libpq: Add service name to PGconn and PQservice()
[pgsql.git] / configure
blob518c33b73a972a530f6fd85f35fbf57bddec4b73
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 18devel.
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
14 # Copyright (c) 1996-2024, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
34 esac
38 as_nl='
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54 else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
86 # IFS
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" "" $as_nl"
93 # Find who we are. Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
104 IFS=$as_save_IFS
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111 as_myself=$0
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there. '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139 # Use a proper internal environment variable to ensure we don't fall
140 # into an infinite loop, continuously re-executing ourselves.
141 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142 _as_can_reexec=no; export _as_can_reexec;
143 # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151 *v*x* | *x*v* ) as_opts=-vx ;;
152 *v* ) as_opts=-v ;;
153 *x* ) as_opts=-x ;;
154 * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
162 # We don't want this to propagate to other subprocesses.
163 { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 emulate sh
167 NULLCMD=:
168 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169 # is contrary to our usage. Disable this feature.
170 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 setopt NO_GLOB_SUBST
172 else
173 case \`(set -o) 2>/dev/null\` in #(
174 *posix*) :
175 set -o posix ;; #(
176 *) :
178 esac
181 as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
194 else
195 exitcode=1; echo positional parameters were not saved.
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204 if (eval "$as_required") 2>/dev/null; then :
205 as_have_required=yes
206 else
207 as_have_required=no
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
211 else
212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
221 for as_base in sh bash ksh sh5; do
222 # Try only shells that exist, to save several forks.
223 as_shell=$as_dir/$as_base
224 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 CONFIG_SHELL=$as_shell as_have_required=yes
227 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228 break 2
231 done;;
232 esac
233 as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237 CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
242 if test "x$CONFIG_SHELL" != x; then :
243 export CONFIG_SHELL
244 # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252 *v*x* | *x*v* ) as_opts=-vx ;;
253 *v* ) as_opts=-v ;;
254 *x* ) as_opts=-x ;;
255 * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
264 if test x$as_have_required = xno; then :
265 $as_echo "$0: This script requires a shell more modern than all"
266 $as_echo "$0: the shells that I found on your system."
267 if test x${ZSH_VERSION+set} = xset ; then
268 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270 else
271 $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@lists.postgresql.org about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
277 exit 1
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
295 { eval $1=; unset $1;}
297 as_unset=as_fn_unset
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
304 return $1
305 } # as_fn_set_status
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
323 case $as_dir in #(
324 -*) as_dir=./$as_dir;;
325 esac
326 test -d "$as_dir" || eval $as_mkdir_p || {
327 as_dirs=
328 while :; do
329 case $as_dir in #(
330 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 *) as_qdir=$as_dir;;
332 esac
333 as_dirs="'$as_qdir' $as_dirs"
334 as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336 X"$as_dir" : 'X\(//\)[^/]' \| \
337 X"$as_dir" : 'X\(//\)$' \| \
338 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341 s//\1/
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
348 /^X\(\/\/\)$/{
349 s//\1/
352 /^X\(\/\).*/{
353 s//\1/
356 s/.*/./; q'`
357 test -d "$as_dir" && break
358 done
359 test -z "$as_dirs" || eval "mkdir $as_dirs"
360 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 } # as_fn_mkdir_p
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
370 test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379 eval 'as_fn_append ()
381 eval $1+=\$2
383 else
384 as_fn_append ()
386 eval $1=\$$1\$2
388 fi # as_fn_append
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396 eval 'as_fn_arith ()
398 as_val=$(( $* ))
400 else
401 as_fn_arith ()
403 as_val=`expr "$@" || test $? -eq 1`
405 fi # as_fn_arith
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
415 as_status=$1; test $as_status -eq 0 && as_status=1
416 if test "$4"; then
417 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422 } # as_fn_error
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425 test "X`expr 00001 : '.*\(...\)'`" = X001; then
426 as_expr=expr
427 else
428 as_expr=false
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 as_basename=basename
433 else
434 as_basename=false
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438 as_dirname=dirname
439 else
440 as_dirname=false
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445 X"$0" : 'X\(//\)$' \| \
446 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448 sed '/^.*\/\([^/][^/]*\)\/*$/{
449 s//\1/
452 /^X\/\(\/\/\)$/{
453 s//\1/
456 /^X\/\(\/\).*/{
457 s//\1/
460 s/.*/./; q'`
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
470 as_lineno_1=$LINENO as_lineno_1a=$LINENO
471 as_lineno_2=$LINENO as_lineno_2a=$LINENO
472 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
475 sed -n '
477 /[$]LINENO/=
478 ' <$as_myself |
479 sed '
480 s/[$]LINENO.*/&-/
481 t lineno
483 :lineno
485 :loop
486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487 t loop
488 s/-\n.*//
489 ' >$as_me.lineno &&
490 chmod +x "$as_me.lineno" ||
491 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
493 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494 # already done that, so ensure we don't try to do so again and fall
495 # in an infinite loop. This has already happened in practice.
496 _as_can_reexec=no; export _as_can_reexec
497 # Don't try to exec as it changes $[0], causing all sort of problems
498 # (the dirname of $[0] is not the place where we might find the
499 # original and so on. Autoconf is especially sensitive to this).
500 . "./$as_me.lineno"
501 # Exit status is that of the last command.
502 exit
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508 case `echo 'xy\c'` in
509 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
510 xy) ECHO_C='\c';;
511 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
512 ECHO_T=' ';;
513 esac;;
515 ECHO_N='-n';;
516 esac
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520 rm -f conf$$.dir/conf$$.file
521 else
522 rm -f conf$$.dir
523 mkdir conf$$.dir 2>/dev/null
525 if (echo >conf$$.file) 2>/dev/null; then
526 if ln -s conf$$.file conf$$ 2>/dev/null; then
527 as_ln_s='ln -s'
528 # ... but there are two gotchas:
529 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531 # In both cases, we have to default to `cp -pR'.
532 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533 as_ln_s='cp -pR'
534 elif ln conf$$.file conf$$ 2>/dev/null; then
535 as_ln_s=ln
536 else
537 as_ln_s='cp -pR'
539 else
540 as_ln_s='cp -pR'
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
545 if mkdir -p . 2>/dev/null; then
546 as_mkdir_p='mkdir -p "$as_dir"'
547 else
548 test -d ./-p && rmdir ./-p
549 as_mkdir_p=false
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 # Initializations.
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='18devel'
586 PACKAGE_STRING='PostgreSQL 18devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 LDFLAGS_EX_BE
633 PROVE
634 DBTOEPUB
636 XSLTPROC
637 XMLLINT
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_CRC
650 LIBOBJS
651 OPENSSL
652 ZSTD
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 with_ssl
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 EGREP
663 GREP
666 python_additional_libs
667 python_libspec
668 python_libdir
669 python_includespec
670 python_version
671 python_majorversion
672 PYTHON
673 perl_embed_ldflags
674 perl_embed_ccflags
675 perl_includespec
676 perl_useshrplib
677 perl_privlibexp
678 perl_archlibexp
679 PERL
680 FLEXFLAGS
681 FLEX
682 BISONFLAGS
683 BISON
684 MKDIR_P
685 LN_S
687 install_bin
688 INSTALL_DATA
689 INSTALL_SCRIPT
690 INSTALL_PROGRAM
691 WINDRES
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 LDFLAGS_SL
697 LDFLAGS_EX
698 ZSTD_LIBS
699 ZSTD_CFLAGS
700 with_zstd
701 LZ4_LIBS
702 LZ4_CFLAGS
703 with_lz4
704 with_zlib
705 with_system_tzdata
706 with_libxslt
707 XML2_LIBS
708 XML2_CFLAGS
709 XML2_CONFIG
710 with_libxml
711 with_uuid
712 with_readline
713 with_systemd
714 with_selinux
715 with_ldap
716 with_krb_srvnam
717 krb_srvtab
718 with_gssapi
719 with_python
720 with_perl
721 with_tcl
722 ICU_LIBS
723 ICU_CFLAGS
724 with_icu
725 autodepend
726 PKG_CONFIG_LIBDIR
727 PKG_CONFIG_PATH
728 PKG_CONFIG
729 DLSUFFIX
733 CFLAGS_SL
734 BITCODE_CXXFLAGS
735 BITCODE_CFLAGS
736 CXXFLAGS_SL_MODULE
737 CFLAGS_SL_MODULE
738 CFLAGS_VECTORIZE
739 CFLAGS_UNROLL_LOOPS
740 PERMIT_MISSING_VARIABLE_DECLARATIONS
741 PERMIT_DECLARATION_AFTER_STATEMENT
742 LLVM_BINPATH
743 LLVM_CXXFLAGS
744 LLVM_CFLAGS
745 LLVM_CPPFLAGS
746 LLVM_LIBS
747 CLANG
748 LLVM_CONFIG
750 with_llvm
751 SUN_STUDIO_CC
752 ac_ct_CXX
753 CXXFLAGS
755 OBJEXT
756 EXEEXT
757 ac_ct_CC
758 CPPFLAGS
759 LDFLAGS
760 CFLAGS
762 enable_injection_points
763 PG_TEST_EXTRA
764 enable_tap_tests
765 enable_dtrace
766 DTRACEFLAGS
767 DTRACE
768 enable_coverage
769 GENHTML
770 LCOV
771 GCOV
772 enable_debug
773 enable_rpath
774 default_port
775 WANTED_LANGUAGES
776 enable_nls
777 PORTNAME
778 host_os
779 host_vendor
780 host_cpu
781 host
782 build_os
783 build_vendor
784 build_cpu
785 build
786 PG_MAJORVERSION
787 target_alias
788 host_alias
789 build_alias
790 LIBS
791 ECHO_T
792 ECHO_N
793 ECHO_C
794 DEFS
795 mandir
796 localedir
797 libdir
798 psdir
799 pdfdir
800 dvidir
801 htmldir
802 infodir
803 docdir
804 oldincludedir
805 includedir
806 localstatedir
807 sharedstatedir
808 sysconfdir
809 datadir
810 datarootdir
811 libexecdir
812 sbindir
813 bindir
814 program_transform_name
815 prefix
816 exec_prefix
817 PACKAGE_URL
818 PACKAGE_BUGREPORT
819 PACKAGE_STRING
820 PACKAGE_VERSION
821 PACKAGE_TARNAME
822 PACKAGE_NAME
823 PATH_SEPARATOR
824 SHELL'
825 ac_subst_files=''
826 ac_user_opts='
827 enable_option_checking
828 with_extra_version
829 with_template
830 with_includes
831 with_libraries
832 with_libs
833 enable_integer_datetimes
834 enable_nls
835 with_pgport
836 enable_rpath
837 enable_debug
838 enable_profiling
839 enable_coverage
840 enable_dtrace
841 enable_tap_tests
842 enable_injection_points
843 with_blocksize
844 with_segsize
845 with_segsize_blocks
846 with_wal_blocksize
847 with_llvm
848 enable_depend
849 enable_cassert
850 with_icu
851 with_tcl
852 with_tclconfig
853 with_perl
854 with_python
855 with_gssapi
856 with_krb_srvnam
857 with_pam
858 with_bsd_auth
859 with_ldap
860 with_bonjour
861 with_selinux
862 with_systemd
863 with_readline
864 with_libedit_preferred
865 with_uuid
866 with_ossp_uuid
867 with_libxml
868 with_libxslt
869 with_system_tzdata
870 with_zlib
871 with_lz4
872 with_zstd
873 with_ssl
874 with_openssl
875 enable_largefile
877 ac_precious_vars='build_alias
878 host_alias
879 target_alias
880 PG_TEST_EXTRA
882 CFLAGS
883 LDFLAGS
884 LIBS
885 CPPFLAGS
887 CXXFLAGS
889 LLVM_CONFIG
890 CLANG
892 PKG_CONFIG
893 PKG_CONFIG_PATH
894 PKG_CONFIG_LIBDIR
895 ICU_CFLAGS
896 ICU_LIBS
897 XML2_CONFIG
898 XML2_CFLAGS
899 XML2_LIBS
900 LZ4_CFLAGS
901 LZ4_LIBS
902 ZSTD_CFLAGS
903 ZSTD_LIBS
904 LDFLAGS_EX
905 LDFLAGS_SL
906 PERL
907 PYTHON
908 MSGFMT
909 TCLSH'
912 # Initialize some variables set by options.
913 ac_init_help=
914 ac_init_version=false
915 ac_unrecognized_opts=
916 ac_unrecognized_sep=
917 # The variables have the same names as the options, with
918 # dashes changed to underlines.
919 cache_file=/dev/null
920 exec_prefix=NONE
921 no_create=
922 no_recursion=
923 prefix=NONE
924 program_prefix=NONE
925 program_suffix=NONE
926 program_transform_name=s,x,x,
927 silent=
928 site=
929 srcdir=
930 verbose=
931 x_includes=NONE
932 x_libraries=NONE
934 # Installation directory options.
935 # These are left unexpanded so users can "make install exec_prefix=/foo"
936 # and all the variables that are supposed to be based on exec_prefix
937 # by default will actually change.
938 # Use braces instead of parens because sh, perl, etc. also accept them.
939 # (The list follows the same order as the GNU Coding Standards.)
940 bindir='${exec_prefix}/bin'
941 sbindir='${exec_prefix}/sbin'
942 libexecdir='${exec_prefix}/libexec'
943 datarootdir='${prefix}/share'
944 datadir='${datarootdir}'
945 sysconfdir='${prefix}/etc'
946 sharedstatedir='${prefix}/com'
947 localstatedir='${prefix}/var'
948 includedir='${prefix}/include'
949 oldincludedir='/usr/include'
950 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
951 infodir='${datarootdir}/info'
952 htmldir='${docdir}'
953 dvidir='${docdir}'
954 pdfdir='${docdir}'
955 psdir='${docdir}'
956 libdir='${exec_prefix}/lib'
957 localedir='${datarootdir}/locale'
958 mandir='${datarootdir}/man'
960 ac_prev=
961 ac_dashdash=
962 for ac_option
964 # If the previous option needs an argument, assign it.
965 if test -n "$ac_prev"; then
966 eval $ac_prev=\$ac_option
967 ac_prev=
968 continue
971 case $ac_option in
972 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
973 *=) ac_optarg= ;;
974 *) ac_optarg=yes ;;
975 esac
977 # Accept the important Cygnus configure options, so we can diagnose typos.
979 case $ac_dashdash$ac_option in
981 ac_dashdash=yes ;;
983 -bindir | --bindir | --bindi | --bind | --bin | --bi)
984 ac_prev=bindir ;;
985 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
986 bindir=$ac_optarg ;;
988 -build | --build | --buil | --bui | --bu)
989 ac_prev=build_alias ;;
990 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
991 build_alias=$ac_optarg ;;
993 -cache-file | --cache-file | --cache-fil | --cache-fi \
994 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
995 ac_prev=cache_file ;;
996 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
997 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
998 cache_file=$ac_optarg ;;
1000 --config-cache | -C)
1001 cache_file=config.cache ;;
1003 -datadir | --datadir | --datadi | --datad)
1004 ac_prev=datadir ;;
1005 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1006 datadir=$ac_optarg ;;
1008 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1009 | --dataroo | --dataro | --datar)
1010 ac_prev=datarootdir ;;
1011 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1012 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1013 datarootdir=$ac_optarg ;;
1015 -disable-* | --disable-*)
1016 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1017 # Reject names that are not valid shell variable names.
1018 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1019 as_fn_error $? "invalid feature name: $ac_useropt"
1020 ac_useropt_orig=$ac_useropt
1021 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1022 case $ac_user_opts in
1024 "enable_$ac_useropt"
1025 "*) ;;
1026 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1027 ac_unrecognized_sep=', ';;
1028 esac
1029 eval enable_$ac_useropt=no ;;
1031 -docdir | --docdir | --docdi | --doc | --do)
1032 ac_prev=docdir ;;
1033 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1034 docdir=$ac_optarg ;;
1036 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1037 ac_prev=dvidir ;;
1038 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1039 dvidir=$ac_optarg ;;
1041 -enable-* | --enable-*)
1042 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1043 # Reject names that are not valid shell variable names.
1044 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1045 as_fn_error $? "invalid feature name: $ac_useropt"
1046 ac_useropt_orig=$ac_useropt
1047 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1048 case $ac_user_opts in
1050 "enable_$ac_useropt"
1051 "*) ;;
1052 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1053 ac_unrecognized_sep=', ';;
1054 esac
1055 eval enable_$ac_useropt=\$ac_optarg ;;
1057 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1058 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1059 | --exec | --exe | --ex)
1060 ac_prev=exec_prefix ;;
1061 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1062 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1063 | --exec=* | --exe=* | --ex=*)
1064 exec_prefix=$ac_optarg ;;
1066 -gas | --gas | --ga | --g)
1067 # Obsolete; use --with-gas.
1068 with_gas=yes ;;
1070 -help | --help | --hel | --he | -h)
1071 ac_init_help=long ;;
1072 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1073 ac_init_help=recursive ;;
1074 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1075 ac_init_help=short ;;
1077 -host | --host | --hos | --ho)
1078 ac_prev=host_alias ;;
1079 -host=* | --host=* | --hos=* | --ho=*)
1080 host_alias=$ac_optarg ;;
1082 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1083 ac_prev=htmldir ;;
1084 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1085 | --ht=*)
1086 htmldir=$ac_optarg ;;
1088 -includedir | --includedir | --includedi | --included | --include \
1089 | --includ | --inclu | --incl | --inc)
1090 ac_prev=includedir ;;
1091 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1092 | --includ=* | --inclu=* | --incl=* | --inc=*)
1093 includedir=$ac_optarg ;;
1095 -infodir | --infodir | --infodi | --infod | --info | --inf)
1096 ac_prev=infodir ;;
1097 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1098 infodir=$ac_optarg ;;
1100 -libdir | --libdir | --libdi | --libd)
1101 ac_prev=libdir ;;
1102 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1103 libdir=$ac_optarg ;;
1105 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1106 | --libexe | --libex | --libe)
1107 ac_prev=libexecdir ;;
1108 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1109 | --libexe=* | --libex=* | --libe=*)
1110 libexecdir=$ac_optarg ;;
1112 -localedir | --localedir | --localedi | --localed | --locale)
1113 ac_prev=localedir ;;
1114 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1115 localedir=$ac_optarg ;;
1117 -localstatedir | --localstatedir | --localstatedi | --localstated \
1118 | --localstate | --localstat | --localsta | --localst | --locals)
1119 ac_prev=localstatedir ;;
1120 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1121 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1122 localstatedir=$ac_optarg ;;
1124 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1125 ac_prev=mandir ;;
1126 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1127 mandir=$ac_optarg ;;
1129 -nfp | --nfp | --nf)
1130 # Obsolete; use --without-fp.
1131 with_fp=no ;;
1133 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1134 | --no-cr | --no-c | -n)
1135 no_create=yes ;;
1137 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1138 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1139 no_recursion=yes ;;
1141 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1142 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1143 | --oldin | --oldi | --old | --ol | --o)
1144 ac_prev=oldincludedir ;;
1145 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1146 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1147 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1148 oldincludedir=$ac_optarg ;;
1150 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1151 ac_prev=prefix ;;
1152 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1153 prefix=$ac_optarg ;;
1155 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1156 | --program-pre | --program-pr | --program-p)
1157 ac_prev=program_prefix ;;
1158 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1159 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1160 program_prefix=$ac_optarg ;;
1162 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1163 | --program-suf | --program-su | --program-s)
1164 ac_prev=program_suffix ;;
1165 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1166 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1167 program_suffix=$ac_optarg ;;
1169 -program-transform-name | --program-transform-name \
1170 | --program-transform-nam | --program-transform-na \
1171 | --program-transform-n | --program-transform- \
1172 | --program-transform | --program-transfor \
1173 | --program-transfo | --program-transf \
1174 | --program-trans | --program-tran \
1175 | --progr-tra | --program-tr | --program-t)
1176 ac_prev=program_transform_name ;;
1177 -program-transform-name=* | --program-transform-name=* \
1178 | --program-transform-nam=* | --program-transform-na=* \
1179 | --program-transform-n=* | --program-transform-=* \
1180 | --program-transform=* | --program-transfor=* \
1181 | --program-transfo=* | --program-transf=* \
1182 | --program-trans=* | --program-tran=* \
1183 | --progr-tra=* | --program-tr=* | --program-t=*)
1184 program_transform_name=$ac_optarg ;;
1186 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1187 ac_prev=pdfdir ;;
1188 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1189 pdfdir=$ac_optarg ;;
1191 -psdir | --psdir | --psdi | --psd | --ps)
1192 ac_prev=psdir ;;
1193 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1194 psdir=$ac_optarg ;;
1196 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1197 | -silent | --silent | --silen | --sile | --sil)
1198 silent=yes ;;
1200 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1201 ac_prev=sbindir ;;
1202 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1203 | --sbi=* | --sb=*)
1204 sbindir=$ac_optarg ;;
1206 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1207 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1208 | --sharedst | --shareds | --shared | --share | --shar \
1209 | --sha | --sh)
1210 ac_prev=sharedstatedir ;;
1211 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1212 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1213 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1214 | --sha=* | --sh=*)
1215 sharedstatedir=$ac_optarg ;;
1217 -site | --site | --sit)
1218 ac_prev=site ;;
1219 -site=* | --site=* | --sit=*)
1220 site=$ac_optarg ;;
1222 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1223 ac_prev=srcdir ;;
1224 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1225 srcdir=$ac_optarg ;;
1227 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1228 | --syscon | --sysco | --sysc | --sys | --sy)
1229 ac_prev=sysconfdir ;;
1230 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1231 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1232 sysconfdir=$ac_optarg ;;
1234 -target | --target | --targe | --targ | --tar | --ta | --t)
1235 ac_prev=target_alias ;;
1236 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1237 target_alias=$ac_optarg ;;
1239 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1240 verbose=yes ;;
1242 -version | --version | --versio | --versi | --vers | -V)
1243 ac_init_version=: ;;
1245 -with-* | --with-*)
1246 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1247 # Reject names that are not valid shell variable names.
1248 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1249 as_fn_error $? "invalid package name: $ac_useropt"
1250 ac_useropt_orig=$ac_useropt
1251 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1252 case $ac_user_opts in
1254 "with_$ac_useropt"
1255 "*) ;;
1256 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1257 ac_unrecognized_sep=', ';;
1258 esac
1259 eval with_$ac_useropt=\$ac_optarg ;;
1261 -without-* | --without-*)
1262 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1263 # Reject names that are not valid shell variable names.
1264 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1265 as_fn_error $? "invalid package name: $ac_useropt"
1266 ac_useropt_orig=$ac_useropt
1267 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1268 case $ac_user_opts in
1270 "with_$ac_useropt"
1271 "*) ;;
1272 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1273 ac_unrecognized_sep=', ';;
1274 esac
1275 eval with_$ac_useropt=no ;;
1277 --x)
1278 # Obsolete; use --with-x.
1279 with_x=yes ;;
1281 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1282 | --x-incl | --x-inc | --x-in | --x-i)
1283 ac_prev=x_includes ;;
1284 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1285 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1286 x_includes=$ac_optarg ;;
1288 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1289 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1290 ac_prev=x_libraries ;;
1291 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1292 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1293 x_libraries=$ac_optarg ;;
1295 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1296 Try \`$0 --help' for more information"
1299 *=*)
1300 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1301 # Reject names that are not valid shell variable names.
1302 case $ac_envvar in #(
1303 '' | [0-9]* | *[!_$as_cr_alnum]* )
1304 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1305 esac
1306 eval $ac_envvar=\$ac_optarg
1307 export $ac_envvar ;;
1310 # FIXME: should be removed in autoconf 3.0.
1311 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1312 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1313 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1314 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1317 esac
1318 done
1320 if test -n "$ac_prev"; then
1321 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1322 as_fn_error $? "missing argument to $ac_option"
1325 if test -n "$ac_unrecognized_opts"; then
1326 case $enable_option_checking in
1327 no) ;;
1328 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1329 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1330 esac
1333 # Check all directory arguments for consistency.
1334 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1335 datadir sysconfdir sharedstatedir localstatedir includedir \
1336 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1337 libdir localedir mandir
1339 eval ac_val=\$$ac_var
1340 # Remove trailing slashes.
1341 case $ac_val in
1342 */ )
1343 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1344 eval $ac_var=\$ac_val;;
1345 esac
1346 # Be sure to have absolute directory names.
1347 case $ac_val in
1348 [\\/$]* | ?:[\\/]* ) continue;;
1349 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1350 esac
1351 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1352 done
1354 # There might be people who depend on the old broken behavior: `$host'
1355 # used to hold the argument of --host etc.
1356 # FIXME: To remove some day.
1357 build=$build_alias
1358 host=$host_alias
1359 target=$target_alias
1361 # FIXME: To remove some day.
1362 if test "x$host_alias" != x; then
1363 if test "x$build_alias" = x; then
1364 cross_compiling=maybe
1365 elif test "x$build_alias" != "x$host_alias"; then
1366 cross_compiling=yes
1370 ac_tool_prefix=
1371 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1373 test "$silent" = yes && exec 6>/dev/null
1376 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1377 ac_ls_di=`ls -di .` &&
1378 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1379 as_fn_error $? "working directory cannot be determined"
1380 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1381 as_fn_error $? "pwd does not report name of working directory"
1384 # Find the source files, if location was not specified.
1385 if test -z "$srcdir"; then
1386 ac_srcdir_defaulted=yes
1387 # Try the directory containing this script, then the parent directory.
1388 ac_confdir=`$as_dirname -- "$as_myself" ||
1389 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1390 X"$as_myself" : 'X\(//\)[^/]' \| \
1391 X"$as_myself" : 'X\(//\)$' \| \
1392 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1393 $as_echo X"$as_myself" |
1394 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1395 s//\1/
1398 /^X\(\/\/\)[^/].*/{
1399 s//\1/
1402 /^X\(\/\/\)$/{
1403 s//\1/
1406 /^X\(\/\).*/{
1407 s//\1/
1410 s/.*/./; q'`
1411 srcdir=$ac_confdir
1412 if test ! -r "$srcdir/$ac_unique_file"; then
1413 srcdir=..
1415 else
1416 ac_srcdir_defaulted=no
1418 if test ! -r "$srcdir/$ac_unique_file"; then
1419 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1420 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1422 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1423 ac_abs_confdir=`(
1424 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1425 pwd)`
1426 # When building in place, set srcdir=.
1427 if test "$ac_abs_confdir" = "$ac_pwd"; then
1428 srcdir=.
1430 # Remove unnecessary trailing slashes from srcdir.
1431 # Double slashes in file names in object file debugging info
1432 # mess up M-x gdb in Emacs.
1433 case $srcdir in
1434 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1435 esac
1436 for ac_var in $ac_precious_vars; do
1437 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1438 eval ac_env_${ac_var}_value=\$${ac_var}
1439 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1440 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1441 done
1444 # Report the --help message.
1446 if test "$ac_init_help" = "long"; then
1447 # Omit some internal or obsolete options to make the list less imposing.
1448 # This message is too long to be a string in the A/UX 3.1 sh.
1449 cat <<_ACEOF
1450 \`configure' configures PostgreSQL 18devel to adapt to many kinds of systems.
1452 Usage: $0 [OPTION]... [VAR=VALUE]...
1454 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1455 VAR=VALUE. See below for descriptions of some of the useful variables.
1457 Defaults for the options are specified in brackets.
1459 Configuration:
1460 -h, --help display this help and exit
1461 --help=short display options specific to this package
1462 --help=recursive display the short help of all the included packages
1463 -V, --version display version information and exit
1464 -q, --quiet, --silent do not print \`checking ...' messages
1465 --cache-file=FILE cache test results in FILE [disabled]
1466 -C, --config-cache alias for \`--cache-file=config.cache'
1467 -n, --no-create do not create output files
1468 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1470 Installation directories:
1471 --prefix=PREFIX install architecture-independent files in PREFIX
1472 [$ac_default_prefix]
1473 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1474 [PREFIX]
1476 By default, \`make install' will install all the files in
1477 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1478 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1479 for instance \`--prefix=\$HOME'.
1481 For better control, use the options below.
1483 Fine tuning of the installation directories:
1484 --bindir=DIR user executables [EPREFIX/bin]
1485 --sbindir=DIR system admin executables [EPREFIX/sbin]
1486 --libexecdir=DIR program executables [EPREFIX/libexec]
1487 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1488 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1489 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1490 --libdir=DIR object code libraries [EPREFIX/lib]
1491 --includedir=DIR C header files [PREFIX/include]
1492 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1493 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1494 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1495 --infodir=DIR info documentation [DATAROOTDIR/info]
1496 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1497 --mandir=DIR man documentation [DATAROOTDIR/man]
1498 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1499 --htmldir=DIR html documentation [DOCDIR]
1500 --dvidir=DIR dvi documentation [DOCDIR]
1501 --pdfdir=DIR pdf documentation [DOCDIR]
1502 --psdir=DIR ps documentation [DOCDIR]
1503 _ACEOF
1505 cat <<\_ACEOF
1507 System types:
1508 --build=BUILD configure for building on BUILD [guessed]
1509 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1510 _ACEOF
1513 if test -n "$ac_init_help"; then
1514 case $ac_init_help in
1515 short | recursive ) echo "Configuration of PostgreSQL 18devel:";;
1516 esac
1517 cat <<\_ACEOF
1519 Optional Features:
1520 --disable-option-checking ignore unrecognized --enable/--with options
1521 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1522 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1523 --disable-integer-datetimes
1524 obsolete option, no longer supported
1525 --enable-nls[=LANGUAGES]
1526 enable Native Language Support
1527 --disable-rpath do not embed shared library search path in
1528 executables
1529 --enable-debug build with debugging symbols (-g)
1530 --enable-profiling build with profiling enabled
1531 --enable-coverage build with coverage testing instrumentation
1532 --enable-dtrace build with DTrace support
1533 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1534 --enable-injection-points
1535 enable injection points (for testing)
1536 --enable-depend turn on automatic dependency tracking
1537 --enable-cassert enable assertion checks (for debugging)
1538 --disable-largefile omit support for large files
1540 Optional Packages:
1541 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1542 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1543 --with-extra-version=STRING
1544 append STRING to version
1545 --with-template=NAME override operating system template
1546 --with-includes=DIRS look for additional header files in DIRS
1547 --with-libraries=DIRS look for additional libraries in DIRS
1548 --with-libs=DIRS alternative spelling of --with-libraries
1549 --with-pgport=PORTNUM set default port number [5432]
1550 --with-blocksize=BLOCKSIZE
1551 set table block size in kB [8]
1552 --with-segsize=SEGSIZE set table segment size in GB [1]
1553 --with-segsize-blocks=SEGSIZE_BLOCKS
1554 set table segment size in blocks [0]
1555 --with-wal-blocksize=BLOCKSIZE
1556 set WAL block size in kB [8]
1557 --with-llvm build with LLVM based JIT support
1558 --without-icu build without ICU support
1559 --with-tcl build Tcl modules (PL/Tcl)
1560 --with-tclconfig=DIR tclConfig.sh is in DIR
1561 --with-perl build Perl modules (PL/Perl)
1562 --with-python build Python modules (PL/Python)
1563 --with-gssapi build with GSSAPI support
1564 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1565 [postgres]
1566 --with-pam build with PAM support
1567 --with-bsd-auth build with BSD Authentication support
1568 --with-ldap build with LDAP support
1569 --with-bonjour build with Bonjour support
1570 --with-selinux build with SELinux support
1571 --with-systemd build with systemd support
1572 --without-readline do not use GNU Readline nor BSD Libedit for editing
1573 --with-libedit-preferred
1574 prefer BSD Libedit over GNU Readline
1575 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1576 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1577 --with-libxml build with XML support
1578 --with-libxslt use XSLT support when building contrib/xml2
1579 --with-system-tzdata=DIR
1580 use system time zone data in DIR
1581 --without-zlib do not use Zlib
1582 --with-lz4 build with LZ4 support
1583 --with-zstd build with ZSTD support
1584 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1585 --with-openssl obsolete spelling of --with-ssl=openssl
1587 Some influential environment variables:
1588 PG_TEST_EXTRA
1589 enable selected extra tests (overridden at runtime by
1590 PG_TEST_EXTRA environment variable)
1591 CC C compiler command
1592 CFLAGS C compiler flags
1593 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1594 nonstandard directory <lib dir>
1595 LIBS libraries to pass to the linker, e.g. -l<library>
1596 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1597 you have headers in a nonstandard directory <include dir>
1598 CXX C++ compiler command
1599 CXXFLAGS C++ compiler flags
1600 LLVM_CONFIG path to llvm-config command
1601 CLANG path to clang compiler to generate bitcode
1602 CPP C preprocessor
1603 PKG_CONFIG path to pkg-config utility
1604 PKG_CONFIG_PATH
1605 directories to add to pkg-config's search path
1606 PKG_CONFIG_LIBDIR
1607 path overriding pkg-config's built-in search path
1608 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1609 ICU_LIBS linker flags for ICU, overriding pkg-config
1610 XML2_CONFIG path to xml2-config utility
1611 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1612 XML2_LIBS linker flags for XML2, overriding pkg-config
1613 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1614 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1615 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1616 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1617 LDFLAGS_EX extra linker flags for linking executables only
1618 LDFLAGS_SL extra linker flags for linking shared libraries only
1619 PERL Perl program
1620 PYTHON Python program
1621 MSGFMT msgfmt program for NLS
1622 TCLSH Tcl interpreter program (tclsh)
1624 Use these variables to override the choices made by `configure' or to help
1625 it to find libraries and programs with nonstandard names/locations.
1627 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1628 PostgreSQL home page: <https://www.postgresql.org/>.
1629 _ACEOF
1630 ac_status=$?
1633 if test "$ac_init_help" = "recursive"; then
1634 # If there are subdirs, report their specific --help.
1635 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1636 test -d "$ac_dir" ||
1637 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1638 continue
1639 ac_builddir=.
1641 case "$ac_dir" in
1642 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1644 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1645 # A ".." for each directory in $ac_dir_suffix.
1646 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1647 case $ac_top_builddir_sub in
1648 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1649 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1650 esac ;;
1651 esac
1652 ac_abs_top_builddir=$ac_pwd
1653 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1654 # for backward compatibility:
1655 ac_top_builddir=$ac_top_build_prefix
1657 case $srcdir in
1658 .) # We are building in place.
1659 ac_srcdir=.
1660 ac_top_srcdir=$ac_top_builddir_sub
1661 ac_abs_top_srcdir=$ac_pwd ;;
1662 [\\/]* | ?:[\\/]* ) # Absolute name.
1663 ac_srcdir=$srcdir$ac_dir_suffix;
1664 ac_top_srcdir=$srcdir
1665 ac_abs_top_srcdir=$srcdir ;;
1666 *) # Relative name.
1667 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1668 ac_top_srcdir=$ac_top_build_prefix$srcdir
1669 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1670 esac
1671 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1673 cd "$ac_dir" || { ac_status=$?; continue; }
1674 # Check for guested configure.
1675 if test -f "$ac_srcdir/configure.gnu"; then
1676 echo &&
1677 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1678 elif test -f "$ac_srcdir/configure"; then
1679 echo &&
1680 $SHELL "$ac_srcdir/configure" --help=recursive
1681 else
1682 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1683 fi || ac_status=$?
1684 cd "$ac_pwd" || { ac_status=$?; break; }
1685 done
1688 test -n "$ac_init_help" && exit $ac_status
1689 if $ac_init_version; then
1690 cat <<\_ACEOF
1691 PostgreSQL configure 18devel
1692 generated by GNU Autoconf 2.69
1694 Copyright (C) 2012 Free Software Foundation, Inc.
1695 This configure script is free software; the Free Software Foundation
1696 gives unlimited permission to copy, distribute and modify it.
1698 Copyright (c) 1996-2024, PostgreSQL Global Development Group
1699 _ACEOF
1700 exit
1703 ## ------------------------ ##
1704 ## Autoconf initialization. ##
1705 ## ------------------------ ##
1707 # ac_fn_c_try_compile LINENO
1708 # --------------------------
1709 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1710 ac_fn_c_try_compile ()
1712 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1713 rm -f conftest.$ac_objext
1714 if { { ac_try="$ac_compile"
1715 case "(($ac_try" in
1716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1717 *) ac_try_echo=$ac_try;;
1718 esac
1719 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1720 $as_echo "$ac_try_echo"; } >&5
1721 (eval "$ac_compile") 2>conftest.err
1722 ac_status=$?
1723 if test -s conftest.err; then
1724 grep -v '^ *+' conftest.err >conftest.er1
1725 cat conftest.er1 >&5
1726 mv -f conftest.er1 conftest.err
1728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1729 test $ac_status = 0; } && {
1730 test -z "$ac_c_werror_flag" ||
1731 test ! -s conftest.err
1732 } && test -s conftest.$ac_objext; then :
1733 ac_retval=0
1734 else
1735 $as_echo "$as_me: failed program was:" >&5
1736 sed 's/^/| /' conftest.$ac_ext >&5
1738 ac_retval=1
1740 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1741 as_fn_set_status $ac_retval
1743 } # ac_fn_c_try_compile
1745 # ac_fn_cxx_try_compile LINENO
1746 # ----------------------------
1747 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1748 ac_fn_cxx_try_compile ()
1750 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1751 rm -f conftest.$ac_objext
1752 if { { ac_try="$ac_compile"
1753 case "(($ac_try" in
1754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1755 *) ac_try_echo=$ac_try;;
1756 esac
1757 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1758 $as_echo "$ac_try_echo"; } >&5
1759 (eval "$ac_compile") 2>conftest.err
1760 ac_status=$?
1761 if test -s conftest.err; then
1762 grep -v '^ *+' conftest.err >conftest.er1
1763 cat conftest.er1 >&5
1764 mv -f conftest.er1 conftest.err
1766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1767 test $ac_status = 0; } && {
1768 test -z "$ac_cxx_werror_flag" ||
1769 test ! -s conftest.err
1770 } && test -s conftest.$ac_objext; then :
1771 ac_retval=0
1772 else
1773 $as_echo "$as_me: failed program was:" >&5
1774 sed 's/^/| /' conftest.$ac_ext >&5
1776 ac_retval=1
1778 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1779 as_fn_set_status $ac_retval
1781 } # ac_fn_cxx_try_compile
1783 # ac_fn_c_try_link LINENO
1784 # -----------------------
1785 # Try to link conftest.$ac_ext, and return whether this succeeded.
1786 ac_fn_c_try_link ()
1788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789 rm -f conftest.$ac_objext conftest$ac_exeext
1790 if { { ac_try="$ac_link"
1791 case "(($ac_try" in
1792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1793 *) ac_try_echo=$ac_try;;
1794 esac
1795 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1796 $as_echo "$ac_try_echo"; } >&5
1797 (eval "$ac_link") 2>conftest.err
1798 ac_status=$?
1799 if test -s conftest.err; then
1800 grep -v '^ *+' conftest.err >conftest.er1
1801 cat conftest.er1 >&5
1802 mv -f conftest.er1 conftest.err
1804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805 test $ac_status = 0; } && {
1806 test -z "$ac_c_werror_flag" ||
1807 test ! -s conftest.err
1808 } && test -s conftest$ac_exeext && {
1809 test "$cross_compiling" = yes ||
1810 test -x conftest$ac_exeext
1811 }; then :
1812 ac_retval=0
1813 else
1814 $as_echo "$as_me: failed program was:" >&5
1815 sed 's/^/| /' conftest.$ac_ext >&5
1817 ac_retval=1
1819 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1820 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1821 # interfere with the next link command; also delete a directory that is
1822 # left behind by Apple's compiler. We do this before executing the actions.
1823 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1824 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1825 as_fn_set_status $ac_retval
1827 } # ac_fn_c_try_link
1829 # ac_fn_c_try_cpp LINENO
1830 # ----------------------
1831 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1832 ac_fn_c_try_cpp ()
1834 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1835 if { { ac_try="$ac_cpp conftest.$ac_ext"
1836 case "(($ac_try" in
1837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1838 *) ac_try_echo=$ac_try;;
1839 esac
1840 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1841 $as_echo "$ac_try_echo"; } >&5
1842 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1843 ac_status=$?
1844 if test -s conftest.err; then
1845 grep -v '^ *+' conftest.err >conftest.er1
1846 cat conftest.er1 >&5
1847 mv -f conftest.er1 conftest.err
1849 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1850 test $ac_status = 0; } > conftest.i && {
1851 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1852 test ! -s conftest.err
1853 }; then :
1854 ac_retval=0
1855 else
1856 $as_echo "$as_me: failed program was:" >&5
1857 sed 's/^/| /' conftest.$ac_ext >&5
1859 ac_retval=1
1861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1862 as_fn_set_status $ac_retval
1864 } # ac_fn_c_try_cpp
1866 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1867 # -------------------------------------------------------
1868 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1869 # the include files in INCLUDES and setting the cache variable VAR
1870 # accordingly.
1871 ac_fn_c_check_header_mongrel ()
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 if eval \${$3+:} false; then :
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876 $as_echo_n "checking for $2... " >&6; }
1877 if eval \${$3+:} false; then :
1878 $as_echo_n "(cached) " >&6
1880 eval ac_res=\$$3
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882 $as_echo "$ac_res" >&6; }
1883 else
1884 # Is the header compilable?
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1886 $as_echo_n "checking $2 usability... " >&6; }
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888 /* end confdefs.h. */
1890 #include <$2>
1891 _ACEOF
1892 if ac_fn_c_try_compile "$LINENO"; then :
1893 ac_header_compiler=yes
1894 else
1895 ac_header_compiler=no
1897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1899 $as_echo "$ac_header_compiler" >&6; }
1901 # Is the header present?
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1903 $as_echo_n "checking $2 presence... " >&6; }
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905 /* end confdefs.h. */
1906 #include <$2>
1907 _ACEOF
1908 if ac_fn_c_try_cpp "$LINENO"; then :
1909 ac_header_preproc=yes
1910 else
1911 ac_header_preproc=no
1913 rm -f conftest.err conftest.i conftest.$ac_ext
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1915 $as_echo "$ac_header_preproc" >&6; }
1917 # So? What about this header?
1918 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1919 yes:no: )
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1921 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1923 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1925 no:yes:* )
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1927 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1929 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1931 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1933 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1935 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1936 ( $as_echo "## ---------------------------------------------- ##
1937 ## Report this to pgsql-bugs@lists.postgresql.org ##
1938 ## ---------------------------------------------- ##"
1939 ) | sed "s/^/$as_me: WARNING: /" >&2
1941 esac
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943 $as_echo_n "checking for $2... " >&6; }
1944 if eval \${$3+:} false; then :
1945 $as_echo_n "(cached) " >&6
1946 else
1947 eval "$3=\$ac_header_compiler"
1949 eval ac_res=\$$3
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1951 $as_echo "$ac_res" >&6; }
1953 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1955 } # ac_fn_c_check_header_mongrel
1957 # ac_fn_c_try_run LINENO
1958 # ----------------------
1959 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1960 # that executables *can* be run.
1961 ac_fn_c_try_run ()
1963 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964 if { { ac_try="$ac_link"
1965 case "(($ac_try" in
1966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967 *) ac_try_echo=$ac_try;;
1968 esac
1969 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970 $as_echo "$ac_try_echo"; } >&5
1971 (eval "$ac_link") 2>&5
1972 ac_status=$?
1973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1974 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1975 { { case "(($ac_try" in
1976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1977 *) ac_try_echo=$ac_try;;
1978 esac
1979 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1980 $as_echo "$ac_try_echo"; } >&5
1981 (eval "$ac_try") 2>&5
1982 ac_status=$?
1983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1984 test $ac_status = 0; }; }; then :
1985 ac_retval=0
1986 else
1987 $as_echo "$as_me: program exited with status $ac_status" >&5
1988 $as_echo "$as_me: failed program was:" >&5
1989 sed 's/^/| /' conftest.$ac_ext >&5
1991 ac_retval=$ac_status
1993 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1994 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1995 as_fn_set_status $ac_retval
1997 } # ac_fn_c_try_run
1999 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2000 # -------------------------------------------------------
2001 # Tests whether HEADER exists and can be compiled using the include files in
2002 # INCLUDES, setting the cache variable VAR accordingly.
2003 ac_fn_c_check_header_compile ()
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2007 $as_echo_n "checking for $2... " >&6; }
2008 if eval \${$3+:} false; then :
2009 $as_echo_n "(cached) " >&6
2010 else
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012 /* end confdefs.h. */
2014 #include <$2>
2015 _ACEOF
2016 if ac_fn_c_try_compile "$LINENO"; then :
2017 eval "$3=yes"
2018 else
2019 eval "$3=no"
2021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2023 eval ac_res=\$$3
2024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2025 $as_echo "$ac_res" >&6; }
2026 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2028 } # ac_fn_c_check_header_compile
2030 # ac_fn_c_check_func LINENO FUNC VAR
2031 # ----------------------------------
2032 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2033 ac_fn_c_check_func ()
2035 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2037 $as_echo_n "checking for $2... " >&6; }
2038 if eval \${$3+:} false; then :
2039 $as_echo_n "(cached) " >&6
2040 else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042 /* end confdefs.h. */
2043 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2044 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2045 #define $2 innocuous_$2
2047 /* System header to define __stub macros and hopefully few prototypes,
2048 which can conflict with char $2 (); below.
2049 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2050 <limits.h> exists even on freestanding compilers. */
2052 #ifdef __STDC__
2053 # include <limits.h>
2054 #else
2055 # include <assert.h>
2056 #endif
2058 #undef $2
2060 /* Override any GCC internal prototype to avoid an error.
2061 Use char because int might match the return type of a GCC
2062 builtin and then its argument prototype would still apply. */
2063 #ifdef __cplusplus
2064 extern "C"
2065 #endif
2066 char $2 ();
2067 /* The GNU C library defines this for functions which it implements
2068 to always fail with ENOSYS. Some functions are actually named
2069 something starting with __ and the normal name is an alias. */
2070 #if defined __stub_$2 || defined __stub___$2
2071 choke me
2072 #endif
2075 main ()
2077 return $2 ();
2079 return 0;
2081 _ACEOF
2082 if ac_fn_c_try_link "$LINENO"; then :
2083 eval "$3=yes"
2084 else
2085 eval "$3=no"
2087 rm -f core conftest.err conftest.$ac_objext \
2088 conftest$ac_exeext conftest.$ac_ext
2090 eval ac_res=\$$3
2091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2092 $as_echo "$ac_res" >&6; }
2093 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2095 } # ac_fn_c_check_func
2097 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2098 # ----------------------------------------------------
2099 # Tries to find if the field MEMBER exists in type AGGR, after including
2100 # INCLUDES, setting cache variable VAR accordingly.
2101 ac_fn_c_check_member ()
2103 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2105 $as_echo_n "checking for $2.$3... " >&6; }
2106 if eval \${$4+:} false; then :
2107 $as_echo_n "(cached) " >&6
2108 else
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110 /* end confdefs.h. */
2113 main ()
2115 static $2 ac_aggr;
2116 if (ac_aggr.$3)
2117 return 0;
2119 return 0;
2121 _ACEOF
2122 if ac_fn_c_try_compile "$LINENO"; then :
2123 eval "$4=yes"
2124 else
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126 /* end confdefs.h. */
2129 main ()
2131 static $2 ac_aggr;
2132 if (sizeof ac_aggr.$3)
2133 return 0;
2135 return 0;
2137 _ACEOF
2138 if ac_fn_c_try_compile "$LINENO"; then :
2139 eval "$4=yes"
2140 else
2141 eval "$4=no"
2143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147 eval ac_res=\$$4
2148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2149 $as_echo "$ac_res" >&6; }
2150 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2152 } # ac_fn_c_check_member
2154 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2155 # -------------------------------------------
2156 # Tests whether TYPE exists after having included INCLUDES, setting cache
2157 # variable VAR accordingly.
2158 ac_fn_c_check_type ()
2160 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2162 $as_echo_n "checking for $2... " >&6; }
2163 if eval \${$3+:} false; then :
2164 $as_echo_n "(cached) " >&6
2165 else
2166 eval "$3=no"
2167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168 /* end confdefs.h. */
2171 main ()
2173 if (sizeof ($2))
2174 return 0;
2176 return 0;
2178 _ACEOF
2179 if ac_fn_c_try_compile "$LINENO"; then :
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181 /* end confdefs.h. */
2184 main ()
2186 if (sizeof (($2)))
2187 return 0;
2189 return 0;
2191 _ACEOF
2192 if ac_fn_c_try_compile "$LINENO"; then :
2194 else
2195 eval "$3=yes"
2197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201 eval ac_res=\$$3
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2203 $as_echo "$ac_res" >&6; }
2204 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2206 } # ac_fn_c_check_type
2208 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2209 # --------------------------------------------
2210 # Tries to find the compile-time value of EXPR in a program that includes
2211 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2212 # computed
2213 ac_fn_c_compute_int ()
2215 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2216 if test "$cross_compiling" = yes; then
2217 # Depending upon the size, compute the lo and hi bounds.
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219 /* end confdefs.h. */
2222 main ()
2224 static int test_array [1 - 2 * !(($2) >= 0)];
2225 test_array [0] = 0;
2226 return test_array [0];
2229 return 0;
2231 _ACEOF
2232 if ac_fn_c_try_compile "$LINENO"; then :
2233 ac_lo=0 ac_mid=0
2234 while :; do
2235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236 /* end confdefs.h. */
2239 main ()
2241 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2242 test_array [0] = 0;
2243 return test_array [0];
2246 return 0;
2248 _ACEOF
2249 if ac_fn_c_try_compile "$LINENO"; then :
2250 ac_hi=$ac_mid; break
2251 else
2252 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2253 if test $ac_lo -le $ac_mid; then
2254 ac_lo= ac_hi=
2255 break
2257 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2260 done
2261 else
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263 /* end confdefs.h. */
2266 main ()
2268 static int test_array [1 - 2 * !(($2) < 0)];
2269 test_array [0] = 0;
2270 return test_array [0];
2273 return 0;
2275 _ACEOF
2276 if ac_fn_c_try_compile "$LINENO"; then :
2277 ac_hi=-1 ac_mid=-1
2278 while :; do
2279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280 /* end confdefs.h. */
2283 main ()
2285 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2286 test_array [0] = 0;
2287 return test_array [0];
2290 return 0;
2292 _ACEOF
2293 if ac_fn_c_try_compile "$LINENO"; then :
2294 ac_lo=$ac_mid; break
2295 else
2296 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2297 if test $ac_mid -le $ac_hi; then
2298 ac_lo= ac_hi=
2299 break
2301 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304 done
2305 else
2306 ac_lo= ac_hi=
2308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311 # Binary search between lo and hi bounds.
2312 while test "x$ac_lo" != "x$ac_hi"; do
2313 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315 /* end confdefs.h. */
2318 main ()
2320 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2321 test_array [0] = 0;
2322 return test_array [0];
2325 return 0;
2327 _ACEOF
2328 if ac_fn_c_try_compile "$LINENO"; then :
2329 ac_hi=$ac_mid
2330 else
2331 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334 done
2335 case $ac_lo in #((
2336 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2337 '') ac_retval=1 ;;
2338 esac
2339 else
2340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341 /* end confdefs.h. */
2343 static long int longval () { return $2; }
2344 static unsigned long int ulongval () { return $2; }
2345 #include <stdio.h>
2346 #include <stdlib.h>
2348 main ()
2351 FILE *f = fopen ("conftest.val", "w");
2352 if (! f)
2353 return 1;
2354 if (($2) < 0)
2356 long int i = longval ();
2357 if (i != ($2))
2358 return 1;
2359 fprintf (f, "%ld", i);
2361 else
2363 unsigned long int i = ulongval ();
2364 if (i != ($2))
2365 return 1;
2366 fprintf (f, "%lu", i);
2368 /* Do not output a trailing newline, as this causes \r\n confusion
2369 on some platforms. */
2370 return ferror (f) || fclose (f) != 0;
2373 return 0;
2375 _ACEOF
2376 if ac_fn_c_try_run "$LINENO"; then :
2377 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2378 else
2379 ac_retval=1
2381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2382 conftest.$ac_objext conftest.beam conftest.$ac_ext
2383 rm -f conftest.val
2386 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2387 as_fn_set_status $ac_retval
2389 } # ac_fn_c_compute_int
2391 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2392 # ---------------------------------------------
2393 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2394 # accordingly.
2395 ac_fn_c_check_decl ()
2397 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2399 as_decl_name=`echo $2|sed 's/ *(.*//'`
2400 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2402 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2403 if eval \${$3+:} false; then :
2404 $as_echo_n "(cached) " >&6
2405 else
2406 ac_save_werror_flag=$ac_c_werror_flag
2407 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409 /* end confdefs.h. */
2412 main ()
2414 #ifndef $as_decl_name
2415 #ifdef __cplusplus
2416 (void) $as_decl_use;
2417 #else
2418 (void) $as_decl_name;
2419 #endif
2420 #endif
2423 return 0;
2425 _ACEOF
2426 if ac_fn_c_try_compile "$LINENO"; then :
2427 eval "$3=yes"
2428 else
2429 eval "$3=no"
2431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2432 ac_c_werror_flag=$ac_save_werror_flag
2434 eval ac_res=\$$3
2435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2436 $as_echo "$ac_res" >&6; }
2437 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2439 } # ac_fn_c_check_decl
2440 cat >config.log <<_ACEOF
2441 This file contains any messages produced by compilers while
2442 running configure, to aid debugging if configure makes a mistake.
2444 It was created by PostgreSQL $as_me 18devel, which was
2445 generated by GNU Autoconf 2.69. Invocation command line was
2447 $ $0 $@
2449 _ACEOF
2450 exec 5>>config.log
2452 cat <<_ASUNAME
2453 ## --------- ##
2454 ## Platform. ##
2455 ## --------- ##
2457 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2458 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2459 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2460 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2461 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2463 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2464 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2466 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2467 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2468 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2469 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2470 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2471 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2472 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2474 _ASUNAME
2476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2477 for as_dir in $PATH
2479 IFS=$as_save_IFS
2480 test -z "$as_dir" && as_dir=.
2481 $as_echo "PATH: $as_dir"
2482 done
2483 IFS=$as_save_IFS
2485 } >&5
2487 cat >&5 <<_ACEOF
2490 ## ----------- ##
2491 ## Core tests. ##
2492 ## ----------- ##
2494 _ACEOF
2497 # Keep a trace of the command line.
2498 # Strip out --no-create and --no-recursion so they do not pile up.
2499 # Strip out --silent because we don't want to record it for future runs.
2500 # Also quote any args containing shell meta-characters.
2501 # Make two passes to allow for proper duplicate-argument suppression.
2502 ac_configure_args=
2503 ac_configure_args0=
2504 ac_configure_args1=
2505 ac_must_keep_next=false
2506 for ac_pass in 1 2
2508 for ac_arg
2510 case $ac_arg in
2511 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2512 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2513 | -silent | --silent | --silen | --sile | --sil)
2514 continue ;;
2515 *\'*)
2516 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2517 esac
2518 case $ac_pass in
2519 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2521 as_fn_append ac_configure_args1 " '$ac_arg'"
2522 if test $ac_must_keep_next = true; then
2523 ac_must_keep_next=false # Got value, back to normal.
2524 else
2525 case $ac_arg in
2526 *=* | --config-cache | -C | -disable-* | --disable-* \
2527 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2528 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2529 | -with-* | --with-* | -without-* | --without-* | --x)
2530 case "$ac_configure_args0 " in
2531 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2532 esac
2534 -* ) ac_must_keep_next=true ;;
2535 esac
2537 as_fn_append ac_configure_args " '$ac_arg'"
2539 esac
2540 done
2541 done
2542 { ac_configure_args0=; unset ac_configure_args0;}
2543 { ac_configure_args1=; unset ac_configure_args1;}
2545 # When interrupted or exit'd, cleanup temporary files, and complete
2546 # config.log. We remove comments because anyway the quotes in there
2547 # would cause problems or look ugly.
2548 # WARNING: Use '\'' to represent an apostrophe within the trap.
2549 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2550 trap 'exit_status=$?
2551 # Save into config.log some information that might help in debugging.
2553 echo
2555 $as_echo "## ---------------- ##
2556 ## Cache variables. ##
2557 ## ---------------- ##"
2558 echo
2559 # The following way of writing the cache mishandles newlines in values,
2561 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2562 eval ac_val=\$$ac_var
2563 case $ac_val in #(
2564 *${as_nl}*)
2565 case $ac_var in #(
2566 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2567 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2568 esac
2569 case $ac_var in #(
2570 _ | IFS | as_nl) ;; #(
2571 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2572 *) { eval $ac_var=; unset $ac_var;} ;;
2573 esac ;;
2574 esac
2575 done
2576 (set) 2>&1 |
2577 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2578 *${as_nl}ac_space=\ *)
2579 sed -n \
2580 "s/'\''/'\''\\\\'\'''\''/g;
2581 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2582 ;; #(
2584 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2586 esac |
2587 sort
2589 echo
2591 $as_echo "## ----------------- ##
2592 ## Output variables. ##
2593 ## ----------------- ##"
2594 echo
2595 for ac_var in $ac_subst_vars
2597 eval ac_val=\$$ac_var
2598 case $ac_val in
2599 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2600 esac
2601 $as_echo "$ac_var='\''$ac_val'\''"
2602 done | sort
2603 echo
2605 if test -n "$ac_subst_files"; then
2606 $as_echo "## ------------------- ##
2607 ## File substitutions. ##
2608 ## ------------------- ##"
2609 echo
2610 for ac_var in $ac_subst_files
2612 eval ac_val=\$$ac_var
2613 case $ac_val in
2614 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2615 esac
2616 $as_echo "$ac_var='\''$ac_val'\''"
2617 done | sort
2618 echo
2621 if test -s confdefs.h; then
2622 $as_echo "## ----------- ##
2623 ## confdefs.h. ##
2624 ## ----------- ##"
2625 echo
2626 cat confdefs.h
2627 echo
2629 test "$ac_signal" != 0 &&
2630 $as_echo "$as_me: caught signal $ac_signal"
2631 $as_echo "$as_me: exit $exit_status"
2632 } >&5
2633 rm -f core *.core core.conftest.* &&
2634 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2635 exit $exit_status
2637 for ac_signal in 1 2 13 15; do
2638 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2639 done
2640 ac_signal=0
2642 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2643 rm -f -r conftest* confdefs.h
2645 $as_echo "/* confdefs.h */" > confdefs.h
2647 # Predefined preprocessor variables.
2649 cat >>confdefs.h <<_ACEOF
2650 #define PACKAGE_NAME "$PACKAGE_NAME"
2651 _ACEOF
2653 cat >>confdefs.h <<_ACEOF
2654 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2655 _ACEOF
2657 cat >>confdefs.h <<_ACEOF
2658 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2659 _ACEOF
2661 cat >>confdefs.h <<_ACEOF
2662 #define PACKAGE_STRING "$PACKAGE_STRING"
2663 _ACEOF
2665 cat >>confdefs.h <<_ACEOF
2666 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2667 _ACEOF
2669 cat >>confdefs.h <<_ACEOF
2670 #define PACKAGE_URL "$PACKAGE_URL"
2671 _ACEOF
2674 # Let the site file select an alternate cache file if it wants to.
2675 # Prefer an explicitly selected file to automatically selected ones.
2676 ac_site_file1=NONE
2677 ac_site_file2=NONE
2678 if test -n "$CONFIG_SITE"; then
2679 # We do not want a PATH search for config.site.
2680 case $CONFIG_SITE in #((
2681 -*) ac_site_file1=./$CONFIG_SITE;;
2682 */*) ac_site_file1=$CONFIG_SITE;;
2683 *) ac_site_file1=./$CONFIG_SITE;;
2684 esac
2685 elif test "x$prefix" != xNONE; then
2686 ac_site_file1=$prefix/share/config.site
2687 ac_site_file2=$prefix/etc/config.site
2688 else
2689 ac_site_file1=$ac_default_prefix/share/config.site
2690 ac_site_file2=$ac_default_prefix/etc/config.site
2692 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2694 test "x$ac_site_file" = xNONE && continue
2695 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2697 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2698 sed 's/^/| /' "$ac_site_file" >&5
2699 . "$ac_site_file" \
2700 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2701 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2702 as_fn_error $? "failed to load site script $ac_site_file
2703 See \`config.log' for more details" "$LINENO" 5; }
2705 done
2707 if test -r "$cache_file"; then
2708 # Some versions of bash will fail to source /dev/null (special files
2709 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2710 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2712 $as_echo "$as_me: loading cache $cache_file" >&6;}
2713 case $cache_file in
2714 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2715 *) . "./$cache_file";;
2716 esac
2718 else
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2720 $as_echo "$as_me: creating cache $cache_file" >&6;}
2721 >$cache_file
2724 # Check that the precious variables saved in the cache have kept the same
2725 # value.
2726 ac_cache_corrupted=false
2727 for ac_var in $ac_precious_vars; do
2728 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2729 eval ac_new_set=\$ac_env_${ac_var}_set
2730 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2731 eval ac_new_val=\$ac_env_${ac_var}_value
2732 case $ac_old_set,$ac_new_set in
2733 set,)
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2735 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2736 ac_cache_corrupted=: ;;
2737 ,set)
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2739 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2740 ac_cache_corrupted=: ;;
2741 ,);;
2743 if test "x$ac_old_val" != "x$ac_new_val"; then
2744 # differences in whitespace do not lead to failure.
2745 ac_old_val_w=`echo x $ac_old_val`
2746 ac_new_val_w=`echo x $ac_new_val`
2747 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2749 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2750 ac_cache_corrupted=:
2751 else
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2753 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2754 eval $ac_var=\$ac_old_val
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2757 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2759 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2760 fi;;
2761 esac
2762 # Pass precious variables to config.status.
2763 if test "$ac_new_set" = set; then
2764 case $ac_new_val in
2765 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2766 *) ac_arg=$ac_var=$ac_new_val ;;
2767 esac
2768 case " $ac_configure_args " in
2769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2770 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2771 esac
2773 done
2774 if $ac_cache_corrupted; then
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2776 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2778 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2779 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2781 ## -------------------- ##
2782 ## Main body of script. ##
2783 ## -------------------- ##
2785 ac_ext=c
2786 ac_cpp='$CPP $CPPFLAGS'
2787 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2788 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2789 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2796 ac_aux_dir=
2797 for ac_dir in config "$srcdir"/config; do
2798 if test -f "$ac_dir/install-sh"; then
2799 ac_aux_dir=$ac_dir
2800 ac_install_sh="$ac_aux_dir/install-sh -c"
2801 break
2802 elif test -f "$ac_dir/install.sh"; then
2803 ac_aux_dir=$ac_dir
2804 ac_install_sh="$ac_aux_dir/install.sh -c"
2805 break
2806 elif test -f "$ac_dir/shtool"; then
2807 ac_aux_dir=$ac_dir
2808 ac_install_sh="$ac_aux_dir/shtool install -c"
2809 break
2811 done
2812 if test -z "$ac_aux_dir"; then
2813 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2816 # These three variables are undocumented and unsupported,
2817 # and are intended to be withdrawn in a future Autoconf release.
2818 # They can cause serious problems if a builder's source tree is in a directory
2819 # whose full name contains unusual characters.
2820 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2821 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2822 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2827 cat >>confdefs.h <<_ACEOF
2828 #define CONFIGURE_ARGS "$ac_configure_args"
2829 _ACEOF
2832 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2833 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2834 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2837 cat >>confdefs.h <<_ACEOF
2838 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2839 _ACEOF
2842 cat >>confdefs.h <<_ACEOF
2843 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2844 _ACEOF
2847 cat >>confdefs.h <<_ACEOF
2848 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2849 _ACEOF
2855 # Check whether --with-extra-version was given.
2856 if test "${with_extra_version+set}" = set; then :
2857 withval=$with_extra_version;
2858 case $withval in
2859 yes)
2860 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2863 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2866 PG_VERSION="$PACKAGE_VERSION$withval"
2868 esac
2870 else
2871 PG_VERSION="$PACKAGE_VERSION"
2876 cat >>confdefs.h <<_ACEOF
2877 #define PG_VERSION "$PG_VERSION"
2878 _ACEOF
2881 # Make sure we can run config.sub.
2882 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2883 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2886 $as_echo_n "checking build system type... " >&6; }
2887 if ${ac_cv_build+:} false; then :
2888 $as_echo_n "(cached) " >&6
2889 else
2890 ac_build_alias=$build_alias
2891 test "x$ac_build_alias" = x &&
2892 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2893 test "x$ac_build_alias" = x &&
2894 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2895 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2896 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2900 $as_echo "$ac_cv_build" >&6; }
2901 case $ac_cv_build in
2902 *-*-*) ;;
2903 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2904 esac
2905 build=$ac_cv_build
2906 ac_save_IFS=$IFS; IFS='-'
2907 set x $ac_cv_build
2908 shift
2909 build_cpu=$1
2910 build_vendor=$2
2911 shift; shift
2912 # Remember, the first character of IFS is used to create $*,
2913 # except with old shells:
2914 build_os=$*
2915 IFS=$ac_save_IFS
2916 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2920 $as_echo_n "checking host system type... " >&6; }
2921 if ${ac_cv_host+:} false; then :
2922 $as_echo_n "(cached) " >&6
2923 else
2924 if test "x$host_alias" = x; then
2925 ac_cv_host=$ac_cv_build
2926 else
2927 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2928 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2933 $as_echo "$ac_cv_host" >&6; }
2934 case $ac_cv_host in
2935 *-*-*) ;;
2936 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2937 esac
2938 host=$ac_cv_host
2939 ac_save_IFS=$IFS; IFS='-'
2940 set x $ac_cv_host
2941 shift
2942 host_cpu=$1
2943 host_vendor=$2
2944 shift; shift
2945 # Remember, the first character of IFS is used to create $*,
2946 # except with old shells:
2947 host_os=$*
2948 IFS=$ac_save_IFS
2949 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2953 template=
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2955 $as_echo_n "checking which template to use... " >&6; }
2960 # Check whether --with-template was given.
2961 if test "${with_template+set}" = set; then :
2962 withval=$with_template;
2963 case $withval in
2964 yes)
2965 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2968 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2972 case $withval in
2973 list) echo; ls "$srcdir/src/template"; exit;;
2974 *) if test -f "$srcdir/src/template/$with_template" ; then
2975 template=$withval
2976 else
2977 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2978 fi;;
2979 esac
2982 esac
2984 else
2986 # --with-template not given
2988 case $host_os in
2989 cygwin*|msys*) template=cygwin ;;
2990 darwin*) template=darwin ;;
2991 dragonfly*) template=netbsd ;;
2992 freebsd*) template=freebsd ;;
2993 linux*|gnu*|k*bsd*-gnu)
2994 template=linux ;;
2995 mingw*) template=win32 ;;
2996 netbsd*) template=netbsd ;;
2997 openbsd*) template=openbsd ;;
2998 solaris*) template=solaris ;;
2999 esac
3001 if test x"$template" = x"" ; then
3002 as_fn_error $? "
3003 *******************************************************************
3004 PostgreSQL has apparently not been ported to your platform yet.
3005 To try a manual configuration, look into the src/template directory
3006 for a similar platform and use the '--with-template=' option.
3008 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3009 rectifying this. Include the above 'checking host system type...'
3010 line.
3011 *******************************************************************
3012 " "$LINENO" 5
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3021 $as_echo "$template" >&6; }
3023 PORTNAME=$template
3026 # Initialize default assumption that we do not need separate assembly code
3027 # for TAS (test-and-set). This can be overridden by the template file
3028 # when it's executed.
3029 need_tas=no
3030 tas_file=dummy.s
3032 # Default, works for most platforms, override in template file if needed
3033 DLSUFFIX=".so"
3038 ## Command line options
3042 # Add non-standard directories to the include path
3047 # Check whether --with-includes was given.
3048 if test "${with_includes+set}" = set; then :
3049 withval=$with_includes;
3050 case $withval in
3051 yes)
3052 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3055 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3060 esac
3068 # Add non-standard directories to the library search path
3073 # Check whether --with-libraries was given.
3074 if test "${with_libraries+set}" = set; then :
3075 withval=$with_libraries;
3076 case $withval in
3077 yes)
3078 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3081 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3084 LIBRARY_DIRS=$withval
3086 esac
3095 # Check whether --with-libs was given.
3096 if test "${with_libs+set}" = set; then :
3097 withval=$with_libs;
3098 case $withval in
3099 yes)
3100 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3103 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3106 LIBRARY_DIRS=$withval
3108 esac
3116 # 64-bit integer date/time storage is now the only option, but to avoid
3117 # unnecessary breakage of build scripts, continue to accept an explicit
3118 # "--enable-integer-datetimes" switch.
3122 # Check whether --enable-integer-datetimes was given.
3123 if test "${enable_integer_datetimes+set}" = set; then :
3124 enableval=$enable_integer_datetimes;
3125 case $enableval in
3126 yes)
3130 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3133 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3135 esac
3137 else
3138 enable_integer_datetimes=yes
3146 # NLS
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3149 $as_echo_n "checking whether NLS is wanted... " >&6; }
3152 # Check whether --enable-nls was given.
3153 if test "${enable_nls+set}" = set; then :
3154 enableval=$enable_nls;
3155 case $enableval in
3156 yes)
3163 enable_nls=yes
3164 WANTED_LANGUAGES=$enableval
3166 esac
3168 else
3169 enable_nls=no
3174 if test "$enable_nls" = yes; then
3176 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3181 $as_echo "$enable_nls" >&6; }
3186 # Default port number (--with-pgport), default 5432
3188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3189 $as_echo_n "checking for default port number... " >&6; }
3193 # Check whether --with-pgport was given.
3194 if test "${with_pgport+set}" = set; then :
3195 withval=$with_pgport;
3196 case $withval in
3197 yes)
3198 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3201 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3204 default_port=$withval
3206 esac
3208 else
3209 default_port=5432
3213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3214 $as_echo "$default_port" >&6; }
3215 # Need both of these because some places want an integer and some a string
3217 cat >>confdefs.h <<_ACEOF
3218 #define DEF_PGPORT ${default_port}
3219 _ACEOF
3222 cat >>confdefs.h <<_ACEOF
3223 #define DEF_PGPORT_STR "${default_port}"
3224 _ACEOF
3228 # It's worth validating port; you can get very confusing errors otherwise
3229 if test x"$default_port" = x""; then
3230 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3231 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3232 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3233 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3234 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3235 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3236 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3240 # '-rpath'-like feature can be disabled
3244 # Check whether --enable-rpath was given.
3245 if test "${enable_rpath+set}" = set; then :
3246 enableval=$enable_rpath;
3247 case $enableval in
3248 yes)
3255 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3257 esac
3259 else
3260 enable_rpath=yes
3268 # --enable-debug adds -g to compiler flags
3272 # Check whether --enable-debug was given.
3273 if test "${enable_debug+set}" = set; then :
3274 enableval=$enable_debug;
3275 case $enableval in
3276 yes)
3283 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3285 esac
3287 else
3288 enable_debug=no
3296 # --enable-profiling enables gcc profiling
3300 # Check whether --enable-profiling was given.
3301 if test "${enable_profiling+set}" = set; then :
3302 enableval=$enable_profiling;
3303 case $enableval in
3304 yes)
3311 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3313 esac
3315 else
3316 enable_profiling=no
3323 # --enable-coverage enables generation of code coverage metrics with gcov
3327 # Check whether --enable-coverage was given.
3328 if test "${enable_coverage+set}" = set; then :
3329 enableval=$enable_coverage;
3330 case $enableval in
3331 yes)
3332 if test -z "$GCOV"; then
3333 for ac_prog in gcov
3335 # Extract the first word of "$ac_prog", so it can be a program name with args.
3336 set dummy $ac_prog; ac_word=$2
3337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3338 $as_echo_n "checking for $ac_word... " >&6; }
3339 if ${ac_cv_path_GCOV+:} false; then :
3340 $as_echo_n "(cached) " >&6
3341 else
3342 case $GCOV in
3343 [\\/]* | ?:[\\/]*)
3344 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348 for as_dir in $PATH
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
3352 for ac_exec_ext in '' $ac_executable_extensions; do
3353 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3354 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3356 break 2
3358 done
3359 done
3360 IFS=$as_save_IFS
3363 esac
3365 GCOV=$ac_cv_path_GCOV
3366 if test -n "$GCOV"; then
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3368 $as_echo "$GCOV" >&6; }
3369 else
3370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3371 $as_echo "no" >&6; }
3375 test -n "$GCOV" && break
3376 done
3378 else
3379 # Report the value of GCOV in configure's output in all cases.
3380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3381 $as_echo_n "checking for GCOV... " >&6; }
3382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3383 $as_echo "$GCOV" >&6; }
3386 if test -z "$GCOV"; then
3387 as_fn_error $? "gcov not found" "$LINENO" 5
3389 if test -z "$LCOV"; then
3390 for ac_prog in lcov
3392 # Extract the first word of "$ac_prog", so it can be a program name with args.
3393 set dummy $ac_prog; ac_word=$2
3394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3395 $as_echo_n "checking for $ac_word... " >&6; }
3396 if ${ac_cv_path_LCOV+:} false; then :
3397 $as_echo_n "(cached) " >&6
3398 else
3399 case $LCOV in
3400 [\\/]* | ?:[\\/]*)
3401 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3405 for as_dir in $PATH
3407 IFS=$as_save_IFS
3408 test -z "$as_dir" && as_dir=.
3409 for ac_exec_ext in '' $ac_executable_extensions; do
3410 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3411 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3413 break 2
3415 done
3416 done
3417 IFS=$as_save_IFS
3420 esac
3422 LCOV=$ac_cv_path_LCOV
3423 if test -n "$LCOV"; then
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3425 $as_echo "$LCOV" >&6; }
3426 else
3427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3428 $as_echo "no" >&6; }
3432 test -n "$LCOV" && break
3433 done
3435 else
3436 # Report the value of LCOV in configure's output in all cases.
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3438 $as_echo_n "checking for LCOV... " >&6; }
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3440 $as_echo "$LCOV" >&6; }
3443 if test -z "$LCOV"; then
3444 as_fn_error $? "lcov not found" "$LINENO" 5
3446 if test -z "$GENHTML"; then
3447 for ac_prog in genhtml
3449 # Extract the first word of "$ac_prog", so it can be a program name with args.
3450 set dummy $ac_prog; ac_word=$2
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3452 $as_echo_n "checking for $ac_word... " >&6; }
3453 if ${ac_cv_path_GENHTML+:} false; then :
3454 $as_echo_n "(cached) " >&6
3455 else
3456 case $GENHTML in
3457 [\\/]* | ?:[\\/]*)
3458 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3462 for as_dir in $PATH
3464 IFS=$as_save_IFS
3465 test -z "$as_dir" && as_dir=.
3466 for ac_exec_ext in '' $ac_executable_extensions; do
3467 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3468 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3469 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3470 break 2
3472 done
3473 done
3474 IFS=$as_save_IFS
3477 esac
3479 GENHTML=$ac_cv_path_GENHTML
3480 if test -n "$GENHTML"; then
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3482 $as_echo "$GENHTML" >&6; }
3483 else
3484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3485 $as_echo "no" >&6; }
3489 test -n "$GENHTML" && break
3490 done
3492 else
3493 # Report the value of GENHTML in configure's output in all cases.
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3495 $as_echo_n "checking for GENHTML... " >&6; }
3496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3497 $as_echo "$GENHTML" >&6; }
3500 if test -z "$GENHTML"; then
3501 as_fn_error $? "genhtml not found" "$LINENO" 5
3508 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3510 esac
3512 else
3513 enable_coverage=no
3521 # DTrace
3525 # Check whether --enable-dtrace was given.
3526 if test "${enable_dtrace+set}" = set; then :
3527 enableval=$enable_dtrace;
3528 case $enableval in
3529 yes)
3530 if test -z "$DTRACE"; then
3531 for ac_prog in dtrace
3533 # Extract the first word of "$ac_prog", so it can be a program name with args.
3534 set dummy $ac_prog; ac_word=$2
3535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3536 $as_echo_n "checking for $ac_word... " >&6; }
3537 if ${ac_cv_path_DTRACE+:} false; then :
3538 $as_echo_n "(cached) " >&6
3539 else
3540 case $DTRACE in
3541 [\\/]* | ?:[\\/]*)
3542 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3546 for as_dir in $PATH
3548 IFS=$as_save_IFS
3549 test -z "$as_dir" && as_dir=.
3550 for ac_exec_ext in '' $ac_executable_extensions; do
3551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3552 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3554 break 2
3556 done
3557 done
3558 IFS=$as_save_IFS
3561 esac
3563 DTRACE=$ac_cv_path_DTRACE
3564 if test -n "$DTRACE"; then
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3566 $as_echo "$DTRACE" >&6; }
3567 else
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3569 $as_echo "no" >&6; }
3573 test -n "$DTRACE" && break
3574 done
3576 else
3577 # Report the value of DTRACE in configure's output in all cases.
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3579 $as_echo_n "checking for DTRACE... " >&6; }
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3581 $as_echo "$DTRACE" >&6; }
3584 if test -z "$DTRACE"; then
3585 as_fn_error $? "dtrace not found" "$LINENO" 5
3593 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3595 esac
3597 else
3598 enable_dtrace=no
3606 # TAP tests
3610 # Check whether --enable-tap-tests was given.
3611 if test "${enable_tap_tests+set}" = set; then :
3612 enableval=$enable_tap_tests;
3613 case $enableval in
3614 yes)
3621 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3623 esac
3625 else
3626 enable_tap_tests=no
3635 # Injection points
3639 # Check whether --enable-injection-points was given.
3640 if test "${enable_injection_points+set}" = set; then :
3641 enableval=$enable_injection_points;
3642 case $enableval in
3643 yes)
3645 $as_echo "#define USE_INJECTION_POINTS 1" >>confdefs.h
3652 as_fn_error $? "no argument expected for --enable-injection-points option" "$LINENO" 5
3654 esac
3656 else
3657 enable_injection_points=no
3665 # Block size
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3668 $as_echo_n "checking for block size... " >&6; }
3672 # Check whether --with-blocksize was given.
3673 if test "${with_blocksize+set}" = set; then :
3674 withval=$with_blocksize;
3675 case $withval in
3676 yes)
3677 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3680 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3683 blocksize=$withval
3685 esac
3687 else
3688 blocksize=8
3692 case ${blocksize} in
3693 1) BLCKSZ=1024;;
3694 2) BLCKSZ=2048;;
3695 4) BLCKSZ=4096;;
3696 8) BLCKSZ=8192;;
3697 16) BLCKSZ=16384;;
3698 32) BLCKSZ=32768;;
3699 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3700 esac
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3702 $as_echo "${blocksize}kB" >&6; }
3705 cat >>confdefs.h <<_ACEOF
3706 #define BLCKSZ ${BLCKSZ}
3707 _ACEOF
3711 # Relation segment size
3716 # Check whether --with-segsize was given.
3717 if test "${with_segsize+set}" = set; then :
3718 withval=$with_segsize;
3719 case $withval in
3720 yes)
3721 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3724 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3727 segsize=$withval
3729 esac
3731 else
3732 segsize=1
3739 # Check whether --with-segsize-blocks was given.
3740 if test "${with_segsize_blocks+set}" = set; then :
3741 withval=$with_segsize_blocks;
3742 case $withval in
3743 yes)
3744 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3747 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3750 segsize_blocks=$withval
3752 esac
3754 else
3755 segsize_blocks=0
3760 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3761 # otherwise. segsize-blocks is only really useful for developers wanting to
3762 # test segment related code. Warn if both are used.
3763 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3765 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3769 $as_echo_n "checking for segment size... " >&6; }
3770 if test $segsize_blocks -eq 0; then
3771 # this expression is set up to avoid unnecessary integer overflow
3772 # blocksize is already guaranteed to be a factor of 1024
3773 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3774 test $? -eq 0 || exit 1
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3776 $as_echo "${segsize}GB" >&6; }
3777 else
3778 RELSEG_SIZE=$segsize_blocks
3779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3780 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3784 cat >>confdefs.h <<_ACEOF
3785 #define RELSEG_SIZE ${RELSEG_SIZE}
3786 _ACEOF
3790 # WAL block size
3792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3793 $as_echo_n "checking for WAL block size... " >&6; }
3797 # Check whether --with-wal-blocksize was given.
3798 if test "${with_wal_blocksize+set}" = set; then :
3799 withval=$with_wal_blocksize;
3800 case $withval in
3801 yes)
3802 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3805 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3808 wal_blocksize=$withval
3810 esac
3812 else
3813 wal_blocksize=8
3817 case ${wal_blocksize} in
3818 1) XLOG_BLCKSZ=1024;;
3819 2) XLOG_BLCKSZ=2048;;
3820 4) XLOG_BLCKSZ=4096;;
3821 8) XLOG_BLCKSZ=8192;;
3822 16) XLOG_BLCKSZ=16384;;
3823 32) XLOG_BLCKSZ=32768;;
3824 64) XLOG_BLCKSZ=65536;;
3825 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3826 esac
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3828 $as_echo "${wal_blocksize}kB" >&6; }
3831 cat >>confdefs.h <<_ACEOF
3832 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3833 _ACEOF
3837 # C compiler
3840 # If you don't specify a list of compilers to test, the AC_PROG_CC and
3841 # AC_PROG_CXX macros test for a long list of unsupported compilers.
3842 pgac_cc_list="gcc cc"
3843 pgac_cxx_list="g++ c++"
3845 ac_ext=c
3846 ac_cpp='$CPP $CPPFLAGS'
3847 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3848 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3850 if test -n "$ac_tool_prefix"; then
3851 for ac_prog in $pgac_cc_list
3853 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3854 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3856 $as_echo_n "checking for $ac_word... " >&6; }
3857 if ${ac_cv_prog_CC+:} false; then :
3858 $as_echo_n "(cached) " >&6
3859 else
3860 if test -n "$CC"; then
3861 ac_cv_prog_CC="$CC" # Let the user override the test.
3862 else
3863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3864 for as_dir in $PATH
3866 IFS=$as_save_IFS
3867 test -z "$as_dir" && as_dir=.
3868 for ac_exec_ext in '' $ac_executable_extensions; do
3869 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3870 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3872 break 2
3874 done
3875 done
3876 IFS=$as_save_IFS
3880 CC=$ac_cv_prog_CC
3881 if test -n "$CC"; then
3882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3883 $as_echo "$CC" >&6; }
3884 else
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3886 $as_echo "no" >&6; }
3890 test -n "$CC" && break
3891 done
3893 if test -z "$CC"; then
3894 ac_ct_CC=$CC
3895 for ac_prog in $pgac_cc_list
3897 # Extract the first word of "$ac_prog", so it can be a program name with args.
3898 set dummy $ac_prog; ac_word=$2
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3900 $as_echo_n "checking for $ac_word... " >&6; }
3901 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3902 $as_echo_n "(cached) " >&6
3903 else
3904 if test -n "$ac_ct_CC"; then
3905 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3906 else
3907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3908 for as_dir in $PATH
3910 IFS=$as_save_IFS
3911 test -z "$as_dir" && as_dir=.
3912 for ac_exec_ext in '' $ac_executable_extensions; do
3913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3914 ac_cv_prog_ac_ct_CC="$ac_prog"
3915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3916 break 2
3918 done
3919 done
3920 IFS=$as_save_IFS
3924 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3925 if test -n "$ac_ct_CC"; then
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3927 $as_echo "$ac_ct_CC" >&6; }
3928 else
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3930 $as_echo "no" >&6; }
3934 test -n "$ac_ct_CC" && break
3935 done
3937 if test "x$ac_ct_CC" = x; then
3938 CC=""
3939 else
3940 case $cross_compiling:$ac_tool_warned in
3941 yes:)
3942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3943 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3944 ac_tool_warned=yes ;;
3945 esac
3946 CC=$ac_ct_CC
3951 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3952 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3953 as_fn_error $? "no acceptable C compiler found in \$PATH
3954 See \`config.log' for more details" "$LINENO" 5; }
3956 # Provide some information about the compiler.
3957 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3958 set X $ac_compile
3959 ac_compiler=$2
3960 for ac_option in --version -v -V -qversion; do
3961 { { ac_try="$ac_compiler $ac_option >&5"
3962 case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965 esac
3966 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967 $as_echo "$ac_try_echo"; } >&5
3968 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3969 ac_status=$?
3970 if test -s conftest.err; then
3971 sed '10a\
3972 ... rest of stderr output deleted ...
3973 10q' conftest.err >conftest.er1
3974 cat conftest.er1 >&5
3976 rm -f conftest.er1 conftest.err
3977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978 test $ac_status = 0; }
3979 done
3981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3982 /* end confdefs.h. */
3985 main ()
3989 return 0;
3991 _ACEOF
3992 ac_clean_files_save=$ac_clean_files
3993 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3994 # Try to create an executable without -o first, disregard a.out.
3995 # It will help us diagnose broken compilers, and finding out an intuition
3996 # of exeext.
3997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3998 $as_echo_n "checking whether the C compiler works... " >&6; }
3999 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4001 # The possible output files:
4002 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4004 ac_rmfiles=
4005 for ac_file in $ac_files
4007 case $ac_file in
4008 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4009 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4010 esac
4011 done
4012 rm -f $ac_rmfiles
4014 if { { ac_try="$ac_link_default"
4015 case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018 esac
4019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020 $as_echo "$ac_try_echo"; } >&5
4021 (eval "$ac_link_default") 2>&5
4022 ac_status=$?
4023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; then :
4025 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4026 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4027 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4028 # so that the user can short-circuit this test for compilers unknown to
4029 # Autoconf.
4030 for ac_file in $ac_files ''
4032 test -f "$ac_file" || continue
4033 case $ac_file in
4034 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4036 [ab].out )
4037 # We found the default executable, but exeext='' is most
4038 # certainly right.
4039 break;;
4040 *.* )
4041 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4042 then :; else
4043 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4045 # We set ac_cv_exeext here because the later test for it is not
4046 # safe: cross compilers may not add the suffix if given an `-o'
4047 # argument, so we may need to know it at that point already.
4048 # Even if this section looks crufty: it has the advantage of
4049 # actually working.
4050 break;;
4052 break;;
4053 esac
4054 done
4055 test "$ac_cv_exeext" = no && ac_cv_exeext=
4057 else
4058 ac_file=''
4060 if test -z "$ac_file"; then :
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4062 $as_echo "no" >&6; }
4063 $as_echo "$as_me: failed program was:" >&5
4064 sed 's/^/| /' conftest.$ac_ext >&5
4066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4068 as_fn_error 77 "C compiler cannot create executables
4069 See \`config.log' for more details" "$LINENO" 5; }
4070 else
4071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4072 $as_echo "yes" >&6; }
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4075 $as_echo_n "checking for C compiler default output file name... " >&6; }
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4077 $as_echo "$ac_file" >&6; }
4078 ac_exeext=$ac_cv_exeext
4080 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4081 ac_clean_files=$ac_clean_files_save
4082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4083 $as_echo_n "checking for suffix of executables... " >&6; }
4084 if { { ac_try="$ac_link"
4085 case "(($ac_try" in
4086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087 *) ac_try_echo=$ac_try;;
4088 esac
4089 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4090 $as_echo "$ac_try_echo"; } >&5
4091 (eval "$ac_link") 2>&5
4092 ac_status=$?
4093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4094 test $ac_status = 0; }; then :
4095 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4096 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4097 # work properly (i.e., refer to `conftest.exe'), while it won't with
4098 # `rm'.
4099 for ac_file in conftest.exe conftest conftest.*; do
4100 test -f "$ac_file" || continue
4101 case $ac_file in
4102 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4103 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4104 break;;
4105 * ) break;;
4106 esac
4107 done
4108 else
4109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4111 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4112 See \`config.log' for more details" "$LINENO" 5; }
4114 rm -f conftest conftest$ac_cv_exeext
4115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4116 $as_echo "$ac_cv_exeext" >&6; }
4118 rm -f conftest.$ac_ext
4119 EXEEXT=$ac_cv_exeext
4120 ac_exeext=$EXEEXT
4121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4122 /* end confdefs.h. */
4123 #include <stdio.h>
4125 main ()
4127 FILE *f = fopen ("conftest.out", "w");
4128 return ferror (f) || fclose (f) != 0;
4131 return 0;
4133 _ACEOF
4134 ac_clean_files="$ac_clean_files conftest.out"
4135 # Check that the compiler produces executables we can run. If not, either
4136 # the compiler is broken, or we cross compile.
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4138 $as_echo_n "checking whether we are cross compiling... " >&6; }
4139 if test "$cross_compiling" != yes; then
4140 { { ac_try="$ac_link"
4141 case "(($ac_try" in
4142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4143 *) ac_try_echo=$ac_try;;
4144 esac
4145 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4146 $as_echo "$ac_try_echo"; } >&5
4147 (eval "$ac_link") 2>&5
4148 ac_status=$?
4149 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150 test $ac_status = 0; }
4151 if { ac_try='./conftest$ac_cv_exeext'
4152 { { case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155 esac
4156 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157 $as_echo "$ac_try_echo"; } >&5
4158 (eval "$ac_try") 2>&5
4159 ac_status=$?
4160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; }; then
4162 cross_compiling=no
4163 else
4164 if test "$cross_compiling" = maybe; then
4165 cross_compiling=yes
4166 else
4167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4169 as_fn_error $? "cannot run C compiled programs.
4170 If you meant to cross compile, use \`--host'.
4171 See \`config.log' for more details" "$LINENO" 5; }
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4176 $as_echo "$cross_compiling" >&6; }
4178 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4179 ac_clean_files=$ac_clean_files_save
4180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4181 $as_echo_n "checking for suffix of object files... " >&6; }
4182 if ${ac_cv_objext+:} false; then :
4183 $as_echo_n "(cached) " >&6
4184 else
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186 /* end confdefs.h. */
4189 main ()
4193 return 0;
4195 _ACEOF
4196 rm -f conftest.o conftest.obj
4197 if { { ac_try="$ac_compile"
4198 case "(($ac_try" in
4199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4200 *) ac_try_echo=$ac_try;;
4201 esac
4202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4203 $as_echo "$ac_try_echo"; } >&5
4204 (eval "$ac_compile") 2>&5
4205 ac_status=$?
4206 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4207 test $ac_status = 0; }; then :
4208 for ac_file in conftest.o conftest.obj conftest.*; do
4209 test -f "$ac_file" || continue;
4210 case $ac_file in
4211 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4212 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4213 break;;
4214 esac
4215 done
4216 else
4217 $as_echo "$as_me: failed program was:" >&5
4218 sed 's/^/| /' conftest.$ac_ext >&5
4220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4222 as_fn_error $? "cannot compute suffix of object files: cannot compile
4223 See \`config.log' for more details" "$LINENO" 5; }
4225 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4228 $as_echo "$ac_cv_objext" >&6; }
4229 OBJEXT=$ac_cv_objext
4230 ac_objext=$OBJEXT
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4232 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4233 if ${ac_cv_c_compiler_gnu+:} false; then :
4234 $as_echo_n "(cached) " >&6
4235 else
4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h. */
4240 main ()
4242 #ifndef __GNUC__
4243 choke me
4244 #endif
4247 return 0;
4249 _ACEOF
4250 if ac_fn_c_try_compile "$LINENO"; then :
4251 ac_compiler_gnu=yes
4252 else
4253 ac_compiler_gnu=no
4255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4260 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4261 if test $ac_compiler_gnu = yes; then
4262 GCC=yes
4263 else
4264 GCC=
4266 ac_test_CFLAGS=${CFLAGS+set}
4267 ac_save_CFLAGS=$CFLAGS
4268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4269 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4270 if ${ac_cv_prog_cc_g+:} false; then :
4271 $as_echo_n "(cached) " >&6
4272 else
4273 ac_save_c_werror_flag=$ac_c_werror_flag
4274 ac_c_werror_flag=yes
4275 ac_cv_prog_cc_g=no
4276 CFLAGS="-g"
4277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4278 /* end confdefs.h. */
4281 main ()
4285 return 0;
4287 _ACEOF
4288 if ac_fn_c_try_compile "$LINENO"; then :
4289 ac_cv_prog_cc_g=yes
4290 else
4291 CFLAGS=""
4292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4293 /* end confdefs.h. */
4296 main ()
4300 return 0;
4302 _ACEOF
4303 if ac_fn_c_try_compile "$LINENO"; then :
4305 else
4306 ac_c_werror_flag=$ac_save_c_werror_flag
4307 CFLAGS="-g"
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4309 /* end confdefs.h. */
4312 main ()
4316 return 0;
4318 _ACEOF
4319 if ac_fn_c_try_compile "$LINENO"; then :
4320 ac_cv_prog_cc_g=yes
4322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4327 ac_c_werror_flag=$ac_save_c_werror_flag
4329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4330 $as_echo "$ac_cv_prog_cc_g" >&6; }
4331 if test "$ac_test_CFLAGS" = set; then
4332 CFLAGS=$ac_save_CFLAGS
4333 elif test $ac_cv_prog_cc_g = yes; then
4334 if test "$GCC" = yes; then
4335 CFLAGS="-g -O2"
4336 else
4337 CFLAGS="-g"
4339 else
4340 if test "$GCC" = yes; then
4341 CFLAGS="-O2"
4342 else
4343 CFLAGS=
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4347 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4348 if ${ac_cv_prog_cc_c89+:} false; then :
4349 $as_echo_n "(cached) " >&6
4350 else
4351 ac_cv_prog_cc_c89=no
4352 ac_save_CC=$CC
4353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4354 /* end confdefs.h. */
4355 #include <stdarg.h>
4356 #include <stdio.h>
4357 struct stat;
4358 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4359 struct buf { int x; };
4360 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4361 static char *e (p, i)
4362 char **p;
4363 int i;
4365 return p[i];
4367 static char *f (char * (*g) (char **, int), char **p, ...)
4369 char *s;
4370 va_list v;
4371 va_start (v,p);
4372 s = g (p, va_arg (v,int));
4373 va_end (v);
4374 return s;
4377 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4378 function prototypes and stuff, but not '\xHH' hex character constants.
4379 These don't provoke an error unfortunately, instead are silently treated
4380 as 'x'. The following induces an error, until -std is added to get
4381 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4382 array size at least. It's necessary to write '\x00'==0 to get something
4383 that's true only with -std. */
4384 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4386 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4387 inside strings and character constants. */
4388 #define FOO(x) 'x'
4389 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4391 int test (int i, double x);
4392 struct s1 {int (*f) (int a);};
4393 struct s2 {int (*f) (double a);};
4394 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4395 int argc;
4396 char **argv;
4398 main ()
4400 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4402 return 0;
4404 _ACEOF
4405 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4406 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4408 CC="$ac_save_CC $ac_arg"
4409 if ac_fn_c_try_compile "$LINENO"; then :
4410 ac_cv_prog_cc_c89=$ac_arg
4412 rm -f core conftest.err conftest.$ac_objext
4413 test "x$ac_cv_prog_cc_c89" != "xno" && break
4414 done
4415 rm -f conftest.$ac_ext
4416 CC=$ac_save_CC
4419 # AC_CACHE_VAL
4420 case "x$ac_cv_prog_cc_c89" in
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4423 $as_echo "none needed" >&6; } ;;
4424 xno)
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4426 $as_echo "unsupported" >&6; } ;;
4428 CC="$CC $ac_cv_prog_cc_c89"
4429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4430 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4431 esac
4432 if test "x$ac_cv_prog_cc_c89" != xno; then :
4436 ac_ext=c
4437 ac_cpp='$CPP $CPPFLAGS'
4438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4443 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4444 if ${ac_cv_prog_cc_c99+:} false; then :
4445 $as_echo_n "(cached) " >&6
4446 else
4447 ac_cv_prog_cc_c99=no
4448 ac_save_CC=$CC
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450 /* end confdefs.h. */
4451 #include <stdarg.h>
4452 #include <stdbool.h>
4453 #include <stdlib.h>
4454 #include <wchar.h>
4455 #include <stdio.h>
4457 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4458 #define debug(...) fprintf (stderr, __VA_ARGS__)
4459 #define showlist(...) puts (#__VA_ARGS__)
4460 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4461 static void
4462 test_varargs_macros (void)
4464 int x = 1234;
4465 int y = 5678;
4466 debug ("Flag");
4467 debug ("X = %d\n", x);
4468 showlist (The first, second, and third items.);
4469 report (x>y, "x is %d but y is %d", x, y);
4472 // Check long long types.
4473 #define BIG64 18446744073709551615ull
4474 #define BIG32 4294967295ul
4475 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4476 #if !BIG_OK
4477 your preprocessor is broken;
4478 #endif
4479 #if BIG_OK
4480 #else
4481 your preprocessor is broken;
4482 #endif
4483 static long long int bignum = -9223372036854775807LL;
4484 static unsigned long long int ubignum = BIG64;
4486 struct incomplete_array
4488 int datasize;
4489 double data[];
4492 struct named_init {
4493 int number;
4494 const wchar_t *name;
4495 double average;
4498 typedef const char *ccp;
4500 static inline int
4501 test_restrict (ccp restrict text)
4503 // See if C++-style comments work.
4504 // Iterate through items via the restricted pointer.
4505 // Also check for declarations in for loops.
4506 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4507 continue;
4508 return 0;
4511 // Check varargs and va_copy.
4512 static void
4513 test_varargs (const char *format, ...)
4515 va_list args;
4516 va_start (args, format);
4517 va_list args_copy;
4518 va_copy (args_copy, args);
4520 const char *str;
4521 int number;
4522 float fnumber;
4524 while (*format)
4526 switch (*format++)
4528 case 's': // string
4529 str = va_arg (args_copy, const char *);
4530 break;
4531 case 'd': // int
4532 number = va_arg (args_copy, int);
4533 break;
4534 case 'f': // float
4535 fnumber = va_arg (args_copy, double);
4536 break;
4537 default:
4538 break;
4541 va_end (args_copy);
4542 va_end (args);
4546 main ()
4549 // Check bool.
4550 _Bool success = false;
4552 // Check restrict.
4553 if (test_restrict ("String literal") == 0)
4554 success = true;
4555 char *restrict newvar = "Another string";
4557 // Check varargs.
4558 test_varargs ("s, d' f .", "string", 65, 34.234);
4559 test_varargs_macros ();
4561 // Check flexible array members.
4562 struct incomplete_array *ia =
4563 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4564 ia->datasize = 10;
4565 for (int i = 0; i < ia->datasize; ++i)
4566 ia->data[i] = i * 1.234;
4568 // Check named initializers.
4569 struct named_init ni = {
4570 .number = 34,
4571 .name = L"Test wide string",
4572 .average = 543.34343,
4575 ni.number = 58;
4577 int dynamic_array[ni.number];
4578 dynamic_array[ni.number - 1] = 543;
4580 // work around unused variable warnings
4581 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4582 || dynamic_array[ni.number - 1] != 543);
4585 return 0;
4587 _ACEOF
4588 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4590 CC="$ac_save_CC $ac_arg"
4591 if ac_fn_c_try_compile "$LINENO"; then :
4592 ac_cv_prog_cc_c99=$ac_arg
4594 rm -f core conftest.err conftest.$ac_objext
4595 test "x$ac_cv_prog_cc_c99" != "xno" && break
4596 done
4597 rm -f conftest.$ac_ext
4598 CC=$ac_save_CC
4601 # AC_CACHE_VAL
4602 case "x$ac_cv_prog_cc_c99" in
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4605 $as_echo "none needed" >&6; } ;;
4606 xno)
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4608 $as_echo "unsupported" >&6; } ;;
4610 CC="$CC $ac_cv_prog_cc_c99"
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4612 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4613 esac
4614 if test "x$ac_cv_prog_cc_c99" != xno; then :
4620 # Error out if the compiler does not support C99, as the codebase
4621 # relies on that.
4622 if test "$ac_cv_prog_cc_c99" = no; then
4623 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4626 ac_ext=cpp
4627 ac_cpp='$CXXCPP $CPPFLAGS'
4628 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4629 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4630 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4631 if test -z "$CXX"; then
4632 if test -n "$CCC"; then
4633 CXX=$CCC
4634 else
4635 if test -n "$ac_tool_prefix"; then
4636 for ac_prog in $pgac_cxx_list
4638 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4639 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4641 $as_echo_n "checking for $ac_word... " >&6; }
4642 if ${ac_cv_prog_CXX+:} false; then :
4643 $as_echo_n "(cached) " >&6
4644 else
4645 if test -n "$CXX"; then
4646 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4647 else
4648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649 for as_dir in $PATH
4651 IFS=$as_save_IFS
4652 test -z "$as_dir" && as_dir=.
4653 for ac_exec_ext in '' $ac_executable_extensions; do
4654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4655 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657 break 2
4659 done
4660 done
4661 IFS=$as_save_IFS
4665 CXX=$ac_cv_prog_CXX
4666 if test -n "$CXX"; then
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4668 $as_echo "$CXX" >&6; }
4669 else
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671 $as_echo "no" >&6; }
4675 test -n "$CXX" && break
4676 done
4678 if test -z "$CXX"; then
4679 ac_ct_CXX=$CXX
4680 for ac_prog in $pgac_cxx_list
4682 # Extract the first word of "$ac_prog", so it can be a program name with args.
4683 set dummy $ac_prog; ac_word=$2
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685 $as_echo_n "checking for $ac_word... " >&6; }
4686 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688 else
4689 if test -n "$ac_ct_CXX"; then
4690 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4691 else
4692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693 for as_dir in $PATH
4695 IFS=$as_save_IFS
4696 test -z "$as_dir" && as_dir=.
4697 for ac_exec_ext in '' $ac_executable_extensions; do
4698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699 ac_cv_prog_ac_ct_CXX="$ac_prog"
4700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701 break 2
4703 done
4704 done
4705 IFS=$as_save_IFS
4709 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4710 if test -n "$ac_ct_CXX"; then
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4712 $as_echo "$ac_ct_CXX" >&6; }
4713 else
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715 $as_echo "no" >&6; }
4719 test -n "$ac_ct_CXX" && break
4720 done
4722 if test "x$ac_ct_CXX" = x; then
4723 CXX="g++"
4724 else
4725 case $cross_compiling:$ac_tool_warned in
4726 yes:)
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4728 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4729 ac_tool_warned=yes ;;
4730 esac
4731 CXX=$ac_ct_CXX
4737 # Provide some information about the compiler.
4738 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4739 set X $ac_compile
4740 ac_compiler=$2
4741 for ac_option in --version -v -V -qversion; do
4742 { { ac_try="$ac_compiler $ac_option >&5"
4743 case "(($ac_try" in
4744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4745 *) ac_try_echo=$ac_try;;
4746 esac
4747 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4748 $as_echo "$ac_try_echo"; } >&5
4749 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4750 ac_status=$?
4751 if test -s conftest.err; then
4752 sed '10a\
4753 ... rest of stderr output deleted ...
4754 10q' conftest.err >conftest.er1
4755 cat conftest.er1 >&5
4757 rm -f conftest.er1 conftest.err
4758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4759 test $ac_status = 0; }
4760 done
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4763 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4764 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4765 $as_echo_n "(cached) " >&6
4766 else
4767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4768 /* end confdefs.h. */
4771 main ()
4773 #ifndef __GNUC__
4774 choke me
4775 #endif
4778 return 0;
4780 _ACEOF
4781 if ac_fn_cxx_try_compile "$LINENO"; then :
4782 ac_compiler_gnu=yes
4783 else
4784 ac_compiler_gnu=no
4786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4787 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4791 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4792 if test $ac_compiler_gnu = yes; then
4793 GXX=yes
4794 else
4795 GXX=
4797 ac_test_CXXFLAGS=${CXXFLAGS+set}
4798 ac_save_CXXFLAGS=$CXXFLAGS
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4800 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4801 if ${ac_cv_prog_cxx_g+:} false; then :
4802 $as_echo_n "(cached) " >&6
4803 else
4804 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4805 ac_cxx_werror_flag=yes
4806 ac_cv_prog_cxx_g=no
4807 CXXFLAGS="-g"
4808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4809 /* end confdefs.h. */
4812 main ()
4816 return 0;
4818 _ACEOF
4819 if ac_fn_cxx_try_compile "$LINENO"; then :
4820 ac_cv_prog_cxx_g=yes
4821 else
4822 CXXFLAGS=""
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824 /* end confdefs.h. */
4827 main ()
4831 return 0;
4833 _ACEOF
4834 if ac_fn_cxx_try_compile "$LINENO"; then :
4836 else
4837 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4838 CXXFLAGS="-g"
4839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4840 /* end confdefs.h. */
4843 main ()
4847 return 0;
4849 _ACEOF
4850 if ac_fn_cxx_try_compile "$LINENO"; then :
4851 ac_cv_prog_cxx_g=yes
4853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4858 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4861 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4862 if test "$ac_test_CXXFLAGS" = set; then
4863 CXXFLAGS=$ac_save_CXXFLAGS
4864 elif test $ac_cv_prog_cxx_g = yes; then
4865 if test "$GXX" = yes; then
4866 CXXFLAGS="-g -O2"
4867 else
4868 CXXFLAGS="-g"
4870 else
4871 if test "$GXX" = yes; then
4872 CXXFLAGS="-O2"
4873 else
4874 CXXFLAGS=
4877 ac_ext=c
4878 ac_cpp='$CPP $CPPFLAGS'
4879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4884 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4885 # but has idiosyncrasies of its own. We assume icc will define
4886 # __INTEL_COMPILER regardless of CFLAGS.
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4892 main ()
4894 #ifndef __INTEL_COMPILER
4895 choke me
4896 #endif
4898 return 0;
4900 _ACEOF
4901 if ac_fn_c_try_compile "$LINENO"; then :
4902 ICC=yes
4903 else
4904 ICC=no
4906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4908 # Check if it's Sun Studio compiler. We assume that
4909 # __SUNPRO_C will be defined for Sun Studio compilers
4910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4911 /* end confdefs.h. */
4914 main ()
4916 #ifndef __SUNPRO_C
4917 choke me
4918 #endif
4920 return 0;
4922 _ACEOF
4923 if ac_fn_c_try_compile "$LINENO"; then :
4924 SUN_STUDIO_CC=yes
4925 else
4926 SUN_STUDIO_CC=no
4928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934 # LLVM
4936 # Checked early because subsequent tests depend on it.
4940 # Check whether --with-llvm was given.
4941 if test "${with_llvm+set}" = set; then :
4942 withval=$with_llvm;
4943 case $withval in
4944 yes)
4946 $as_echo "#define USE_LLVM 1" >>confdefs.h
4953 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4955 esac
4957 else
4958 with_llvm=no
4964 for ac_prog in gawk mawk nawk awk
4966 # Extract the first word of "$ac_prog", so it can be a program name with args.
4967 set dummy $ac_prog; ac_word=$2
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969 $as_echo_n "checking for $ac_word... " >&6; }
4970 if ${ac_cv_prog_AWK+:} false; then :
4971 $as_echo_n "(cached) " >&6
4972 else
4973 if test -n "$AWK"; then
4974 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4975 else
4976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977 for as_dir in $PATH
4979 IFS=$as_save_IFS
4980 test -z "$as_dir" && as_dir=.
4981 for ac_exec_ext in '' $ac_executable_extensions; do
4982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983 ac_cv_prog_AWK="$ac_prog"
4984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985 break 2
4987 done
4988 done
4989 IFS=$as_save_IFS
4993 AWK=$ac_cv_prog_AWK
4994 if test -n "$AWK"; then
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4996 $as_echo "$AWK" >&6; }
4997 else
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999 $as_echo "no" >&6; }
5003 test -n "$AWK" && break
5004 done
5006 if test "$with_llvm" = yes; then :
5012 if test -z "$LLVM_CONFIG"; then
5013 for ac_prog in llvm-config
5015 # Extract the first word of "$ac_prog", so it can be a program name with args.
5016 set dummy $ac_prog; ac_word=$2
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018 $as_echo_n "checking for $ac_word... " >&6; }
5019 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5020 $as_echo_n "(cached) " >&6
5021 else
5022 case $LLVM_CONFIG in
5023 [\\/]* | ?:[\\/]*)
5024 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028 for as_dir in $PATH
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
5032 for ac_exec_ext in '' $ac_executable_extensions; do
5033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5034 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5036 break 2
5038 done
5039 done
5040 IFS=$as_save_IFS
5043 esac
5045 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5046 if test -n "$LLVM_CONFIG"; then
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5048 $as_echo "$LLVM_CONFIG" >&6; }
5049 else
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051 $as_echo "no" >&6; }
5055 test -n "$LLVM_CONFIG" && break
5056 done
5058 else
5059 # Report the value of LLVM_CONFIG in configure's output in all cases.
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5061 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5063 $as_echo "$LLVM_CONFIG" >&6; }
5067 # no point continuing if llvm wasn't found
5068 if test -z "$LLVM_CONFIG"; then
5069 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5071 # check if detected $LLVM_CONFIG is executable
5072 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5073 if test "x$pgac_llvm_version" = "xno"; then
5074 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5076 # and whether the version is supported
5077 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 14) exit 1; else exit 0;}';then
5078 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 14 is required" "$LINENO" 5
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5081 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5083 # need clang to create some bitcode files
5085 if test -z "$CLANG"; then
5086 for ac_prog in clang
5088 # Extract the first word of "$ac_prog", so it can be a program name with args.
5089 set dummy $ac_prog; ac_word=$2
5090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091 $as_echo_n "checking for $ac_word... " >&6; }
5092 if ${ac_cv_path_CLANG+:} false; then :
5093 $as_echo_n "(cached) " >&6
5094 else
5095 case $CLANG in
5096 [\\/]* | ?:[\\/]*)
5097 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5101 for as_dir in $PATH
5103 IFS=$as_save_IFS
5104 test -z "$as_dir" && as_dir=.
5105 for ac_exec_ext in '' $ac_executable_extensions; do
5106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5107 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5109 break 2
5111 done
5112 done
5113 IFS=$as_save_IFS
5116 esac
5118 CLANG=$ac_cv_path_CLANG
5119 if test -n "$CLANG"; then
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5121 $as_echo "$CLANG" >&6; }
5122 else
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5124 $as_echo "no" >&6; }
5128 test -n "$CLANG" && break
5129 done
5131 else
5132 # Report the value of CLANG in configure's output in all cases.
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5134 $as_echo_n "checking for CLANG... " >&6; }
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5136 $as_echo "$CLANG" >&6; }
5139 if test -z "$CLANG"; then
5140 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5142 # make sure clang is executable
5143 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5144 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5146 # Could check clang version, but it doesn't seem that
5147 # important. Systems with a new enough LLVM version are usually
5148 # going to have a decent clang version too. It's also not entirely
5149 # clear what the minimum version is.
5151 # Collect compiler flags necessary to build the LLVM dependent
5152 # shared library.
5153 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5154 case $pgac_option in
5155 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5156 esac
5157 done
5159 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5160 case $pgac_option in
5161 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5162 esac
5163 done
5165 # ABI influencing options, standard influencing options
5166 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5167 case $pgac_option in
5168 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5169 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5170 esac
5171 done
5173 # Look for components we're interested in, collect necessary
5174 # libs. As some components are optional, we can't just list all of
5175 # them as it'd raise an error.
5176 pgac_components='';
5177 for pgac_component in `$LLVM_CONFIG --components`; do
5178 case $pgac_component in
5179 engine) pgac_components="$pgac_components $pgac_component";;
5180 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5181 orcjit) pgac_components="$pgac_components $pgac_component";;
5182 passes) pgac_components="$pgac_components $pgac_component";;
5183 native) pgac_components="$pgac_components $pgac_component";;
5184 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5185 esac
5186 done;
5188 # And then get the libraries that need to be linked in for the
5189 # selected components. They're large libraries, we only want to
5190 # link them into the LLVM using shared library.
5191 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5192 case $pgac_option in
5193 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5194 esac
5195 done
5197 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5207 fi # fi
5210 unset CFLAGS
5211 unset CXXFLAGS
5214 # Read the template
5216 . "$srcdir/src/template/$template" || exit
5218 # C[XX]FLAGS are selected so:
5219 # If the user specifies something in the environment, that is used.
5220 # else: If the template file set something, that is used.
5221 # else: If coverage was enabled, don't set anything.
5222 # else: If the compiler is GCC, then we use -O2.
5223 # else: If the compiler is something else, then we use -O, unless debugging.
5225 if test "$ac_env_CFLAGS_set" = set; then
5226 CFLAGS=$ac_env_CFLAGS_value
5227 elif test "${CFLAGS+set}" = set; then
5228 : # (keep what template set)
5229 elif test "$enable_coverage" = yes; then
5230 : # no optimization by default
5231 elif test "$GCC" = yes; then
5232 CFLAGS="-O2"
5233 else
5234 # if the user selected debug mode, don't use -O
5235 if test "$enable_debug" != yes; then
5236 CFLAGS="-O"
5240 if test "$ac_env_CXXFLAGS_set" = set; then
5241 CXXFLAGS=$ac_env_CXXFLAGS_value
5242 elif test "${CXXFLAGS+set}" = set; then
5243 : # (keep what template set)
5244 elif test "$enable_coverage" = yes; then
5245 : # no optimization by default
5246 elif test "$GCC" = yes; then
5247 CXXFLAGS="-O2"
5248 else
5249 # if the user selected debug mode, don't use -O
5250 if test "$enable_debug" != yes; then
5251 CXXFLAGS="-O"
5255 # When generating bitcode (for inlining) we always want to use -O2
5256 # even when --enable-debug is specified. The bitcode is not going to
5257 # be used for line-by-line debugging, and JIT inlining doesn't work
5258 # without at least -O1 (otherwise clang will emit 'noinline'
5259 # attributes everywhere), which is bad for testing. Still allow the
5260 # environment to override if done explicitly.
5261 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5262 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5263 else
5264 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5266 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5267 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5268 else
5269 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5272 # C[XX]FLAGS we determined above will be added back at the end
5273 user_CFLAGS=$CFLAGS
5274 CFLAGS=""
5275 user_CXXFLAGS=$CXXFLAGS
5276 CXXFLAGS=""
5277 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5278 BITCODE_CFLAGS=""
5279 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5280 BITCODE_CXXFLAGS=""
5282 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5283 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5284 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5286 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5287 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5290 # Some versions of GCC support some additional useful warning flags.
5291 # Check whether they are supported, and add them to CFLAGS if so.
5292 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5293 # but has its own. Also check other compiler-specific flags here.
5295 if test "$GCC" = yes -a "$ICC" = no; then
5296 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5297 CXXFLAGS="-Wall -Wpointer-arith"
5298 # These work in some but not all gcc versions
5299 save_CFLAGS=$CFLAGS
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5302 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5303 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5304 $as_echo_n "(cached) " >&6
5305 else
5306 pgac_save_CFLAGS=$CFLAGS
5307 pgac_save_CC=$CC
5308 CC=${CC}
5309 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5310 ac_save_c_werror_flag=$ac_c_werror_flag
5311 ac_c_werror_flag=yes
5312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5313 /* end confdefs.h. */
5316 main ()
5320 return 0;
5322 _ACEOF
5323 if ac_fn_c_try_compile "$LINENO"; then :
5324 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5325 else
5326 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5329 ac_c_werror_flag=$ac_save_c_werror_flag
5330 CFLAGS="$pgac_save_CFLAGS"
5331 CC="$pgac_save_CC"
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5334 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5335 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5336 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5340 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5341 # disable it, so AC_SUBST the negative form.
5342 PERMIT_DECLARATION_AFTER_STATEMENT=
5343 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5344 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5347 # Really don't want VLAs to be used in our dialect of C
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5350 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5351 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5352 $as_echo_n "(cached) " >&6
5353 else
5354 pgac_save_CFLAGS=$CFLAGS
5355 pgac_save_CC=$CC
5356 CC=${CC}
5357 CFLAGS="${CFLAGS} -Werror=vla"
5358 ac_save_c_werror_flag=$ac_c_werror_flag
5359 ac_c_werror_flag=yes
5360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5361 /* end confdefs.h. */
5364 main ()
5368 return 0;
5370 _ACEOF
5371 if ac_fn_c_try_compile "$LINENO"; then :
5372 pgac_cv_prog_CC_cflags__Werror_vla=yes
5373 else
5374 pgac_cv_prog_CC_cflags__Werror_vla=no
5376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5377 ac_c_werror_flag=$ac_save_c_werror_flag
5378 CFLAGS="$pgac_save_CFLAGS"
5379 CC="$pgac_save_CC"
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5382 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5383 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5384 CFLAGS="${CFLAGS} -Werror=vla"
5388 # On macOS, complain about usage of symbols newer than the deployment target
5390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5391 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5392 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5393 $as_echo_n "(cached) " >&6
5394 else
5395 pgac_save_CFLAGS=$CFLAGS
5396 pgac_save_CC=$CC
5397 CC=${CC}
5398 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5399 ac_save_c_werror_flag=$ac_c_werror_flag
5400 ac_c_werror_flag=yes
5401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5402 /* end confdefs.h. */
5405 main ()
5409 return 0;
5411 _ACEOF
5412 if ac_fn_c_try_compile "$LINENO"; then :
5413 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5414 else
5415 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5418 ac_c_werror_flag=$ac_save_c_werror_flag
5419 CFLAGS="$pgac_save_CFLAGS"
5420 CC="$pgac_save_CC"
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5423 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5424 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5425 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5430 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5431 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5432 $as_echo_n "(cached) " >&6
5433 else
5434 pgac_save_CXXFLAGS=$CXXFLAGS
5435 pgac_save_CXX=$CXX
5436 CXX=${CXX}
5437 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5438 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5439 ac_cxx_werror_flag=yes
5440 ac_ext=cpp
5441 ac_cpp='$CXXCPP $CPPFLAGS'
5442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5447 /* end confdefs.h. */
5450 main ()
5454 return 0;
5456 _ACEOF
5457 if ac_fn_cxx_try_compile "$LINENO"; then :
5458 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5459 else
5460 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5463 ac_ext=c
5464 ac_cpp='$CPP $CPPFLAGS'
5465 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5466 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5467 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5469 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5470 CXXFLAGS="$pgac_save_CXXFLAGS"
5471 CXX="$pgac_save_CXX"
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5474 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5475 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5476 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5480 # -Wvla is not applicable for C++
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5483 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5484 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5485 $as_echo_n "(cached) " >&6
5486 else
5487 pgac_save_CFLAGS=$CFLAGS
5488 pgac_save_CC=$CC
5489 CC=${CC}
5490 CFLAGS="${CFLAGS} -Wendif-labels"
5491 ac_save_c_werror_flag=$ac_c_werror_flag
5492 ac_c_werror_flag=yes
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494 /* end confdefs.h. */
5497 main ()
5501 return 0;
5503 _ACEOF
5504 if ac_fn_c_try_compile "$LINENO"; then :
5505 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5506 else
5507 pgac_cv_prog_CC_cflags__Wendif_labels=no
5509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5510 ac_c_werror_flag=$ac_save_c_werror_flag
5511 CFLAGS="$pgac_save_CFLAGS"
5512 CC="$pgac_save_CC"
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5515 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5516 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5517 CFLAGS="${CFLAGS} -Wendif-labels"
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5522 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5523 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5524 $as_echo_n "(cached) " >&6
5525 else
5526 pgac_save_CXXFLAGS=$CXXFLAGS
5527 pgac_save_CXX=$CXX
5528 CXX=${CXX}
5529 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5530 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5531 ac_cxx_werror_flag=yes
5532 ac_ext=cpp
5533 ac_cpp='$CXXCPP $CPPFLAGS'
5534 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5535 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5536 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5539 /* end confdefs.h. */
5542 main ()
5546 return 0;
5548 _ACEOF
5549 if ac_fn_cxx_try_compile "$LINENO"; then :
5550 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5551 else
5552 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5555 ac_ext=c
5556 ac_cpp='$CPP $CPPFLAGS'
5557 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5558 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5559 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5561 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5562 CXXFLAGS="$pgac_save_CXXFLAGS"
5563 CXX="$pgac_save_CXX"
5565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5566 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5567 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5568 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5574 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5575 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5576 $as_echo_n "(cached) " >&6
5577 else
5578 pgac_save_CFLAGS=$CFLAGS
5579 pgac_save_CC=$CC
5580 CC=${CC}
5581 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5582 ac_save_c_werror_flag=$ac_c_werror_flag
5583 ac_c_werror_flag=yes
5584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5585 /* end confdefs.h. */
5588 main ()
5592 return 0;
5594 _ACEOF
5595 if ac_fn_c_try_compile "$LINENO"; then :
5596 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5597 else
5598 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5601 ac_c_werror_flag=$ac_save_c_werror_flag
5602 CFLAGS="$pgac_save_CFLAGS"
5603 CC="$pgac_save_CC"
5605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5606 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5607 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5608 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5613 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5614 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5615 $as_echo_n "(cached) " >&6
5616 else
5617 pgac_save_CXXFLAGS=$CXXFLAGS
5618 pgac_save_CXX=$CXX
5619 CXX=${CXX}
5620 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5621 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5622 ac_cxx_werror_flag=yes
5623 ac_ext=cpp
5624 ac_cpp='$CXXCPP $CPPFLAGS'
5625 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5626 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5627 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5630 /* end confdefs.h. */
5633 main ()
5637 return 0;
5639 _ACEOF
5640 if ac_fn_cxx_try_compile "$LINENO"; then :
5641 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5642 else
5643 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5646 ac_ext=c
5647 ac_cpp='$CPP $CPPFLAGS'
5648 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5649 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5650 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5652 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5653 CXXFLAGS="$pgac_save_CXXFLAGS"
5654 CXX="$pgac_save_CXX"
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5657 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5658 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5659 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5665 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5666 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5667 $as_echo_n "(cached) " >&6
5668 else
5669 pgac_save_CFLAGS=$CFLAGS
5670 pgac_save_CC=$CC
5671 CC=${CC}
5672 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5673 ac_save_c_werror_flag=$ac_c_werror_flag
5674 ac_c_werror_flag=yes
5675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5676 /* end confdefs.h. */
5679 main ()
5683 return 0;
5685 _ACEOF
5686 if ac_fn_c_try_compile "$LINENO"; then :
5687 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5688 else
5689 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5692 ac_c_werror_flag=$ac_save_c_werror_flag
5693 CFLAGS="$pgac_save_CFLAGS"
5694 CC="$pgac_save_CC"
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5697 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5698 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5699 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5704 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5705 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5706 $as_echo_n "(cached) " >&6
5707 else
5708 pgac_save_CXXFLAGS=$CXXFLAGS
5709 pgac_save_CXX=$CXX
5710 CXX=${CXX}
5711 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5712 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5713 ac_cxx_werror_flag=yes
5714 ac_ext=cpp
5715 ac_cpp='$CXXCPP $CPPFLAGS'
5716 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5717 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5718 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5721 /* end confdefs.h. */
5724 main ()
5728 return 0;
5730 _ACEOF
5731 if ac_fn_cxx_try_compile "$LINENO"; then :
5732 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5733 else
5734 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5737 ac_ext=c
5738 ac_cpp='$CPP $CPPFLAGS'
5739 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5740 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5741 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5743 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5744 CXXFLAGS="$pgac_save_CXXFLAGS"
5745 CXX="$pgac_save_CXX"
5747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5748 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5749 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5750 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5756 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5757 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5758 $as_echo_n "(cached) " >&6
5759 else
5760 pgac_save_CFLAGS=$CFLAGS
5761 pgac_save_CC=$CC
5762 CC=${CC}
5763 CFLAGS="${CFLAGS} -Wcast-function-type"
5764 ac_save_c_werror_flag=$ac_c_werror_flag
5765 ac_c_werror_flag=yes
5766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5767 /* end confdefs.h. */
5770 main ()
5774 return 0;
5776 _ACEOF
5777 if ac_fn_c_try_compile "$LINENO"; then :
5778 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5779 else
5780 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5783 ac_c_werror_flag=$ac_save_c_werror_flag
5784 CFLAGS="$pgac_save_CFLAGS"
5785 CC="$pgac_save_CC"
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5788 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5789 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5790 CFLAGS="${CFLAGS} -Wcast-function-type"
5794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5795 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5796 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5797 $as_echo_n "(cached) " >&6
5798 else
5799 pgac_save_CXXFLAGS=$CXXFLAGS
5800 pgac_save_CXX=$CXX
5801 CXX=${CXX}
5802 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5803 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5804 ac_cxx_werror_flag=yes
5805 ac_ext=cpp
5806 ac_cpp='$CXXCPP $CPPFLAGS'
5807 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5808 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5809 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5812 /* end confdefs.h. */
5815 main ()
5819 return 0;
5821 _ACEOF
5822 if ac_fn_cxx_try_compile "$LINENO"; then :
5823 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5824 else
5825 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5828 ac_ext=c
5829 ac_cpp='$CPP $CPPFLAGS'
5830 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5831 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5832 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5834 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5835 CXXFLAGS="$pgac_save_CXXFLAGS"
5836 CXX="$pgac_save_CXX"
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5839 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5840 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5841 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5847 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5848 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5849 $as_echo_n "(cached) " >&6
5850 else
5851 pgac_save_CFLAGS=$CFLAGS
5852 pgac_save_CC=$CC
5853 CC=${CC}
5854 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5855 ac_save_c_werror_flag=$ac_c_werror_flag
5856 ac_c_werror_flag=yes
5857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5858 /* end confdefs.h. */
5861 main ()
5865 return 0;
5867 _ACEOF
5868 if ac_fn_c_try_compile "$LINENO"; then :
5869 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5870 else
5871 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5874 ac_c_werror_flag=$ac_save_c_werror_flag
5875 CFLAGS="$pgac_save_CFLAGS"
5876 CC="$pgac_save_CC"
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5879 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5880 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5881 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5886 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5887 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5888 $as_echo_n "(cached) " >&6
5889 else
5890 pgac_save_CXXFLAGS=$CXXFLAGS
5891 pgac_save_CXX=$CXX
5892 CXX=${CXX}
5893 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5894 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5895 ac_cxx_werror_flag=yes
5896 ac_ext=cpp
5897 ac_cpp='$CXXCPP $CPPFLAGS'
5898 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5899 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5900 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5903 /* end confdefs.h. */
5906 main ()
5910 return 0;
5912 _ACEOF
5913 if ac_fn_cxx_try_compile "$LINENO"; then :
5914 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5915 else
5916 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5919 ac_ext=c
5920 ac_cpp='$CPP $CPPFLAGS'
5921 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5922 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5923 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5925 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5926 CXXFLAGS="$pgac_save_CXXFLAGS"
5927 CXX="$pgac_save_CXX"
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5930 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5931 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5932 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5936 # This was included in -Wall/-Wformat in older GCC versions
5938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5939 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5940 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5941 $as_echo_n "(cached) " >&6
5942 else
5943 pgac_save_CFLAGS=$CFLAGS
5944 pgac_save_CC=$CC
5945 CC=${CC}
5946 CFLAGS="${CFLAGS} -Wformat-security"
5947 ac_save_c_werror_flag=$ac_c_werror_flag
5948 ac_c_werror_flag=yes
5949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5950 /* end confdefs.h. */
5953 main ()
5957 return 0;
5959 _ACEOF
5960 if ac_fn_c_try_compile "$LINENO"; then :
5961 pgac_cv_prog_CC_cflags__Wformat_security=yes
5962 else
5963 pgac_cv_prog_CC_cflags__Wformat_security=no
5965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5966 ac_c_werror_flag=$ac_save_c_werror_flag
5967 CFLAGS="$pgac_save_CFLAGS"
5968 CC="$pgac_save_CC"
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5971 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5972 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5973 CFLAGS="${CFLAGS} -Wformat-security"
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5978 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5979 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5980 $as_echo_n "(cached) " >&6
5981 else
5982 pgac_save_CXXFLAGS=$CXXFLAGS
5983 pgac_save_CXX=$CXX
5984 CXX=${CXX}
5985 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5986 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5987 ac_cxx_werror_flag=yes
5988 ac_ext=cpp
5989 ac_cpp='$CXXCPP $CPPFLAGS'
5990 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5991 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5992 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5995 /* end confdefs.h. */
5998 main ()
6002 return 0;
6004 _ACEOF
6005 if ac_fn_cxx_try_compile "$LINENO"; then :
6006 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6007 else
6008 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6011 ac_ext=c
6012 ac_cpp='$CPP $CPPFLAGS'
6013 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6014 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6015 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6017 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6018 CXXFLAGS="$pgac_save_CXXFLAGS"
6019 CXX="$pgac_save_CXX"
6021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6022 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6023 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6024 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6028 # gcc 14+, clang for a while
6029 # (Supported in C++ by clang but not gcc. For consistency, omit in C++.)
6030 save_CFLAGS=$CFLAGS
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS" >&5
6033 $as_echo_n "checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS... " >&6; }
6034 if ${pgac_cv_prog_CC_cflags__Wmissing_variable_declarations+:} false; then :
6035 $as_echo_n "(cached) " >&6
6036 else
6037 pgac_save_CFLAGS=$CFLAGS
6038 pgac_save_CC=$CC
6039 CC=${CC}
6040 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6041 ac_save_c_werror_flag=$ac_c_werror_flag
6042 ac_c_werror_flag=yes
6043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6044 /* end confdefs.h. */
6047 main ()
6051 return 0;
6053 _ACEOF
6054 if ac_fn_c_try_compile "$LINENO"; then :
6055 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=yes
6056 else
6057 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=no
6059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6060 ac_c_werror_flag=$ac_save_c_werror_flag
6061 CFLAGS="$pgac_save_CFLAGS"
6062 CC="$pgac_save_CC"
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&5
6065 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&6; }
6066 if test x"$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" = x"yes"; then
6067 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6071 PERMIT_MISSING_VARIABLE_DECLARATIONS=
6072 if test x"$save_CFLAGS" != x"$CFLAGS"; then
6073 PERMIT_MISSING_VARIABLE_DECLARATIONS=-Wno-missing-variable-declarations
6076 # Disable strict-aliasing rules; needed for gcc 3.3+
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6079 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6080 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6081 $as_echo_n "(cached) " >&6
6082 else
6083 pgac_save_CFLAGS=$CFLAGS
6084 pgac_save_CC=$CC
6085 CC=${CC}
6086 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6087 ac_save_c_werror_flag=$ac_c_werror_flag
6088 ac_c_werror_flag=yes
6089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6090 /* end confdefs.h. */
6093 main ()
6097 return 0;
6099 _ACEOF
6100 if ac_fn_c_try_compile "$LINENO"; then :
6101 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6102 else
6103 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6105 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6106 ac_c_werror_flag=$ac_save_c_werror_flag
6107 CFLAGS="$pgac_save_CFLAGS"
6108 CC="$pgac_save_CC"
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6111 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6112 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6113 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6118 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6119 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6120 $as_echo_n "(cached) " >&6
6121 else
6122 pgac_save_CXXFLAGS=$CXXFLAGS
6123 pgac_save_CXX=$CXX
6124 CXX=${CXX}
6125 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6126 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6127 ac_cxx_werror_flag=yes
6128 ac_ext=cpp
6129 ac_cpp='$CXXCPP $CPPFLAGS'
6130 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6131 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6132 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6135 /* end confdefs.h. */
6138 main ()
6142 return 0;
6144 _ACEOF
6145 if ac_fn_cxx_try_compile "$LINENO"; then :
6146 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6147 else
6148 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6151 ac_ext=c
6152 ac_cpp='$CPP $CPPFLAGS'
6153 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6154 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6157 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6158 CXXFLAGS="$pgac_save_CXXFLAGS"
6159 CXX="$pgac_save_CXX"
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6162 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6163 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6164 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6168 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6171 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6172 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6173 $as_echo_n "(cached) " >&6
6174 else
6175 pgac_save_CFLAGS=$CFLAGS
6176 pgac_save_CC=$CC
6177 CC=${CC}
6178 CFLAGS="${CFLAGS} -fwrapv"
6179 ac_save_c_werror_flag=$ac_c_werror_flag
6180 ac_c_werror_flag=yes
6181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6182 /* end confdefs.h. */
6185 main ()
6189 return 0;
6191 _ACEOF
6192 if ac_fn_c_try_compile "$LINENO"; then :
6193 pgac_cv_prog_CC_cflags__fwrapv=yes
6194 else
6195 pgac_cv_prog_CC_cflags__fwrapv=no
6197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6198 ac_c_werror_flag=$ac_save_c_werror_flag
6199 CFLAGS="$pgac_save_CFLAGS"
6200 CC="$pgac_save_CC"
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6203 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6204 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6205 CFLAGS="${CFLAGS} -fwrapv"
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6210 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6211 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6212 $as_echo_n "(cached) " >&6
6213 else
6214 pgac_save_CXXFLAGS=$CXXFLAGS
6215 pgac_save_CXX=$CXX
6216 CXX=${CXX}
6217 CXXFLAGS="${CXXFLAGS} -fwrapv"
6218 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6219 ac_cxx_werror_flag=yes
6220 ac_ext=cpp
6221 ac_cpp='$CXXCPP $CPPFLAGS'
6222 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6223 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6224 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6227 /* end confdefs.h. */
6230 main ()
6234 return 0;
6236 _ACEOF
6237 if ac_fn_cxx_try_compile "$LINENO"; then :
6238 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6239 else
6240 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6243 ac_ext=c
6244 ac_cpp='$CPP $CPPFLAGS'
6245 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6246 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6247 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6249 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6250 CXXFLAGS="$pgac_save_CXXFLAGS"
6251 CXX="$pgac_save_CXX"
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6254 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6255 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6256 CXXFLAGS="${CXXFLAGS} -fwrapv"
6260 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6263 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6264 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6265 $as_echo_n "(cached) " >&6
6266 else
6267 pgac_save_CFLAGS=$CFLAGS
6268 pgac_save_CC=$CC
6269 CC=${CC}
6270 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6271 ac_save_c_werror_flag=$ac_c_werror_flag
6272 ac_c_werror_flag=yes
6273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6274 /* end confdefs.h. */
6277 main ()
6281 return 0;
6283 _ACEOF
6284 if ac_fn_c_try_compile "$LINENO"; then :
6285 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6286 else
6287 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6290 ac_c_werror_flag=$ac_save_c_werror_flag
6291 CFLAGS="$pgac_save_CFLAGS"
6292 CC="$pgac_save_CC"
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6295 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6296 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6297 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6302 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6303 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6304 $as_echo_n "(cached) " >&6
6305 else
6306 pgac_save_CXXFLAGS=$CXXFLAGS
6307 pgac_save_CXX=$CXX
6308 CXX=${CXX}
6309 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6310 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6311 ac_cxx_werror_flag=yes
6312 ac_ext=cpp
6313 ac_cpp='$CXXCPP $CPPFLAGS'
6314 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6315 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6316 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6319 /* end confdefs.h. */
6322 main ()
6326 return 0;
6328 _ACEOF
6329 if ac_fn_cxx_try_compile "$LINENO"; then :
6330 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6331 else
6332 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6335 ac_ext=c
6336 ac_cpp='$CPP $CPPFLAGS'
6337 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6338 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6339 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6341 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6342 CXXFLAGS="$pgac_save_CXXFLAGS"
6343 CXX="$pgac_save_CXX"
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6346 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6347 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6348 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6352 # Optimization flags for specific files that benefit from loop unrolling
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6354 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6355 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6356 $as_echo_n "(cached) " >&6
6357 else
6358 pgac_save_CFLAGS=$CFLAGS
6359 pgac_save_CC=$CC
6360 CC=${CC}
6361 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6362 ac_save_c_werror_flag=$ac_c_werror_flag
6363 ac_c_werror_flag=yes
6364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6365 /* end confdefs.h. */
6368 main ()
6372 return 0;
6374 _ACEOF
6375 if ac_fn_c_try_compile "$LINENO"; then :
6376 pgac_cv_prog_CC_cflags__funroll_loops=yes
6377 else
6378 pgac_cv_prog_CC_cflags__funroll_loops=no
6380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6381 ac_c_werror_flag=$ac_save_c_werror_flag
6382 CFLAGS="$pgac_save_CFLAGS"
6383 CC="$pgac_save_CC"
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6386 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6387 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6388 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6392 # Optimization flags for specific files that benefit from vectorization
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6394 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6395 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6396 $as_echo_n "(cached) " >&6
6397 else
6398 pgac_save_CFLAGS=$CFLAGS
6399 pgac_save_CC=$CC
6400 CC=${CC}
6401 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6402 ac_save_c_werror_flag=$ac_c_werror_flag
6403 ac_c_werror_flag=yes
6404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6405 /* end confdefs.h. */
6408 main ()
6412 return 0;
6414 _ACEOF
6415 if ac_fn_c_try_compile "$LINENO"; then :
6416 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6417 else
6418 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6421 ac_c_werror_flag=$ac_save_c_werror_flag
6422 CFLAGS="$pgac_save_CFLAGS"
6423 CC="$pgac_save_CC"
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6426 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6427 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6428 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6433 # The following tests want to suppress various unhelpful warnings by adding
6434 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6435 # switches, so we have to test for the positive form and if that works,
6436 # add the negative form. Note that tests of this form typically need to
6437 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6439 # Suppress clang's unhelpful unused-command-line-argument warnings.
6440 NOT_THE_CFLAGS=""
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6442 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6443 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6444 $as_echo_n "(cached) " >&6
6445 else
6446 pgac_save_CFLAGS=$CFLAGS
6447 pgac_save_CC=$CC
6448 CC=${CC}
6449 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6450 ac_save_c_werror_flag=$ac_c_werror_flag
6451 ac_c_werror_flag=yes
6452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6453 /* end confdefs.h. */
6456 main ()
6460 return 0;
6462 _ACEOF
6463 if ac_fn_c_try_compile "$LINENO"; then :
6464 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6465 else
6466 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6469 ac_c_werror_flag=$ac_save_c_werror_flag
6470 CFLAGS="$pgac_save_CFLAGS"
6471 CC="$pgac_save_CC"
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6474 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6475 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6476 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6480 if test -n "$NOT_THE_CFLAGS"; then
6481 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6483 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6484 # of warnings when building plperl because of usages in the Perl headers.
6485 NOT_THE_CFLAGS=""
6486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6487 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6488 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6489 $as_echo_n "(cached) " >&6
6490 else
6491 pgac_save_CFLAGS=$CFLAGS
6492 pgac_save_CC=$CC
6493 CC=${CC}
6494 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6495 ac_save_c_werror_flag=$ac_c_werror_flag
6496 ac_c_werror_flag=yes
6497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6498 /* end confdefs.h. */
6501 main ()
6505 return 0;
6507 _ACEOF
6508 if ac_fn_c_try_compile "$LINENO"; then :
6509 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6510 else
6511 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6514 ac_c_werror_flag=$ac_save_c_werror_flag
6515 CFLAGS="$pgac_save_CFLAGS"
6516 CC="$pgac_save_CC"
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6519 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6520 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6521 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6525 if test -n "$NOT_THE_CFLAGS"; then
6526 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6528 # Similarly disable useless truncation warnings from gcc 8+
6529 NOT_THE_CFLAGS=""
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6531 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6532 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6533 $as_echo_n "(cached) " >&6
6534 else
6535 pgac_save_CFLAGS=$CFLAGS
6536 pgac_save_CC=$CC
6537 CC=${CC}
6538 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6539 ac_save_c_werror_flag=$ac_c_werror_flag
6540 ac_c_werror_flag=yes
6541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6542 /* end confdefs.h. */
6545 main ()
6549 return 0;
6551 _ACEOF
6552 if ac_fn_c_try_compile "$LINENO"; then :
6553 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6554 else
6555 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6558 ac_c_werror_flag=$ac_save_c_werror_flag
6559 CFLAGS="$pgac_save_CFLAGS"
6560 CC="$pgac_save_CC"
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6563 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6564 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6565 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6569 if test -n "$NOT_THE_CFLAGS"; then
6570 CFLAGS="$CFLAGS -Wno-format-truncation"
6572 NOT_THE_CFLAGS=""
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6574 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6575 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6576 $as_echo_n "(cached) " >&6
6577 else
6578 pgac_save_CFLAGS=$CFLAGS
6579 pgac_save_CC=$CC
6580 CC=${CC}
6581 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6582 ac_save_c_werror_flag=$ac_c_werror_flag
6583 ac_c_werror_flag=yes
6584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6585 /* end confdefs.h. */
6588 main ()
6592 return 0;
6594 _ACEOF
6595 if ac_fn_c_try_compile "$LINENO"; then :
6596 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6597 else
6598 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6601 ac_c_werror_flag=$ac_save_c_werror_flag
6602 CFLAGS="$pgac_save_CFLAGS"
6603 CC="$pgac_save_CC"
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6606 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6607 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6608 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6612 if test -n "$NOT_THE_CFLAGS"; then
6613 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6615 # Suppress clang 16's strict warnings about function casts
6616 NOT_THE_CFLAGS=""
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6618 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6619 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6620 $as_echo_n "(cached) " >&6
6621 else
6622 pgac_save_CFLAGS=$CFLAGS
6623 pgac_save_CC=$CC
6624 CC=${CC}
6625 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6626 ac_save_c_werror_flag=$ac_c_werror_flag
6627 ac_c_werror_flag=yes
6628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6629 /* end confdefs.h. */
6632 main ()
6636 return 0;
6638 _ACEOF
6639 if ac_fn_c_try_compile "$LINENO"; then :
6640 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6641 else
6642 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6645 ac_c_werror_flag=$ac_save_c_werror_flag
6646 CFLAGS="$pgac_save_CFLAGS"
6647 CC="$pgac_save_CC"
6649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6650 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6651 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6652 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6656 if test -n "$NOT_THE_CFLAGS"; then
6657 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6659 elif test "$ICC" = yes; then
6660 # Intel's compiler has a bug/misoptimization in checking for
6661 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6664 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6665 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667 else
6668 pgac_save_CFLAGS=$CFLAGS
6669 pgac_save_CC=$CC
6670 CC=${CC}
6671 CFLAGS="${CFLAGS} -mp1"
6672 ac_save_c_werror_flag=$ac_c_werror_flag
6673 ac_c_werror_flag=yes
6674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6675 /* end confdefs.h. */
6678 main ()
6682 return 0;
6684 _ACEOF
6685 if ac_fn_c_try_compile "$LINENO"; then :
6686 pgac_cv_prog_CC_cflags__mp1=yes
6687 else
6688 pgac_cv_prog_CC_cflags__mp1=no
6690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6691 ac_c_werror_flag=$ac_save_c_werror_flag
6692 CFLAGS="$pgac_save_CFLAGS"
6693 CC="$pgac_save_CC"
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6696 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6697 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6698 CFLAGS="${CFLAGS} -mp1"
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6703 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6704 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6705 $as_echo_n "(cached) " >&6
6706 else
6707 pgac_save_CXXFLAGS=$CXXFLAGS
6708 pgac_save_CXX=$CXX
6709 CXX=${CXX}
6710 CXXFLAGS="${CXXFLAGS} -mp1"
6711 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6712 ac_cxx_werror_flag=yes
6713 ac_ext=cpp
6714 ac_cpp='$CXXCPP $CPPFLAGS'
6715 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6716 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6717 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6720 /* end confdefs.h. */
6723 main ()
6727 return 0;
6729 _ACEOF
6730 if ac_fn_cxx_try_compile "$LINENO"; then :
6731 pgac_cv_prog_CXX_cxxflags__mp1=yes
6732 else
6733 pgac_cv_prog_CXX_cxxflags__mp1=no
6735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6736 ac_ext=c
6737 ac_cpp='$CPP $CPPFLAGS'
6738 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6739 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6740 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6742 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6743 CXXFLAGS="$pgac_save_CXXFLAGS"
6744 CXX="$pgac_save_CXX"
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6747 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6748 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6749 CXXFLAGS="${CXXFLAGS} -mp1"
6753 # Make sure strict aliasing is off (though this is said to be the default)
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6756 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6757 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6758 $as_echo_n "(cached) " >&6
6759 else
6760 pgac_save_CFLAGS=$CFLAGS
6761 pgac_save_CC=$CC
6762 CC=${CC}
6763 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6764 ac_save_c_werror_flag=$ac_c_werror_flag
6765 ac_c_werror_flag=yes
6766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6767 /* end confdefs.h. */
6770 main ()
6774 return 0;
6776 _ACEOF
6777 if ac_fn_c_try_compile "$LINENO"; then :
6778 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6779 else
6780 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6783 ac_c_werror_flag=$ac_save_c_werror_flag
6784 CFLAGS="$pgac_save_CFLAGS"
6785 CC="$pgac_save_CC"
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6788 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6789 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6790 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6795 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6796 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6797 $as_echo_n "(cached) " >&6
6798 else
6799 pgac_save_CXXFLAGS=$CXXFLAGS
6800 pgac_save_CXX=$CXX
6801 CXX=${CXX}
6802 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6803 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6804 ac_cxx_werror_flag=yes
6805 ac_ext=cpp
6806 ac_cpp='$CXXCPP $CPPFLAGS'
6807 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6808 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6809 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6812 /* end confdefs.h. */
6815 main ()
6819 return 0;
6821 _ACEOF
6822 if ac_fn_cxx_try_compile "$LINENO"; then :
6823 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6824 else
6825 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6828 ac_ext=c
6829 ac_cpp='$CPP $CPPFLAGS'
6830 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6831 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6832 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6834 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6835 CXXFLAGS="$pgac_save_CXXFLAGS"
6836 CXX="$pgac_save_CXX"
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6839 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6840 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6841 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6847 # If the compiler knows how to hide symbols, add the switch needed for that to
6848 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6850 # This is done separately from the above because -fvisibility is supported by
6851 # quite a few different compilers, making the required repetition bothersome.
6853 # We might need to add a separate test to check if
6854 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6855 # compiler that supports one of the supported variants of -fvisibility=hidden
6856 # but uses a different syntax to mark a symbol as exported.
6857 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6859 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6860 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
6861 $as_echo_n "(cached) " >&6
6862 else
6863 pgac_save_CFLAGS=$CFLAGS
6864 pgac_save_CC=$CC
6865 CC=${CC}
6866 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6867 ac_save_c_werror_flag=$ac_c_werror_flag
6868 ac_c_werror_flag=yes
6869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6870 /* end confdefs.h. */
6873 main ()
6877 return 0;
6879 _ACEOF
6880 if ac_fn_c_try_compile "$LINENO"; then :
6881 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
6882 else
6883 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
6885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6886 ac_c_werror_flag=$ac_save_c_werror_flag
6887 CFLAGS="$pgac_save_CFLAGS"
6888 CC="$pgac_save_CC"
6890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
6891 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
6892 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
6893 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6897 # For C++ we additionally want -fvisibility-inlines-hidden
6898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
6899 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6900 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
6901 $as_echo_n "(cached) " >&6
6902 else
6903 pgac_save_CXXFLAGS=$CXXFLAGS
6904 pgac_save_CXX=$CXX
6905 CXX=${CXX}
6906 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6907 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6908 ac_cxx_werror_flag=yes
6909 ac_ext=cpp
6910 ac_cpp='$CXXCPP $CPPFLAGS'
6911 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6912 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6913 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6916 /* end confdefs.h. */
6919 main ()
6923 return 0;
6925 _ACEOF
6926 if ac_fn_cxx_try_compile "$LINENO"; then :
6927 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
6928 else
6929 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
6931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6932 ac_ext=c
6933 ac_cpp='$CPP $CPPFLAGS'
6934 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6935 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6936 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6938 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6939 CXXFLAGS="$pgac_save_CXXFLAGS"
6940 CXX="$pgac_save_CXX"
6942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
6943 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
6944 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
6945 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
6949 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6950 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
6951 $as_echo_n "(cached) " >&6
6952 else
6953 pgac_save_CXXFLAGS=$CXXFLAGS
6954 pgac_save_CXX=$CXX
6955 CXX=${CXX}
6956 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6957 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6958 ac_cxx_werror_flag=yes
6959 ac_ext=cpp
6960 ac_cpp='$CXXCPP $CPPFLAGS'
6961 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6962 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6963 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6966 /* end confdefs.h. */
6969 main ()
6973 return 0;
6975 _ACEOF
6976 if ac_fn_cxx_try_compile "$LINENO"; then :
6977 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
6978 else
6979 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
6981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6982 ac_ext=c
6983 ac_cpp='$CPP $CPPFLAGS'
6984 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6985 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6986 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6988 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6989 CXXFLAGS="$pgac_save_CXXFLAGS"
6990 CXX="$pgac_save_CXX"
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
6993 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
6994 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
6995 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6998 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7001 if test "$have_visibility_attribute" = "yes"; then
7003 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7012 # Determine flags used to emit bitcode for JIT inlining.
7013 # 1. We must duplicate any behaviour-changing compiler flags used above,
7014 # to keep compatibility with the compiler used for normal Postgres code.
7015 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7016 # warning in the main build is enough.
7017 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7018 if test "$with_llvm" = yes ; then
7019 CLANGXX="$CLANG -xc++"
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7022 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7023 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7024 $as_echo_n "(cached) " >&6
7025 else
7026 pgac_save_CFLAGS=$CFLAGS
7027 pgac_save_CC=$CC
7028 CC=${CLANG}
7029 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7030 ac_save_c_werror_flag=$ac_c_werror_flag
7031 ac_c_werror_flag=yes
7032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033 /* end confdefs.h. */
7036 main ()
7040 return 0;
7042 _ACEOF
7043 if ac_fn_c_try_compile "$LINENO"; then :
7044 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7045 else
7046 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7049 ac_c_werror_flag=$ac_save_c_werror_flag
7050 CFLAGS="$pgac_save_CFLAGS"
7051 CC="$pgac_save_CC"
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7054 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7055 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7056 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7060 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7061 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7062 $as_echo_n "(cached) " >&6
7063 else
7064 pgac_save_CXXFLAGS=$CXXFLAGS
7065 pgac_save_CXX=$CXX
7066 CXX=${CLANGXX}
7067 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7068 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7069 ac_cxx_werror_flag=yes
7070 ac_ext=cpp
7071 ac_cpp='$CXXCPP $CPPFLAGS'
7072 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7073 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7074 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7077 /* end confdefs.h. */
7080 main ()
7084 return 0;
7086 _ACEOF
7087 if ac_fn_cxx_try_compile "$LINENO"; then :
7088 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7089 else
7090 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7093 ac_ext=c
7094 ac_cpp='$CPP $CPPFLAGS'
7095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7099 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7100 CXXFLAGS="$pgac_save_CXXFLAGS"
7101 CXX="$pgac_save_CXX"
7103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7104 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7105 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7106 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7110 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7111 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7112 $as_echo_n "(cached) " >&6
7113 else
7114 pgac_save_CFLAGS=$CFLAGS
7115 pgac_save_CC=$CC
7116 CC=${CLANG}
7117 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7118 ac_save_c_werror_flag=$ac_c_werror_flag
7119 ac_c_werror_flag=yes
7120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7121 /* end confdefs.h. */
7124 main ()
7128 return 0;
7130 _ACEOF
7131 if ac_fn_c_try_compile "$LINENO"; then :
7132 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7133 else
7134 pgac_cv_prog_CLANG_cflags__fwrapv=no
7136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137 ac_c_werror_flag=$ac_save_c_werror_flag
7138 CFLAGS="$pgac_save_CFLAGS"
7139 CC="$pgac_save_CC"
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7142 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7143 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7144 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7148 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7149 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7150 $as_echo_n "(cached) " >&6
7151 else
7152 pgac_save_CXXFLAGS=$CXXFLAGS
7153 pgac_save_CXX=$CXX
7154 CXX=${CLANGXX}
7155 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7156 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7157 ac_cxx_werror_flag=yes
7158 ac_ext=cpp
7159 ac_cpp='$CXXCPP $CPPFLAGS'
7160 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7161 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7162 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7165 /* end confdefs.h. */
7168 main ()
7172 return 0;
7174 _ACEOF
7175 if ac_fn_cxx_try_compile "$LINENO"; then :
7176 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7177 else
7178 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7181 ac_ext=c
7182 ac_cpp='$CPP $CPPFLAGS'
7183 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7184 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7185 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7187 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7188 CXXFLAGS="$pgac_save_CXXFLAGS"
7189 CXX="$pgac_save_CXX"
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7192 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7193 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7194 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7198 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7199 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7200 $as_echo_n "(cached) " >&6
7201 else
7202 pgac_save_CFLAGS=$CFLAGS
7203 pgac_save_CC=$CC
7204 CC=${CLANG}
7205 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7206 ac_save_c_werror_flag=$ac_c_werror_flag
7207 ac_c_werror_flag=yes
7208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7209 /* end confdefs.h. */
7212 main ()
7216 return 0;
7218 _ACEOF
7219 if ac_fn_c_try_compile "$LINENO"; then :
7220 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7221 else
7222 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7225 ac_c_werror_flag=$ac_save_c_werror_flag
7226 CFLAGS="$pgac_save_CFLAGS"
7227 CC="$pgac_save_CC"
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7230 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7231 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7232 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7236 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7237 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7238 $as_echo_n "(cached) " >&6
7239 else
7240 pgac_save_CXXFLAGS=$CXXFLAGS
7241 pgac_save_CXX=$CXX
7242 CXX=${CLANGXX}
7243 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7244 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7245 ac_cxx_werror_flag=yes
7246 ac_ext=cpp
7247 ac_cpp='$CXXCPP $CPPFLAGS'
7248 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7249 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7250 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7253 /* end confdefs.h. */
7256 main ()
7260 return 0;
7262 _ACEOF
7263 if ac_fn_cxx_try_compile "$LINENO"; then :
7264 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7265 else
7266 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7269 ac_ext=c
7270 ac_cpp='$CPP $CPPFLAGS'
7271 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7272 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7273 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7275 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7276 CXXFLAGS="$pgac_save_CXXFLAGS"
7277 CXX="$pgac_save_CXX"
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7280 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7281 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7282 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7286 # Ideally bitcode should perhaps match $CC's use, or not, of outline atomic
7287 # functions, but for now we err on the side of suppressing them in bitcode,
7288 # because we can't assume they're available at runtime. This affects aarch64
7289 # builds using the basic armv8-a ISA without LSE support.
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -mno-outline-atomics, for BITCODE_CFLAGS" >&5
7291 $as_echo_n "checking whether ${CLANG} supports -mno-outline-atomics, for BITCODE_CFLAGS... " >&6; }
7292 if ${pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics+:} false; then :
7293 $as_echo_n "(cached) " >&6
7294 else
7295 pgac_save_CXXFLAGS=$CXXFLAGS
7296 pgac_save_CXX=$CXX
7297 CXX=${CLANG}
7298 CXXFLAGS="${BITCODE_CFLAGS} -mno-outline-atomics"
7299 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7300 ac_cxx_werror_flag=yes
7301 ac_ext=cpp
7302 ac_cpp='$CXXCPP $CPPFLAGS'
7303 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7304 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7305 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7308 /* end confdefs.h. */
7311 main ()
7315 return 0;
7317 _ACEOF
7318 if ac_fn_cxx_try_compile "$LINENO"; then :
7319 pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics=yes
7320 else
7321 pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics=no
7323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7324 ac_ext=c
7325 ac_cpp='$CPP $CPPFLAGS'
7326 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7327 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7328 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7330 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7331 CXXFLAGS="$pgac_save_CXXFLAGS"
7332 CXX="$pgac_save_CXX"
7334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" >&5
7335 $as_echo "$pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" >&6; }
7336 if test x"$pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" = x"yes"; then
7337 BITCODE_CFLAGS="${BITCODE_CFLAGS} -mno-outline-atomics"
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -mno-outline-atomics, for BITCODE_CXXFLAGS" >&5
7341 $as_echo_n "checking whether ${CLANG} supports -mno-outline-atomics, for BITCODE_CXXFLAGS... " >&6; }
7342 if ${pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics+:} false; then :
7343 $as_echo_n "(cached) " >&6
7344 else
7345 pgac_save_CXXFLAGS=$CXXFLAGS
7346 pgac_save_CXX=$CXX
7347 CXX=${CLANG}
7348 CXXFLAGS="${BITCODE_CXXFLAGS} -mno-outline-atomics"
7349 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7350 ac_cxx_werror_flag=yes
7351 ac_ext=cpp
7352 ac_cpp='$CXXCPP $CPPFLAGS'
7353 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7354 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7355 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7358 /* end confdefs.h. */
7361 main ()
7365 return 0;
7367 _ACEOF
7368 if ac_fn_cxx_try_compile "$LINENO"; then :
7369 pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics=yes
7370 else
7371 pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics=no
7373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7374 ac_ext=c
7375 ac_cpp='$CPP $CPPFLAGS'
7376 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7377 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7378 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7380 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7381 CXXFLAGS="$pgac_save_CXXFLAGS"
7382 CXX="$pgac_save_CXX"
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" >&5
7385 $as_echo "$pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" >&6; }
7386 if test x"$pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" = x"yes"; then
7387 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -mno-outline-atomics"
7391 NOT_THE_CFLAGS=""
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7393 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7394 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7395 $as_echo_n "(cached) " >&6
7396 else
7397 pgac_save_CFLAGS=$CFLAGS
7398 pgac_save_CC=$CC
7399 CC=${CLANG}
7400 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7401 ac_save_c_werror_flag=$ac_c_werror_flag
7402 ac_c_werror_flag=yes
7403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7404 /* end confdefs.h. */
7407 main ()
7411 return 0;
7413 _ACEOF
7414 if ac_fn_c_try_compile "$LINENO"; then :
7415 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7416 else
7417 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7420 ac_c_werror_flag=$ac_save_c_werror_flag
7421 CFLAGS="$pgac_save_CFLAGS"
7422 CC="$pgac_save_CC"
7424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7425 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7426 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7427 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7430 if test -n "$NOT_THE_CFLAGS"; then
7431 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7433 NOT_THE_CFLAGS=""
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7435 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7436 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7437 $as_echo_n "(cached) " >&6
7438 else
7439 pgac_save_CFLAGS=$CFLAGS
7440 pgac_save_CC=$CC
7441 CC=${CLANG}
7442 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7443 ac_save_c_werror_flag=$ac_c_werror_flag
7444 ac_c_werror_flag=yes
7445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7446 /* end confdefs.h. */
7449 main ()
7453 return 0;
7455 _ACEOF
7456 if ac_fn_c_try_compile "$LINENO"; then :
7457 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7458 else
7459 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7461 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7462 ac_c_werror_flag=$ac_save_c_werror_flag
7463 CFLAGS="$pgac_save_CFLAGS"
7464 CC="$pgac_save_CC"
7466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7467 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7468 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7469 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7472 if test -n "$NOT_THE_CFLAGS"; then
7473 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7475 NOT_THE_CFLAGS=""
7476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7477 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7478 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7479 $as_echo_n "(cached) " >&6
7480 else
7481 pgac_save_CFLAGS=$CFLAGS
7482 pgac_save_CC=$CC
7483 CC=${CLANG}
7484 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7485 ac_save_c_werror_flag=$ac_c_werror_flag
7486 ac_c_werror_flag=yes
7487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7488 /* end confdefs.h. */
7491 main ()
7495 return 0;
7497 _ACEOF
7498 if ac_fn_c_try_compile "$LINENO"; then :
7499 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7500 else
7501 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7504 ac_c_werror_flag=$ac_save_c_werror_flag
7505 CFLAGS="$pgac_save_CFLAGS"
7506 CC="$pgac_save_CC"
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7509 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7510 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7511 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7514 if test -n "$NOT_THE_CFLAGS"; then
7515 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7517 NOT_THE_CFLAGS=""
7518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7519 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7520 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7521 $as_echo_n "(cached) " >&6
7522 else
7523 pgac_save_CFLAGS=$CFLAGS
7524 pgac_save_CC=$CC
7525 CC=${CLANG}
7526 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7527 ac_save_c_werror_flag=$ac_c_werror_flag
7528 ac_c_werror_flag=yes
7529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7530 /* end confdefs.h. */
7533 main ()
7537 return 0;
7539 _ACEOF
7540 if ac_fn_c_try_compile "$LINENO"; then :
7541 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7542 else
7543 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7546 ac_c_werror_flag=$ac_save_c_werror_flag
7547 CFLAGS="$pgac_save_CFLAGS"
7548 CC="$pgac_save_CC"
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7551 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7552 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7553 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7556 if test -n "$NOT_THE_CFLAGS"; then
7557 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7561 # supply -g if --enable-debug
7562 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7563 CFLAGS="$CFLAGS -g"
7566 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7567 CXXFLAGS="$CXXFLAGS -g"
7570 # enable code coverage if --enable-coverage
7571 if test "$enable_coverage" = yes; then
7572 if test "$GCC" = yes; then
7573 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7574 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7575 else
7576 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7580 # enable profiling if --enable-profiling
7581 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7582 if test "$GCC" = yes; then
7584 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7586 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7587 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7588 else
7589 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7593 # On Solaris, we need these #defines to get POSIX-conforming versions
7594 # of many interfaces (sigwait, getpwuid_r, shmdt, ...).
7595 if test "$PORTNAME" = "solaris"; then
7596 CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS"
7599 # We already have this in Makefile.win32, but configure needs it too
7600 if test "$PORTNAME" = "win32"; then
7601 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7604 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7605 # user-specified flags (if any) at the end. This lets users override
7606 # the automatic additions.
7607 CFLAGS="$CFLAGS $user_CFLAGS"
7608 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7609 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7610 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7615 # The template file must set up CFLAGS_SL; we don't support user override
7618 # Check if the compiler still works with the final flag settings
7619 # (note, we're not checking that for CXX, which is optional)
7620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7621 $as_echo_n "checking whether the C compiler still works... " >&6; }
7622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7623 /* end confdefs.h. */
7626 main ()
7628 return 0;
7630 return 0;
7632 _ACEOF
7633 if ac_fn_c_try_link "$LINENO"; then :
7634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7635 $as_echo "yes" >&6; }
7636 else
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7638 $as_echo "no" >&6; }
7639 as_fn_error $? "cannot proceed" "$LINENO" 5
7641 rm -f core conftest.err conftest.$ac_objext \
7642 conftest$ac_exeext conftest.$ac_ext
7644 # Defend against gcc -ffast-math
7645 if test "$GCC" = yes; then
7646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7647 /* end confdefs.h. */
7650 main ()
7652 #ifdef __FAST_MATH__
7653 choke me
7654 #endif
7656 return 0;
7658 _ACEOF
7659 if ac_fn_c_try_compile "$LINENO"; then :
7661 else
7662 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7667 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7668 # versions of clang do not understand -fexcess-precision=standard, the use of
7669 # x87 floating point operations leads to problems like isinf possibly returning
7670 # false for a value that is infinite when converted from the 80bit register to
7671 # the 8byte memory representation.
7673 # Only perform the test if the compiler doesn't understand
7674 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7675 # automatically.
7676 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7678 /* end confdefs.h. */
7681 main ()
7684 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7685 choke me
7686 #endif
7689 return 0;
7691 _ACEOF
7692 if ac_fn_c_try_compile "$LINENO"; then :
7694 else
7695 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7700 ac_ext=c
7701 ac_cpp='$CPP $CPPFLAGS'
7702 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7703 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7704 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7706 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7707 # On Suns, sometimes $CPP names a directory.
7708 if test -n "$CPP" && test -d "$CPP"; then
7709 CPP=
7711 if test -z "$CPP"; then
7712 if ${ac_cv_prog_CPP+:} false; then :
7713 $as_echo_n "(cached) " >&6
7714 else
7715 # Double quotes because CPP needs to be expanded
7716 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7718 ac_preproc_ok=false
7719 for ac_c_preproc_warn_flag in '' yes
7721 # Use a header file that comes with gcc, so configuring glibc
7722 # with a fresh cross-compiler works.
7723 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7724 # <limits.h> exists even on freestanding compilers.
7725 # On the NeXT, cc -E runs the code through the compiler's parser,
7726 # not just through cpp. "Syntax error" is here to catch this case.
7727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7728 /* end confdefs.h. */
7729 #ifdef __STDC__
7730 # include <limits.h>
7731 #else
7732 # include <assert.h>
7733 #endif
7734 Syntax error
7735 _ACEOF
7736 if ac_fn_c_try_cpp "$LINENO"; then :
7738 else
7739 # Broken: fails on valid input.
7740 continue
7742 rm -f conftest.err conftest.i conftest.$ac_ext
7744 # OK, works on sane cases. Now check whether nonexistent headers
7745 # can be detected and how.
7746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7747 /* end confdefs.h. */
7748 #include <ac_nonexistent.h>
7749 _ACEOF
7750 if ac_fn_c_try_cpp "$LINENO"; then :
7751 # Broken: success on invalid input.
7752 continue
7753 else
7754 # Passes both tests.
7755 ac_preproc_ok=:
7756 break
7758 rm -f conftest.err conftest.i conftest.$ac_ext
7760 done
7761 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7762 rm -f conftest.i conftest.err conftest.$ac_ext
7763 if $ac_preproc_ok; then :
7764 break
7767 done
7768 ac_cv_prog_CPP=$CPP
7771 CPP=$ac_cv_prog_CPP
7772 else
7773 ac_cv_prog_CPP=$CPP
7775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7776 $as_echo "$CPP" >&6; }
7777 ac_preproc_ok=false
7778 for ac_c_preproc_warn_flag in '' yes
7780 # Use a header file that comes with gcc, so configuring glibc
7781 # with a fresh cross-compiler works.
7782 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7783 # <limits.h> exists even on freestanding compilers.
7784 # On the NeXT, cc -E runs the code through the compiler's parser,
7785 # not just through cpp. "Syntax error" is here to catch this case.
7786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7787 /* end confdefs.h. */
7788 #ifdef __STDC__
7789 # include <limits.h>
7790 #else
7791 # include <assert.h>
7792 #endif
7793 Syntax error
7794 _ACEOF
7795 if ac_fn_c_try_cpp "$LINENO"; then :
7797 else
7798 # Broken: fails on valid input.
7799 continue
7801 rm -f conftest.err conftest.i conftest.$ac_ext
7803 # OK, works on sane cases. Now check whether nonexistent headers
7804 # can be detected and how.
7805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7806 /* end confdefs.h. */
7807 #include <ac_nonexistent.h>
7808 _ACEOF
7809 if ac_fn_c_try_cpp "$LINENO"; then :
7810 # Broken: success on invalid input.
7811 continue
7812 else
7813 # Passes both tests.
7814 ac_preproc_ok=:
7815 break
7817 rm -f conftest.err conftest.i conftest.$ac_ext
7819 done
7820 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7821 rm -f conftest.i conftest.err conftest.$ac_ext
7822 if $ac_preproc_ok; then :
7824 else
7825 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7826 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7827 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7828 See \`config.log' for more details" "$LINENO" 5; }
7831 ac_ext=c
7832 ac_cpp='$CPP $CPPFLAGS'
7833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7841 # Set up TAS assembly code if needed; the template file has now had its
7842 # chance to request this.
7844 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7847 if test "$need_tas" = yes ; then
7848 TAS=tas.o
7849 else
7850 TAS=""
7855 cat >>confdefs.h <<_ACEOF
7856 #define DLSUFFIX "$DLSUFFIX"
7857 _ACEOF
7861 # Set up pkg_config in case we need it below
7870 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7871 if test -n "$ac_tool_prefix"; then
7872 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7873 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7875 $as_echo_n "checking for $ac_word... " >&6; }
7876 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7877 $as_echo_n "(cached) " >&6
7878 else
7879 case $PKG_CONFIG in
7880 [\\/]* | ?:[\\/]*)
7881 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885 for as_dir in $PATH
7887 IFS=$as_save_IFS
7888 test -z "$as_dir" && as_dir=.
7889 for ac_exec_ext in '' $ac_executable_extensions; do
7890 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7891 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7893 break 2
7895 done
7896 done
7897 IFS=$as_save_IFS
7900 esac
7902 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7903 if test -n "$PKG_CONFIG"; then
7904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7905 $as_echo "$PKG_CONFIG" >&6; }
7906 else
7907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7908 $as_echo "no" >&6; }
7913 if test -z "$ac_cv_path_PKG_CONFIG"; then
7914 ac_pt_PKG_CONFIG=$PKG_CONFIG
7915 # Extract the first word of "pkg-config", so it can be a program name with args.
7916 set dummy pkg-config; ac_word=$2
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7918 $as_echo_n "checking for $ac_word... " >&6; }
7919 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7920 $as_echo_n "(cached) " >&6
7921 else
7922 case $ac_pt_PKG_CONFIG in
7923 [\\/]* | ?:[\\/]*)
7924 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7928 for as_dir in $PATH
7930 IFS=$as_save_IFS
7931 test -z "$as_dir" && as_dir=.
7932 for ac_exec_ext in '' $ac_executable_extensions; do
7933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7934 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7936 break 2
7938 done
7939 done
7940 IFS=$as_save_IFS
7943 esac
7945 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7946 if test -n "$ac_pt_PKG_CONFIG"; then
7947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7948 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7949 else
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7951 $as_echo "no" >&6; }
7954 if test "x$ac_pt_PKG_CONFIG" = x; then
7955 PKG_CONFIG=""
7956 else
7957 case $cross_compiling:$ac_tool_warned in
7958 yes:)
7959 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7960 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7961 ac_tool_warned=yes ;;
7962 esac
7963 PKG_CONFIG=$ac_pt_PKG_CONFIG
7965 else
7966 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7970 if test -n "$PKG_CONFIG"; then
7971 _pkg_min_version=0.9.0
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7973 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7974 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7976 $as_echo "yes" >&6; }
7977 else
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7979 $as_echo "no" >&6; }
7980 PKG_CONFIG=""
7985 # Automatic dependency tracking
7989 # Check whether --enable-depend was given.
7990 if test "${enable_depend+set}" = set; then :
7991 enableval=$enable_depend;
7992 case $enableval in
7993 yes)
7994 autodepend=yes
8000 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
8002 esac
8004 else
8005 enable_depend=no
8014 # Enable assert checks
8018 # Check whether --enable-cassert was given.
8019 if test "${enable_cassert+set}" = set; then :
8020 enableval=$enable_cassert;
8021 case $enableval in
8022 yes)
8024 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8031 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8033 esac
8035 else
8036 enable_cassert=no
8044 # Include directories
8046 ac_save_IFS=$IFS
8047 IFS="${IFS}${PATH_SEPARATOR}"
8048 # SRCH_INC comes from the template file
8049 for dir in $with_includes $SRCH_INC; do
8050 if test -d "$dir"; then
8051 INCLUDES="$INCLUDES -I$dir"
8052 else
8053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8054 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8056 done
8057 IFS=$ac_save_IFS
8061 # Library directories
8063 ac_save_IFS=$IFS
8064 IFS="${IFS}${PATH_SEPARATOR}"
8065 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8066 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8067 if test -d "$dir"; then
8068 LIBDIRS="$LIBDIRS -L$dir"
8069 else
8070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8071 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8073 done
8074 IFS=$ac_save_IFS
8077 # ICU
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8080 $as_echo_n "checking whether to build with ICU support... " >&6; }
8084 # Check whether --with-icu was given.
8085 if test "${with_icu+set}" = set; then :
8086 withval=$with_icu;
8087 case $withval in
8088 yes)
8090 $as_echo "#define USE_ICU 1" >>confdefs.h
8097 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8099 esac
8101 else
8102 with_icu=yes
8104 $as_echo "#define USE_ICU 1" >>confdefs.h
8109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8110 $as_echo "$with_icu" >&6; }
8113 if test "$with_icu" = yes; then
8115 pkg_failed=no
8116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8117 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8119 if test -n "$ICU_CFLAGS"; then
8120 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
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_CFLAGS=`$PKG_CONFIG --cflags "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
8136 if test -n "$ICU_LIBS"; then
8137 pkg_cv_ICU_LIBS="$ICU_LIBS"
8138 elif test -n "$PKG_CONFIG"; then
8139 if test -n "$PKG_CONFIG" && \
8140 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8141 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8142 ac_status=$?
8143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8144 test $ac_status = 0; }; then
8145 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8146 test "x$?" != "x0" && pkg_failed=yes
8147 else
8148 pkg_failed=yes
8150 else
8151 pkg_failed=untried
8156 if test $pkg_failed = yes; then
8157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8158 $as_echo "no" >&6; }
8160 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8161 _pkg_short_errors_supported=yes
8162 else
8163 _pkg_short_errors_supported=no
8165 if test $_pkg_short_errors_supported = yes; then
8166 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8167 else
8168 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8170 # Put the nasty error message in config.log where it belongs
8171 echo "$ICU_PKG_ERRORS" >&5
8173 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8175 $ICU_PKG_ERRORS
8177 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8178 installed software in a non-standard prefix.
8180 Alternatively, you may set the environment variables ICU_CFLAGS
8181 and ICU_LIBS to avoid the need to call pkg-config.
8182 See the pkg-config man page for more details." "$LINENO" 5
8183 elif test $pkg_failed = untried; then
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8185 $as_echo "no" >&6; }
8186 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8187 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8188 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8189 is in your PATH or set the PKG_CONFIG environment variable to the full
8190 path to pkg-config.
8192 Alternatively, you may set the environment variables ICU_CFLAGS
8193 and ICU_LIBS to avoid the need to call pkg-config.
8194 See the pkg-config man page for more details.
8196 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8197 See \`config.log' for more details" "$LINENO" 5; }
8198 else
8199 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8200 ICU_LIBS=$pkg_cv_ICU_LIBS
8201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8202 $as_echo "yes" >&6; }
8208 # Optionally build Tcl modules (PL/Tcl)
8210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8211 $as_echo_n "checking whether to build with Tcl... " >&6; }
8215 # Check whether --with-tcl was given.
8216 if test "${with_tcl+set}" = set; then :
8217 withval=$with_tcl;
8218 case $withval in
8219 yes)
8226 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8228 esac
8230 else
8231 with_tcl=no
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8237 $as_echo "$with_tcl" >&6; }
8240 # We see if the path to the Tcl/Tk configuration scripts is specified.
8241 # This will override the use of tclsh to find the paths to search.
8246 # Check whether --with-tclconfig was given.
8247 if test "${with_tclconfig+set}" = set; then :
8248 withval=$with_tclconfig;
8249 case $withval in
8250 yes)
8251 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8254 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8259 esac
8266 # Optionally build Perl modules (PL/Perl)
8268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8269 $as_echo_n "checking whether to build Perl modules... " >&6; }
8273 # Check whether --with-perl was given.
8274 if test "${with_perl+set}" = set; then :
8275 withval=$with_perl;
8276 case $withval in
8277 yes)
8284 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8286 esac
8288 else
8289 with_perl=no
8294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8295 $as_echo "$with_perl" >&6; }
8299 # Optionally build Python modules (PL/Python)
8301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8302 $as_echo_n "checking whether to build Python modules... " >&6; }
8306 # Check whether --with-python was given.
8307 if test "${with_python+set}" = set; then :
8308 withval=$with_python;
8309 case $withval in
8310 yes)
8317 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8319 esac
8321 else
8322 with_python=no
8327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8328 $as_echo "$with_python" >&6; }
8332 # GSSAPI
8334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8335 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8339 # Check whether --with-gssapi was given.
8340 if test "${with_gssapi+set}" = set; then :
8341 withval=$with_gssapi;
8342 case $withval in
8343 yes)
8346 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8348 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8355 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8357 esac
8359 else
8360 with_gssapi=no
8365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8366 $as_echo "$with_gssapi" >&6; }
8374 # Kerberos configuration parameters
8379 # Check whether --with-krb-srvnam was given.
8380 if test "${with_krb_srvnam+set}" = set; then :
8381 withval=$with_krb_srvnam;
8382 case $withval in
8383 yes)
8384 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8387 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8392 esac
8394 else
8395 with_krb_srvnam="postgres"
8401 cat >>confdefs.h <<_ACEOF
8402 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8403 _ACEOF
8408 # PAM
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8411 $as_echo_n "checking whether to build with PAM support... " >&6; }
8415 # Check whether --with-pam was given.
8416 if test "${with_pam+set}" = set; then :
8417 withval=$with_pam;
8418 case $withval in
8419 yes)
8421 $as_echo "#define USE_PAM 1" >>confdefs.h
8428 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8430 esac
8432 else
8433 with_pam=no
8438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8439 $as_echo "$with_pam" >&6; }
8443 # BSD AUTH
8445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8446 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8450 # Check whether --with-bsd-auth was given.
8451 if test "${with_bsd_auth+set}" = set; then :
8452 withval=$with_bsd_auth;
8453 case $withval in
8454 yes)
8456 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8463 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8465 esac
8467 else
8468 with_bsd_auth=no
8473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8474 $as_echo "$with_bsd_auth" >&6; }
8478 # LDAP
8480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8481 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8485 # Check whether --with-ldap was given.
8486 if test "${with_ldap+set}" = set; then :
8487 withval=$with_ldap;
8488 case $withval in
8489 yes)
8491 $as_echo "#define USE_LDAP 1" >>confdefs.h
8498 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8500 esac
8502 else
8503 with_ldap=no
8508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8509 $as_echo "$with_ldap" >&6; }
8514 # Bonjour
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8517 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8521 # Check whether --with-bonjour was given.
8522 if test "${with_bonjour+set}" = set; then :
8523 withval=$with_bonjour;
8524 case $withval in
8525 yes)
8527 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8534 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8536 esac
8538 else
8539 with_bonjour=no
8544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8545 $as_echo "$with_bonjour" >&6; }
8549 # SELinux
8551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8552 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8556 # Check whether --with-selinux was given.
8557 if test "${with_selinux+set}" = set; then :
8558 withval=$with_selinux;
8559 case $withval in
8560 yes)
8567 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8569 esac
8571 else
8572 with_selinux=no
8578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8579 $as_echo "$with_selinux" >&6; }
8582 # Systemd
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8585 $as_echo_n "checking whether to build with systemd support... " >&6; }
8589 # Check whether --with-systemd was given.
8590 if test "${with_systemd+set}" = set; then :
8591 withval=$with_systemd;
8592 case $withval in
8593 yes)
8595 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8602 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8604 esac
8606 else
8607 with_systemd=no
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8614 $as_echo "$with_systemd" >&6; }
8617 # Readline
8622 # Check whether --with-readline was given.
8623 if test "${with_readline+set}" = set; then :
8624 withval=$with_readline;
8625 case $withval in
8626 yes)
8633 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8635 esac
8637 else
8638 with_readline=yes
8643 # readline on MinGW has problems with backslashes in psql and other bugs.
8644 # This is particularly a problem with non-US code pages.
8645 # Therefore disable its use until we understand the cause. 2004-07-20
8646 if test "$PORTNAME" = "win32"; then
8647 if test "$with_readline" = yes; then
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8649 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8650 with_readline=no
8657 # Prefer libedit
8662 # Check whether --with-libedit-preferred was given.
8663 if test "${with_libedit_preferred+set}" = set; then :
8664 withval=$with_libedit_preferred;
8665 case $withval in
8666 yes)
8673 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8675 esac
8677 else
8678 with_libedit_preferred=no
8686 # UUID library
8688 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8689 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8690 # UUID library. More than one of these might be present on a given platform,
8691 # so we make the user say which one she wants.
8696 # Check whether --with-uuid was given.
8697 if test "${with_uuid+set}" = set; then :
8698 withval=$with_uuid;
8699 case $withval in
8700 yes)
8701 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8704 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8709 esac
8714 if test x"$with_uuid" = x"" ; then
8715 with_uuid=no
8720 # Check whether --with-ossp-uuid was given.
8721 if test "${with_ossp_uuid+set}" = set; then :
8722 withval=$with_ossp_uuid;
8723 case $withval in
8724 yes)
8731 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8733 esac
8735 else
8736 with_ossp_uuid=no
8741 if test "$with_ossp_uuid" = yes ; then
8742 with_uuid=ossp
8745 if test "$with_uuid" != no ; then
8746 if test "$with_uuid" = bsd ; then
8748 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8750 elif test "$with_uuid" = e2fs ; then
8752 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8754 elif test "$with_uuid" = ossp ; then
8756 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8758 else
8759 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8766 # XML
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8769 $as_echo_n "checking whether to build with XML support... " >&6; }
8773 # Check whether --with-libxml was given.
8774 if test "${with_libxml+set}" = set; then :
8775 withval=$with_libxml;
8776 case $withval in
8777 yes)
8779 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8786 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8788 esac
8790 else
8791 with_libxml=no
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8797 $as_echo "$with_libxml" >&6; }
8800 if test "$with_libxml" = yes ; then
8801 # Check pkg-config, then xml2-config. But for backwards compatibility,
8802 # setting XML2_CONFIG overrides pkg-config.
8803 have_libxml2_pkg_config=no
8804 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8806 pkg_failed=no
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8808 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8810 if test -n "$XML2_CFLAGS"; then
8811 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
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_CFLAGS=`$PKG_CONFIG --cflags "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
8827 if test -n "$XML2_LIBS"; then
8828 pkg_cv_XML2_LIBS="$XML2_LIBS"
8829 elif test -n "$PKG_CONFIG"; then
8830 if test -n "$PKG_CONFIG" && \
8831 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8832 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8833 ac_status=$?
8834 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8835 test $ac_status = 0; }; then
8836 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8837 test "x$?" != "x0" && pkg_failed=yes
8838 else
8839 pkg_failed=yes
8841 else
8842 pkg_failed=untried
8847 if test $pkg_failed = yes; then
8848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8849 $as_echo "no" >&6; }
8851 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8852 _pkg_short_errors_supported=yes
8853 else
8854 _pkg_short_errors_supported=no
8856 if test $_pkg_short_errors_supported = yes; then
8857 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8858 else
8859 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8861 # Put the nasty error message in config.log where it belongs
8862 echo "$XML2_PKG_ERRORS" >&5
8864 # do nothing
8865 elif test $pkg_failed = untried; then
8866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8867 $as_echo "no" >&6; }
8868 # do nothing
8869 else
8870 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8871 XML2_LIBS=$pkg_cv_XML2_LIBS
8872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8873 $as_echo "yes" >&6; }
8874 have_libxml2_pkg_config=yes
8877 if test "$have_libxml2_pkg_config" = no ; then
8878 if test -z "$XML2_CONFIG"; then
8879 for ac_prog in xml2-config
8881 # Extract the first word of "$ac_prog", so it can be a program name with args.
8882 set dummy $ac_prog; ac_word=$2
8883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8884 $as_echo_n "checking for $ac_word... " >&6; }
8885 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8886 $as_echo_n "(cached) " >&6
8887 else
8888 case $XML2_CONFIG in
8889 [\\/]* | ?:[\\/]*)
8890 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8894 for as_dir in $PATH
8896 IFS=$as_save_IFS
8897 test -z "$as_dir" && as_dir=.
8898 for ac_exec_ext in '' $ac_executable_extensions; do
8899 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8900 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8901 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8902 break 2
8904 done
8905 done
8906 IFS=$as_save_IFS
8909 esac
8911 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8912 if test -n "$XML2_CONFIG"; then
8913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8914 $as_echo "$XML2_CONFIG" >&6; }
8915 else
8916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8917 $as_echo "no" >&6; }
8921 test -n "$XML2_CONFIG" && break
8922 done
8924 else
8925 # Report the value of XML2_CONFIG in configure's output in all cases.
8926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8927 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8929 $as_echo "$XML2_CONFIG" >&6; }
8932 if test -n "$XML2_CONFIG"; then
8933 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8934 XML2_LIBS=`$XML2_CONFIG --libs`
8937 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8938 for pgac_option in $XML2_CFLAGS; do
8939 case $pgac_option in
8940 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8941 esac
8942 done
8943 for pgac_option in $XML2_LIBS; do
8944 case $pgac_option in
8945 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8946 esac
8947 done
8952 # XSLT
8957 # Check whether --with-libxslt was given.
8958 if test "${with_libxslt+set}" = set; then :
8959 withval=$with_libxslt;
8960 case $withval in
8961 yes)
8963 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8970 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8972 esac
8974 else
8975 with_libxslt=no
8985 # tzdata
8990 # Check whether --with-system-tzdata was given.
8991 if test "${with_system_tzdata+set}" = set; then :
8992 withval=$with_system_tzdata;
8993 case $withval in
8994 yes)
8995 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8998 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9003 esac
9011 # Zlib
9016 # Check whether --with-zlib was given.
9017 if test "${with_zlib+set}" = set; then :
9018 withval=$with_zlib;
9019 case $withval in
9020 yes)
9027 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9029 esac
9031 else
9032 with_zlib=yes
9040 # LZ4
9042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9043 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9047 # Check whether --with-lz4 was given.
9048 if test "${with_lz4+set}" = set; then :
9049 withval=$with_lz4;
9050 case $withval in
9051 yes)
9053 $as_echo "#define USE_LZ4 1" >>confdefs.h
9060 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9062 esac
9064 else
9065 with_lz4=no
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9071 $as_echo "$with_lz4" >&6; }
9074 if test "$with_lz4" = yes; then
9076 pkg_failed=no
9077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9078 $as_echo_n "checking for liblz4... " >&6; }
9080 if test -n "$LZ4_CFLAGS"; then
9081 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
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_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9090 test "x$?" != "x0" && pkg_failed=yes
9091 else
9092 pkg_failed=yes
9094 else
9095 pkg_failed=untried
9097 if test -n "$LZ4_LIBS"; then
9098 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9099 elif test -n "$PKG_CONFIG"; then
9100 if test -n "$PKG_CONFIG" && \
9101 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9102 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9103 ac_status=$?
9104 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9105 test $ac_status = 0; }; then
9106 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9107 test "x$?" != "x0" && pkg_failed=yes
9108 else
9109 pkg_failed=yes
9111 else
9112 pkg_failed=untried
9117 if test $pkg_failed = yes; then
9118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9119 $as_echo "no" >&6; }
9121 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9122 _pkg_short_errors_supported=yes
9123 else
9124 _pkg_short_errors_supported=no
9126 if test $_pkg_short_errors_supported = yes; then
9127 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9128 else
9129 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9131 # Put the nasty error message in config.log where it belongs
9132 echo "$LZ4_PKG_ERRORS" >&5
9134 as_fn_error $? "Package requirements (liblz4) were not met:
9136 $LZ4_PKG_ERRORS
9138 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9139 installed software in a non-standard prefix.
9141 Alternatively, you may set the environment variables LZ4_CFLAGS
9142 and LZ4_LIBS to avoid the need to call pkg-config.
9143 See the pkg-config man page for more details." "$LINENO" 5
9144 elif test $pkg_failed = untried; then
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9146 $as_echo "no" >&6; }
9147 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9148 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9149 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9150 is in your PATH or set the PKG_CONFIG environment variable to the full
9151 path to pkg-config.
9153 Alternatively, you may set the environment variables LZ4_CFLAGS
9154 and LZ4_LIBS to avoid the need to call pkg-config.
9155 See the pkg-config man page for more details.
9157 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9158 See \`config.log' for more details" "$LINENO" 5; }
9159 else
9160 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9161 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9163 $as_echo "yes" >&6; }
9166 # We only care about -I, -D, and -L switches;
9167 # note that -llz4 will be added by AC_CHECK_LIB below.
9168 for pgac_option in $LZ4_CFLAGS; do
9169 case $pgac_option in
9170 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9171 esac
9172 done
9173 for pgac_option in $LZ4_LIBS; do
9174 case $pgac_option in
9175 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9176 esac
9177 done
9181 # ZSTD
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9184 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9188 # Check whether --with-zstd was given.
9189 if test "${with_zstd+set}" = set; then :
9190 withval=$with_zstd;
9191 case $withval in
9192 yes)
9194 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9201 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9203 esac
9205 else
9206 with_zstd=no
9211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9212 $as_echo "$with_zstd" >&6; }
9215 if test "$with_zstd" = yes; then
9217 pkg_failed=no
9218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9219 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9221 if test -n "$ZSTD_CFLAGS"; then
9222 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
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_CFLAGS=`$PKG_CONFIG --cflags "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
9238 if test -n "$ZSTD_LIBS"; then
9239 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9240 elif test -n "$PKG_CONFIG"; then
9241 if test -n "$PKG_CONFIG" && \
9242 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9243 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9244 ac_status=$?
9245 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9246 test $ac_status = 0; }; then
9247 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9248 test "x$?" != "x0" && pkg_failed=yes
9249 else
9250 pkg_failed=yes
9252 else
9253 pkg_failed=untried
9258 if test $pkg_failed = yes; then
9259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9260 $as_echo "no" >&6; }
9262 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9263 _pkg_short_errors_supported=yes
9264 else
9265 _pkg_short_errors_supported=no
9267 if test $_pkg_short_errors_supported = yes; then
9268 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9269 else
9270 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9272 # Put the nasty error message in config.log where it belongs
9273 echo "$ZSTD_PKG_ERRORS" >&5
9275 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9277 $ZSTD_PKG_ERRORS
9279 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9280 installed software in a non-standard prefix.
9282 Alternatively, you may set the environment variables ZSTD_CFLAGS
9283 and ZSTD_LIBS to avoid the need to call pkg-config.
9284 See the pkg-config man page for more details." "$LINENO" 5
9285 elif test $pkg_failed = untried; then
9286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9287 $as_echo "no" >&6; }
9288 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9289 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9290 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9291 is in your PATH or set the PKG_CONFIG environment variable to the full
9292 path to pkg-config.
9294 Alternatively, you may set the environment variables ZSTD_CFLAGS
9295 and ZSTD_LIBS to avoid the need to call pkg-config.
9296 See the pkg-config man page for more details.
9298 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9299 See \`config.log' for more details" "$LINENO" 5; }
9300 else
9301 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9302 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9304 $as_echo "yes" >&6; }
9307 # We only care about -I, -D, and -L switches;
9308 # note that -lzstd will be added by AC_CHECK_LIB below.
9309 for pgac_option in $ZSTD_CFLAGS; do
9310 case $pgac_option in
9311 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9312 esac
9313 done
9314 for pgac_option in $ZSTD_LIBS; do
9315 case $pgac_option in
9316 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9317 esac
9318 done
9321 # Assignments
9324 CPPFLAGS="$CPPFLAGS $INCLUDES"
9325 LDFLAGS="$LDFLAGS $LIBDIRS"
9331 if test -n "$ac_tool_prefix"; then
9332 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9333 set dummy ${ac_tool_prefix}strip; ac_word=$2
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9335 $as_echo_n "checking for $ac_word... " >&6; }
9336 if ${ac_cv_prog_STRIP+:} false; then :
9337 $as_echo_n "(cached) " >&6
9338 else
9339 if test -n "$STRIP"; then
9340 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9341 else
9342 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9343 for as_dir in $PATH
9345 IFS=$as_save_IFS
9346 test -z "$as_dir" && as_dir=.
9347 for ac_exec_ext in '' $ac_executable_extensions; do
9348 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9349 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9350 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9351 break 2
9353 done
9354 done
9355 IFS=$as_save_IFS
9359 STRIP=$ac_cv_prog_STRIP
9360 if test -n "$STRIP"; then
9361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9362 $as_echo "$STRIP" >&6; }
9363 else
9364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9365 $as_echo "no" >&6; }
9370 if test -z "$ac_cv_prog_STRIP"; then
9371 ac_ct_STRIP=$STRIP
9372 # Extract the first word of "strip", so it can be a program name with args.
9373 set dummy strip; ac_word=$2
9374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9375 $as_echo_n "checking for $ac_word... " >&6; }
9376 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9377 $as_echo_n "(cached) " >&6
9378 else
9379 if test -n "$ac_ct_STRIP"; then
9380 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9381 else
9382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383 for as_dir in $PATH
9385 IFS=$as_save_IFS
9386 test -z "$as_dir" && as_dir=.
9387 for ac_exec_ext in '' $ac_executable_extensions; do
9388 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389 ac_cv_prog_ac_ct_STRIP="strip"
9390 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391 break 2
9393 done
9394 done
9395 IFS=$as_save_IFS
9399 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9400 if test -n "$ac_ct_STRIP"; then
9401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9402 $as_echo "$ac_ct_STRIP" >&6; }
9403 else
9404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405 $as_echo "no" >&6; }
9408 if test "x$ac_ct_STRIP" = x; then
9409 STRIP=":"
9410 else
9411 case $cross_compiling:$ac_tool_warned in
9412 yes:)
9413 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9414 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9415 ac_tool_warned=yes ;;
9416 esac
9417 STRIP=$ac_ct_STRIP
9419 else
9420 STRIP="$ac_cv_prog_STRIP"
9424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9425 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9426 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9427 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9428 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9430 $as_echo "yes" >&6; }
9431 else
9432 case $host_os in
9433 darwin*)
9434 STRIP="$STRIP -x"
9435 STRIP_STATIC_LIB=$STRIP
9436 STRIP_SHARED_LIB=$STRIP
9437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9438 $as_echo "yes" >&6; }
9441 STRIP_STATIC_LIB=:
9442 STRIP_SHARED_LIB=:
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9444 $as_echo "no" >&6; }
9446 esac
9451 if test -n "$ac_tool_prefix"; then
9452 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9453 set dummy ${ac_tool_prefix}ar; ac_word=$2
9454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9455 $as_echo_n "checking for $ac_word... " >&6; }
9456 if ${ac_cv_prog_AR+:} false; then :
9457 $as_echo_n "(cached) " >&6
9458 else
9459 if test -n "$AR"; then
9460 ac_cv_prog_AR="$AR" # Let the user override the test.
9461 else
9462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9463 for as_dir in $PATH
9465 IFS=$as_save_IFS
9466 test -z "$as_dir" && as_dir=.
9467 for ac_exec_ext in '' $ac_executable_extensions; do
9468 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9469 ac_cv_prog_AR="${ac_tool_prefix}ar"
9470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9471 break 2
9473 done
9474 done
9475 IFS=$as_save_IFS
9479 AR=$ac_cv_prog_AR
9480 if test -n "$AR"; then
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9482 $as_echo "$AR" >&6; }
9483 else
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485 $as_echo "no" >&6; }
9490 if test -z "$ac_cv_prog_AR"; then
9491 ac_ct_AR=$AR
9492 # Extract the first word of "ar", so it can be a program name with args.
9493 set dummy ar; ac_word=$2
9494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9495 $as_echo_n "checking for $ac_word... " >&6; }
9496 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9497 $as_echo_n "(cached) " >&6
9498 else
9499 if test -n "$ac_ct_AR"; then
9500 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9501 else
9502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9503 for as_dir in $PATH
9505 IFS=$as_save_IFS
9506 test -z "$as_dir" && as_dir=.
9507 for ac_exec_ext in '' $ac_executable_extensions; do
9508 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9509 ac_cv_prog_ac_ct_AR="ar"
9510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9511 break 2
9513 done
9514 done
9515 IFS=$as_save_IFS
9519 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9520 if test -n "$ac_ct_AR"; then
9521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9522 $as_echo "$ac_ct_AR" >&6; }
9523 else
9524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9525 $as_echo "no" >&6; }
9528 if test "x$ac_ct_AR" = x; then
9529 AR="ar"
9530 else
9531 case $cross_compiling:$ac_tool_warned in
9532 yes:)
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9534 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9535 ac_tool_warned=yes ;;
9536 esac
9537 AR=$ac_ct_AR
9539 else
9540 AR="$ac_cv_prog_AR"
9543 if test "$PORTNAME" = "win32"; then
9544 if test -n "$ac_tool_prefix"; then
9545 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9546 set dummy ${ac_tool_prefix}windres; ac_word=$2
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9548 $as_echo_n "checking for $ac_word... " >&6; }
9549 if ${ac_cv_prog_WINDRES+:} false; then :
9550 $as_echo_n "(cached) " >&6
9551 else
9552 if test -n "$WINDRES"; then
9553 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9554 else
9555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9556 for as_dir in $PATH
9558 IFS=$as_save_IFS
9559 test -z "$as_dir" && as_dir=.
9560 for ac_exec_ext in '' $ac_executable_extensions; do
9561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9562 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9564 break 2
9566 done
9567 done
9568 IFS=$as_save_IFS
9572 WINDRES=$ac_cv_prog_WINDRES
9573 if test -n "$WINDRES"; then
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9575 $as_echo "$WINDRES" >&6; }
9576 else
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9578 $as_echo "no" >&6; }
9583 if test -z "$ac_cv_prog_WINDRES"; then
9584 ac_ct_WINDRES=$WINDRES
9585 # Extract the first word of "windres", so it can be a program name with args.
9586 set dummy windres; ac_word=$2
9587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9588 $as_echo_n "checking for $ac_word... " >&6; }
9589 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9590 $as_echo_n "(cached) " >&6
9591 else
9592 if test -n "$ac_ct_WINDRES"; then
9593 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9594 else
9595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9596 for as_dir in $PATH
9598 IFS=$as_save_IFS
9599 test -z "$as_dir" && as_dir=.
9600 for ac_exec_ext in '' $ac_executable_extensions; do
9601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9602 ac_cv_prog_ac_ct_WINDRES="windres"
9603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9604 break 2
9606 done
9607 done
9608 IFS=$as_save_IFS
9612 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9613 if test -n "$ac_ct_WINDRES"; then
9614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9615 $as_echo "$ac_ct_WINDRES" >&6; }
9616 else
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9618 $as_echo "no" >&6; }
9621 if test "x$ac_ct_WINDRES" = x; then
9622 WINDRES="windres"
9623 else
9624 case $cross_compiling:$ac_tool_warned in
9625 yes:)
9626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9627 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9628 ac_tool_warned=yes ;;
9629 esac
9630 WINDRES=$ac_ct_WINDRES
9632 else
9633 WINDRES="$ac_cv_prog_WINDRES"
9638 # Find a good install program. We prefer a C program (faster),
9639 # so one script is as good as another. But avoid the broken or
9640 # incompatible versions:
9641 # SysV /etc/install, /usr/sbin/install
9642 # SunOS /usr/etc/install
9643 # IRIX /sbin/install
9644 # AIX /bin/install
9645 # AmigaOS /C/install, which installs bootblocks on floppy discs
9646 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9647 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9648 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9649 # OS/2's system install, which has a completely different semantic
9650 # ./install, which can be erroneously created by make from ./install.sh.
9651 # Reject install programs that cannot install multiple files.
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9653 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9654 if test -z "$INSTALL"; then
9655 if ${ac_cv_path_install+:} false; then :
9656 $as_echo_n "(cached) " >&6
9657 else
9658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9659 for as_dir in $PATH
9661 IFS=$as_save_IFS
9662 test -z "$as_dir" && as_dir=.
9663 # Account for people who put trailing slashes in PATH elements.
9664 case $as_dir/ in #((
9665 ./ | .// | /[cC]/* | \
9666 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9667 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9668 /usr/ucb/* ) ;;
9670 # OSF1 and SCO ODT 3.0 have their own names for install.
9671 # Don't use installbsd from OSF since it installs stuff as root
9672 # by default.
9673 for ac_prog in ginstall scoinst install; do
9674 for ac_exec_ext in '' $ac_executable_extensions; do
9675 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9676 if test $ac_prog = install &&
9677 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9678 # AIX install. It has an incompatible calling convention.
9680 elif test $ac_prog = install &&
9681 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9682 # program-specific install script used by HP pwplus--don't use.
9684 else
9685 rm -rf conftest.one conftest.two conftest.dir
9686 echo one > conftest.one
9687 echo two > conftest.two
9688 mkdir conftest.dir
9689 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9690 test -s conftest.one && test -s conftest.two &&
9691 test -s conftest.dir/conftest.one &&
9692 test -s conftest.dir/conftest.two
9693 then
9694 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9695 break 3
9699 done
9700 done
9702 esac
9704 done
9705 IFS=$as_save_IFS
9707 rm -rf conftest.one conftest.two conftest.dir
9710 if test "${ac_cv_path_install+set}" = set; then
9711 INSTALL=$ac_cv_path_install
9712 else
9713 # As a last resort, use the slow shell script. Don't cache a
9714 # value for INSTALL within a source directory, because that will
9715 # break other packages using the cache if that directory is
9716 # removed, or if the value is a relative name.
9717 INSTALL=$ac_install_sh
9720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9721 $as_echo "$INSTALL" >&6; }
9723 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9724 # It thinks the first close brace ends the variable substitution.
9725 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9727 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9729 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9731 # When Autoconf chooses install-sh as install program it tries to generate
9732 # a relative path to it in each makefile where it substitutes it. This clashes
9733 # with our Makefile.global concept. This workaround helps.
9734 case $INSTALL in
9735 *install-sh*) install_bin='';;
9736 *) install_bin=$INSTALL;;
9737 esac
9740 if test -z "$TAR"; then
9741 for ac_prog in tar
9743 # Extract the first word of "$ac_prog", so it can be a program name with args.
9744 set dummy $ac_prog; ac_word=$2
9745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9746 $as_echo_n "checking for $ac_word... " >&6; }
9747 if ${ac_cv_path_TAR+:} false; then :
9748 $as_echo_n "(cached) " >&6
9749 else
9750 case $TAR in
9751 [\\/]* | ?:[\\/]*)
9752 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9756 for as_dir in $PATH
9758 IFS=$as_save_IFS
9759 test -z "$as_dir" && as_dir=.
9760 for ac_exec_ext in '' $ac_executable_extensions; do
9761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9762 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9764 break 2
9766 done
9767 done
9768 IFS=$as_save_IFS
9771 esac
9773 TAR=$ac_cv_path_TAR
9774 if test -n "$TAR"; then
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9776 $as_echo "$TAR" >&6; }
9777 else
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9779 $as_echo "no" >&6; }
9783 test -n "$TAR" && break
9784 done
9786 else
9787 # Report the value of TAR in configure's output in all cases.
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9789 $as_echo_n "checking for TAR... " >&6; }
9790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9791 $as_echo "$TAR" >&6; }
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9795 $as_echo_n "checking whether ln -s works... " >&6; }
9796 LN_S=$as_ln_s
9797 if test "$LN_S" = "ln -s"; then
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9799 $as_echo "yes" >&6; }
9800 else
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9802 $as_echo "no, using $LN_S" >&6; }
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9806 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9807 if test -z "$MKDIR_P"; then
9808 if ${ac_cv_path_mkdir+:} false; then :
9809 $as_echo_n "(cached) " >&6
9810 else
9811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9812 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9814 IFS=$as_save_IFS
9815 test -z "$as_dir" && as_dir=.
9816 for ac_prog in mkdir gmkdir; do
9817 for ac_exec_ext in '' $ac_executable_extensions; do
9818 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9819 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9820 'mkdir (GNU coreutils) '* | \
9821 'mkdir (coreutils) '* | \
9822 'mkdir (fileutils) '4.1*)
9823 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9824 break 3;;
9825 esac
9826 done
9827 done
9828 done
9829 IFS=$as_save_IFS
9833 test -d ./--version && rmdir ./--version
9834 if test "${ac_cv_path_mkdir+set}" = set; then
9835 MKDIR_P="$ac_cv_path_mkdir -p"
9836 else
9837 # As a last resort, use the slow shell script. Don't cache a
9838 # value for MKDIR_P within a source directory, because that will
9839 # break other packages using the cache if that directory is
9840 # removed, or if the value is a relative name.
9841 MKDIR_P="$ac_install_sh -d"
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9845 $as_echo "$MKDIR_P" >&6; }
9847 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9848 # a relative path to it in each makefile where it substitutes it. This clashes
9849 # with our Makefile.global concept. This workaround helps.
9850 case $MKDIR_P in
9851 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9852 esac
9854 if test -z "$BISON"; then
9855 for ac_prog in bison
9857 # Extract the first word of "$ac_prog", so it can be a program name with args.
9858 set dummy $ac_prog; ac_word=$2
9859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9860 $as_echo_n "checking for $ac_word... " >&6; }
9861 if ${ac_cv_path_BISON+:} false; then :
9862 $as_echo_n "(cached) " >&6
9863 else
9864 case $BISON in
9865 [\\/]* | ?:[\\/]*)
9866 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9870 for as_dir in $PATH
9872 IFS=$as_save_IFS
9873 test -z "$as_dir" && as_dir=.
9874 for ac_exec_ext in '' $ac_executable_extensions; do
9875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9876 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9878 break 2
9880 done
9881 done
9882 IFS=$as_save_IFS
9885 esac
9887 BISON=$ac_cv_path_BISON
9888 if test -n "$BISON"; then
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9890 $as_echo "$BISON" >&6; }
9891 else
9892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893 $as_echo "no" >&6; }
9897 test -n "$BISON" && break
9898 done
9900 else
9901 # Report the value of BISON in configure's output in all cases.
9902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9903 $as_echo_n "checking for BISON... " >&6; }
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9905 $as_echo "$BISON" >&6; }
9909 if test "$BISON"; then
9910 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9911 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9912 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9913 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
9914 then
9915 as_fn_error $? "
9916 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9917 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
9919 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9920 # of the now preferred %name-prefix "base_yy", but the latter
9921 # doesn't work with Bison 2.3 or less. So for now we silence the
9922 # deprecation warnings.
9923 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9924 then
9925 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9929 if test -z "$BISON"; then
9930 as_fn_error $? "bison not found" "$LINENO" 5
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9935 $as_echo_n "checking for flex... " >&6; }
9936 if ${pgac_cv_path_flex+:} false; then :
9937 $as_echo_n "(cached) " >&6
9938 else
9939 # Let the user override the test
9940 if test -n "$FLEX"; then
9941 pgac_cv_path_flex=$FLEX
9942 else
9943 pgac_save_IFS=$IFS
9944 IFS=$PATH_SEPARATOR
9945 for pgac_dir in $PATH; do
9946 IFS=$pgac_save_IFS
9947 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9948 pgac_dir=`pwd`
9950 for pgac_prog in flex lex; do
9951 pgac_candidate="$pgac_dir/$pgac_prog"
9952 if test -f "$pgac_candidate" \
9953 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9954 then
9955 echo '%%' > conftest.l
9956 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9957 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9958 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;}'
9959 then
9960 pgac_cv_path_flex=$pgac_candidate
9961 break 2
9962 else
9963 as_fn_error $? "
9964 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9965 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." "$LINENO" 5
9969 done
9970 done
9971 rm -f conftest.l lex.yy.c
9972 : ${pgac_cv_path_flex=no}
9976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9977 $as_echo "$pgac_cv_path_flex" >&6; }
9978 if test x"$pgac_cv_path_flex" = x"no"; then
9979 as_fn_error $? "flex not found" "$LINENO" 5
9980 else
9981 FLEX=$pgac_cv_path_flex
9982 pgac_flex_version=`$FLEX --version 2>/dev/null`
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9984 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9991 if test -z "$PERL"; then
9992 for ac_prog in perl
9994 # Extract the first word of "$ac_prog", so it can be a program name with args.
9995 set dummy $ac_prog; ac_word=$2
9996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9997 $as_echo_n "checking for $ac_word... " >&6; }
9998 if ${ac_cv_path_PERL+:} false; then :
9999 $as_echo_n "(cached) " >&6
10000 else
10001 case $PERL in
10002 [\\/]* | ?:[\\/]*)
10003 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10007 for as_dir in $PATH
10009 IFS=$as_save_IFS
10010 test -z "$as_dir" && as_dir=.
10011 for ac_exec_ext in '' $ac_executable_extensions; do
10012 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10013 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10015 break 2
10017 done
10018 done
10019 IFS=$as_save_IFS
10022 esac
10024 PERL=$ac_cv_path_PERL
10025 if test -n "$PERL"; then
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10027 $as_echo "$PERL" >&6; }
10028 else
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10030 $as_echo "no" >&6; }
10034 test -n "$PERL" && break
10035 done
10037 else
10038 # Report the value of PERL in configure's output in all cases.
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10040 $as_echo_n "checking for PERL... " >&6; }
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10042 $as_echo "$PERL" >&6; }
10046 if test "$PERL"; then
10047 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'`
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10049 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10050 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10051 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10052 then
10053 as_fn_error $? "
10054 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10055 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
10059 if test -z "$PERL"; then
10060 as_fn_error $? "Perl not found" "$LINENO" 5
10063 if test "$with_perl" = yes; then
10064 if test -z "$PERL"; then
10065 as_fn_error $? "Perl not found" "$LINENO" 5
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10069 $as_echo_n "checking for Perl archlibexp... " >&6; }
10070 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10071 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10073 $as_echo "$perl_archlibexp" >&6; }
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10075 $as_echo_n "checking for Perl privlibexp... " >&6; }
10076 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10077 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10079 $as_echo "$perl_privlibexp" >&6; }
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10081 $as_echo_n "checking for Perl useshrplib... " >&6; }
10082 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10083 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10085 $as_echo "$perl_useshrplib" >&6; }
10086 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10087 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10088 You might have to rebuild your Perl installation. Refer to the
10089 documentation for details. Use --without-perl to disable building
10090 PL/Perl." "$LINENO" 5
10092 # On most platforms, archlibexp is also where the Perl include files live ...
10093 perl_includespec="-I$perl_archlibexp/CORE"
10094 # ... but on newer macOS versions, we must use -iwithsysroot to look
10095 # under $PG_SYSROOT
10096 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10097 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10098 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10103 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10104 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10106 $as_echo "$perl_ccflags" >&6; }
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10108 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10109 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10111 $as_echo "$perl_embed_ccflags" >&6; }
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10115 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10116 if test "$PORTNAME" = "win32" ; then
10117 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10118 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10119 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10120 else
10121 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10122 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10123 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10126 else
10127 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10128 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10129 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10131 if test -z "$perl_embed_ldflags" ; then
10132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133 $as_echo "no" >&6; }
10134 as_fn_error $? "could not determine flags for linking embedded Perl.
10135 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10136 installed." "$LINENO" 5
10137 else
10138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10139 $as_echo "$perl_embed_ldflags" >&6; }
10144 if test "$with_python" = yes; then
10145 if test -z "$PYTHON"; then
10146 for ac_prog in python3 python
10148 # Extract the first word of "$ac_prog", so it can be a program name with args.
10149 set dummy $ac_prog; ac_word=$2
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10151 $as_echo_n "checking for $ac_word... " >&6; }
10152 if ${ac_cv_path_PYTHON+:} false; then :
10153 $as_echo_n "(cached) " >&6
10154 else
10155 case $PYTHON in
10156 [\\/]* | ?:[\\/]*)
10157 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10161 for as_dir in $PATH
10163 IFS=$as_save_IFS
10164 test -z "$as_dir" && as_dir=.
10165 for ac_exec_ext in '' $ac_executable_extensions; do
10166 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10167 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10168 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10169 break 2
10171 done
10172 done
10173 IFS=$as_save_IFS
10176 esac
10178 PYTHON=$ac_cv_path_PYTHON
10179 if test -n "$PYTHON"; then
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10181 $as_echo "$PYTHON" >&6; }
10182 else
10183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10184 $as_echo "no" >&6; }
10188 test -n "$PYTHON" && break
10189 done
10191 else
10192 # Report the value of PYTHON in configure's output in all cases.
10193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10194 $as_echo_n "checking for PYTHON... " >&6; }
10195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10196 $as_echo "$PYTHON" >&6; }
10199 if test x"$PYTHON" = x""; then
10200 as_fn_error $? "Python not found" "$LINENO" 5
10204 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10206 $as_echo "$as_me: using python $python_fullversion" >&6;}
10207 # python_fullversion is typically n.n.n plus some trailing junk
10208 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10209 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10210 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10211 # Reject unsupported Python versions as soon as practical.
10212 if test "$python_majorversion" -lt 3; then
10213 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10217 $as_echo_n "checking for Python sysconfig module... " >&6; }
10218 if "${PYTHON}" -c 'import sysconfig' 2>&5
10219 then
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10221 $as_echo "yes" >&6; }
10222 else
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10224 $as_echo "no" >&6; }
10225 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10229 $as_echo_n "checking Python configuration directory... " >&6; }
10230 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10232 $as_echo "$python_configdir" >&6; }
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10235 $as_echo_n "checking Python include directory... " >&6; }
10236 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10237 if test "$PORTNAME" = win32 ; then
10238 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10241 $as_echo "$python_includespec" >&6; }
10245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10246 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10248 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10249 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10251 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10252 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10253 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10254 then
10255 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10256 found_shlib=1
10257 else
10258 # Otherwise, guess the base name of the shlib.
10259 # LDVERSION was added in Python 3.2, before that use VERSION,
10260 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10261 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10262 if test x"${python_ldversion}" != x""; then
10263 ldlibrary="python${python_ldversion}"
10264 else
10265 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10266 if test x"${python_version_var}" != x""; then
10267 ldlibrary="python${python_version_var}"
10268 else
10269 ldlibrary="python${python_version}"
10272 # Search for a likely-looking file.
10273 found_shlib=0
10274 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10276 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10277 python_libdir="$d"
10278 found_shlib=1
10279 break 2
10281 done
10282 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10283 # (".so.n.n") as well. However, check this only after failing to find
10284 # ".so" anywhere, because yet other platforms (Debian) put the .so
10285 # symlink in a different directory from the underlying versioned shlib.
10286 if test "$found_shlib" != 1; then
10287 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10289 for f in "$d/lib${ldlibrary}.so."* ; do
10290 if test -e "$f"; then
10291 python_libdir="$d"
10292 found_shlib=1
10293 break 2
10295 done
10296 done
10298 # As usual, Windows has its own ideas. Possible default library
10299 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10300 # and the "lib" prefix might not be there.
10301 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10302 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10304 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10305 if test -e "$f"; then
10306 python_libdir="$d"
10307 found_shlib=1
10308 break 2
10310 done
10311 done
10314 if test "$found_shlib" != 1; then
10315 as_fn_error $? "could not find shared library for Python
10316 You might have to rebuild your Python installation. Refer to the
10317 documentation for details. Use --without-python to disable building
10318 PL/Python." "$LINENO" 5
10320 python_libspec="-L${python_libdir} -l${ldlibrary}"
10322 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10325 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10331 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10332 if test -z "$ZIC"; then
10333 for ac_prog in zic
10335 # Extract the first word of "$ac_prog", so it can be a program name with args.
10336 set dummy $ac_prog; ac_word=$2
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10338 $as_echo_n "checking for $ac_word... " >&6; }
10339 if ${ac_cv_path_ZIC+:} false; then :
10340 $as_echo_n "(cached) " >&6
10341 else
10342 case $ZIC in
10343 [\\/]* | ?:[\\/]*)
10344 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10348 for as_dir in $PATH
10350 IFS=$as_save_IFS
10351 test -z "$as_dir" && as_dir=.
10352 for ac_exec_ext in '' $ac_executable_extensions; do
10353 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10354 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10356 break 2
10358 done
10359 done
10360 IFS=$as_save_IFS
10363 esac
10365 ZIC=$ac_cv_path_ZIC
10366 if test -n "$ZIC"; then
10367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10368 $as_echo "$ZIC" >&6; }
10369 else
10370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10371 $as_echo "no" >&6; }
10375 test -n "$ZIC" && break
10376 done
10378 else
10379 # Report the value of ZIC in configure's output in all cases.
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10381 $as_echo_n "checking for ZIC... " >&6; }
10382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10383 $as_echo "$ZIC" >&6; }
10386 if test -z "$ZIC"; then
10387 as_fn_error $? "
10388 When cross-compiling, either use the option --with-system-tzdata to use
10389 existing time-zone data, or set the environment variable ZIC to a zic
10390 program to use during the build." "$LINENO" 5
10395 # Pthreads
10397 # For each platform, we need to know about any special compile and link
10398 # libraries, and whether the normal C function names are thread-safe.
10399 # WIN32 doesn't need the pthread tests; it always uses threads
10401 # These tests are run before the library-tests, because linking with the
10402 # other libraries can pull in the pthread functions as a side-effect. We
10403 # want to use the -pthread or similar flags directly, and not rely on
10404 # the side-effects of linking with some other library.
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10407 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10408 if ${ac_cv_path_SED+:} false; then :
10409 $as_echo_n "(cached) " >&6
10410 else
10411 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10412 for ac_i in 1 2 3 4 5 6 7; do
10413 ac_script="$ac_script$as_nl$ac_script"
10414 done
10415 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10416 { ac_script=; unset ac_script;}
10417 if test -z "$SED"; then
10418 ac_path_SED_found=false
10419 # Loop through the user's path and test for each of PROGNAME-LIST
10420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421 for as_dir in $PATH
10423 IFS=$as_save_IFS
10424 test -z "$as_dir" && as_dir=.
10425 for ac_prog in sed gsed; do
10426 for ac_exec_ext in '' $ac_executable_extensions; do
10427 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10428 as_fn_executable_p "$ac_path_SED" || continue
10429 # Check for GNU ac_path_SED and select it if it is found.
10430 # Check for GNU $ac_path_SED
10431 case `"$ac_path_SED" --version 2>&1` in
10432 *GNU*)
10433 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10435 ac_count=0
10436 $as_echo_n 0123456789 >"conftest.in"
10437 while :
10439 cat "conftest.in" "conftest.in" >"conftest.tmp"
10440 mv "conftest.tmp" "conftest.in"
10441 cp "conftest.in" "conftest.nl"
10442 $as_echo '' >> "conftest.nl"
10443 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10444 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10445 as_fn_arith $ac_count + 1 && ac_count=$as_val
10446 if test $ac_count -gt ${ac_path_SED_max-0}; then
10447 # Best one so far, save it but keep looking for a better one
10448 ac_cv_path_SED="$ac_path_SED"
10449 ac_path_SED_max=$ac_count
10451 # 10*(2^10) chars as input seems more than enough
10452 test $ac_count -gt 10 && break
10453 done
10454 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10455 esac
10457 $ac_path_SED_found && break 3
10458 done
10459 done
10460 done
10461 IFS=$as_save_IFS
10462 if test -z "$ac_cv_path_SED"; then
10463 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10465 else
10466 ac_cv_path_SED=$SED
10470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10471 $as_echo "$ac_cv_path_SED" >&6; }
10472 SED="$ac_cv_path_SED"
10473 rm -f conftest.sed
10476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10477 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10478 if ${ac_cv_path_GREP+:} false; then :
10479 $as_echo_n "(cached) " >&6
10480 else
10481 if test -z "$GREP"; then
10482 ac_path_GREP_found=false
10483 # Loop through the user's path and test for each of PROGNAME-LIST
10484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10485 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10487 IFS=$as_save_IFS
10488 test -z "$as_dir" && as_dir=.
10489 for ac_prog in grep ggrep; do
10490 for ac_exec_ext in '' $ac_executable_extensions; do
10491 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10492 as_fn_executable_p "$ac_path_GREP" || continue
10493 # Check for GNU ac_path_GREP and select it if it is found.
10494 # Check for GNU $ac_path_GREP
10495 case `"$ac_path_GREP" --version 2>&1` in
10496 *GNU*)
10497 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10499 ac_count=0
10500 $as_echo_n 0123456789 >"conftest.in"
10501 while :
10503 cat "conftest.in" "conftest.in" >"conftest.tmp"
10504 mv "conftest.tmp" "conftest.in"
10505 cp "conftest.in" "conftest.nl"
10506 $as_echo 'GREP' >> "conftest.nl"
10507 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10508 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10509 as_fn_arith $ac_count + 1 && ac_count=$as_val
10510 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10511 # Best one so far, save it but keep looking for a better one
10512 ac_cv_path_GREP="$ac_path_GREP"
10513 ac_path_GREP_max=$ac_count
10515 # 10*(2^10) chars as input seems more than enough
10516 test $ac_count -gt 10 && break
10517 done
10518 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10519 esac
10521 $ac_path_GREP_found && break 3
10522 done
10523 done
10524 done
10525 IFS=$as_save_IFS
10526 if test -z "$ac_cv_path_GREP"; then
10527 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10529 else
10530 ac_cv_path_GREP=$GREP
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10535 $as_echo "$ac_cv_path_GREP" >&6; }
10536 GREP="$ac_cv_path_GREP"
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10540 $as_echo_n "checking for egrep... " >&6; }
10541 if ${ac_cv_path_EGREP+:} false; then :
10542 $as_echo_n "(cached) " >&6
10543 else
10544 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10545 then ac_cv_path_EGREP="$GREP -E"
10546 else
10547 if test -z "$EGREP"; then
10548 ac_path_EGREP_found=false
10549 # Loop through the user's path and test for each of PROGNAME-LIST
10550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10551 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10553 IFS=$as_save_IFS
10554 test -z "$as_dir" && as_dir=.
10555 for ac_prog in egrep; do
10556 for ac_exec_ext in '' $ac_executable_extensions; do
10557 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10558 as_fn_executable_p "$ac_path_EGREP" || continue
10559 # Check for GNU ac_path_EGREP and select it if it is found.
10560 # Check for GNU $ac_path_EGREP
10561 case `"$ac_path_EGREP" --version 2>&1` in
10562 *GNU*)
10563 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10565 ac_count=0
10566 $as_echo_n 0123456789 >"conftest.in"
10567 while :
10569 cat "conftest.in" "conftest.in" >"conftest.tmp"
10570 mv "conftest.tmp" "conftest.in"
10571 cp "conftest.in" "conftest.nl"
10572 $as_echo 'EGREP' >> "conftest.nl"
10573 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10574 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10575 as_fn_arith $ac_count + 1 && ac_count=$as_val
10576 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10577 # Best one so far, save it but keep looking for a better one
10578 ac_cv_path_EGREP="$ac_path_EGREP"
10579 ac_path_EGREP_max=$ac_count
10581 # 10*(2^10) chars as input seems more than enough
10582 test $ac_count -gt 10 && break
10583 done
10584 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10585 esac
10587 $ac_path_EGREP_found && break 3
10588 done
10589 done
10590 done
10591 IFS=$as_save_IFS
10592 if test -z "$ac_cv_path_EGREP"; then
10593 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10595 else
10596 ac_cv_path_EGREP=$EGREP
10601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10602 $as_echo "$ac_cv_path_EGREP" >&6; }
10603 EGREP="$ac_cv_path_EGREP"
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10607 $as_echo_n "checking for ANSI C header files... " >&6; }
10608 if ${ac_cv_header_stdc+:} false; then :
10609 $as_echo_n "(cached) " >&6
10610 else
10611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10612 /* end confdefs.h. */
10613 #include <stdlib.h>
10614 #include <stdarg.h>
10615 #include <string.h>
10616 #include <float.h>
10619 main ()
10623 return 0;
10625 _ACEOF
10626 if ac_fn_c_try_compile "$LINENO"; then :
10627 ac_cv_header_stdc=yes
10628 else
10629 ac_cv_header_stdc=no
10631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10633 if test $ac_cv_header_stdc = yes; then
10634 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10636 /* end confdefs.h. */
10637 #include <string.h>
10639 _ACEOF
10640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10641 $EGREP "memchr" >/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 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10653 /* end confdefs.h. */
10654 #include <stdlib.h>
10656 _ACEOF
10657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10658 $EGREP "free" >/dev/null 2>&1; then :
10660 else
10661 ac_cv_header_stdc=no
10663 rm -f conftest*
10667 if test $ac_cv_header_stdc = yes; then
10668 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10669 if test "$cross_compiling" = yes; then :
10671 else
10672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10673 /* end confdefs.h. */
10674 #include <ctype.h>
10675 #include <stdlib.h>
10676 #if ((' ' & 0x0FF) == 0x020)
10677 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10678 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10679 #else
10680 # define ISLOWER(c) \
10681 (('a' <= (c) && (c) <= 'i') \
10682 || ('j' <= (c) && (c) <= 'r') \
10683 || ('s' <= (c) && (c) <= 'z'))
10684 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10685 #endif
10687 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10689 main ()
10691 int i;
10692 for (i = 0; i < 256; i++)
10693 if (XOR (islower (i), ISLOWER (i))
10694 || toupper (i) != TOUPPER (i))
10695 return 2;
10696 return 0;
10698 _ACEOF
10699 if ac_fn_c_try_run "$LINENO"; then :
10701 else
10702 ac_cv_header_stdc=no
10704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10705 conftest.$ac_objext conftest.beam conftest.$ac_ext
10710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10711 $as_echo "$ac_cv_header_stdc" >&6; }
10712 if test $ac_cv_header_stdc = yes; then
10714 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10718 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10719 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10720 inttypes.h stdint.h unistd.h
10721 do :
10722 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10723 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10725 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10726 cat >>confdefs.h <<_ACEOF
10727 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10728 _ACEOF
10732 done
10735 if test "$PORTNAME" != "win32"; then :
10736 # then
10741 ac_ext=c
10742 ac_cpp='$CPP $CPPFLAGS'
10743 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10744 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10745 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10747 ax_pthread_ok=no
10749 # We used to check for pthread.h first, but this fails if pthread.h
10750 # requires special compiler flags (e.g. on Tru64 or Sequent).
10751 # It gets checked for in the link test anyway.
10753 # First of all, check if the user has set any of the PTHREAD_LIBS,
10754 # etcetera environment variables, and if threads linking works using
10755 # them:
10756 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10757 ax_pthread_save_CC="$CC"
10758 ax_pthread_save_CFLAGS="$CFLAGS"
10759 ax_pthread_save_LIBS="$LIBS"
10760 if test "x$PTHREAD_CC" != "x"; then :
10761 CC="$PTHREAD_CC"
10763 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10764 LIBS="$PTHREAD_LIBS $LIBS"
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10766 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10768 /* end confdefs.h. */
10770 /* Override any GCC internal prototype to avoid an error.
10771 Use char because int might match the return type of a GCC
10772 builtin and then its argument prototype would still apply. */
10773 #ifdef __cplusplus
10774 extern "C"
10775 #endif
10776 char pthread_join ();
10778 main ()
10780 return pthread_join ();
10782 return 0;
10784 _ACEOF
10785 if ac_fn_c_try_link "$LINENO"; then :
10786 ax_pthread_ok=yes
10788 rm -f core conftest.err conftest.$ac_objext \
10789 conftest$ac_exeext conftest.$ac_ext
10790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10791 $as_echo "$ax_pthread_ok" >&6; }
10792 if test "x$ax_pthread_ok" = "xno"; then
10793 PTHREAD_LIBS=""
10794 PTHREAD_CFLAGS=""
10796 CC="$ax_pthread_save_CC"
10797 CFLAGS="$ax_pthread_save_CFLAGS"
10798 LIBS="$ax_pthread_save_LIBS"
10801 # We must check for the threads library under a number of different
10802 # names; the ordering is very important because some systems
10803 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10804 # libraries is broken (non-POSIX).
10806 # Create a list of thread flags to try. Items starting with a "-" are
10807 # C compiler flags, and other items are library names, except for "none"
10808 # which indicates that we try without any flags at all, and "pthread-config"
10809 # which is a program returning the flags for the Pth emulation library.
10811 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10813 # The ordering *is* (sometimes) important. Some notes on the
10814 # individual items follow:
10816 # pthreads: AIX (must check this before -lpthread)
10817 # none: in case threads are in libc; should be tried before -Kthread and
10818 # other compiler flags to prevent continual compiler warnings
10819 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10820 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10821 # (Note: HP C rejects this with "bad form for `-t' option")
10822 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10823 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10824 # doesn't hurt to check since this sometimes defines pthreads and
10825 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10826 # is present but should not be used directly; and before -mthreads,
10827 # because the compiler interprets this as "-mt" + "-hreads")
10828 # -mthreads: Mingw32/gcc, Lynx/gcc
10829 # pthread: Linux, etcetera
10830 # --thread-safe: KAI C++
10831 # pthread-config: use pthread-config program (for GNU Pth library)
10833 case $host_os in
10835 freebsd*)
10837 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10838 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10840 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10843 hpux*)
10845 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10846 # multi-threading and also sets -lpthread."
10848 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10851 openedition*)
10853 # IBM z/OS requires a feature-test macro to be defined in order to
10854 # enable POSIX threads at all, so give the user a hint if this is
10855 # not set. (We don't define these ourselves, as they can affect
10856 # other portions of the system API in unpredictable ways.)
10858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10859 /* end confdefs.h. */
10861 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10862 AX_PTHREAD_ZOS_MISSING
10863 # endif
10865 _ACEOF
10866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10867 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10869 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10871 rm -f conftest*
10875 solaris*)
10877 # On Solaris (at least, for some versions), libc contains stubbed
10878 # (non-functional) versions of the pthreads routines, so link-based
10879 # tests will erroneously succeed. (N.B.: The stubs are missing
10880 # pthread_cleanup_push, or rather a function called by this macro,
10881 # so we could check for that, but who knows whether they'll stub
10882 # that too in a future libc.) So we'll check first for the
10883 # standard Solaris way of linking pthreads (-mt -lpthread).
10885 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10887 esac
10889 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10891 if test "x$GCC" = "xyes"; then :
10892 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10895 # The presence of a feature test macro requesting re-entrant function
10896 # definitions is, on some systems, a strong hint that pthreads support is
10897 # correctly enabled
10899 case $host_os in
10900 darwin* | hpux* | linux* | osf* | solaris*)
10901 ax_pthread_check_macro="_REENTRANT"
10904 aix*)
10905 ax_pthread_check_macro="_THREAD_SAFE"
10909 ax_pthread_check_macro="--"
10911 esac
10912 if test "x$ax_pthread_check_macro" = "x--"; then :
10913 ax_pthread_check_cond=0
10914 else
10915 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10918 # Are we compiling with Clang?
10920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10921 $as_echo_n "checking whether $CC is Clang... " >&6; }
10922 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10923 $as_echo_n "(cached) " >&6
10924 else
10925 ax_cv_PTHREAD_CLANG=no
10926 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10927 if test "x$GCC" = "xyes"; then
10928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10929 /* end confdefs.h. */
10930 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10931 # if defined(__clang__) && defined(__llvm__)
10932 AX_PTHREAD_CC_IS_CLANG
10933 # endif
10935 _ACEOF
10936 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10937 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10938 ax_cv_PTHREAD_CLANG=yes
10940 rm -f conftest*
10945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10946 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10947 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10949 ax_pthread_clang_warning=no
10951 # Clang needs special handling, because older versions handle the -pthread
10952 # option in a rather... idiosyncratic way
10954 if test "x$ax_pthread_clang" = "xyes"; then
10956 # Clang takes -pthread; it has never supported any other flag
10958 # (Note 1: This will need to be revisited if a system that Clang
10959 # supports has POSIX threads in a separate library. This tends not
10960 # to be the way of modern systems, but it's conceivable.)
10962 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10963 # to get POSIX threads support; the API is always present and
10964 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10965 # -pthread does define _REENTRANT, and while the Darwin headers
10966 # ignore this macro, third-party headers might not.)
10968 PTHREAD_CFLAGS="-pthread"
10969 PTHREAD_LIBS=
10971 ax_pthread_ok=yes
10973 # However, older versions of Clang make a point of warning the user
10974 # that, in an invocation where only linking and no compilation is
10975 # taking place, the -pthread option has no effect ("argument unused
10976 # during compilation"). They expect -pthread to be passed in only
10977 # when source code is being compiled.
10979 # Problem is, this is at odds with the way Automake and most other
10980 # C build frameworks function, which is that the same flags used in
10981 # compilation (CFLAGS) are also used in linking. Many systems
10982 # supported by AX_PTHREAD require exactly this for POSIX threads
10983 # support, and in fact it is often not straightforward to specify a
10984 # flag that is used only in the compilation phase and not in
10985 # linking. Such a scenario is extremely rare in practice.
10987 # Even though use of the -pthread flag in linking would only print
10988 # a warning, this can be a nuisance for well-run software projects
10989 # that build with -Werror. So if the active version of Clang has
10990 # this misfeature, we search for an option to squash it.
10992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10993 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10994 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10995 $as_echo_n "(cached) " >&6
10996 else
10997 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10998 # Create an alternate version of $ac_link that compiles and
10999 # links in two steps (.c -> .o, .o -> exe) instead of one
11000 # (.c -> exe), because the warning occurs only in the second
11001 # step
11002 ax_pthread_save_ac_link="$ac_link"
11003 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11004 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11005 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11006 ax_pthread_save_CFLAGS="$CFLAGS"
11007 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11008 if test "x$ax_pthread_try" = "xunknown"; then :
11009 break
11011 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11012 ac_link="$ax_pthread_save_ac_link"
11013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11014 /* end confdefs.h. */
11015 int main(void){return 0;}
11016 _ACEOF
11017 if ac_fn_c_try_link "$LINENO"; then :
11018 ac_link="$ax_pthread_2step_ac_link"
11019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11020 /* end confdefs.h. */
11021 int main(void){return 0;}
11022 _ACEOF
11023 if ac_fn_c_try_link "$LINENO"; then :
11024 break
11026 rm -f core conftest.err conftest.$ac_objext \
11027 conftest$ac_exeext conftest.$ac_ext
11030 rm -f core conftest.err conftest.$ac_objext \
11031 conftest$ac_exeext conftest.$ac_ext
11032 done
11033 ac_link="$ax_pthread_save_ac_link"
11034 CFLAGS="$ax_pthread_save_CFLAGS"
11035 if test "x$ax_pthread_try" = "x"; then :
11036 ax_pthread_try=no
11038 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11042 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11044 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11045 no | unknown) ;;
11046 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11047 esac
11049 fi # $ax_pthread_clang = yes
11051 if test "x$ax_pthread_ok" = "xno"; then
11052 for ax_pthread_try_flag in $ax_pthread_flags; do
11054 case $ax_pthread_try_flag in
11055 none)
11056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11057 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11060 -mt,pthread)
11061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11062 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11063 PTHREAD_CFLAGS="-mt"
11064 PTHREAD_LIBS="-lpthread"
11068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11069 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11070 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11073 pthread-config)
11074 # Extract the first word of "pthread-config", so it can be a program name with args.
11075 set dummy pthread-config; ac_word=$2
11076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11077 $as_echo_n "checking for $ac_word... " >&6; }
11078 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11079 $as_echo_n "(cached) " >&6
11080 else
11081 if test -n "$ax_pthread_config"; then
11082 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11083 else
11084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11085 for as_dir in $PATH
11087 IFS=$as_save_IFS
11088 test -z "$as_dir" && as_dir=.
11089 for ac_exec_ext in '' $ac_executable_extensions; do
11090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11091 ac_cv_prog_ax_pthread_config="yes"
11092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11093 break 2
11095 done
11096 done
11097 IFS=$as_save_IFS
11099 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11102 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11103 if test -n "$ax_pthread_config"; then
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11105 $as_echo "$ax_pthread_config" >&6; }
11106 else
11107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11108 $as_echo "no" >&6; }
11112 if test "x$ax_pthread_config" = "xno"; then :
11113 continue
11115 PTHREAD_CFLAGS="`pthread-config --cflags`"
11116 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11121 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11122 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11124 esac
11126 ax_pthread_save_CFLAGS="$CFLAGS"
11127 ax_pthread_save_LIBS="$LIBS"
11128 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11129 LIBS="$PTHREAD_LIBS $LIBS"
11131 # Check for various functions. We must include pthread.h,
11132 # since some functions may be macros. (On the Sequent, we
11133 # need a special flag -Kthread to make this header compile.)
11134 # We check for pthread_join because it is in -lpthread on IRIX
11135 # while pthread_create is in libc. We check for pthread_attr_init
11136 # due to DEC craziness with -lpthreads. We check for
11137 # pthread_cleanup_push because it is one of the few pthread
11138 # functions on Solaris that doesn't have a non-functional libc stub.
11139 # We try pthread_create on general principles.
11141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11142 /* end confdefs.h. */
11143 #include <pthread.h>
11144 # if $ax_pthread_check_cond
11145 # error "$ax_pthread_check_macro must be defined"
11146 # endif
11147 static void routine(void *a) { a = 0; }
11148 static void *start_routine(void *a) { return a; }
11150 main ()
11152 pthread_t th; pthread_attr_t attr;
11153 pthread_create(&th, 0, start_routine, 0);
11154 pthread_join(th, 0);
11155 pthread_attr_init(&attr);
11156 pthread_cleanup_push(routine, 0);
11157 pthread_cleanup_pop(0) /* ; */
11159 return 0;
11161 _ACEOF
11162 if ac_fn_c_try_link "$LINENO"; then :
11163 ax_pthread_ok=yes
11165 rm -f core conftest.err conftest.$ac_objext \
11166 conftest$ac_exeext conftest.$ac_ext
11168 CFLAGS="$ax_pthread_save_CFLAGS"
11169 LIBS="$ax_pthread_save_LIBS"
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11172 $as_echo "$ax_pthread_ok" >&6; }
11173 if test "x$ax_pthread_ok" = "xyes"; then :
11174 break
11177 PTHREAD_LIBS=""
11178 PTHREAD_CFLAGS=""
11179 done
11182 # Various other checks:
11183 if test "x$ax_pthread_ok" = "xyes"; then
11184 ax_pthread_save_CFLAGS="$CFLAGS"
11185 ax_pthread_save_LIBS="$LIBS"
11186 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11187 LIBS="$PTHREAD_LIBS $LIBS"
11189 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11191 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11192 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11193 $as_echo_n "(cached) " >&6
11194 else
11195 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11196 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11198 /* end confdefs.h. */
11199 #include <pthread.h>
11201 main ()
11203 int attr = $ax_pthread_attr; return attr /* ; */
11205 return 0;
11207 _ACEOF
11208 if ac_fn_c_try_link "$LINENO"; then :
11209 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11211 rm -f core conftest.err conftest.$ac_objext \
11212 conftest$ac_exeext conftest.$ac_ext
11213 done
11216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11217 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11218 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11219 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11220 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11222 cat >>confdefs.h <<_ACEOF
11223 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11224 _ACEOF
11226 ax_pthread_joinable_attr_defined=yes
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11231 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11232 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11233 $as_echo_n "(cached) " >&6
11234 else
11235 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11236 case $host_os in
11237 solaris*)
11238 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11240 esac
11243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11244 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11245 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11246 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11247 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11248 ax_pthread_special_flags_added=yes
11251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11252 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11253 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11254 $as_echo_n "(cached) " >&6
11255 else
11256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11257 /* end confdefs.h. */
11258 #include <pthread.h>
11260 main ()
11262 int i = PTHREAD_PRIO_INHERIT;
11264 return 0;
11266 _ACEOF
11267 if ac_fn_c_try_link "$LINENO"; then :
11268 ax_cv_PTHREAD_PRIO_INHERIT=yes
11269 else
11270 ax_cv_PTHREAD_PRIO_INHERIT=no
11272 rm -f core conftest.err conftest.$ac_objext \
11273 conftest$ac_exeext conftest.$ac_ext
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11277 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11278 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11279 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11281 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11283 ax_pthread_prio_inherit_defined=yes
11287 CFLAGS="$ax_pthread_save_CFLAGS"
11288 LIBS="$ax_pthread_save_LIBS"
11290 # More AIX lossage: compile with *_r variant
11291 if test "x$GCC" != "xyes"; then
11292 case $host_os in
11293 aix*)
11294 case "x/$CC" in #(
11295 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11296 #handle absolute path differently from PATH based program lookup
11297 case "x$CC" in #(
11298 x/*) :
11299 if as_fn_executable_p ${CC}_r; then :
11300 PTHREAD_CC="${CC}_r"
11301 fi ;; #(
11302 *) :
11303 for ac_prog in ${CC}_r
11305 # Extract the first word of "$ac_prog", so it can be a program name with args.
11306 set dummy $ac_prog; ac_word=$2
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11308 $as_echo_n "checking for $ac_word... " >&6; }
11309 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11310 $as_echo_n "(cached) " >&6
11311 else
11312 if test -n "$PTHREAD_CC"; then
11313 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11314 else
11315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11316 for as_dir in $PATH
11318 IFS=$as_save_IFS
11319 test -z "$as_dir" && as_dir=.
11320 for ac_exec_ext in '' $ac_executable_extensions; do
11321 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11322 ac_cv_prog_PTHREAD_CC="$ac_prog"
11323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11324 break 2
11326 done
11327 done
11328 IFS=$as_save_IFS
11332 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11333 if test -n "$PTHREAD_CC"; then
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11335 $as_echo "$PTHREAD_CC" >&6; }
11336 else
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11338 $as_echo "no" >&6; }
11342 test -n "$PTHREAD_CC" && break
11343 done
11344 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11346 esac ;; #(
11347 *) :
11349 esac
11351 esac
11355 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11361 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11362 if test "x$ax_pthread_ok" = "xyes"; then
11364 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11367 else
11368 ax_pthread_ok=no
11371 ac_ext=c
11372 ac_cpp='$CPP $CPPFLAGS'
11373 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11374 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11375 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11377 # set thread flags
11379 # Some platforms use these, so just define them. They can't hurt if they
11380 # are not supported.
11381 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11383 # Check for *_r functions
11384 _CFLAGS="$CFLAGS"
11385 _LIBS="$LIBS"
11386 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11387 LIBS="$LIBS $PTHREAD_LIBS"
11389 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11390 if test "x$ac_cv_header_pthread_h" = xyes; then :
11392 else
11393 as_fn_error $? "
11394 pthread.h not found" "$LINENO" 5
11399 for ac_func in strerror_r
11400 do :
11401 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11402 if test "x$ac_cv_func_strerror_r" = xyes; then :
11403 cat >>confdefs.h <<_ACEOF
11404 #define HAVE_STRERROR_R 1
11405 _ACEOF
11408 done
11411 # Do test here with the proper thread flags
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11413 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11414 if ${pgac_cv_func_strerror_r_int+:} false; then :
11415 $as_echo_n "(cached) " >&6
11416 else
11417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418 /* end confdefs.h. */
11419 #include <string.h>
11421 main ()
11423 char buf[100];
11424 switch (strerror_r(1, buf, sizeof(buf)))
11425 { case 0: break; default: break; }
11428 return 0;
11430 _ACEOF
11431 if ac_fn_c_try_compile "$LINENO"; then :
11432 pgac_cv_func_strerror_r_int=yes
11433 else
11434 pgac_cv_func_strerror_r_int=no
11436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11439 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11440 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11442 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11447 CFLAGS="$_CFLAGS"
11448 LIBS="$_LIBS"
11451 else
11452 # else
11453 # do not use values from template file
11454 PTHREAD_CFLAGS=
11455 PTHREAD_LIBS=
11457 fi # fi
11464 ## Libraries
11466 ## Most libraries are included only if they demonstrably provide a function
11467 ## we need, but libm is an exception: always include it, because there are
11468 ## too many compilers that play cute optimization games that will break
11469 ## probes for standard functions such as pow().
11472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11473 $as_echo_n "checking for main in -lm... " >&6; }
11474 if ${ac_cv_lib_m_main+:} false; then :
11475 $as_echo_n "(cached) " >&6
11476 else
11477 ac_check_lib_save_LIBS=$LIBS
11478 LIBS="-lm $LIBS"
11479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11480 /* end confdefs.h. */
11484 main ()
11486 return main ();
11488 return 0;
11490 _ACEOF
11491 if ac_fn_c_try_link "$LINENO"; then :
11492 ac_cv_lib_m_main=yes
11493 else
11494 ac_cv_lib_m_main=no
11496 rm -f core conftest.err conftest.$ac_objext \
11497 conftest$ac_exeext conftest.$ac_ext
11498 LIBS=$ac_check_lib_save_LIBS
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11501 $as_echo "$ac_cv_lib_m_main" >&6; }
11502 if test "x$ac_cv_lib_m_main" = xyes; then :
11503 cat >>confdefs.h <<_ACEOF
11504 #define HAVE_LIBM 1
11505 _ACEOF
11507 LIBS="-lm $LIBS"
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11512 $as_echo_n "checking for library containing setproctitle... " >&6; }
11513 if ${ac_cv_search_setproctitle+:} false; then :
11514 $as_echo_n "(cached) " >&6
11515 else
11516 ac_func_search_save_LIBS=$LIBS
11517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11518 /* end confdefs.h. */
11520 /* Override any GCC internal prototype to avoid an error.
11521 Use char because int might match the return type of a GCC
11522 builtin and then its argument prototype would still apply. */
11523 #ifdef __cplusplus
11524 extern "C"
11525 #endif
11526 char setproctitle ();
11528 main ()
11530 return setproctitle ();
11532 return 0;
11534 _ACEOF
11535 for ac_lib in '' util; do
11536 if test -z "$ac_lib"; then
11537 ac_res="none required"
11538 else
11539 ac_res=-l$ac_lib
11540 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11542 if ac_fn_c_try_link "$LINENO"; then :
11543 ac_cv_search_setproctitle=$ac_res
11545 rm -f core conftest.err conftest.$ac_objext \
11546 conftest$ac_exeext
11547 if ${ac_cv_search_setproctitle+:} false; then :
11548 break
11550 done
11551 if ${ac_cv_search_setproctitle+:} false; then :
11553 else
11554 ac_cv_search_setproctitle=no
11556 rm conftest.$ac_ext
11557 LIBS=$ac_func_search_save_LIBS
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11560 $as_echo "$ac_cv_search_setproctitle" >&6; }
11561 ac_res=$ac_cv_search_setproctitle
11562 if test "$ac_res" != no; then :
11563 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11567 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11568 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11569 # required. Just checking for dlsym() ought to suffice.
11570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11571 $as_echo_n "checking for library containing dlsym... " >&6; }
11572 if ${ac_cv_search_dlsym+:} false; then :
11573 $as_echo_n "(cached) " >&6
11574 else
11575 ac_func_search_save_LIBS=$LIBS
11576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11577 /* end confdefs.h. */
11579 /* Override any GCC internal prototype to avoid an error.
11580 Use char because int might match the return type of a GCC
11581 builtin and then its argument prototype would still apply. */
11582 #ifdef __cplusplus
11583 extern "C"
11584 #endif
11585 char dlsym ();
11587 main ()
11589 return dlsym ();
11591 return 0;
11593 _ACEOF
11594 for ac_lib in '' dl; do
11595 if test -z "$ac_lib"; then
11596 ac_res="none required"
11597 else
11598 ac_res=-l$ac_lib
11599 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11601 if ac_fn_c_try_link "$LINENO"; then :
11602 ac_cv_search_dlsym=$ac_res
11604 rm -f core conftest.err conftest.$ac_objext \
11605 conftest$ac_exeext
11606 if ${ac_cv_search_dlsym+:} false; then :
11607 break
11609 done
11610 if ${ac_cv_search_dlsym+:} false; then :
11612 else
11613 ac_cv_search_dlsym=no
11615 rm conftest.$ac_ext
11616 LIBS=$ac_func_search_save_LIBS
11618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11619 $as_echo "$ac_cv_search_dlsym" >&6; }
11620 ac_res=$ac_cv_search_dlsym
11621 if test "$ac_res" != no; then :
11622 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11627 $as_echo_n "checking for library containing socket... " >&6; }
11628 if ${ac_cv_search_socket+:} false; then :
11629 $as_echo_n "(cached) " >&6
11630 else
11631 ac_func_search_save_LIBS=$LIBS
11632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11633 /* end confdefs.h. */
11635 /* Override any GCC internal prototype to avoid an error.
11636 Use char because int might match the return type of a GCC
11637 builtin and then its argument prototype would still apply. */
11638 #ifdef __cplusplus
11639 extern "C"
11640 #endif
11641 char socket ();
11643 main ()
11645 return socket ();
11647 return 0;
11649 _ACEOF
11650 for ac_lib in '' socket ws2_32; do
11651 if test -z "$ac_lib"; then
11652 ac_res="none required"
11653 else
11654 ac_res=-l$ac_lib
11655 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11657 if ac_fn_c_try_link "$LINENO"; then :
11658 ac_cv_search_socket=$ac_res
11660 rm -f core conftest.err conftest.$ac_objext \
11661 conftest$ac_exeext
11662 if ${ac_cv_search_socket+:} false; then :
11663 break
11665 done
11666 if ${ac_cv_search_socket+:} false; then :
11668 else
11669 ac_cv_search_socket=no
11671 rm conftest.$ac_ext
11672 LIBS=$ac_func_search_save_LIBS
11674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11675 $as_echo "$ac_cv_search_socket" >&6; }
11676 ac_res=$ac_cv_search_socket
11677 if test "$ac_res" != no; then :
11678 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11683 $as_echo_n "checking for library containing getopt_long... " >&6; }
11684 if ${ac_cv_search_getopt_long+:} false; then :
11685 $as_echo_n "(cached) " >&6
11686 else
11687 ac_func_search_save_LIBS=$LIBS
11688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11689 /* end confdefs.h. */
11691 /* Override any GCC internal prototype to avoid an error.
11692 Use char because int might match the return type of a GCC
11693 builtin and then its argument prototype would still apply. */
11694 #ifdef __cplusplus
11695 extern "C"
11696 #endif
11697 char getopt_long ();
11699 main ()
11701 return getopt_long ();
11703 return 0;
11705 _ACEOF
11706 for ac_lib in '' getopt gnugetopt; do
11707 if test -z "$ac_lib"; then
11708 ac_res="none required"
11709 else
11710 ac_res=-l$ac_lib
11711 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11713 if ac_fn_c_try_link "$LINENO"; then :
11714 ac_cv_search_getopt_long=$ac_res
11716 rm -f core conftest.err conftest.$ac_objext \
11717 conftest$ac_exeext
11718 if ${ac_cv_search_getopt_long+:} false; then :
11719 break
11721 done
11722 if ${ac_cv_search_getopt_long+:} false; then :
11724 else
11725 ac_cv_search_getopt_long=no
11727 rm conftest.$ac_ext
11728 LIBS=$ac_func_search_save_LIBS
11730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11731 $as_echo "$ac_cv_search_getopt_long" >&6; }
11732 ac_res=$ac_cv_search_getopt_long
11733 if test "$ac_res" != no; then :
11734 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11739 $as_echo_n "checking for library containing shm_open... " >&6; }
11740 if ${ac_cv_search_shm_open+:} false; then :
11741 $as_echo_n "(cached) " >&6
11742 else
11743 ac_func_search_save_LIBS=$LIBS
11744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11745 /* end confdefs.h. */
11747 /* Override any GCC internal prototype to avoid an error.
11748 Use char because int might match the return type of a GCC
11749 builtin and then its argument prototype would still apply. */
11750 #ifdef __cplusplus
11751 extern "C"
11752 #endif
11753 char shm_open ();
11755 main ()
11757 return shm_open ();
11759 return 0;
11761 _ACEOF
11762 for ac_lib in '' rt; do
11763 if test -z "$ac_lib"; then
11764 ac_res="none required"
11765 else
11766 ac_res=-l$ac_lib
11767 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11769 if ac_fn_c_try_link "$LINENO"; then :
11770 ac_cv_search_shm_open=$ac_res
11772 rm -f core conftest.err conftest.$ac_objext \
11773 conftest$ac_exeext
11774 if ${ac_cv_search_shm_open+:} false; then :
11775 break
11777 done
11778 if ${ac_cv_search_shm_open+:} false; then :
11780 else
11781 ac_cv_search_shm_open=no
11783 rm conftest.$ac_ext
11784 LIBS=$ac_func_search_save_LIBS
11786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11787 $as_echo "$ac_cv_search_shm_open" >&6; }
11788 ac_res=$ac_cv_search_shm_open
11789 if test "$ac_res" != no; then :
11790 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11795 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11796 if ${ac_cv_search_shm_unlink+:} false; then :
11797 $as_echo_n "(cached) " >&6
11798 else
11799 ac_func_search_save_LIBS=$LIBS
11800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11801 /* end confdefs.h. */
11803 /* Override any GCC internal prototype to avoid an error.
11804 Use char because int might match the return type of a GCC
11805 builtin and then its argument prototype would still apply. */
11806 #ifdef __cplusplus
11807 extern "C"
11808 #endif
11809 char shm_unlink ();
11811 main ()
11813 return shm_unlink ();
11815 return 0;
11817 _ACEOF
11818 for ac_lib in '' rt; do
11819 if test -z "$ac_lib"; then
11820 ac_res="none required"
11821 else
11822 ac_res=-l$ac_lib
11823 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11825 if ac_fn_c_try_link "$LINENO"; then :
11826 ac_cv_search_shm_unlink=$ac_res
11828 rm -f core conftest.err conftest.$ac_objext \
11829 conftest$ac_exeext
11830 if ${ac_cv_search_shm_unlink+:} false; then :
11831 break
11833 done
11834 if ${ac_cv_search_shm_unlink+:} false; then :
11836 else
11837 ac_cv_search_shm_unlink=no
11839 rm conftest.$ac_ext
11840 LIBS=$ac_func_search_save_LIBS
11842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11843 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11844 ac_res=$ac_cv_search_shm_unlink
11845 if test "$ac_res" != no; then :
11846 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11851 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11852 if ${ac_cv_search_clock_gettime+:} false; then :
11853 $as_echo_n "(cached) " >&6
11854 else
11855 ac_func_search_save_LIBS=$LIBS
11856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11857 /* end confdefs.h. */
11859 /* Override any GCC internal prototype to avoid an error.
11860 Use char because int might match the return type of a GCC
11861 builtin and then its argument prototype would still apply. */
11862 #ifdef __cplusplus
11863 extern "C"
11864 #endif
11865 char clock_gettime ();
11867 main ()
11869 return clock_gettime ();
11871 return 0;
11873 _ACEOF
11874 for ac_lib in '' rt; do
11875 if test -z "$ac_lib"; then
11876 ac_res="none required"
11877 else
11878 ac_res=-l$ac_lib
11879 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11881 if ac_fn_c_try_link "$LINENO"; then :
11882 ac_cv_search_clock_gettime=$ac_res
11884 rm -f core conftest.err conftest.$ac_objext \
11885 conftest$ac_exeext
11886 if ${ac_cv_search_clock_gettime+:} false; then :
11887 break
11889 done
11890 if ${ac_cv_search_clock_gettime+:} false; then :
11892 else
11893 ac_cv_search_clock_gettime=no
11895 rm conftest.$ac_ext
11896 LIBS=$ac_func_search_save_LIBS
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11899 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11900 ac_res=$ac_cv_search_clock_gettime
11901 if test "$ac_res" != no; then :
11902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11906 # Cygwin:
11907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11908 $as_echo_n "checking for library containing shmget... " >&6; }
11909 if ${ac_cv_search_shmget+:} false; then :
11910 $as_echo_n "(cached) " >&6
11911 else
11912 ac_func_search_save_LIBS=$LIBS
11913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11914 /* end confdefs.h. */
11916 /* Override any GCC internal prototype to avoid an error.
11917 Use char because int might match the return type of a GCC
11918 builtin and then its argument prototype would still apply. */
11919 #ifdef __cplusplus
11920 extern "C"
11921 #endif
11922 char shmget ();
11924 main ()
11926 return shmget ();
11928 return 0;
11930 _ACEOF
11931 for ac_lib in '' cygipc; do
11932 if test -z "$ac_lib"; then
11933 ac_res="none required"
11934 else
11935 ac_res=-l$ac_lib
11936 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11938 if ac_fn_c_try_link "$LINENO"; then :
11939 ac_cv_search_shmget=$ac_res
11941 rm -f core conftest.err conftest.$ac_objext \
11942 conftest$ac_exeext
11943 if ${ac_cv_search_shmget+:} false; then :
11944 break
11946 done
11947 if ${ac_cv_search_shmget+:} false; then :
11949 else
11950 ac_cv_search_shmget=no
11952 rm conftest.$ac_ext
11953 LIBS=$ac_func_search_save_LIBS
11955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11956 $as_echo "$ac_cv_search_shmget" >&6; }
11957 ac_res=$ac_cv_search_shmget
11958 if test "$ac_res" != no; then :
11959 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11963 # *BSD:
11964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
11965 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
11966 if ${ac_cv_search_backtrace_symbols+:} false; then :
11967 $as_echo_n "(cached) " >&6
11968 else
11969 ac_func_search_save_LIBS=$LIBS
11970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11971 /* end confdefs.h. */
11973 /* Override any GCC internal prototype to avoid an error.
11974 Use char because int might match the return type of a GCC
11975 builtin and then its argument prototype would still apply. */
11976 #ifdef __cplusplus
11977 extern "C"
11978 #endif
11979 char backtrace_symbols ();
11981 main ()
11983 return backtrace_symbols ();
11985 return 0;
11987 _ACEOF
11988 for ac_lib in '' execinfo; do
11989 if test -z "$ac_lib"; then
11990 ac_res="none required"
11991 else
11992 ac_res=-l$ac_lib
11993 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11995 if ac_fn_c_try_link "$LINENO"; then :
11996 ac_cv_search_backtrace_symbols=$ac_res
11998 rm -f core conftest.err conftest.$ac_objext \
11999 conftest$ac_exeext
12000 if ${ac_cv_search_backtrace_symbols+:} false; then :
12001 break
12003 done
12004 if ${ac_cv_search_backtrace_symbols+:} false; then :
12006 else
12007 ac_cv_search_backtrace_symbols=no
12009 rm conftest.$ac_ext
12010 LIBS=$ac_func_search_save_LIBS
12012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12013 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12014 ac_res=$ac_cv_search_backtrace_symbols
12015 if test "$ac_res" != no; then :
12016 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12022 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12023 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12024 $as_echo_n "(cached) " >&6
12025 else
12026 ac_func_search_save_LIBS=$LIBS
12027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12028 /* end confdefs.h. */
12030 /* Override any GCC internal prototype to avoid an error.
12031 Use char because int might match the return type of a GCC
12032 builtin and then its argument prototype would still apply. */
12033 #ifdef __cplusplus
12034 extern "C"
12035 #endif
12036 char pthread_barrier_wait ();
12038 main ()
12040 return pthread_barrier_wait ();
12042 return 0;
12044 _ACEOF
12045 for ac_lib in '' pthread; do
12046 if test -z "$ac_lib"; then
12047 ac_res="none required"
12048 else
12049 ac_res=-l$ac_lib
12050 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12052 if ac_fn_c_try_link "$LINENO"; then :
12053 ac_cv_search_pthread_barrier_wait=$ac_res
12055 rm -f core conftest.err conftest.$ac_objext \
12056 conftest$ac_exeext
12057 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12058 break
12060 done
12061 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12063 else
12064 ac_cv_search_pthread_barrier_wait=no
12066 rm conftest.$ac_ext
12067 LIBS=$ac_func_search_save_LIBS
12069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12070 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12071 ac_res=$ac_cv_search_pthread_barrier_wait
12072 if test "$ac_res" != no; then :
12073 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12078 if test "$with_readline" = yes; then
12081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12082 $as_echo_n "checking for library containing readline... " >&6; }
12083 if ${pgac_cv_check_readline+:} false; then :
12084 $as_echo_n "(cached) " >&6
12085 else
12086 pgac_cv_check_readline=no
12087 pgac_save_LIBS=$LIBS
12088 if test x"$with_libedit_preferred" != x"yes"
12089 then READLINE_ORDER="-lreadline -ledit"
12090 else READLINE_ORDER="-ledit -lreadline"
12092 for pgac_rllib in $READLINE_ORDER ; do
12093 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12094 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12096 /* end confdefs.h. */
12098 /* Override any GCC internal prototype to avoid an error.
12099 Use char because int might match the return type of a GCC
12100 builtin and then its argument prototype would still apply. */
12101 #ifdef __cplusplus
12102 extern "C"
12103 #endif
12104 char readline ();
12106 main ()
12108 return readline ();
12110 return 0;
12112 _ACEOF
12113 if ac_fn_c_try_link "$LINENO"; then :
12115 # Older NetBSD and OpenBSD have a broken linker that does not
12116 # recognize dependent libraries; assume curses is needed if we didn't
12117 # find any dependency.
12118 case $host_os in
12119 netbsd* | openbsd*)
12120 if test x"$pgac_lib" = x"" ; then
12121 pgac_lib=" -lcurses"
12122 fi ;;
12123 esac
12125 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12126 break
12129 rm -f core conftest.err conftest.$ac_objext \
12130 conftest$ac_exeext conftest.$ac_ext
12131 done
12132 if test "$pgac_cv_check_readline" != no ; then
12133 break
12135 done
12136 LIBS=$pgac_save_LIBS
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12140 $as_echo "$pgac_cv_check_readline" >&6; }
12141 if test "$pgac_cv_check_readline" != no ; then
12142 LIBS="$pgac_cv_check_readline $LIBS"
12144 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12149 if test x"$pgac_cv_check_readline" = x"no"; then
12150 as_fn_error $? "readline library not found
12151 If you have readline already installed, see config.log for details on the
12152 failure. It is possible the compiler isn't looking in the proper directory.
12153 Use --without-readline to disable readline support." "$LINENO" 5
12157 if test "$with_zlib" = yes; then
12158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12159 $as_echo_n "checking for inflate in -lz... " >&6; }
12160 if ${ac_cv_lib_z_inflate+:} false; then :
12161 $as_echo_n "(cached) " >&6
12162 else
12163 ac_check_lib_save_LIBS=$LIBS
12164 LIBS="-lz $LIBS"
12165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12166 /* end confdefs.h. */
12168 /* Override any GCC internal prototype to avoid an error.
12169 Use char because int might match the return type of a GCC
12170 builtin and then its argument prototype would still apply. */
12171 #ifdef __cplusplus
12172 extern "C"
12173 #endif
12174 char inflate ();
12176 main ()
12178 return inflate ();
12180 return 0;
12182 _ACEOF
12183 if ac_fn_c_try_link "$LINENO"; then :
12184 ac_cv_lib_z_inflate=yes
12185 else
12186 ac_cv_lib_z_inflate=no
12188 rm -f core conftest.err conftest.$ac_objext \
12189 conftest$ac_exeext conftest.$ac_ext
12190 LIBS=$ac_check_lib_save_LIBS
12192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12193 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12194 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12195 cat >>confdefs.h <<_ACEOF
12196 #define HAVE_LIBZ 1
12197 _ACEOF
12199 LIBS="-lz $LIBS"
12201 else
12202 as_fn_error $? "zlib library not found
12203 If you have zlib already installed, see config.log for details on the
12204 failure. It is possible the compiler isn't looking in the proper directory.
12205 Use --without-zlib to disable zlib support." "$LINENO" 5
12210 if test "$with_gssapi" = yes ; then
12211 if test "$PORTNAME" != "win32"; then
12212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12213 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12214 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12215 $as_echo_n "(cached) " >&6
12216 else
12217 ac_func_search_save_LIBS=$LIBS
12218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12219 /* end confdefs.h. */
12221 /* Override any GCC internal prototype to avoid an error.
12222 Use char because int might match the return type of a GCC
12223 builtin and then its argument prototype would still apply. */
12224 #ifdef __cplusplus
12225 extern "C"
12226 #endif
12227 char gss_store_cred_into ();
12229 main ()
12231 return gss_store_cred_into ();
12233 return 0;
12235 _ACEOF
12236 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12237 if test -z "$ac_lib"; then
12238 ac_res="none required"
12239 else
12240 ac_res=-l$ac_lib
12241 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12243 if ac_fn_c_try_link "$LINENO"; then :
12244 ac_cv_search_gss_store_cred_into=$ac_res
12246 rm -f core conftest.err conftest.$ac_objext \
12247 conftest$ac_exeext
12248 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12249 break
12251 done
12252 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12254 else
12255 ac_cv_search_gss_store_cred_into=no
12257 rm conftest.$ac_ext
12258 LIBS=$ac_func_search_save_LIBS
12260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12261 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12262 ac_res=$ac_cv_search_gss_store_cred_into
12263 if test "$ac_res" != no; then :
12264 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12266 else
12267 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12270 else
12271 LIBS="$LIBS -lgssapi32"
12276 # SSL Library
12278 # There is currently only one supported SSL/TLS library: OpenSSL.
12283 # Check whether --with-ssl was given.
12284 if test "${with_ssl+set}" = set; then :
12285 withval=$with_ssl;
12286 case $withval in
12287 yes)
12288 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12291 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12296 esac
12301 if test x"$with_ssl" = x"" ; then
12302 with_ssl=no
12307 # Check whether --with-openssl was given.
12308 if test "${with_openssl+set}" = set; then :
12309 withval=$with_openssl;
12310 case $withval in
12311 yes)
12318 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12320 esac
12322 else
12323 with_openssl=no
12328 if test "$with_openssl" = yes ; then
12329 with_ssl=openssl
12332 if test "$with_ssl" = openssl ; then
12333 # Minimum required OpenSSL version is 1.1.1
12335 $as_echo "#define OPENSSL_API_COMPAT 0x10101000L" >>confdefs.h
12337 if test "$PORTNAME" != "win32"; then
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12339 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12340 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12341 $as_echo_n "(cached) " >&6
12342 else
12343 ac_check_lib_save_LIBS=$LIBS
12344 LIBS="-lcrypto $LIBS"
12345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12346 /* end confdefs.h. */
12348 /* Override any GCC internal prototype to avoid an error.
12349 Use char because int might match the return type of a GCC
12350 builtin and then its argument prototype would still apply. */
12351 #ifdef __cplusplus
12352 extern "C"
12353 #endif
12354 char CRYPTO_new_ex_data ();
12356 main ()
12358 return CRYPTO_new_ex_data ();
12360 return 0;
12362 _ACEOF
12363 if ac_fn_c_try_link "$LINENO"; then :
12364 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12365 else
12366 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12368 rm -f core conftest.err conftest.$ac_objext \
12369 conftest$ac_exeext conftest.$ac_ext
12370 LIBS=$ac_check_lib_save_LIBS
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12373 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12374 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12375 cat >>confdefs.h <<_ACEOF
12376 #define HAVE_LIBCRYPTO 1
12377 _ACEOF
12379 LIBS="-lcrypto $LIBS"
12381 else
12382 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12386 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12387 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12388 $as_echo_n "(cached) " >&6
12389 else
12390 ac_check_lib_save_LIBS=$LIBS
12391 LIBS="-lssl $LIBS"
12392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12393 /* end confdefs.h. */
12395 /* Override any GCC internal prototype to avoid an error.
12396 Use char because int might match the return type of a GCC
12397 builtin and then its argument prototype would still apply. */
12398 #ifdef __cplusplus
12399 extern "C"
12400 #endif
12401 char SSL_new ();
12403 main ()
12405 return SSL_new ();
12407 return 0;
12409 _ACEOF
12410 if ac_fn_c_try_link "$LINENO"; then :
12411 ac_cv_lib_ssl_SSL_new=yes
12412 else
12413 ac_cv_lib_ssl_SSL_new=no
12415 rm -f core conftest.err conftest.$ac_objext \
12416 conftest$ac_exeext conftest.$ac_ext
12417 LIBS=$ac_check_lib_save_LIBS
12419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12420 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12421 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12422 cat >>confdefs.h <<_ACEOF
12423 #define HAVE_LIBSSL 1
12424 _ACEOF
12426 LIBS="-lssl $LIBS"
12428 else
12429 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12432 else
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12434 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12435 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12436 $as_echo_n "(cached) " >&6
12437 else
12438 ac_func_search_save_LIBS=$LIBS
12439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12440 /* end confdefs.h. */
12442 /* Override any GCC internal prototype to avoid an error.
12443 Use char because int might match the return type of a GCC
12444 builtin and then its argument prototype would still apply. */
12445 #ifdef __cplusplus
12446 extern "C"
12447 #endif
12448 char CRYPTO_new_ex_data ();
12450 main ()
12452 return CRYPTO_new_ex_data ();
12454 return 0;
12456 _ACEOF
12457 for ac_lib in '' eay32 crypto; do
12458 if test -z "$ac_lib"; then
12459 ac_res="none required"
12460 else
12461 ac_res=-l$ac_lib
12462 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12464 if ac_fn_c_try_link "$LINENO"; then :
12465 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12467 rm -f core conftest.err conftest.$ac_objext \
12468 conftest$ac_exeext
12469 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12470 break
12472 done
12473 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12475 else
12476 ac_cv_search_CRYPTO_new_ex_data=no
12478 rm conftest.$ac_ext
12479 LIBS=$ac_func_search_save_LIBS
12481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12482 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12483 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12484 if test "$ac_res" != no; then :
12485 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12487 else
12488 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12492 $as_echo_n "checking for library containing SSL_new... " >&6; }
12493 if ${ac_cv_search_SSL_new+:} false; then :
12494 $as_echo_n "(cached) " >&6
12495 else
12496 ac_func_search_save_LIBS=$LIBS
12497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12498 /* end confdefs.h. */
12500 /* Override any GCC internal prototype to avoid an error.
12501 Use char because int might match the return type of a GCC
12502 builtin and then its argument prototype would still apply. */
12503 #ifdef __cplusplus
12504 extern "C"
12505 #endif
12506 char SSL_new ();
12508 main ()
12510 return SSL_new ();
12512 return 0;
12514 _ACEOF
12515 for ac_lib in '' ssleay32 ssl; do
12516 if test -z "$ac_lib"; then
12517 ac_res="none required"
12518 else
12519 ac_res=-l$ac_lib
12520 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12522 if ac_fn_c_try_link "$LINENO"; then :
12523 ac_cv_search_SSL_new=$ac_res
12525 rm -f core conftest.err conftest.$ac_objext \
12526 conftest$ac_exeext
12527 if ${ac_cv_search_SSL_new+:} false; then :
12528 break
12530 done
12531 if ${ac_cv_search_SSL_new+:} false; then :
12533 else
12534 ac_cv_search_SSL_new=no
12536 rm conftest.$ac_ext
12537 LIBS=$ac_func_search_save_LIBS
12539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12540 $as_echo "$ac_cv_search_SSL_new" >&6; }
12541 ac_res=$ac_cv_search_SSL_new
12542 if test "$ac_res" != no; then :
12543 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12545 else
12546 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12550 # Functions introduced in OpenSSL 1.1.1.
12551 for ac_func in SSL_CTX_set_ciphersuites
12552 do :
12553 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
12554 if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes; then :
12555 cat >>confdefs.h <<_ACEOF
12556 #define HAVE_SSL_CTX_SET_CIPHERSUITES 1
12557 _ACEOF
12559 else
12560 as_fn_error $? "OpenSSL version >= 1.1.1 is required for SSL support" "$LINENO" 5
12562 done
12564 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
12565 for ac_func in SSL_CTX_set_cert_cb
12566 do :
12567 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
12568 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
12569 cat >>confdefs.h <<_ACEOF
12570 #define HAVE_SSL_CTX_SET_CERT_CB 1
12571 _ACEOF
12574 done
12576 # Function introduced in OpenSSL 1.1.1, not in LibreSSL.
12577 for ac_func in X509_get_signature_info SSL_CTX_set_num_tickets
12578 do :
12579 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12580 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12581 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12582 cat >>confdefs.h <<_ACEOF
12583 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12584 _ACEOF
12587 done
12590 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12592 elif test "$with_ssl" != no ; then
12593 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12597 if test "$with_pam" = yes ; then
12598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12599 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12600 if ${ac_cv_lib_pam_pam_start+:} false; then :
12601 $as_echo_n "(cached) " >&6
12602 else
12603 ac_check_lib_save_LIBS=$LIBS
12604 LIBS="-lpam $LIBS"
12605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12606 /* end confdefs.h. */
12608 /* Override any GCC internal prototype to avoid an error.
12609 Use char because int might match the return type of a GCC
12610 builtin and then its argument prototype would still apply. */
12611 #ifdef __cplusplus
12612 extern "C"
12613 #endif
12614 char pam_start ();
12616 main ()
12618 return pam_start ();
12620 return 0;
12622 _ACEOF
12623 if ac_fn_c_try_link "$LINENO"; then :
12624 ac_cv_lib_pam_pam_start=yes
12625 else
12626 ac_cv_lib_pam_pam_start=no
12628 rm -f core conftest.err conftest.$ac_objext \
12629 conftest$ac_exeext conftest.$ac_ext
12630 LIBS=$ac_check_lib_save_LIBS
12632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12633 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12634 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12635 cat >>confdefs.h <<_ACEOF
12636 #define HAVE_LIBPAM 1
12637 _ACEOF
12639 LIBS="-lpam $LIBS"
12641 else
12642 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12647 if test "$with_libxml" = yes ; then
12648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12649 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12650 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12651 $as_echo_n "(cached) " >&6
12652 else
12653 ac_check_lib_save_LIBS=$LIBS
12654 LIBS="-lxml2 $LIBS"
12655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12656 /* end confdefs.h. */
12658 /* Override any GCC internal prototype to avoid an error.
12659 Use char because int might match the return type of a GCC
12660 builtin and then its argument prototype would still apply. */
12661 #ifdef __cplusplus
12662 extern "C"
12663 #endif
12664 char xmlSaveToBuffer ();
12666 main ()
12668 return xmlSaveToBuffer ();
12670 return 0;
12672 _ACEOF
12673 if ac_fn_c_try_link "$LINENO"; then :
12674 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12675 else
12676 ac_cv_lib_xml2_xmlSaveToBuffer=no
12678 rm -f core conftest.err conftest.$ac_objext \
12679 conftest$ac_exeext conftest.$ac_ext
12680 LIBS=$ac_check_lib_save_LIBS
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12683 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12684 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12685 cat >>confdefs.h <<_ACEOF
12686 #define HAVE_LIBXML2 1
12687 _ACEOF
12689 LIBS="-lxml2 $LIBS"
12691 else
12692 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12697 if test "$with_libxslt" = yes ; then
12698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12699 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12700 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12701 $as_echo_n "(cached) " >&6
12702 else
12703 ac_check_lib_save_LIBS=$LIBS
12704 LIBS="-lxslt $LIBS"
12705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12706 /* end confdefs.h. */
12708 /* Override any GCC internal prototype to avoid an error.
12709 Use char because int might match the return type of a GCC
12710 builtin and then its argument prototype would still apply. */
12711 #ifdef __cplusplus
12712 extern "C"
12713 #endif
12714 char xsltCleanupGlobals ();
12716 main ()
12718 return xsltCleanupGlobals ();
12720 return 0;
12722 _ACEOF
12723 if ac_fn_c_try_link "$LINENO"; then :
12724 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12725 else
12726 ac_cv_lib_xslt_xsltCleanupGlobals=no
12728 rm -f core conftest.err conftest.$ac_objext \
12729 conftest$ac_exeext conftest.$ac_ext
12730 LIBS=$ac_check_lib_save_LIBS
12732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12733 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12734 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12735 cat >>confdefs.h <<_ACEOF
12736 #define HAVE_LIBXSLT 1
12737 _ACEOF
12739 LIBS="-lxslt $LIBS"
12741 else
12742 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12747 if test "$with_lz4" = yes ; then
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
12749 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
12750 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
12751 $as_echo_n "(cached) " >&6
12752 else
12753 ac_check_lib_save_LIBS=$LIBS
12754 LIBS="-llz4 $LIBS"
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756 /* end confdefs.h. */
12758 /* Override any GCC internal prototype to avoid an error.
12759 Use char because int might match the return type of a GCC
12760 builtin and then its argument prototype would still apply. */
12761 #ifdef __cplusplus
12762 extern "C"
12763 #endif
12764 char LZ4_compress_default ();
12766 main ()
12768 return LZ4_compress_default ();
12770 return 0;
12772 _ACEOF
12773 if ac_fn_c_try_link "$LINENO"; then :
12774 ac_cv_lib_lz4_LZ4_compress_default=yes
12775 else
12776 ac_cv_lib_lz4_LZ4_compress_default=no
12778 rm -f core conftest.err conftest.$ac_objext \
12779 conftest$ac_exeext conftest.$ac_ext
12780 LIBS=$ac_check_lib_save_LIBS
12782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
12783 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
12784 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
12785 cat >>confdefs.h <<_ACEOF
12786 #define HAVE_LIBLZ4 1
12787 _ACEOF
12789 LIBS="-llz4 $LIBS"
12791 else
12792 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
12797 if test "$with_zstd" = yes ; then
12798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
12799 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
12800 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
12801 $as_echo_n "(cached) " >&6
12802 else
12803 ac_check_lib_save_LIBS=$LIBS
12804 LIBS="-lzstd $LIBS"
12805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12806 /* end confdefs.h. */
12808 /* Override any GCC internal prototype to avoid an error.
12809 Use char because int might match the return type of a GCC
12810 builtin and then its argument prototype would still apply. */
12811 #ifdef __cplusplus
12812 extern "C"
12813 #endif
12814 char ZSTD_compress ();
12816 main ()
12818 return ZSTD_compress ();
12820 return 0;
12822 _ACEOF
12823 if ac_fn_c_try_link "$LINENO"; then :
12824 ac_cv_lib_zstd_ZSTD_compress=yes
12825 else
12826 ac_cv_lib_zstd_ZSTD_compress=no
12828 rm -f core conftest.err conftest.$ac_objext \
12829 conftest$ac_exeext conftest.$ac_ext
12830 LIBS=$ac_check_lib_save_LIBS
12832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
12833 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
12834 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
12835 cat >>confdefs.h <<_ACEOF
12836 #define HAVE_LIBZSTD 1
12837 _ACEOF
12839 LIBS="-lzstd $LIBS"
12841 else
12842 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
12847 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12848 if test "$with_ldap" = yes ; then
12849 _LIBS="$LIBS"
12850 if test "$PORTNAME" != "win32"; then
12851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12852 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12853 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12854 $as_echo_n "(cached) " >&6
12855 else
12856 ac_check_lib_save_LIBS=$LIBS
12857 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12859 /* end confdefs.h. */
12861 /* Override any GCC internal prototype to avoid an error.
12862 Use char because int might match the return type of a GCC
12863 builtin and then its argument prototype would still apply. */
12864 #ifdef __cplusplus
12865 extern "C"
12866 #endif
12867 char ldap_bind ();
12869 main ()
12871 return ldap_bind ();
12873 return 0;
12875 _ACEOF
12876 if ac_fn_c_try_link "$LINENO"; then :
12877 ac_cv_lib_ldap_ldap_bind=yes
12878 else
12879 ac_cv_lib_ldap_ldap_bind=no
12881 rm -f core conftest.err conftest.$ac_objext \
12882 conftest$ac_exeext conftest.$ac_ext
12883 LIBS=$ac_check_lib_save_LIBS
12885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12886 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12887 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12888 cat >>confdefs.h <<_ACEOF
12889 #define HAVE_LIBLDAP 1
12890 _ACEOF
12892 LIBS="-lldap $LIBS"
12894 else
12895 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12898 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12899 # This test is carried out against libldap.
12900 for ac_func in ldap_initialize
12901 do :
12902 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12903 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12904 cat >>confdefs.h <<_ACEOF
12905 #define HAVE_LDAP_INITIALIZE 1
12906 _ACEOF
12909 done
12911 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
12912 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
12913 # library from a separate OpenLDAP installation). The most reliable
12914 # way to check that is to check for a function introduced in 2.5.
12915 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
12916 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
12917 thread_safe_libldap=yes
12918 else
12919 thread_safe_libldap=no
12922 if test "$thread_safe_libldap" = no; then
12923 # Use ldap_r for FE if available, else assume ldap is thread-safe.
12924 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12925 LIBS="$_LIBS"
12926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12927 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12928 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12929 $as_echo_n "(cached) " >&6
12930 else
12931 ac_check_lib_save_LIBS=$LIBS
12932 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934 /* end confdefs.h. */
12936 /* Override any GCC internal prototype to avoid an error.
12937 Use char because int might match the return type of a GCC
12938 builtin and then its argument prototype would still apply. */
12939 #ifdef __cplusplus
12940 extern "C"
12941 #endif
12942 char ldap_bind ();
12944 main ()
12946 return ldap_bind ();
12948 return 0;
12950 _ACEOF
12951 if ac_fn_c_try_link "$LINENO"; then :
12952 ac_cv_lib_ldap_r_ldap_bind=yes
12953 else
12954 ac_cv_lib_ldap_r_ldap_bind=no
12956 rm -f core conftest.err conftest.$ac_objext \
12957 conftest$ac_exeext conftest.$ac_ext
12958 LIBS=$ac_check_lib_save_LIBS
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12961 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12962 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12963 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12964 else
12965 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12968 else
12969 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12971 else
12972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12973 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12974 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12975 $as_echo_n "(cached) " >&6
12976 else
12977 ac_check_lib_save_LIBS=$LIBS
12978 LIBS="-lwldap32 $LIBS"
12979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12980 /* end confdefs.h. */
12982 /* Override any GCC internal prototype to avoid an error.
12983 Use char because int might match the return type of a GCC
12984 builtin and then its argument prototype would still apply. */
12985 #ifdef __cplusplus
12986 extern "C"
12987 #endif
12988 char ldap_bind ();
12990 main ()
12992 return ldap_bind ();
12994 return 0;
12996 _ACEOF
12997 if ac_fn_c_try_link "$LINENO"; then :
12998 ac_cv_lib_wldap32_ldap_bind=yes
12999 else
13000 ac_cv_lib_wldap32_ldap_bind=no
13002 rm -f core conftest.err conftest.$ac_objext \
13003 conftest$ac_exeext conftest.$ac_ext
13004 LIBS=$ac_check_lib_save_LIBS
13006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13007 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13008 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13009 cat >>confdefs.h <<_ACEOF
13010 #define HAVE_LIBWLDAP32 1
13011 _ACEOF
13013 LIBS="-lwldap32 $LIBS"
13015 else
13016 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13019 LDAP_LIBS_FE="-lwldap32"
13020 LDAP_LIBS_BE="-lwldap32"
13022 LIBS="$_LIBS"
13027 # for contrib/sepgsql
13028 if test "$with_selinux" = yes; then
13029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13030 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13031 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13032 $as_echo_n "(cached) " >&6
13033 else
13034 ac_check_lib_save_LIBS=$LIBS
13035 LIBS="-lselinux $LIBS"
13036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13037 /* end confdefs.h. */
13039 /* Override any GCC internal prototype to avoid an error.
13040 Use char because int might match the return type of a GCC
13041 builtin and then its argument prototype would still apply. */
13042 #ifdef __cplusplus
13043 extern "C"
13044 #endif
13045 char security_compute_create_name ();
13047 main ()
13049 return security_compute_create_name ();
13051 return 0;
13053 _ACEOF
13054 if ac_fn_c_try_link "$LINENO"; then :
13055 ac_cv_lib_selinux_security_compute_create_name=yes
13056 else
13057 ac_cv_lib_selinux_security_compute_create_name=no
13059 rm -f core conftest.err conftest.$ac_objext \
13060 conftest$ac_exeext conftest.$ac_ext
13061 LIBS=$ac_check_lib_save_LIBS
13063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13064 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13065 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13066 cat >>confdefs.h <<_ACEOF
13067 #define HAVE_LIBSELINUX 1
13068 _ACEOF
13070 LIBS="-lselinux $LIBS"
13072 else
13073 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13078 # for contrib/uuid-ossp
13079 if test "$with_uuid" = bsd ; then
13080 # On BSD, the UUID functions are in libc
13081 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13082 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13083 UUID_LIBS=""
13084 else
13085 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13088 elif test "$with_uuid" = e2fs ; then
13089 # On macOS, the UUID functions are in libc
13090 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13091 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13092 UUID_LIBS=""
13093 else
13094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13095 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13096 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13097 $as_echo_n "(cached) " >&6
13098 else
13099 ac_check_lib_save_LIBS=$LIBS
13100 LIBS="-luuid $LIBS"
13101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13102 /* end confdefs.h. */
13104 /* Override any GCC internal prototype to avoid an error.
13105 Use char because int might match the return type of a GCC
13106 builtin and then its argument prototype would still apply. */
13107 #ifdef __cplusplus
13108 extern "C"
13109 #endif
13110 char uuid_generate ();
13112 main ()
13114 return uuid_generate ();
13116 return 0;
13118 _ACEOF
13119 if ac_fn_c_try_link "$LINENO"; then :
13120 ac_cv_lib_uuid_uuid_generate=yes
13121 else
13122 ac_cv_lib_uuid_uuid_generate=no
13124 rm -f core conftest.err conftest.$ac_objext \
13125 conftest$ac_exeext conftest.$ac_ext
13126 LIBS=$ac_check_lib_save_LIBS
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13129 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13130 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13131 UUID_LIBS="-luuid"
13132 else
13133 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13138 elif test "$with_uuid" = ossp ; then
13139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13140 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13141 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13142 $as_echo_n "(cached) " >&6
13143 else
13144 ac_check_lib_save_LIBS=$LIBS
13145 LIBS="-lossp-uuid $LIBS"
13146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13147 /* end confdefs.h. */
13149 /* Override any GCC internal prototype to avoid an error.
13150 Use char because int might match the return type of a GCC
13151 builtin and then its argument prototype would still apply. */
13152 #ifdef __cplusplus
13153 extern "C"
13154 #endif
13155 char uuid_export ();
13157 main ()
13159 return uuid_export ();
13161 return 0;
13163 _ACEOF
13164 if ac_fn_c_try_link "$LINENO"; then :
13165 ac_cv_lib_ossp_uuid_uuid_export=yes
13166 else
13167 ac_cv_lib_ossp_uuid_uuid_export=no
13169 rm -f core conftest.err conftest.$ac_objext \
13170 conftest$ac_exeext conftest.$ac_ext
13171 LIBS=$ac_check_lib_save_LIBS
13173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13174 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13175 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13176 UUID_LIBS="-lossp-uuid"
13177 else
13178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13179 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13180 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13181 $as_echo_n "(cached) " >&6
13182 else
13183 ac_check_lib_save_LIBS=$LIBS
13184 LIBS="-luuid $LIBS"
13185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13186 /* end confdefs.h. */
13188 /* Override any GCC internal prototype to avoid an error.
13189 Use char because int might match the return type of a GCC
13190 builtin and then its argument prototype would still apply. */
13191 #ifdef __cplusplus
13192 extern "C"
13193 #endif
13194 char uuid_export ();
13196 main ()
13198 return uuid_export ();
13200 return 0;
13202 _ACEOF
13203 if ac_fn_c_try_link "$LINENO"; then :
13204 ac_cv_lib_uuid_uuid_export=yes
13205 else
13206 ac_cv_lib_uuid_uuid_export=no
13208 rm -f core conftest.err conftest.$ac_objext \
13209 conftest$ac_exeext conftest.$ac_ext
13210 LIBS=$ac_check_lib_save_LIBS
13212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13213 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13214 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13215 UUID_LIBS="-luuid"
13216 else
13217 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13227 ## Header files
13230 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h mbarrier.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h xlocale.h
13231 do :
13232 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13233 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13234 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13235 cat >>confdefs.h <<_ACEOF
13236 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13237 _ACEOF
13241 done
13244 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13245 for ac_header in readline/readline.h
13246 do :
13247 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13248 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13249 cat >>confdefs.h <<_ACEOF
13250 #define HAVE_READLINE_READLINE_H 1
13251 _ACEOF
13253 else
13254 for ac_header in readline.h
13255 do :
13256 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13257 if test "x$ac_cv_header_readline_h" = xyes; then :
13258 cat >>confdefs.h <<_ACEOF
13259 #define HAVE_READLINE_H 1
13260 _ACEOF
13262 else
13263 as_fn_error $? "readline header not found
13264 If you have readline already installed, see config.log for details on the
13265 failure. It is possible the compiler isn't looking in the proper directory.
13266 Use --without-readline to disable readline support." "$LINENO" 5
13269 done
13273 done
13275 for ac_header in readline/history.h
13276 do :
13277 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13278 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13279 cat >>confdefs.h <<_ACEOF
13280 #define HAVE_READLINE_HISTORY_H 1
13281 _ACEOF
13283 else
13284 for ac_header in history.h
13285 do :
13286 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13287 if test "x$ac_cv_header_history_h" = xyes; then :
13288 cat >>confdefs.h <<_ACEOF
13289 #define HAVE_HISTORY_H 1
13290 _ACEOF
13292 else
13293 as_fn_error $? "history header not found
13294 If you have readline already installed, see config.log for details on the
13295 failure. It is possible the compiler isn't looking in the proper directory.
13296 Use --without-readline to disable readline support." "$LINENO" 5
13299 done
13303 done
13307 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13308 # Some installations of libedit usurp /usr/include/readline/, which seems
13309 # bad practice, since in combined installations readline will have its headers
13310 # there. We might have to resort to AC_EGREP checks to make sure we found
13311 # the proper header...
13312 for ac_header in editline/readline.h
13313 do :
13314 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13315 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13316 cat >>confdefs.h <<_ACEOF
13317 #define HAVE_EDITLINE_READLINE_H 1
13318 _ACEOF
13320 else
13321 for ac_header in readline.h
13322 do :
13323 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13324 if test "x$ac_cv_header_readline_h" = xyes; then :
13325 cat >>confdefs.h <<_ACEOF
13326 #define HAVE_READLINE_H 1
13327 _ACEOF
13329 else
13330 for ac_header in readline/readline.h
13331 do :
13332 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13333 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13334 cat >>confdefs.h <<_ACEOF
13335 #define HAVE_READLINE_READLINE_H 1
13336 _ACEOF
13338 else
13339 as_fn_error $? "readline header not found
13340 If you have libedit already installed, see config.log for details on the
13341 failure. It is possible the compiler isn't looking in the proper directory.
13342 Use --without-readline to disable libedit support." "$LINENO" 5
13345 done
13349 done
13353 done
13355 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13356 # not be there at all. Hence, don't complain if not found. We must check
13357 # though, since in yet other versions it is an independent header.
13358 for ac_header in editline/history.h
13359 do :
13360 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13361 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13362 cat >>confdefs.h <<_ACEOF
13363 #define HAVE_EDITLINE_HISTORY_H 1
13364 _ACEOF
13366 else
13367 for ac_header in history.h
13368 do :
13369 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13370 if test "x$ac_cv_header_history_h" = xyes; then :
13371 cat >>confdefs.h <<_ACEOF
13372 #define HAVE_HISTORY_H 1
13373 _ACEOF
13375 else
13376 for ac_header in readline/history.h
13377 do :
13378 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13379 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13380 cat >>confdefs.h <<_ACEOF
13381 #define HAVE_READLINE_HISTORY_H 1
13382 _ACEOF
13386 done
13390 done
13394 done
13398 if test "$with_zlib" = yes; then
13399 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13400 if test "x$ac_cv_header_zlib_h" = xyes; then :
13402 else
13403 as_fn_error $? "zlib header not found
13404 If you have zlib already installed, see config.log for details on the
13405 failure. It is possible the compiler isn't looking in the proper directory.
13406 Use --without-zlib to disable zlib support." "$LINENO" 5
13412 if test -z "$LZ4"; then
13413 for ac_prog in lz4
13415 # Extract the first word of "$ac_prog", so it can be a program name with args.
13416 set dummy $ac_prog; ac_word=$2
13417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13418 $as_echo_n "checking for $ac_word... " >&6; }
13419 if ${ac_cv_path_LZ4+:} false; then :
13420 $as_echo_n "(cached) " >&6
13421 else
13422 case $LZ4 in
13423 [\\/]* | ?:[\\/]*)
13424 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13428 for as_dir in $PATH
13430 IFS=$as_save_IFS
13431 test -z "$as_dir" && as_dir=.
13432 for ac_exec_ext in '' $ac_executable_extensions; do
13433 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13434 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13435 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13436 break 2
13438 done
13439 done
13440 IFS=$as_save_IFS
13443 esac
13445 LZ4=$ac_cv_path_LZ4
13446 if test -n "$LZ4"; then
13447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13448 $as_echo "$LZ4" >&6; }
13449 else
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13451 $as_echo "no" >&6; }
13455 test -n "$LZ4" && break
13456 done
13458 else
13459 # Report the value of LZ4 in configure's output in all cases.
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13461 $as_echo_n "checking for LZ4... " >&6; }
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13463 $as_echo "$LZ4" >&6; }
13466 if test "$with_lz4" = yes; then
13467 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13468 if test "x$ac_cv_header_lz4_h" = xyes; then :
13470 else
13471 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13477 if test -z "$ZSTD"; then
13478 for ac_prog in zstd
13480 # Extract the first word of "$ac_prog", so it can be a program name with args.
13481 set dummy $ac_prog; ac_word=$2
13482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13483 $as_echo_n "checking for $ac_word... " >&6; }
13484 if ${ac_cv_path_ZSTD+:} false; then :
13485 $as_echo_n "(cached) " >&6
13486 else
13487 case $ZSTD in
13488 [\\/]* | ?:[\\/]*)
13489 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13493 for as_dir in $PATH
13495 IFS=$as_save_IFS
13496 test -z "$as_dir" && as_dir=.
13497 for ac_exec_ext in '' $ac_executable_extensions; do
13498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13499 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13501 break 2
13503 done
13504 done
13505 IFS=$as_save_IFS
13508 esac
13510 ZSTD=$ac_cv_path_ZSTD
13511 if test -n "$ZSTD"; then
13512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13513 $as_echo "$ZSTD" >&6; }
13514 else
13515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13516 $as_echo "no" >&6; }
13520 test -n "$ZSTD" && break
13521 done
13523 else
13524 # Report the value of ZSTD in configure's output in all cases.
13525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13526 $as_echo_n "checking for ZSTD... " >&6; }
13527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13528 $as_echo "$ZSTD" >&6; }
13531 if test "$with_zstd" = yes; then
13532 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13533 if test "x$ac_cv_header_zstd_h" = xyes; then :
13535 else
13536 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13542 if test "$with_gssapi" = yes ; then
13543 for ac_header in gssapi/gssapi.h
13544 do :
13545 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13546 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13547 cat >>confdefs.h <<_ACEOF
13548 #define HAVE_GSSAPI_GSSAPI_H 1
13549 _ACEOF
13551 else
13552 for ac_header in gssapi.h
13553 do :
13554 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13555 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13556 cat >>confdefs.h <<_ACEOF
13557 #define HAVE_GSSAPI_H 1
13558 _ACEOF
13560 else
13561 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13564 done
13568 done
13570 for ac_header in gssapi/gssapi_ext.h
13571 do :
13572 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
13573 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
13574 cat >>confdefs.h <<_ACEOF
13575 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
13576 _ACEOF
13578 else
13579 for ac_header in gssapi_ext.h
13580 do :
13581 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
13582 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
13583 cat >>confdefs.h <<_ACEOF
13584 #define HAVE_GSSAPI_EXT_H 1
13585 _ACEOF
13587 else
13588 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
13591 done
13595 done
13599 if test -z "$OPENSSL"; then
13600 for ac_prog in openssl
13602 # Extract the first word of "$ac_prog", so it can be a program name with args.
13603 set dummy $ac_prog; ac_word=$2
13604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13605 $as_echo_n "checking for $ac_word... " >&6; }
13606 if ${ac_cv_path_OPENSSL+:} false; then :
13607 $as_echo_n "(cached) " >&6
13608 else
13609 case $OPENSSL in
13610 [\\/]* | ?:[\\/]*)
13611 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
13614 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13615 for as_dir in $PATH
13617 IFS=$as_save_IFS
13618 test -z "$as_dir" && as_dir=.
13619 for ac_exec_ext in '' $ac_executable_extensions; do
13620 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13621 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
13622 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13623 break 2
13625 done
13626 done
13627 IFS=$as_save_IFS
13630 esac
13632 OPENSSL=$ac_cv_path_OPENSSL
13633 if test -n "$OPENSSL"; then
13634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13635 $as_echo "$OPENSSL" >&6; }
13636 else
13637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13638 $as_echo "no" >&6; }
13642 test -n "$OPENSSL" && break
13643 done
13645 else
13646 # Report the value of OPENSSL in configure's output in all cases.
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
13648 $as_echo_n "checking for OPENSSL... " >&6; }
13649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13650 $as_echo "$OPENSSL" >&6; }
13653 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
13654 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
13655 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
13656 if test "$with_ssl" = openssl ; then
13657 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13658 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13660 else
13661 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13665 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13666 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13668 else
13669 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13675 if test "$with_pam" = yes ; then
13676 for ac_header in security/pam_appl.h
13677 do :
13678 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13679 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13680 cat >>confdefs.h <<_ACEOF
13681 #define HAVE_SECURITY_PAM_APPL_H 1
13682 _ACEOF
13684 else
13685 for ac_header in pam/pam_appl.h
13686 do :
13687 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13688 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13689 cat >>confdefs.h <<_ACEOF
13690 #define HAVE_PAM_PAM_APPL_H 1
13691 _ACEOF
13693 else
13694 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13697 done
13701 done
13705 if test "$with_bsd_auth" = yes ; then
13706 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13707 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13709 else
13710 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13716 if test "$with_systemd" = yes ; then
13717 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13718 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13720 else
13721 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13727 if test "$with_libxml" = yes ; then
13728 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13729 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13731 else
13732 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13738 if test "$with_libxslt" = yes ; then
13739 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13740 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13742 else
13743 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13749 if test "$with_ldap" = yes ; then
13750 if test "$PORTNAME" != "win32"; then
13751 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13752 if test "x$ac_cv_header_ldap_h" = xyes; then :
13754 else
13755 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13760 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13761 if ${pgac_cv_ldap_safe+:} false; then :
13762 $as_echo_n "(cached) " >&6
13763 else
13764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13765 /* end confdefs.h. */
13766 #include <ldap.h>
13767 #if !defined(LDAP_VENDOR_VERSION) || \
13768 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13769 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13770 choke me
13771 #endif
13773 main ()
13777 return 0;
13779 _ACEOF
13780 if ac_fn_c_try_compile "$LINENO"; then :
13781 pgac_cv_ldap_safe=yes
13782 else
13783 pgac_cv_ldap_safe=no
13785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13788 $as_echo "$pgac_cv_ldap_safe" >&6; }
13790 if test "$pgac_cv_ldap_safe" != yes; then
13791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13792 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13793 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13794 *** also uses LDAP will crash on exit." >&5
13795 $as_echo "$as_me: WARNING:
13796 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13797 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13798 *** also uses LDAP will crash on exit." >&2;}
13800 else
13801 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13802 #include <windows.h>
13805 if test "x$ac_cv_header_winldap_h" = xyes; then :
13807 else
13808 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13815 if test "$with_bonjour" = yes ; then
13816 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13817 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13819 else
13820 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13826 # for contrib/uuid-ossp
13827 if test "$with_uuid" = bsd ; then
13828 for ac_header in uuid.h
13829 do :
13830 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13831 if test "x$ac_cv_header_uuid_h" = xyes; then :
13832 cat >>confdefs.h <<_ACEOF
13833 #define HAVE_UUID_H 1
13834 _ACEOF
13835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13836 /* end confdefs.h. */
13837 #include <uuid.h>
13839 _ACEOF
13840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13841 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13843 else
13844 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13846 rm -f conftest*
13848 else
13849 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13852 done
13854 elif test "$with_uuid" = e2fs ; then
13855 for ac_header in uuid/uuid.h
13856 do :
13857 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13858 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13859 cat >>confdefs.h <<_ACEOF
13860 #define HAVE_UUID_UUID_H 1
13861 _ACEOF
13862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13863 /* end confdefs.h. */
13864 #include <uuid/uuid.h>
13866 _ACEOF
13867 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13868 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13870 else
13871 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13873 rm -f conftest*
13875 else
13876 for ac_header in uuid.h
13877 do :
13878 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13879 if test "x$ac_cv_header_uuid_h" = xyes; then :
13880 cat >>confdefs.h <<_ACEOF
13881 #define HAVE_UUID_H 1
13882 _ACEOF
13883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13884 /* end confdefs.h. */
13885 #include <uuid.h>
13887 _ACEOF
13888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13889 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13891 else
13892 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13894 rm -f conftest*
13896 else
13897 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13900 done
13904 done
13906 elif test "$with_uuid" = ossp ; then
13907 for ac_header in ossp/uuid.h
13908 do :
13909 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13910 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13911 cat >>confdefs.h <<_ACEOF
13912 #define HAVE_OSSP_UUID_H 1
13913 _ACEOF
13914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13915 /* end confdefs.h. */
13916 #include <ossp/uuid.h>
13918 _ACEOF
13919 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13920 $EGREP "uuid_export" >/dev/null 2>&1; then :
13922 else
13923 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13925 rm -f conftest*
13927 else
13928 for ac_header in uuid.h
13929 do :
13930 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13931 if test "x$ac_cv_header_uuid_h" = xyes; then :
13932 cat >>confdefs.h <<_ACEOF
13933 #define HAVE_UUID_H 1
13934 _ACEOF
13935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13936 /* end confdefs.h. */
13937 #include <uuid.h>
13939 _ACEOF
13940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13941 $EGREP "uuid_export" >/dev/null 2>&1; then :
13943 else
13944 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13946 rm -f conftest*
13948 else
13949 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13952 done
13956 done
13960 if test "$PORTNAME" = "win32" ; then
13961 for ac_header in crtdefs.h
13962 do :
13963 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13964 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13965 cat >>confdefs.h <<_ACEOF
13966 #define HAVE_CRTDEFS_H 1
13967 _ACEOF
13971 done
13976 ## Types, structures, compiler characteristics
13979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13980 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13981 if ${ac_cv_c_bigendian+:} false; then :
13982 $as_echo_n "(cached) " >&6
13983 else
13984 ac_cv_c_bigendian=unknown
13985 # See if we're dealing with a universal compiler.
13986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13987 /* end confdefs.h. */
13988 #ifndef __APPLE_CC__
13989 not a universal capable compiler
13990 #endif
13991 typedef int dummy;
13993 _ACEOF
13994 if ac_fn_c_try_compile "$LINENO"; then :
13996 # Check for potential -arch flags. It is not universal unless
13997 # there are at least two -arch flags with different values.
13998 ac_arch=
13999 ac_prev=
14000 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14001 if test -n "$ac_prev"; then
14002 case $ac_word in
14003 i?86 | x86_64 | ppc | ppc64)
14004 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14005 ac_arch=$ac_word
14006 else
14007 ac_cv_c_bigendian=universal
14008 break
14011 esac
14012 ac_prev=
14013 elif test "x$ac_word" = "x-arch"; then
14014 ac_prev=arch
14016 done
14018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14019 if test $ac_cv_c_bigendian = unknown; then
14020 # See if sys/param.h defines the BYTE_ORDER macro.
14021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14022 /* end confdefs.h. */
14023 #include <sys/types.h>
14024 #include <sys/param.h>
14027 main ()
14029 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14030 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14031 && LITTLE_ENDIAN)
14032 bogus endian macros
14033 #endif
14036 return 0;
14038 _ACEOF
14039 if ac_fn_c_try_compile "$LINENO"; then :
14040 # It does; now see whether it defined to BIG_ENDIAN or not.
14041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14042 /* end confdefs.h. */
14043 #include <sys/types.h>
14044 #include <sys/param.h>
14047 main ()
14049 #if BYTE_ORDER != BIG_ENDIAN
14050 not big endian
14051 #endif
14054 return 0;
14056 _ACEOF
14057 if ac_fn_c_try_compile "$LINENO"; then :
14058 ac_cv_c_bigendian=yes
14059 else
14060 ac_cv_c_bigendian=no
14062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14066 if test $ac_cv_c_bigendian = unknown; then
14067 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14069 /* end confdefs.h. */
14070 #include <limits.h>
14073 main ()
14075 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14076 bogus endian macros
14077 #endif
14080 return 0;
14082 _ACEOF
14083 if ac_fn_c_try_compile "$LINENO"; then :
14084 # It does; now see whether it defined to _BIG_ENDIAN or not.
14085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14086 /* end confdefs.h. */
14087 #include <limits.h>
14090 main ()
14092 #ifndef _BIG_ENDIAN
14093 not big endian
14094 #endif
14097 return 0;
14099 _ACEOF
14100 if ac_fn_c_try_compile "$LINENO"; then :
14101 ac_cv_c_bigendian=yes
14102 else
14103 ac_cv_c_bigendian=no
14105 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14109 if test $ac_cv_c_bigendian = unknown; then
14110 # Compile a test program.
14111 if test "$cross_compiling" = yes; then :
14112 # Try to guess by grepping values from an object file.
14113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14114 /* end confdefs.h. */
14115 short int ascii_mm[] =
14116 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14117 short int ascii_ii[] =
14118 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14119 int use_ascii (int i) {
14120 return ascii_mm[i] + ascii_ii[i];
14122 short int ebcdic_ii[] =
14123 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14124 short int ebcdic_mm[] =
14125 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14126 int use_ebcdic (int i) {
14127 return ebcdic_mm[i] + ebcdic_ii[i];
14129 extern int foo;
14132 main ()
14134 return use_ascii (foo) == use_ebcdic (foo);
14136 return 0;
14138 _ACEOF
14139 if ac_fn_c_try_compile "$LINENO"; then :
14140 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14141 ac_cv_c_bigendian=yes
14143 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14144 if test "$ac_cv_c_bigendian" = unknown; then
14145 ac_cv_c_bigendian=no
14146 else
14147 # finding both strings is unlikely to happen, but who knows?
14148 ac_cv_c_bigendian=unknown
14152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14153 else
14154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14155 /* end confdefs.h. */
14156 $ac_includes_default
14158 main ()
14161 /* Are we little or big endian? From Harbison&Steele. */
14162 union
14164 long int l;
14165 char c[sizeof (long int)];
14166 } u;
14167 u.l = 1;
14168 return u.c[sizeof (long int) - 1] == 1;
14171 return 0;
14173 _ACEOF
14174 if ac_fn_c_try_run "$LINENO"; then :
14175 ac_cv_c_bigendian=no
14176 else
14177 ac_cv_c_bigendian=yes
14179 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14180 conftest.$ac_objext conftest.beam conftest.$ac_ext
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14186 $as_echo "$ac_cv_c_bigendian" >&6; }
14187 case $ac_cv_c_bigendian in #(
14188 yes)
14189 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14190 ;; #(
14192 ;; #(
14193 universal)
14195 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14197 ;; #(
14199 as_fn_error $? "unknown endianness
14200 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14201 esac
14203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14204 $as_echo_n "checking for inline... " >&6; }
14205 if ${ac_cv_c_inline+:} false; then :
14206 $as_echo_n "(cached) " >&6
14207 else
14208 ac_cv_c_inline=no
14209 for ac_kw in inline __inline__ __inline; do
14210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14211 /* end confdefs.h. */
14212 #ifndef __cplusplus
14213 typedef int foo_t;
14214 static $ac_kw foo_t static_foo () {return 0; }
14215 $ac_kw foo_t foo () {return 0; }
14216 #endif
14218 _ACEOF
14219 if ac_fn_c_try_compile "$LINENO"; then :
14220 ac_cv_c_inline=$ac_kw
14222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14223 test "$ac_cv_c_inline" != no && break
14224 done
14227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14228 $as_echo "$ac_cv_c_inline" >&6; }
14230 case $ac_cv_c_inline in
14231 inline | yes) ;;
14233 case $ac_cv_c_inline in
14234 no) ac_val=;;
14235 *) ac_val=$ac_cv_c_inline;;
14236 esac
14237 cat >>confdefs.h <<_ACEOF
14238 #ifndef __cplusplus
14239 #define inline $ac_val
14240 #endif
14241 _ACEOF
14243 esac
14245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14246 $as_echo_n "checking for printf format archetype... " >&6; }
14247 if ${pgac_cv_printf_archetype+:} false; then :
14248 $as_echo_n "(cached) " >&6
14249 else
14250 pgac_cv_printf_archetype=gnu_printf
14251 ac_save_c_werror_flag=$ac_c_werror_flag
14252 ac_c_werror_flag=yes
14253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14254 /* end confdefs.h. */
14255 extern void pgac_write(int ignore, const char *fmt,...)
14256 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14258 main ()
14260 pgac_write(0, "error %s: %m", "foo");
14262 return 0;
14264 _ACEOF
14265 if ac_fn_c_try_compile "$LINENO"; then :
14266 ac_archetype_ok=yes
14267 else
14268 ac_archetype_ok=no
14270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14271 ac_c_werror_flag=$ac_save_c_werror_flag
14273 if [ "$ac_archetype_ok" = no ]; then
14274 pgac_cv_printf_archetype=__syslog__
14275 ac_save_c_werror_flag=$ac_c_werror_flag
14276 ac_c_werror_flag=yes
14277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14278 /* end confdefs.h. */
14279 extern void pgac_write(int ignore, const char *fmt,...)
14280 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14282 main ()
14284 pgac_write(0, "error %s: %m", "foo");
14286 return 0;
14288 _ACEOF
14289 if ac_fn_c_try_compile "$LINENO"; then :
14290 ac_archetype_ok=yes
14291 else
14292 ac_archetype_ok=no
14294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14295 ac_c_werror_flag=$ac_save_c_werror_flag
14297 if [ "$ac_archetype_ok" = no ]; then
14298 pgac_cv_printf_archetype=printf
14302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14303 $as_echo "$pgac_cv_printf_archetype" >&6; }
14305 cat >>confdefs.h <<_ACEOF
14306 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14307 _ACEOF
14310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14311 $as_echo_n "checking for _Static_assert... " >&6; }
14312 if ${pgac_cv__static_assert+:} false; then :
14313 $as_echo_n "(cached) " >&6
14314 else
14315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14316 /* end confdefs.h. */
14319 main ()
14321 ({ _Static_assert(1, "foo"); })
14323 return 0;
14325 _ACEOF
14326 if ac_fn_c_try_link "$LINENO"; then :
14327 pgac_cv__static_assert=yes
14328 else
14329 pgac_cv__static_assert=no
14331 rm -f core conftest.err conftest.$ac_objext \
14332 conftest$ac_exeext conftest.$ac_ext
14334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14335 $as_echo "$pgac_cv__static_assert" >&6; }
14336 if test x"$pgac_cv__static_assert" = xyes ; then
14338 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14342 $as_echo_n "checking for typeof... " >&6; }
14343 if ${pgac_cv_c_typeof+:} false; then :
14344 $as_echo_n "(cached) " >&6
14345 else
14346 pgac_cv_c_typeof=no
14347 for pgac_kw in typeof __typeof__ decltype; do
14348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14349 /* end confdefs.h. */
14352 main ()
14354 int x = 0;
14355 $pgac_kw(x) y;
14356 y = x;
14357 return y;
14359 return 0;
14361 _ACEOF
14362 if ac_fn_c_try_compile "$LINENO"; then :
14363 pgac_cv_c_typeof=$pgac_kw
14365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14366 test "$pgac_cv_c_typeof" != no && break
14367 done
14369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14370 $as_echo "$pgac_cv_c_typeof" >&6; }
14371 if test "$pgac_cv_c_typeof" != no; then
14373 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14375 if test "$pgac_cv_c_typeof" != typeof; then
14377 cat >>confdefs.h <<_ACEOF
14378 #define typeof $pgac_cv_c_typeof
14379 _ACEOF
14383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14384 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14385 if ${pgac_cv__types_compatible+:} false; then :
14386 $as_echo_n "(cached) " >&6
14387 else
14388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14389 /* end confdefs.h. */
14392 main ()
14394 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14396 return 0;
14398 _ACEOF
14399 if ac_fn_c_try_compile "$LINENO"; then :
14400 pgac_cv__types_compatible=yes
14401 else
14402 pgac_cv__types_compatible=no
14404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14407 $as_echo "$pgac_cv__types_compatible" >&6; }
14408 if test x"$pgac_cv__types_compatible" = xyes ; then
14410 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14414 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14415 if ${pgac_cv__builtin_constant_p+:} false; then :
14416 $as_echo_n "(cached) " >&6
14417 else
14418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14419 /* end confdefs.h. */
14420 static int x;
14421 static int y[__builtin_constant_p(x) ? x : 1];
14422 static int z[__builtin_constant_p("string literal") ? 1 : x];
14425 _ACEOF
14426 if ac_fn_c_try_compile "$LINENO"; then :
14427 pgac_cv__builtin_constant_p=yes
14428 else
14429 pgac_cv__builtin_constant_p=no
14431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14434 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14435 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14437 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
14441 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
14442 if ${pgac_cv__builtin_op_overflow+:} false; then :
14443 $as_echo_n "(cached) " >&6
14444 else
14445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14446 /* end confdefs.h. */
14448 #include <stdint.h>
14449 int64_t a = 1;
14450 int64_t b = 1;
14451 int64_t result;
14452 int oflo;
14455 main ()
14457 oflo = __builtin_mul_overflow(a, b, &result);
14459 return 0;
14461 _ACEOF
14462 if ac_fn_c_try_link "$LINENO"; then :
14463 pgac_cv__builtin_op_overflow=yes
14464 else
14465 pgac_cv__builtin_op_overflow=no
14467 rm -f core conftest.err conftest.$ac_objext \
14468 conftest$ac_exeext conftest.$ac_ext
14470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
14471 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
14472 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
14474 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
14477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14478 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14479 if ${pgac_cv__builtin_unreachable+:} false; then :
14480 $as_echo_n "(cached) " >&6
14481 else
14482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14483 /* end confdefs.h. */
14486 main ()
14488 __builtin_unreachable();
14490 return 0;
14492 _ACEOF
14493 if ac_fn_c_try_link "$LINENO"; then :
14494 pgac_cv__builtin_unreachable=yes
14495 else
14496 pgac_cv__builtin_unreachable=no
14498 rm -f core conftest.err conftest.$ac_objext \
14499 conftest$ac_exeext conftest.$ac_ext
14501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14502 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14503 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14505 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14509 $as_echo_n "checking for computed goto support... " >&6; }
14510 if ${pgac_cv_computed_goto+:} false; then :
14511 $as_echo_n "(cached) " >&6
14512 else
14513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14514 /* end confdefs.h. */
14517 main ()
14519 void *labeladdrs[] = {&&my_label};
14520 goto *labeladdrs[0];
14521 my_label:
14522 return 1;
14525 return 0;
14527 _ACEOF
14528 if ac_fn_c_try_compile "$LINENO"; then :
14529 pgac_cv_computed_goto=yes
14530 else
14531 pgac_cv_computed_goto=no
14533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14536 $as_echo "$pgac_cv_computed_goto" >&6; }
14537 if test x"$pgac_cv_computed_goto" = xyes ; then
14539 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14542 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14543 #include <time.h>
14546 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14548 cat >>confdefs.h <<_ACEOF
14549 #define HAVE_STRUCT_TM_TM_ZONE 1
14550 _ACEOF
14556 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14557 #include <sys/ipc.h>
14558 #include <sys/sem.h>
14561 if test "x$ac_cv_type_union_semun" = xyes; then :
14563 cat >>confdefs.h <<_ACEOF
14564 #define HAVE_UNION_SEMUN 1
14565 _ACEOF
14570 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14572 if test "x$ac_cv_type_socklen_t" = xyes; then :
14574 cat >>confdefs.h <<_ACEOF
14575 #define HAVE_SOCKLEN_T 1
14576 _ACEOF
14581 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14582 #include <sys/socket.h>
14585 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14587 cat >>confdefs.h <<_ACEOF
14588 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14589 _ACEOF
14595 # MSVC doesn't cope well with defining restrict to __restrict, the
14596 # spelling it understands, because it conflicts with
14597 # __declspec(restrict). Therefore we define pg_restrict to the
14598 # appropriate definition, which presumably won't conflict.
14599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14600 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14601 if ${ac_cv_c_restrict+:} false; then :
14602 $as_echo_n "(cached) " >&6
14603 else
14604 ac_cv_c_restrict=no
14605 # The order here caters to the fact that C++ does not require restrict.
14606 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14608 /* end confdefs.h. */
14609 typedef int * int_ptr;
14610 int foo (int_ptr $ac_kw ip) {
14611 return ip[0];
14614 main ()
14616 int s[1];
14617 int * $ac_kw t = s;
14618 t[0] = 0;
14619 return foo(t)
14621 return 0;
14623 _ACEOF
14624 if ac_fn_c_try_compile "$LINENO"; then :
14625 ac_cv_c_restrict=$ac_kw
14627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14628 test "$ac_cv_c_restrict" != no && break
14629 done
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14633 $as_echo "$ac_cv_c_restrict" >&6; }
14635 case $ac_cv_c_restrict in
14636 restrict) ;;
14637 no) $as_echo "#define restrict /**/" >>confdefs.h
14639 *) cat >>confdefs.h <<_ACEOF
14640 #define restrict $ac_cv_c_restrict
14641 _ACEOF
14643 esac
14645 if test "$ac_cv_c_restrict" = "no"; then
14646 pg_restrict=""
14647 else
14648 pg_restrict="$ac_cv_c_restrict"
14651 cat >>confdefs.h <<_ACEOF
14652 #define pg_restrict $pg_restrict
14653 _ACEOF
14656 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14657 #include <getopt.h>
14658 #endif
14660 if test "x$ac_cv_type_struct_option" = xyes; then :
14662 cat >>confdefs.h <<_ACEOF
14663 #define HAVE_STRUCT_OPTION 1
14664 _ACEOF
14670 case $host_cpu in
14671 x86_64)
14672 # On x86_64, check if we can compile a popcntq instruction
14673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14674 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14675 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14676 $as_echo_n "(cached) " >&6
14677 else
14678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14679 /* end confdefs.h. */
14682 main ()
14684 long long x = 1; long long r;
14685 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14687 return 0;
14689 _ACEOF
14690 if ac_fn_c_try_compile "$LINENO"; then :
14691 pgac_cv_have_x86_64_popcntq=yes
14692 else
14693 pgac_cv_have_x86_64_popcntq=no
14695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14698 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14699 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14701 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14705 ppc*|powerpc*)
14706 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
14707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14708 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14709 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14710 $as_echo_n "(cached) " >&6
14711 else
14712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14713 /* end confdefs.h. */
14714 static inline int
14715 addi(int ra, int si)
14717 int res = 0;
14718 if (__builtin_constant_p(si))
14719 __asm__ __volatile__(
14720 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14721 return res;
14723 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14725 main ()
14729 return 0;
14731 _ACEOF
14732 if ac_fn_c_try_compile "$LINENO"; then :
14733 pgac_cv_have_i_constraint__builtin_constant_p=yes
14734 else
14735 pgac_cv_have_i_constraint__builtin_constant_p=no
14737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14740 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14741 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14743 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14747 esac
14749 # Check largefile support. You might think this is a system service not a
14750 # compiler characteristic, but you'd be wrong. We must check this before
14751 # probing existence of related functions such as fseeko, since the largefile
14752 # defines can affect what is generated for that.
14753 if test "$PORTNAME" != "win32"; then
14754 # Check whether --enable-largefile was given.
14755 if test "${enable_largefile+set}" = set; then :
14756 enableval=$enable_largefile;
14759 if test "$enable_largefile" != no; then
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14762 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14763 if ${ac_cv_sys_largefile_CC+:} false; then :
14764 $as_echo_n "(cached) " >&6
14765 else
14766 ac_cv_sys_largefile_CC=no
14767 if test "$GCC" != yes; then
14768 ac_save_CC=$CC
14769 while :; do
14770 # IRIX 6.2 and later do not support large files by default,
14771 # so use the C compiler's -n32 option if that helps.
14772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14773 /* end confdefs.h. */
14774 #include <sys/types.h>
14775 /* Check that off_t can represent 2**63 - 1 correctly.
14776 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14777 since some C++ compilers masquerading as C compilers
14778 incorrectly reject 9223372036854775807. */
14779 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14780 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14781 && LARGE_OFF_T % 2147483647 == 1)
14782 ? 1 : -1];
14784 main ()
14788 return 0;
14790 _ACEOF
14791 if ac_fn_c_try_compile "$LINENO"; then :
14792 break
14794 rm -f core conftest.err conftest.$ac_objext
14795 CC="$CC -n32"
14796 if ac_fn_c_try_compile "$LINENO"; then :
14797 ac_cv_sys_largefile_CC=' -n32'; break
14799 rm -f core conftest.err conftest.$ac_objext
14800 break
14801 done
14802 CC=$ac_save_CC
14803 rm -f conftest.$ac_ext
14806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14807 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14808 if test "$ac_cv_sys_largefile_CC" != no; then
14809 CC=$CC$ac_cv_sys_largefile_CC
14812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14813 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14814 if ${ac_cv_sys_file_offset_bits+:} false; then :
14815 $as_echo_n "(cached) " >&6
14816 else
14817 while :; do
14818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14819 /* end confdefs.h. */
14820 #include <sys/types.h>
14821 /* Check that off_t can represent 2**63 - 1 correctly.
14822 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14823 since some C++ compilers masquerading as C compilers
14824 incorrectly reject 9223372036854775807. */
14825 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14826 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14827 && LARGE_OFF_T % 2147483647 == 1)
14828 ? 1 : -1];
14830 main ()
14834 return 0;
14836 _ACEOF
14837 if ac_fn_c_try_compile "$LINENO"; then :
14838 ac_cv_sys_file_offset_bits=no; break
14840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14842 /* end confdefs.h. */
14843 #define _FILE_OFFSET_BITS 64
14844 #include <sys/types.h>
14845 /* Check that off_t can represent 2**63 - 1 correctly.
14846 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14847 since some C++ compilers masquerading as C compilers
14848 incorrectly reject 9223372036854775807. */
14849 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14850 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14851 && LARGE_OFF_T % 2147483647 == 1)
14852 ? 1 : -1];
14854 main ()
14858 return 0;
14860 _ACEOF
14861 if ac_fn_c_try_compile "$LINENO"; then :
14862 ac_cv_sys_file_offset_bits=64; break
14864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14865 ac_cv_sys_file_offset_bits=unknown
14866 break
14867 done
14869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14870 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14871 case $ac_cv_sys_file_offset_bits in #(
14872 no | unknown) ;;
14874 cat >>confdefs.h <<_ACEOF
14875 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14876 _ACEOF
14878 esac
14879 rm -rf conftest*
14880 if test $ac_cv_sys_file_offset_bits = unknown; then
14881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14882 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14883 if ${ac_cv_sys_large_files+:} false; then :
14884 $as_echo_n "(cached) " >&6
14885 else
14886 while :; do
14887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14888 /* end confdefs.h. */
14889 #include <sys/types.h>
14890 /* Check that off_t can represent 2**63 - 1 correctly.
14891 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14892 since some C++ compilers masquerading as C compilers
14893 incorrectly reject 9223372036854775807. */
14894 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14895 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14896 && LARGE_OFF_T % 2147483647 == 1)
14897 ? 1 : -1];
14899 main ()
14903 return 0;
14905 _ACEOF
14906 if ac_fn_c_try_compile "$LINENO"; then :
14907 ac_cv_sys_large_files=no; break
14909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14911 /* end confdefs.h. */
14912 #define _LARGE_FILES 1
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_large_files=1; break
14933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14934 ac_cv_sys_large_files=unknown
14935 break
14936 done
14938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14939 $as_echo "$ac_cv_sys_large_files" >&6; }
14940 case $ac_cv_sys_large_files in #(
14941 no | unknown) ;;
14943 cat >>confdefs.h <<_ACEOF
14944 #define _LARGE_FILES $ac_cv_sys_large_files
14945 _ACEOF
14947 esac
14948 rm -rf conftest*
14957 # The cast to long int works around a bug in the HP C Compiler
14958 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14959 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14960 # This bug is HP SR number 8606223364.
14961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14962 $as_echo_n "checking size of off_t... " >&6; }
14963 if ${ac_cv_sizeof_off_t+:} false; then :
14964 $as_echo_n "(cached) " >&6
14965 else
14966 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
14968 else
14969 if test "$ac_cv_type_off_t" = yes; then
14970 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14971 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14972 as_fn_error 77 "cannot compute sizeof (off_t)
14973 See \`config.log' for more details" "$LINENO" 5; }
14974 else
14975 ac_cv_sizeof_off_t=0
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14981 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14985 cat >>confdefs.h <<_ACEOF
14986 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14987 _ACEOF
14991 # If we don't have largefile support, can't handle segment size >= 2GB.
14992 if test "$ac_cv_sizeof_off_t" -lt 8; then
14993 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
14994 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15000 ## Functions, global variables
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15004 $as_echo_n "checking for int timezone... " >&6; }
15005 if ${pgac_cv_var_int_timezone+:} false; then :
15006 $as_echo_n "(cached) " >&6
15007 else
15008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15009 /* end confdefs.h. */
15010 #include <time.h>
15011 int res;
15013 main ()
15015 #ifndef __CYGWIN__
15016 res = timezone / 60;
15017 #else
15018 res = _timezone / 60;
15019 #endif
15021 return 0;
15023 _ACEOF
15024 if ac_fn_c_try_link "$LINENO"; then :
15025 pgac_cv_var_int_timezone=yes
15026 else
15027 pgac_cv_var_int_timezone=no
15029 rm -f core conftest.err conftest.$ac_objext \
15030 conftest$ac_exeext conftest.$ac_ext
15032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15033 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15034 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15036 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15040 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15041 # symbols that that library has no business exposing to the world. Pending
15042 # acquisition of a clue by those developers, ignore libedit (including its
15043 # possible alias of libreadline) while checking for everything else.
15044 LIBS_including_readline="$LIBS"
15045 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15047 for ac_func in backtrace_symbols copyfile copy_file_range elf_aux_info getauxval 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
15048 do :
15049 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15050 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15051 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15052 cat >>confdefs.h <<_ACEOF
15053 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15054 _ACEOF
15057 done
15060 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15062 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15063 if ${pgac_cv__builtin_bswap16+:} false; then :
15064 $as_echo_n "(cached) " >&6
15065 else
15066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15067 /* end confdefs.h. */
15070 call__builtin_bswap16(int x)
15072 return __builtin_bswap16(x);
15075 main ()
15079 return 0;
15081 _ACEOF
15082 if ac_fn_c_try_link "$LINENO"; then :
15083 pgac_cv__builtin_bswap16=yes
15084 else
15085 pgac_cv__builtin_bswap16=no
15087 rm -f core conftest.err conftest.$ac_objext \
15088 conftest$ac_exeext conftest.$ac_ext
15090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15091 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15092 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15094 cat >>confdefs.h <<_ACEOF
15095 #define HAVE__BUILTIN_BSWAP16 1
15096 _ACEOF
15099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15100 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15101 if ${pgac_cv__builtin_bswap32+:} false; then :
15102 $as_echo_n "(cached) " >&6
15103 else
15104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15105 /* end confdefs.h. */
15108 call__builtin_bswap32(int x)
15110 return __builtin_bswap32(x);
15113 main ()
15117 return 0;
15119 _ACEOF
15120 if ac_fn_c_try_link "$LINENO"; then :
15121 pgac_cv__builtin_bswap32=yes
15122 else
15123 pgac_cv__builtin_bswap32=no
15125 rm -f core conftest.err conftest.$ac_objext \
15126 conftest$ac_exeext conftest.$ac_ext
15128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15129 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15130 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15132 cat >>confdefs.h <<_ACEOF
15133 #define HAVE__BUILTIN_BSWAP32 1
15134 _ACEOF
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15138 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15139 if ${pgac_cv__builtin_bswap64+:} false; then :
15140 $as_echo_n "(cached) " >&6
15141 else
15142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15143 /* end confdefs.h. */
15146 call__builtin_bswap64(long int x)
15148 return __builtin_bswap64(x);
15151 main ()
15155 return 0;
15157 _ACEOF
15158 if ac_fn_c_try_link "$LINENO"; then :
15159 pgac_cv__builtin_bswap64=yes
15160 else
15161 pgac_cv__builtin_bswap64=no
15163 rm -f core conftest.err conftest.$ac_objext \
15164 conftest$ac_exeext conftest.$ac_ext
15166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15167 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15168 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15170 cat >>confdefs.h <<_ACEOF
15171 #define HAVE__BUILTIN_BSWAP64 1
15172 _ACEOF
15175 # We assume that we needn't test all widths of these explicitly:
15176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15177 $as_echo_n "checking for __builtin_clz... " >&6; }
15178 if ${pgac_cv__builtin_clz+:} false; then :
15179 $as_echo_n "(cached) " >&6
15180 else
15181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15182 /* end confdefs.h. */
15185 call__builtin_clz(unsigned int x)
15187 return __builtin_clz(x);
15190 main ()
15194 return 0;
15196 _ACEOF
15197 if ac_fn_c_try_link "$LINENO"; then :
15198 pgac_cv__builtin_clz=yes
15199 else
15200 pgac_cv__builtin_clz=no
15202 rm -f core conftest.err conftest.$ac_objext \
15203 conftest$ac_exeext conftest.$ac_ext
15205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15206 $as_echo "$pgac_cv__builtin_clz" >&6; }
15207 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15209 cat >>confdefs.h <<_ACEOF
15210 #define HAVE__BUILTIN_CLZ 1
15211 _ACEOF
15214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15215 $as_echo_n "checking for __builtin_ctz... " >&6; }
15216 if ${pgac_cv__builtin_ctz+:} false; then :
15217 $as_echo_n "(cached) " >&6
15218 else
15219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15220 /* end confdefs.h. */
15223 call__builtin_ctz(unsigned int x)
15225 return __builtin_ctz(x);
15228 main ()
15232 return 0;
15234 _ACEOF
15235 if ac_fn_c_try_link "$LINENO"; then :
15236 pgac_cv__builtin_ctz=yes
15237 else
15238 pgac_cv__builtin_ctz=no
15240 rm -f core conftest.err conftest.$ac_objext \
15241 conftest$ac_exeext conftest.$ac_ext
15243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15244 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15245 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15247 cat >>confdefs.h <<_ACEOF
15248 #define HAVE__BUILTIN_CTZ 1
15249 _ACEOF
15252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15253 $as_echo_n "checking for __builtin_popcount... " >&6; }
15254 if ${pgac_cv__builtin_popcount+:} false; then :
15255 $as_echo_n "(cached) " >&6
15256 else
15257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15258 /* end confdefs.h. */
15261 call__builtin_popcount(unsigned int x)
15263 return __builtin_popcount(x);
15266 main ()
15270 return 0;
15272 _ACEOF
15273 if ac_fn_c_try_link "$LINENO"; then :
15274 pgac_cv__builtin_popcount=yes
15275 else
15276 pgac_cv__builtin_popcount=no
15278 rm -f core conftest.err conftest.$ac_objext \
15279 conftest$ac_exeext conftest.$ac_ext
15281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15282 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15283 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15285 cat >>confdefs.h <<_ACEOF
15286 #define HAVE__BUILTIN_POPCOUNT 1
15287 _ACEOF
15290 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15291 # so it needs a different test function.
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15293 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15294 if ${pgac_cv__builtin_frame_address+:} false; then :
15295 $as_echo_n "(cached) " >&6
15296 else
15297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15298 /* end confdefs.h. */
15300 void *
15301 call__builtin_frame_address(void)
15303 return __builtin_frame_address(0);
15306 main ()
15310 return 0;
15312 _ACEOF
15313 if ac_fn_c_try_link "$LINENO"; then :
15314 pgac_cv__builtin_frame_address=yes
15315 else
15316 pgac_cv__builtin_frame_address=no
15318 rm -f core conftest.err conftest.$ac_objext \
15319 conftest$ac_exeext conftest.$ac_ext
15321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15322 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15323 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15325 cat >>confdefs.h <<_ACEOF
15326 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15327 _ACEOF
15331 # We require 64-bit fseeko() to be available, but run this check anyway
15332 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15334 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15335 if ${ac_cv_sys_largefile_source+:} false; then :
15336 $as_echo_n "(cached) " >&6
15337 else
15338 while :; do
15339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15340 /* end confdefs.h. */
15341 #include <sys/types.h> /* for off_t */
15342 #include <stdio.h>
15344 main ()
15346 int (*fp) (FILE *, off_t, int) = fseeko;
15347 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15349 return 0;
15351 _ACEOF
15352 if ac_fn_c_try_link "$LINENO"; then :
15353 ac_cv_sys_largefile_source=no; break
15355 rm -f core conftest.err conftest.$ac_objext \
15356 conftest$ac_exeext conftest.$ac_ext
15357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15358 /* end confdefs.h. */
15359 #define _LARGEFILE_SOURCE 1
15360 #include <sys/types.h> /* for off_t */
15361 #include <stdio.h>
15363 main ()
15365 int (*fp) (FILE *, off_t, int) = fseeko;
15366 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15368 return 0;
15370 _ACEOF
15371 if ac_fn_c_try_link "$LINENO"; then :
15372 ac_cv_sys_largefile_source=1; break
15374 rm -f core conftest.err conftest.$ac_objext \
15375 conftest$ac_exeext conftest.$ac_ext
15376 ac_cv_sys_largefile_source=unknown
15377 break
15378 done
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15381 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15382 case $ac_cv_sys_largefile_source in #(
15383 no | unknown) ;;
15385 cat >>confdefs.h <<_ACEOF
15386 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15387 _ACEOF
15389 esac
15390 rm -rf conftest*
15392 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15393 # in glibc 2.1.3, but that breaks too many other things.
15394 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15395 if test $ac_cv_sys_largefile_source != unknown; then
15397 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15402 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15403 # by calling it, 2009-04-02
15404 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15405 # The Clang compiler raises a warning for an undeclared identifier that matches
15406 # a compiler builtin function. All extant Clang versions are affected, as of
15407 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15408 # C and Objective C languages, but Clang does report an error under C++ and
15409 # Objective C++.
15411 # Passing -fno-builtin to the compiler would suppress this problem. That
15412 # strategy would have the advantage of being insensitive to stray warnings, but
15413 # it would make tests less realistic.
15414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15415 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15416 if ${ac_cv_c_decl_report+:} false; then :
15417 $as_echo_n "(cached) " >&6
15418 else
15419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15420 /* end confdefs.h. */
15423 main ()
15425 (void) strchr;
15427 return 0;
15429 _ACEOF
15430 if ac_fn_c_try_compile "$LINENO"; then :
15431 if test -s conftest.err; then :
15432 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15433 # valid AC_CHECK_DECL input. No library function is consistently available
15434 # on freestanding implementations, so test against a dummy declaration.
15435 # Include always-available headers on the off chance that they somehow
15436 # elicit warnings.
15437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15438 /* end confdefs.h. */
15439 #include <float.h>
15440 #include <limits.h>
15441 #include <stdarg.h>
15442 #include <stddef.h>
15443 extern void ac_decl (int, char *);
15445 main ()
15447 #ifdef __cplusplus
15448 (void) ac_decl ((int) 0, (char *) 0);
15449 (void) ac_decl;
15450 #else
15451 (void) ac_decl;
15452 #endif
15455 return 0;
15457 _ACEOF
15458 if ac_fn_c_try_compile "$LINENO"; then :
15459 if test -s conftest.err; then :
15460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15461 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15462 as_fn_error $? "cannot detect from compiler exit status or warnings
15463 See \`config.log' for more details" "$LINENO" 5; }
15464 else
15465 ac_cv_c_decl_report=warning
15467 else
15468 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15469 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15470 as_fn_error $? "cannot compile a simple declaration test
15471 See \`config.log' for more details" "$LINENO" 5; }
15473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15474 else
15475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15476 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15477 as_fn_error $? "compiler does not report undeclared identifiers
15478 See \`config.log' for more details" "$LINENO" 5; }
15480 else
15481 ac_cv_c_decl_report=error
15483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15486 $as_echo "$ac_cv_c_decl_report" >&6; }
15488 case $ac_cv_c_decl_report in
15489 warning) ac_c_decl_warn_flag=yes ;;
15490 *) ac_c_decl_warn_flag= ;;
15491 esac
15493 if test "$PORTNAME" != "solaris"; then :
15495 for ac_func in posix_fadvise
15496 do :
15497 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15498 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15499 cat >>confdefs.h <<_ACEOF
15500 #define HAVE_POSIX_FADVISE 1
15501 _ACEOF
15504 done
15506 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15508 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15509 ac_have_decl=1
15510 else
15511 ac_have_decl=0
15514 cat >>confdefs.h <<_ACEOF
15515 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15516 _ACEOF
15519 fi # fi
15521 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15523 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15524 ac_have_decl=1
15525 else
15526 ac_have_decl=0
15529 cat >>confdefs.h <<_ACEOF
15530 #define HAVE_DECL_FDATASYNC $ac_have_decl
15531 _ACEOF
15533 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15534 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15535 ac_have_decl=1
15536 else
15537 ac_have_decl=0
15540 cat >>confdefs.h <<_ACEOF
15541 #define HAVE_DECL_STRLCAT $ac_have_decl
15542 _ACEOF
15543 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15544 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15545 ac_have_decl=1
15546 else
15547 ac_have_decl=0
15550 cat >>confdefs.h <<_ACEOF
15551 #define HAVE_DECL_STRLCPY $ac_have_decl
15552 _ACEOF
15553 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15554 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15555 ac_have_decl=1
15556 else
15557 ac_have_decl=0
15560 cat >>confdefs.h <<_ACEOF
15561 #define HAVE_DECL_STRNLEN $ac_have_decl
15562 _ACEOF
15563 ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "$ac_includes_default"
15564 if test "x$ac_cv_have_decl_strsep" = xyes; then :
15565 ac_have_decl=1
15566 else
15567 ac_have_decl=0
15570 cat >>confdefs.h <<_ACEOF
15571 #define HAVE_DECL_STRSEP $ac_have_decl
15572 _ACEOF
15575 # We can't use AC_CHECK_FUNCS to detect these functions, because it
15576 # won't handle deployment target restrictions on macOS
15577 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
15579 if test "x$ac_cv_have_decl_preadv" = xyes; then :
15580 ac_have_decl=1
15581 else
15582 ac_have_decl=0
15585 cat >>confdefs.h <<_ACEOF
15586 #define HAVE_DECL_PREADV $ac_have_decl
15587 _ACEOF
15589 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
15591 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
15592 ac_have_decl=1
15593 else
15594 ac_have_decl=0
15597 cat >>confdefs.h <<_ACEOF
15598 #define HAVE_DECL_PWRITEV $ac_have_decl
15599 _ACEOF
15602 # This is probably only present on macOS, but may as well check always
15603 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15605 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15606 ac_have_decl=1
15607 else
15608 ac_have_decl=0
15611 cat >>confdefs.h <<_ACEOF
15612 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15613 _ACEOF
15616 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
15617 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
15618 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
15620 else
15621 case " $LIBOBJS " in
15622 *" explicit_bzero.$ac_objext "* ) ;;
15623 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
15625 esac
15629 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15630 if test "x$ac_cv_func_getopt" = xyes; then :
15631 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15633 else
15634 case " $LIBOBJS " in
15635 *" getopt.$ac_objext "* ) ;;
15636 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15638 esac
15642 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15643 if test "x$ac_cv_func_getpeereid" = xyes; then :
15644 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15646 else
15647 case " $LIBOBJS " in
15648 *" getpeereid.$ac_objext "* ) ;;
15649 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15651 esac
15655 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15656 if test "x$ac_cv_func_inet_aton" = xyes; then :
15657 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15659 else
15660 case " $LIBOBJS " in
15661 *" inet_aton.$ac_objext "* ) ;;
15662 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15664 esac
15668 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15669 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15670 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15672 else
15673 case " $LIBOBJS " in
15674 *" mkdtemp.$ac_objext "* ) ;;
15675 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15677 esac
15681 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15682 if test "x$ac_cv_func_strlcat" = xyes; then :
15683 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15685 else
15686 case " $LIBOBJS " in
15687 *" strlcat.$ac_objext "* ) ;;
15688 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15690 esac
15694 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15695 if test "x$ac_cv_func_strlcpy" = xyes; then :
15696 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15698 else
15699 case " $LIBOBJS " in
15700 *" strlcpy.$ac_objext "* ) ;;
15701 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15703 esac
15707 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15708 if test "x$ac_cv_func_strnlen" = xyes; then :
15709 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15711 else
15712 case " $LIBOBJS " in
15713 *" strnlen.$ac_objext "* ) ;;
15714 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15716 esac
15720 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
15721 if test "x$ac_cv_func_strsep" = xyes; then :
15722 $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
15724 else
15725 case " $LIBOBJS " in
15726 *" strsep.$ac_objext "* ) ;;
15727 *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
15729 esac
15735 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
15736 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
15737 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
15739 else
15740 case " $LIBOBJS " in
15741 *" pthread_barrier_wait.$ac_objext "* ) ;;
15742 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
15744 esac
15750 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
15751 # Cygwin and (apparently, based on test results) Mingw both
15752 # have a broken strtof(), so substitute its implementation.
15753 # That's not a perfect fix, since it doesn't avoid double-rounding,
15754 # but we have no better options.
15755 case " $LIBOBJS " in
15756 *" strtof.$ac_objext "* ) ;;
15757 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15759 esac
15761 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
15762 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
15765 # Similarly, use system's getopt_long() only if system provides struct option.
15766 if test x"$ac_cv_type_struct_option" = xyes ; then
15767 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15768 if test "x$ac_cv_func_getopt_long" = xyes; then :
15769 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15771 else
15772 case " $LIBOBJS " in
15773 *" getopt_long.$ac_objext "* ) ;;
15774 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15776 esac
15781 else
15782 case " $LIBOBJS " in
15783 *" getopt_long.$ac_objext "* ) ;;
15784 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15786 esac
15790 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15791 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15792 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15793 case " $LIBOBJS " in
15794 *" getopt.$ac_objext "* ) ;;
15795 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15797 esac
15801 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15802 # so always use our version on Windows.
15803 if test "$PORTNAME" = "win32"; then
15804 case " $LIBOBJS " in
15805 *" getopt.$ac_objext "* ) ;;
15806 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15808 esac
15810 case " $LIBOBJS " in
15811 *" getopt_long.$ac_objext "* ) ;;
15812 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15814 esac
15818 # Win32 (really MinGW) support
15819 if test "$PORTNAME" = "win32"; then
15820 case " $LIBOBJS " in
15821 *" dirmod.$ac_objext "* ) ;;
15822 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15824 esac
15826 case " $LIBOBJS " in
15827 *" kill.$ac_objext "* ) ;;
15828 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15830 esac
15832 case " $LIBOBJS " in
15833 *" open.$ac_objext "* ) ;;
15834 *) LIBOBJS="$LIBOBJS open.$ac_objext"
15836 esac
15838 case " $LIBOBJS " in
15839 *" system.$ac_objext "* ) ;;
15840 *) LIBOBJS="$LIBOBJS system.$ac_objext"
15842 esac
15844 case " $LIBOBJS " in
15845 *" win32common.$ac_objext "* ) ;;
15846 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
15848 esac
15850 case " $LIBOBJS " in
15851 *" win32dlopen.$ac_objext "* ) ;;
15852 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
15854 esac
15856 case " $LIBOBJS " in
15857 *" win32env.$ac_objext "* ) ;;
15858 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15860 esac
15862 case " $LIBOBJS " in
15863 *" win32error.$ac_objext "* ) ;;
15864 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15866 esac
15868 case " $LIBOBJS " in
15869 *" win32fdatasync.$ac_objext "* ) ;;
15870 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
15872 esac
15874 case " $LIBOBJS " in
15875 *" win32gai_strerror.$ac_objext "* ) ;;
15876 *) LIBOBJS="$LIBOBJS win32gai_strerror.$ac_objext"
15878 esac
15880 case " $LIBOBJS " in
15881 *" win32getrusage.$ac_objext "* ) ;;
15882 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
15884 esac
15886 case " $LIBOBJS " in
15887 *" win32link.$ac_objext "* ) ;;
15888 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
15890 esac
15892 case " $LIBOBJS " in
15893 *" win32ntdll.$ac_objext "* ) ;;
15894 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
15896 esac
15898 case " $LIBOBJS " in
15899 *" win32pread.$ac_objext "* ) ;;
15900 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
15902 esac
15904 case " $LIBOBJS " in
15905 *" win32pwrite.$ac_objext "* ) ;;
15906 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
15908 esac
15910 case " $LIBOBJS " in
15911 *" win32security.$ac_objext "* ) ;;
15912 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15914 esac
15916 case " $LIBOBJS " in
15917 *" win32setlocale.$ac_objext "* ) ;;
15918 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15920 esac
15922 case " $LIBOBJS " in
15923 *" win32stat.$ac_objext "* ) ;;
15924 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
15926 esac
15929 # Cygwin needs only a bit of that
15930 if test "$PORTNAME" = "cygwin"; then
15931 case " $LIBOBJS " in
15932 *" dirmod.$ac_objext "* ) ;;
15933 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15935 esac
15939 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15940 if test "x$ac_cv_func_syslog" = xyes; then :
15941 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15942 if test "x$ac_cv_header_syslog_h" = xyes; then :
15944 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15953 $as_echo_n "checking for opterr... " >&6; }
15954 if ${pgac_cv_var_int_opterr+:} false; then :
15955 $as_echo_n "(cached) " >&6
15956 else
15957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15958 /* end confdefs.h. */
15959 #include <unistd.h>
15961 main ()
15963 extern int opterr; opterr = 1;
15965 return 0;
15967 _ACEOF
15968 if ac_fn_c_try_link "$LINENO"; then :
15969 pgac_cv_var_int_opterr=yes
15970 else
15971 pgac_cv_var_int_opterr=no
15973 rm -f core conftest.err conftest.$ac_objext \
15974 conftest$ac_exeext conftest.$ac_ext
15976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15977 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15978 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15980 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15985 $as_echo_n "checking for optreset... " >&6; }
15986 if ${pgac_cv_var_int_optreset+:} false; then :
15987 $as_echo_n "(cached) " >&6
15988 else
15989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15990 /* end confdefs.h. */
15991 #include <unistd.h>
15993 main ()
15995 extern int optreset; optreset = 1;
15997 return 0;
15999 _ACEOF
16000 if ac_fn_c_try_link "$LINENO"; then :
16001 pgac_cv_var_int_optreset=yes
16002 else
16003 pgac_cv_var_int_optreset=no
16005 rm -f core conftest.err conftest.$ac_objext \
16006 conftest$ac_exeext conftest.$ac_ext
16008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16009 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16010 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16012 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16016 if test "$with_icu" = yes; then
16017 ac_save_CPPFLAGS=$CPPFLAGS
16018 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16020 # Verify we have ICU's header files
16021 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16022 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16024 else
16025 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16030 CPPFLAGS=$ac_save_CPPFLAGS
16033 if test "$with_llvm" = yes; then
16035 # Check which functionality is present
16036 SAVE_CPPFLAGS="$CPPFLAGS"
16037 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16038 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16040 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16041 ac_have_decl=1
16042 else
16043 ac_have_decl=0
16046 cat >>confdefs.h <<_ACEOF
16047 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16048 _ACEOF
16049 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16051 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16052 ac_have_decl=1
16053 else
16054 ac_have_decl=0
16057 cat >>confdefs.h <<_ACEOF
16058 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16059 _ACEOF
16061 CPPFLAGS="$SAVE_CPPFLAGS"
16065 # Lastly, restore full LIBS list and check for readline/libedit symbols
16066 LIBS="$LIBS_including_readline"
16068 if test "$with_readline" = yes; then
16069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16070 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16071 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16072 $as_echo_n "(cached) " >&6
16073 else
16074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16075 /* end confdefs.h. */
16076 #include <stdio.h>
16077 #if defined(HAVE_READLINE_READLINE_H)
16078 #include <readline/readline.h>
16079 #elif defined(HAVE_EDITLINE_READLINE_H)
16080 #include <editline/readline.h>
16081 #elif defined(HAVE_READLINE_H)
16082 #include <readline.h>
16083 #endif
16086 main ()
16088 rl_completion_suppress_quote = 1;
16090 return 0;
16092 _ACEOF
16093 if ac_fn_c_try_link "$LINENO"; then :
16094 pgac_cv_var_rl_completion_suppress_quote=yes
16095 else
16096 pgac_cv_var_rl_completion_suppress_quote=no
16098 rm -f core conftest.err conftest.$ac_objext \
16099 conftest$ac_exeext conftest.$ac_ext
16101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16102 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16103 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16105 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16109 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16110 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16111 $as_echo_n "(cached) " >&6
16112 else
16113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16114 /* end confdefs.h. */
16115 #include <stdio.h>
16116 #if defined(HAVE_READLINE_READLINE_H)
16117 #include <readline/readline.h>
16118 #elif defined(HAVE_EDITLINE_READLINE_H)
16119 #include <editline/readline.h>
16120 #elif defined(HAVE_READLINE_H)
16121 #include <readline.h>
16122 #endif
16125 main ()
16127 rl_filename_quote_characters = "x";
16129 return 0;
16131 _ACEOF
16132 if ac_fn_c_try_link "$LINENO"; then :
16133 pgac_cv_var_rl_filename_quote_characters=yes
16134 else
16135 pgac_cv_var_rl_filename_quote_characters=no
16137 rm -f core conftest.err conftest.$ac_objext \
16138 conftest$ac_exeext conftest.$ac_ext
16140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16141 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16142 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16144 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16148 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16149 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16150 $as_echo_n "(cached) " >&6
16151 else
16152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16153 /* end confdefs.h. */
16154 #include <stdio.h>
16155 #if defined(HAVE_READLINE_READLINE_H)
16156 #include <readline/readline.h>
16157 #elif defined(HAVE_EDITLINE_READLINE_H)
16158 #include <editline/readline.h>
16159 #elif defined(HAVE_READLINE_H)
16160 #include <readline.h>
16161 #endif
16164 main ()
16166 rl_filename_quoting_function = 0;
16168 return 0;
16170 _ACEOF
16171 if ac_fn_c_try_link "$LINENO"; then :
16172 pgac_cv_var_rl_filename_quoting_function=yes
16173 else
16174 pgac_cv_var_rl_filename_quoting_function=no
16176 rm -f core conftest.err conftest.$ac_objext \
16177 conftest$ac_exeext conftest.$ac_ext
16179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16180 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16181 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16183 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16187 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16188 do :
16189 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16190 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16191 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16192 cat >>confdefs.h <<_ACEOF
16193 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16194 _ACEOF
16197 done
16202 # This test makes sure that run tests work at all. Sometimes a shared
16203 # library is found by the linker, but the runtime linker can't find it.
16204 # This check should come after all modifications of compiler or linker
16205 # variables, and before any other run tests.
16206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16207 $as_echo_n "checking test program... " >&6; }
16208 if test "$cross_compiling" = yes; then :
16209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16210 $as_echo "cross-compiling" >&6; }
16211 else
16212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16213 /* end confdefs.h. */
16214 int main() { return 0; }
16215 _ACEOF
16216 if ac_fn_c_try_run "$LINENO"; then :
16217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16218 $as_echo "ok" >&6; }
16219 else
16220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16221 $as_echo "failed" >&6; }
16222 as_fn_error $? "
16223 Could not execute a simple test program. This may be a problem
16224 related to locating shared libraries. Check the file 'config.log'
16225 for the exact reason." "$LINENO" 5
16227 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16228 conftest.$ac_objext conftest.beam conftest.$ac_ext
16232 # --------------------
16233 # Run tests below here
16234 # --------------------
16236 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16237 # The cast to long int works around a bug in the HP C Compiler
16238 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16239 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16240 # This bug is HP SR number 8606223364.
16241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16242 $as_echo_n "checking size of void *... " >&6; }
16243 if ${ac_cv_sizeof_void_p+:} false; then :
16244 $as_echo_n "(cached) " >&6
16245 else
16246 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16248 else
16249 if test "$ac_cv_type_void_p" = yes; then
16250 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16251 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16252 as_fn_error 77 "cannot compute sizeof (void *)
16253 See \`config.log' for more details" "$LINENO" 5; }
16254 else
16255 ac_cv_sizeof_void_p=0
16260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16261 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16265 cat >>confdefs.h <<_ACEOF
16266 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16267 _ACEOF
16270 # The cast to long int works around a bug in the HP C Compiler
16271 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16272 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16273 # This bug is HP SR number 8606223364.
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16275 $as_echo_n "checking size of size_t... " >&6; }
16276 if ${ac_cv_sizeof_size_t+:} false; then :
16277 $as_echo_n "(cached) " >&6
16278 else
16279 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16281 else
16282 if test "$ac_cv_type_size_t" = yes; then
16283 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16284 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16285 as_fn_error 77 "cannot compute sizeof (size_t)
16286 See \`config.log' for more details" "$LINENO" 5; }
16287 else
16288 ac_cv_sizeof_size_t=0
16293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16294 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16298 cat >>confdefs.h <<_ACEOF
16299 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16300 _ACEOF
16303 # The cast to long int works around a bug in the HP C Compiler
16304 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16305 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16306 # This bug is HP SR number 8606223364.
16307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16308 $as_echo_n "checking size of long... " >&6; }
16309 if ${ac_cv_sizeof_long+:} false; then :
16310 $as_echo_n "(cached) " >&6
16311 else
16312 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16314 else
16315 if test "$ac_cv_type_long" = yes; then
16316 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16317 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16318 as_fn_error 77 "cannot compute sizeof (long)
16319 See \`config.log' for more details" "$LINENO" 5; }
16320 else
16321 ac_cv_sizeof_long=0
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16327 $as_echo "$ac_cv_sizeof_long" >&6; }
16331 cat >>confdefs.h <<_ACEOF
16332 #define SIZEOF_LONG $ac_cv_sizeof_long
16333 _ACEOF
16336 # The cast to long int works around a bug in the HP C Compiler
16337 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16338 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16339 # This bug is HP SR number 8606223364.
16340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
16341 $as_echo_n "checking size of long long... " >&6; }
16342 if ${ac_cv_sizeof_long_long+:} false; then :
16343 $as_echo_n "(cached) " >&6
16344 else
16345 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
16347 else
16348 if test "$ac_cv_type_long_long" = yes; then
16349 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16350 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16351 as_fn_error 77 "cannot compute sizeof (long long)
16352 See \`config.log' for more details" "$LINENO" 5; }
16353 else
16354 ac_cv_sizeof_long_long=0
16359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
16360 $as_echo "$ac_cv_sizeof_long_long" >&6; }
16364 cat >>confdefs.h <<_ACEOF
16365 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
16366 _ACEOF
16370 # Determine memory alignment requirements for the basic C data types.
16372 # The cast to long int works around a bug in the HP C Compiler,
16373 # see AC_CHECK_SIZEOF for more information.
16374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16375 $as_echo_n "checking alignment of short... " >&6; }
16376 if ${ac_cv_alignof_short+:} false; then :
16377 $as_echo_n "(cached) " >&6
16378 else
16379 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
16380 #ifndef offsetof
16381 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16382 #endif
16383 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16385 else
16386 if test "$ac_cv_type_short" = yes; then
16387 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16388 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16389 as_fn_error 77 "cannot compute alignment of short
16390 See \`config.log' for more details" "$LINENO" 5; }
16391 else
16392 ac_cv_alignof_short=0
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16398 $as_echo "$ac_cv_alignof_short" >&6; }
16402 cat >>confdefs.h <<_ACEOF
16403 #define ALIGNOF_SHORT $ac_cv_alignof_short
16404 _ACEOF
16407 # The cast to long int works around a bug in the HP C Compiler,
16408 # see AC_CHECK_SIZEOF for more information.
16409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16410 $as_echo_n "checking alignment of int... " >&6; }
16411 if ${ac_cv_alignof_int+:} false; then :
16412 $as_echo_n "(cached) " >&6
16413 else
16414 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
16415 #ifndef offsetof
16416 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16417 #endif
16418 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16420 else
16421 if test "$ac_cv_type_int" = yes; then
16422 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16423 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16424 as_fn_error 77 "cannot compute alignment of int
16425 See \`config.log' for more details" "$LINENO" 5; }
16426 else
16427 ac_cv_alignof_int=0
16432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16433 $as_echo "$ac_cv_alignof_int" >&6; }
16437 cat >>confdefs.h <<_ACEOF
16438 #define ALIGNOF_INT $ac_cv_alignof_int
16439 _ACEOF
16442 # The cast to long int works around a bug in the HP C Compiler,
16443 # see AC_CHECK_SIZEOF for more information.
16444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16445 $as_echo_n "checking alignment of long... " >&6; }
16446 if ${ac_cv_alignof_long+:} false; then :
16447 $as_echo_n "(cached) " >&6
16448 else
16449 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
16450 #ifndef offsetof
16451 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16452 #endif
16453 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16455 else
16456 if test "$ac_cv_type_long" = yes; then
16457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16458 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16459 as_fn_error 77 "cannot compute alignment of long
16460 See \`config.log' for more details" "$LINENO" 5; }
16461 else
16462 ac_cv_alignof_long=0
16467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16468 $as_echo "$ac_cv_alignof_long" >&6; }
16472 cat >>confdefs.h <<_ACEOF
16473 #define ALIGNOF_LONG $ac_cv_alignof_long
16474 _ACEOF
16477 # The cast to long int works around a bug in the HP C Compiler,
16478 # see AC_CHECK_SIZEOF for more information.
16479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int64_t" >&5
16480 $as_echo_n "checking alignment of int64_t... " >&6; }
16481 if ${ac_cv_alignof_int64_t+:} false; then :
16482 $as_echo_n "(cached) " >&6
16483 else
16484 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int64_t" "$ac_includes_default
16485 #ifndef offsetof
16486 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16487 #endif
16488 typedef struct { char x; int64_t y; } ac__type_alignof_;"; then :
16490 else
16491 if test "$ac_cv_type_int64_t" = yes; then
16492 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16493 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16494 as_fn_error 77 "cannot compute alignment of int64_t
16495 See \`config.log' for more details" "$LINENO" 5; }
16496 else
16497 ac_cv_alignof_int64_t=0
16502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int64_t" >&5
16503 $as_echo "$ac_cv_alignof_int64_t" >&6; }
16507 cat >>confdefs.h <<_ACEOF
16508 #define ALIGNOF_INT64_T $ac_cv_alignof_int64_t
16509 _ACEOF
16512 # The cast to long int works around a bug in the HP C Compiler,
16513 # see AC_CHECK_SIZEOF for more information.
16514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16515 $as_echo_n "checking alignment of double... " >&6; }
16516 if ${ac_cv_alignof_double+:} false; then :
16517 $as_echo_n "(cached) " >&6
16518 else
16519 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
16520 #ifndef offsetof
16521 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16522 #endif
16523 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16525 else
16526 if test "$ac_cv_type_double" = yes; then
16527 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16528 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16529 as_fn_error 77 "cannot compute alignment of double
16530 See \`config.log' for more details" "$LINENO" 5; }
16531 else
16532 ac_cv_alignof_double=0
16537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16538 $as_echo "$ac_cv_alignof_double" >&6; }
16542 cat >>confdefs.h <<_ACEOF
16543 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16544 _ACEOF
16548 # Compute maximum alignment of any basic type.
16550 # We require 'double' to have the strictest alignment among the basic types,
16551 # because otherwise the C ABI might impose 8-byte alignment on some of the
16552 # other C types that correspond to TYPALIGN_DOUBLE SQL types. That could
16553 # cause a mismatch between the tuple layout and the C struct layout of a
16554 # catalog tuple. We used to carefully order catalog columns such that any
16555 # fixed-width, attalign=4 columns were at offsets divisible by 8 regardless
16556 # of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms
16557 # where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF.
16559 # We assume without checking that long's alignment is at least as strong as
16560 # char, short, or int. Note that we intentionally do not consider any types
16561 # wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
16562 # much of a penalty for disk and memory space.
16564 MAX_ALIGNOF=$ac_cv_alignof_double
16566 if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
16567 as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
16569 if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
16570 as_fn_error $? "alignment of 'int64_t' is greater than the alignment of 'double'" "$LINENO" 5
16573 cat >>confdefs.h <<_ACEOF
16574 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16575 _ACEOF
16578 # Some compilers offer a 128-bit integer scalar type.
16579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16580 $as_echo_n "checking for __int128... " >&6; }
16581 if ${pgac_cv__128bit_int+:} false; then :
16582 $as_echo_n "(cached) " >&6
16583 else
16584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16585 /* end confdefs.h. */
16588 * We don't actually run this test, just link it to verify that any support
16589 * functions needed for __int128 are present.
16591 * These are globals to discourage the compiler from folding all the
16592 * arithmetic tests down to compile-time constants. We do not have
16593 * convenient support for 128bit literals at this point...
16595 __int128 a = 48828125;
16596 __int128 b = 97656250;
16599 main ()
16602 __int128 c,d;
16603 a = (a << 12) + 1; /* 200000000001 */
16604 b = (b << 12) + 5; /* 400000000005 */
16605 /* try the most relevant arithmetic ops */
16606 c = a * b;
16607 d = (c + b) / b;
16608 /* must use the results, else compiler may optimize arithmetic away */
16609 if (d != a+1)
16610 return 1;
16613 return 0;
16615 _ACEOF
16616 if ac_fn_c_try_link "$LINENO"; then :
16617 pgac_cv__128bit_int=yes
16618 else
16619 pgac_cv__128bit_int=no
16621 rm -f core conftest.err conftest.$ac_objext \
16622 conftest$ac_exeext conftest.$ac_ext
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16625 $as_echo "$pgac_cv__128bit_int" >&6; }
16626 if test x"$pgac_cv__128bit_int" = xyes ; then
16627 # Use of non-default alignment with __int128 tickles bugs in some compilers.
16628 # If not cross-compiling, we can test for bugs and disable use of __int128
16629 # with buggy compilers. If cross-compiling, hope for the best.
16630 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16632 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16633 if ${pgac_cv__128bit_int_bug+:} false; then :
16634 $as_echo_n "(cached) " >&6
16635 else
16636 if test "$cross_compiling" = yes; then :
16637 pgac_cv__128bit_int_bug="assuming ok"
16638 else
16639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16640 /* end confdefs.h. */
16642 /* This must match the corresponding code in c.h: */
16643 #if defined(__GNUC__) || defined(__SUNPRO_C)
16644 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16645 #elif defined(_MSC_VER)
16646 #define pg_attribute_aligned(a) __declspec(align(a))
16647 #endif
16648 typedef __int128 int128a
16649 #if defined(pg_attribute_aligned)
16650 pg_attribute_aligned(8)
16651 #endif
16653 int128a holder;
16654 void pass_by_val(void *buffer, int128a par) { holder = par; }
16657 main ()
16660 long int i64 = 97656225L << 12;
16661 int128a q;
16662 pass_by_val(main, (int128a) i64);
16663 q = (int128a) i64;
16664 if (q != holder)
16665 return 1;
16668 return 0;
16670 _ACEOF
16671 if ac_fn_c_try_run "$LINENO"; then :
16672 pgac_cv__128bit_int_bug=ok
16673 else
16674 pgac_cv__128bit_int_bug=broken
16676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16677 conftest.$ac_objext conftest.beam conftest.$ac_ext
16681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16682 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16683 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
16685 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
16687 # The cast to long int works around a bug in the HP C Compiler,
16688 # see AC_CHECK_SIZEOF for more information.
16689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
16690 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
16691 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
16692 $as_echo_n "(cached) " >&6
16693 else
16694 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
16695 #ifndef offsetof
16696 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16697 #endif
16698 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
16700 else
16701 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
16702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16703 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16704 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
16705 See \`config.log' for more details" "$LINENO" 5; }
16706 else
16707 ac_cv_alignof_PG_INT128_TYPE=0
16712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
16713 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
16717 cat >>confdefs.h <<_ACEOF
16718 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
16719 _ACEOF
16725 # Check for various atomic operations now that we have checked how to declare
16726 # 64bit integers.
16727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
16728 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
16729 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
16730 $as_echo_n "(cached) " >&6
16731 else
16732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16733 /* end confdefs.h. */
16736 main ()
16738 char lock = 0;
16739 __sync_lock_test_and_set(&lock, 1);
16740 __sync_lock_release(&lock);
16742 return 0;
16744 _ACEOF
16745 if ac_fn_c_try_link "$LINENO"; then :
16746 pgac_cv_gcc_sync_char_tas="yes"
16747 else
16748 pgac_cv_gcc_sync_char_tas="no"
16750 rm -f core conftest.err conftest.$ac_objext \
16751 conftest$ac_exeext conftest.$ac_ext
16753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
16754 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
16755 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
16757 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
16760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
16761 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
16762 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
16763 $as_echo_n "(cached) " >&6
16764 else
16765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16766 /* end confdefs.h. */
16769 main ()
16771 int lock = 0;
16772 __sync_lock_test_and_set(&lock, 1);
16773 __sync_lock_release(&lock);
16775 return 0;
16777 _ACEOF
16778 if ac_fn_c_try_link "$LINENO"; then :
16779 pgac_cv_gcc_sync_int32_tas="yes"
16780 else
16781 pgac_cv_gcc_sync_int32_tas="no"
16783 rm -f core conftest.err conftest.$ac_objext \
16784 conftest$ac_exeext conftest.$ac_ext
16786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
16787 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
16788 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
16790 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
16793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
16794 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
16795 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
16796 $as_echo_n "(cached) " >&6
16797 else
16798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16799 /* end confdefs.h. */
16802 main ()
16804 int val = 0;
16805 __sync_val_compare_and_swap(&val, 0, 37);
16807 return 0;
16809 _ACEOF
16810 if ac_fn_c_try_link "$LINENO"; then :
16811 pgac_cv_gcc_sync_int32_cas="yes"
16812 else
16813 pgac_cv_gcc_sync_int32_cas="no"
16815 rm -f core conftest.err conftest.$ac_objext \
16816 conftest$ac_exeext conftest.$ac_ext
16818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
16819 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
16820 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
16822 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
16825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
16826 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
16827 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
16828 $as_echo_n "(cached) " >&6
16829 else
16830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16831 /* end confdefs.h. */
16832 #include <stdint.h>
16834 main ()
16836 int64_t lock = 0;
16837 __sync_val_compare_and_swap(&lock, 0, (int64_t) 37);
16839 return 0;
16841 _ACEOF
16842 if ac_fn_c_try_link "$LINENO"; then :
16843 pgac_cv_gcc_sync_int64_cas="yes"
16844 else
16845 pgac_cv_gcc_sync_int64_cas="no"
16847 rm -f core conftest.err conftest.$ac_objext \
16848 conftest$ac_exeext conftest.$ac_ext
16850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
16851 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
16852 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
16854 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
16857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
16858 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
16859 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
16860 $as_echo_n "(cached) " >&6
16861 else
16862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16863 /* end confdefs.h. */
16866 main ()
16868 int val = 0;
16869 int expect = 0;
16870 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
16872 return 0;
16874 _ACEOF
16875 if ac_fn_c_try_link "$LINENO"; then :
16876 pgac_cv_gcc_atomic_int32_cas="yes"
16877 else
16878 pgac_cv_gcc_atomic_int32_cas="no"
16880 rm -f core conftest.err conftest.$ac_objext \
16881 conftest$ac_exeext conftest.$ac_ext
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
16884 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
16885 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
16887 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
16890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
16891 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
16892 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
16893 $as_echo_n "(cached) " >&6
16894 else
16895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16896 /* end confdefs.h. */
16897 #include <stdint.h>
16899 main ()
16901 int64_t val = 0;
16902 int64_t expect = 0;
16903 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
16905 return 0;
16907 _ACEOF
16908 if ac_fn_c_try_link "$LINENO"; then :
16909 pgac_cv_gcc_atomic_int64_cas="yes"
16910 else
16911 pgac_cv_gcc_atomic_int64_cas="no"
16913 rm -f core conftest.err conftest.$ac_objext \
16914 conftest$ac_exeext conftest.$ac_ext
16916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
16917 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
16918 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
16920 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
16925 # Check for x86 cpuid instruction
16926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
16927 $as_echo_n "checking for __get_cpuid... " >&6; }
16928 if ${pgac_cv__get_cpuid+:} false; then :
16929 $as_echo_n "(cached) " >&6
16930 else
16931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16932 /* end confdefs.h. */
16933 #include <cpuid.h>
16935 main ()
16937 unsigned int exx[4] = {0, 0, 0, 0};
16938 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
16941 return 0;
16943 _ACEOF
16944 if ac_fn_c_try_link "$LINENO"; then :
16945 pgac_cv__get_cpuid="yes"
16946 else
16947 pgac_cv__get_cpuid="no"
16949 rm -f core conftest.err conftest.$ac_objext \
16950 conftest$ac_exeext conftest.$ac_ext
16952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
16953 $as_echo "$pgac_cv__get_cpuid" >&6; }
16954 if test x"$pgac_cv__get_cpuid" = x"yes"; then
16956 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
16960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid_count" >&5
16961 $as_echo_n "checking for __get_cpuid_count... " >&6; }
16962 if ${pgac_cv__get_cpuid_count+:} false; then :
16963 $as_echo_n "(cached) " >&6
16964 else
16965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16966 /* end confdefs.h. */
16967 #include <cpuid.h>
16969 main ()
16971 unsigned int exx[4] = {0, 0, 0, 0};
16972 __get_cpuid_count(7, 0, &exx[0], &exx[1], &exx[2], &exx[3]);
16975 return 0;
16977 _ACEOF
16978 if ac_fn_c_try_link "$LINENO"; then :
16979 pgac_cv__get_cpuid_count="yes"
16980 else
16981 pgac_cv__get_cpuid_count="no"
16983 rm -f core conftest.err conftest.$ac_objext \
16984 conftest$ac_exeext conftest.$ac_ext
16986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid_count" >&5
16987 $as_echo "$pgac_cv__get_cpuid_count" >&6; }
16988 if test x"$pgac_cv__get_cpuid_count" = x"yes"; then
16990 $as_echo "#define HAVE__GET_CPUID_COUNT 1" >>confdefs.h
16994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
16995 $as_echo_n "checking for __cpuid... " >&6; }
16996 if ${pgac_cv__cpuid+:} false; then :
16997 $as_echo_n "(cached) " >&6
16998 else
16999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17000 /* end confdefs.h. */
17001 #include <intrin.h>
17003 main ()
17005 unsigned int exx[4] = {0, 0, 0, 0};
17006 __get_cpuid(exx[0], 1);
17009 return 0;
17011 _ACEOF
17012 if ac_fn_c_try_link "$LINENO"; then :
17013 pgac_cv__cpuid="yes"
17014 else
17015 pgac_cv__cpuid="no"
17017 rm -f core conftest.err conftest.$ac_objext \
17018 conftest$ac_exeext conftest.$ac_ext
17020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17021 $as_echo "$pgac_cv__cpuid" >&6; }
17022 if test x"$pgac_cv__cpuid" = x"yes"; then
17024 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuidex" >&5
17029 $as_echo_n "checking for __cpuidex... " >&6; }
17030 if ${pgac_cv__cpuidex+:} false; then :
17031 $as_echo_n "(cached) " >&6
17032 else
17033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17034 /* end confdefs.h. */
17035 #include <intrin.h>
17037 main ()
17039 unsigned int exx[4] = {0, 0, 0, 0};
17040 __get_cpuidex(exx[0], 7, 0);
17043 return 0;
17045 _ACEOF
17046 if ac_fn_c_try_link "$LINENO"; then :
17047 pgac_cv__cpuidex="yes"
17048 else
17049 pgac_cv__cpuidex="no"
17051 rm -f core conftest.err conftest.$ac_objext \
17052 conftest$ac_exeext conftest.$ac_ext
17054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuidex" >&5
17055 $as_echo "$pgac_cv__cpuidex" >&6; }
17056 if test x"$pgac_cv__cpuidex" = x"yes"; then
17058 $as_echo "#define HAVE__CPUIDEX 1" >>confdefs.h
17062 # Check for XSAVE intrinsics
17064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xgetbv" >&5
17065 $as_echo_n "checking for _xgetbv... " >&6; }
17066 if ${pgac_cv_xsave_intrinsics+:} false; then :
17067 $as_echo_n "(cached) " >&6
17068 else
17069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17070 /* end confdefs.h. */
17071 #include <immintrin.h>
17072 #if defined(__has_attribute) && __has_attribute (target)
17073 __attribute__((target("xsave")))
17074 #endif
17075 static int xsave_test(void)
17077 return _xgetbv(0) & 0xe0;
17080 main ()
17082 return xsave_test();
17084 return 0;
17086 _ACEOF
17087 if ac_fn_c_try_link "$LINENO"; then :
17088 pgac_cv_xsave_intrinsics=yes
17089 else
17090 pgac_cv_xsave_intrinsics=no
17092 rm -f core conftest.err conftest.$ac_objext \
17093 conftest$ac_exeext conftest.$ac_ext
17095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_xsave_intrinsics" >&5
17096 $as_echo "$pgac_cv_xsave_intrinsics" >&6; }
17097 if test x"$pgac_cv_xsave_intrinsics" = x"yes"; then
17098 pgac_xsave_intrinsics=yes
17101 if test x"$pgac_xsave_intrinsics" = x"yes"; then
17103 $as_echo "#define HAVE_XSAVE_INTRINSICS 1" >>confdefs.h
17107 # Check for AVX-512 popcount intrinsics
17109 if test x"$host_cpu" = x"x86_64"; then
17110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_popcnt_epi64" >&5
17111 $as_echo_n "checking for _mm512_popcnt_epi64... " >&6; }
17112 if ${pgac_cv_avx512_popcnt_intrinsics+:} false; then :
17113 $as_echo_n "(cached) " >&6
17114 else
17115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17116 /* end confdefs.h. */
17117 #include <immintrin.h>
17118 #include <stdint.h>
17119 #if defined(__has_attribute) && __has_attribute (target)
17120 __attribute__((target("avx512vpopcntdq,avx512bw")))
17121 #endif
17122 static int popcount_test(void)
17124 const char buf[sizeof(__m512i)];
17125 int64_t popcnt = 0;
17126 __m512i accum = _mm512_setzero_si512();
17127 const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
17128 const __m512i cnt = _mm512_popcnt_epi64(val);
17129 accum = _mm512_add_epi64(accum, cnt);
17130 popcnt = _mm512_reduce_add_epi64(accum);
17131 return (int) popcnt;
17134 main ()
17136 return popcount_test();
17138 return 0;
17140 _ACEOF
17141 if ac_fn_c_try_link "$LINENO"; then :
17142 pgac_cv_avx512_popcnt_intrinsics=yes
17143 else
17144 pgac_cv_avx512_popcnt_intrinsics=no
17146 rm -f core conftest.err conftest.$ac_objext \
17147 conftest$ac_exeext conftest.$ac_ext
17149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_popcnt_intrinsics" >&5
17150 $as_echo "$pgac_cv_avx512_popcnt_intrinsics" >&6; }
17151 if test x"$pgac_cv_avx512_popcnt_intrinsics" = x"yes"; then
17152 pgac_avx512_popcnt_intrinsics=yes
17155 if test x"$pgac_avx512_popcnt_intrinsics" = x"yes"; then
17157 $as_echo "#define USE_AVX512_POPCNT_WITH_RUNTIME_CHECK 1" >>confdefs.h
17162 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32" >&5
17165 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32... " >&6; }
17166 if ${pgac_cv_sse42_crc32_intrinsics+:} false; then :
17167 $as_echo_n "(cached) " >&6
17168 else
17169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17170 /* end confdefs.h. */
17171 #include <nmmintrin.h>
17172 #if defined(__has_attribute) && __has_attribute (target)
17173 __attribute__((target("sse4.2")))
17174 #endif
17175 static int crc32_sse42_test(void)
17177 unsigned int crc = 0;
17178 crc = _mm_crc32_u8(crc, 0);
17179 crc = _mm_crc32_u32(crc, 0);
17180 /* return computed value, to prevent the above being optimized away */
17181 return crc == 0;
17184 main ()
17186 return crc32_sse42_test();
17188 return 0;
17190 _ACEOF
17191 if ac_fn_c_try_link "$LINENO"; then :
17192 pgac_cv_sse42_crc32_intrinsics=yes
17193 else
17194 pgac_cv_sse42_crc32_intrinsics=no
17196 rm -f core conftest.err conftest.$ac_objext \
17197 conftest$ac_exeext conftest.$ac_ext
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics" >&5
17200 $as_echo "$pgac_cv_sse42_crc32_intrinsics" >&6; }
17201 if test x"$pgac_cv_sse42_crc32_intrinsics" = x"yes"; then
17202 pgac_sse42_crc32_intrinsics=yes
17206 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17207 # define __SSE4_2__ in that case.
17208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17209 /* end confdefs.h. */
17212 main ()
17215 #ifndef __SSE4_2__
17216 #error __SSE4_2__ not defined
17217 #endif
17220 return 0;
17222 _ACEOF
17223 if ac_fn_c_try_compile "$LINENO"; then :
17224 SSE4_2_TARGETED=1
17226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17228 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17230 # First check if __crc32c* intrinsics can be used with the default compiler
17231 # flags. If not, check if adding "-march=armv8-a+crc+simd" flag helps.
17232 # On systems using soft-float ABI, "-march=armv8-a+crc" is required instead.
17233 # CFLAGS_CRC is set if the extra flag is required.
17234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17235 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17236 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17237 $as_echo_n "(cached) " >&6
17238 else
17239 pgac_save_CFLAGS=$CFLAGS
17240 CFLAGS="$pgac_save_CFLAGS "
17241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17242 /* end confdefs.h. */
17243 #include <arm_acle.h>
17245 main ()
17247 unsigned int crc = 0;
17248 crc = __crc32cb(crc, 0);
17249 crc = __crc32ch(crc, 0);
17250 crc = __crc32cw(crc, 0);
17251 crc = __crc32cd(crc, 0);
17252 /* return computed value, to prevent the above being optimized away */
17253 return crc == 0;
17255 return 0;
17257 _ACEOF
17258 if ac_fn_c_try_link "$LINENO"; then :
17259 pgac_cv_armv8_crc32c_intrinsics_=yes
17260 else
17261 pgac_cv_armv8_crc32c_intrinsics_=no
17263 rm -f core conftest.err conftest.$ac_objext \
17264 conftest$ac_exeext conftest.$ac_ext
17265 CFLAGS="$pgac_save_CFLAGS"
17267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17268 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17269 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17270 CFLAGS_CRC=""
17271 pgac_armv8_crc32c_intrinsics=yes
17274 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc+simd" >&5
17276 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc+simd... " >&6; }
17277 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd+:} false; then :
17278 $as_echo_n "(cached) " >&6
17279 else
17280 pgac_save_CFLAGS=$CFLAGS
17281 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc+simd"
17282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17283 /* end confdefs.h. */
17284 #include <arm_acle.h>
17286 main ()
17288 unsigned int crc = 0;
17289 crc = __crc32cb(crc, 0);
17290 crc = __crc32ch(crc, 0);
17291 crc = __crc32cw(crc, 0);
17292 crc = __crc32cd(crc, 0);
17293 /* return computed value, to prevent the above being optimized away */
17294 return crc == 0;
17296 return 0;
17298 _ACEOF
17299 if ac_fn_c_try_link "$LINENO"; then :
17300 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd=yes
17301 else
17302 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd=no
17304 rm -f core conftest.err conftest.$ac_objext \
17305 conftest$ac_exeext conftest.$ac_ext
17306 CFLAGS="$pgac_save_CFLAGS"
17308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd" >&5
17309 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd" >&6; }
17310 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd" = x"yes"; then
17311 CFLAGS_CRC="-march=armv8-a+crc+simd"
17312 pgac_armv8_crc32c_intrinsics=yes
17315 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17317 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17318 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17319 $as_echo_n "(cached) " >&6
17320 else
17321 pgac_save_CFLAGS=$CFLAGS
17322 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17324 /* end confdefs.h. */
17325 #include <arm_acle.h>
17327 main ()
17329 unsigned int crc = 0;
17330 crc = __crc32cb(crc, 0);
17331 crc = __crc32ch(crc, 0);
17332 crc = __crc32cw(crc, 0);
17333 crc = __crc32cd(crc, 0);
17334 /* return computed value, to prevent the above being optimized away */
17335 return crc == 0;
17337 return 0;
17339 _ACEOF
17340 if ac_fn_c_try_link "$LINENO"; then :
17341 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17342 else
17343 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17345 rm -f core conftest.err conftest.$ac_objext \
17346 conftest$ac_exeext conftest.$ac_ext
17347 CFLAGS="$pgac_save_CFLAGS"
17349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17350 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17351 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17352 CFLAGS_CRC="-march=armv8-a+crc"
17353 pgac_armv8_crc32c_intrinsics=yes
17359 # Check for LoongArch CRC intrinsics to do CRC calculations.
17361 # Check if __builtin_loongarch_crcc_* intrinsics can be used
17362 # with the default compiler flags.
17363 { $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
17364 $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; }
17365 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
17366 $as_echo_n "(cached) " >&6
17367 else
17368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17369 /* end confdefs.h. */
17372 main ()
17374 unsigned int crc = 0;
17375 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
17376 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
17377 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
17378 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
17379 /* return computed value, to prevent the above being optimized away */
17380 return crc == 0;
17382 return 0;
17384 _ACEOF
17385 if ac_fn_c_try_link "$LINENO"; then :
17386 pgac_cv_loongarch_crc32c_intrinsics=yes
17387 else
17388 pgac_cv_loongarch_crc32c_intrinsics=no
17390 rm -f core conftest.err conftest.$ac_objext \
17391 conftest$ac_exeext conftest.$ac_ext
17393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_loongarch_crc32c_intrinsics" >&5
17394 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
17395 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
17396 pgac_loongarch_crc32c_intrinsics=yes
17402 # Select CRC-32C implementation.
17404 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17405 # use the special CRC instructions for calculating CRC-32C. If we're not
17406 # targeting such a processor, but we can nevertheless produce code that uses
17407 # the SSE intrinsics, compile both implementations and select which one to use
17408 # at runtime, depending on whether SSE 4.2 is supported by the processor we're
17409 # running on.
17411 # Similarly, if we are targeting an ARM processor that has the CRC
17412 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17413 # we're not targeting such a processor, but can nevertheless produce code that
17414 # uses the CRC instructions, compile both, and select at runtime.
17416 # Note that we do not use __attribute__((target("..."))) for the ARM CRC
17417 # instructions because until clang 16, using the ARM intrinsics still requires
17418 # special -march flags. Perhaps we can re-evaluate this decision after some
17419 # time has passed.
17421 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
17422 # in the template or configure command line.
17424 # If we are targeting a LoongArch processor, CRC instructions are
17425 # always available (at least on 64 bit), so no runtime check is needed.
17426 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
17427 # Use Intel SSE 4.2 if available.
17428 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17429 USE_SSE42_CRC32C=1
17430 else
17431 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17432 # the runtime check.
17433 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
17434 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17435 else
17436 # Use ARM CRC Extension if available.
17437 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
17438 USE_ARMV8_CRC32C=1
17439 else
17440 # ARM CRC Extension, with runtime check?
17441 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17442 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17443 else
17444 # LoongArch CRCC instructions.
17445 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
17446 USE_LOONGARCH_CRC32C=1
17447 else
17448 # fall back to slicing-by-8 algorithm, which doesn't require any
17449 # special CPU support.
17450 USE_SLICING_BY_8_CRC32C=1
17458 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17460 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17461 if test x"$USE_SSE42_CRC32C" = x"1"; then
17463 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17465 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17467 $as_echo "SSE 4.2" >&6; }
17468 else
17469 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17471 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17473 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17475 $as_echo "SSE 4.2 with runtime check" >&6; }
17476 else
17477 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17479 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17481 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17483 $as_echo "ARMv8 CRC instructions" >&6; }
17484 else
17485 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17487 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17489 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17491 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17492 else
17493 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
17495 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
17497 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
17498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
17499 $as_echo "LoongArch CRCC instructions" >&6; }
17500 else
17502 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17504 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17506 $as_echo "slicing-by-8" >&6; }
17515 # Select semaphore implementation type.
17516 if test "$PORTNAME" != "win32"; then
17517 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17518 # Need sem_open for this
17519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17520 $as_echo_n "checking for library containing sem_open... " >&6; }
17521 if ${ac_cv_search_sem_open+:} false; then :
17522 $as_echo_n "(cached) " >&6
17523 else
17524 ac_func_search_save_LIBS=$LIBS
17525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17526 /* end confdefs.h. */
17528 /* Override any GCC internal prototype to avoid an error.
17529 Use char because int might match the return type of a GCC
17530 builtin and then its argument prototype would still apply. */
17531 #ifdef __cplusplus
17532 extern "C"
17533 #endif
17534 char sem_open ();
17536 main ()
17538 return sem_open ();
17540 return 0;
17542 _ACEOF
17543 for ac_lib in '' rt pthread; do
17544 if test -z "$ac_lib"; then
17545 ac_res="none required"
17546 else
17547 ac_res=-l$ac_lib
17548 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17550 if ac_fn_c_try_link "$LINENO"; then :
17551 ac_cv_search_sem_open=$ac_res
17553 rm -f core conftest.err conftest.$ac_objext \
17554 conftest$ac_exeext
17555 if ${ac_cv_search_sem_open+:} false; then :
17556 break
17558 done
17559 if ${ac_cv_search_sem_open+:} false; then :
17561 else
17562 ac_cv_search_sem_open=no
17564 rm conftest.$ac_ext
17565 LIBS=$ac_func_search_save_LIBS
17567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17568 $as_echo "$ac_cv_search_sem_open" >&6; }
17569 ac_res=$ac_cv_search_sem_open
17570 if test "$ac_res" != no; then :
17571 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17572 USE_NAMED_POSIX_SEMAPHORES=1
17576 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17577 # Need sem_init for this
17578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17579 $as_echo_n "checking for library containing sem_init... " >&6; }
17580 if ${ac_cv_search_sem_init+:} false; then :
17581 $as_echo_n "(cached) " >&6
17582 else
17583 ac_func_search_save_LIBS=$LIBS
17584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17585 /* end confdefs.h. */
17587 /* Override any GCC internal prototype to avoid an error.
17588 Use char because int might match the return type of a GCC
17589 builtin and then its argument prototype would still apply. */
17590 #ifdef __cplusplus
17591 extern "C"
17592 #endif
17593 char sem_init ();
17595 main ()
17597 return sem_init ();
17599 return 0;
17601 _ACEOF
17602 for ac_lib in '' rt pthread; do
17603 if test -z "$ac_lib"; then
17604 ac_res="none required"
17605 else
17606 ac_res=-l$ac_lib
17607 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17609 if ac_fn_c_try_link "$LINENO"; then :
17610 ac_cv_search_sem_init=$ac_res
17612 rm -f core conftest.err conftest.$ac_objext \
17613 conftest$ac_exeext
17614 if ${ac_cv_search_sem_init+:} false; then :
17615 break
17617 done
17618 if ${ac_cv_search_sem_init+:} false; then :
17620 else
17621 ac_cv_search_sem_init=no
17623 rm conftest.$ac_ext
17624 LIBS=$ac_func_search_save_LIBS
17626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17627 $as_echo "$ac_cv_search_sem_init" >&6; }
17628 ac_res=$ac_cv_search_sem_init
17629 if test "$ac_res" != no; then :
17630 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17631 USE_UNNAMED_POSIX_SEMAPHORES=1
17635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17636 $as_echo_n "checking which semaphore API to use... " >&6; }
17637 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17639 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17641 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17642 sematype="named POSIX"
17643 else
17644 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17646 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17648 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17649 sematype="unnamed POSIX"
17650 else
17652 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17654 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17655 sematype="System V"
17658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17659 $as_echo "$sematype" >&6; }
17660 else
17662 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17664 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17668 # Select shared-memory implementation type.
17669 if test "$PORTNAME" != "win32"; then
17671 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17673 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17674 else
17676 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17678 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17681 # Select random number source. If a TLS library is used then it will be the
17682 # first choice, else the native platform sources (Windows API or /dev/urandom)
17683 # will be used.
17684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17685 $as_echo_n "checking which random number source to use... " >&6; }
17686 if test x"$with_ssl" = x"openssl" ; then
17687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17688 $as_echo "OpenSSL" >&6; }
17689 elif test x"$PORTNAME" = x"win32" ; then
17690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17691 $as_echo "Windows native" >&6; }
17692 elif test x"$cross_compiling" = x"yes"; then
17693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
17694 $as_echo "assuming /dev/urandom" >&6; }
17695 else
17696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17697 $as_echo "/dev/urandom" >&6; }
17698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17699 $as_echo_n "checking for /dev/urandom... " >&6; }
17700 if ${ac_cv_file__dev_urandom+:} false; then :
17701 $as_echo_n "(cached) " >&6
17702 else
17703 test "$cross_compiling" = yes &&
17704 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17705 if test -r "/dev/urandom"; then
17706 ac_cv_file__dev_urandom=yes
17707 else
17708 ac_cv_file__dev_urandom=no
17711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17712 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17713 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17718 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
17719 as_fn_error $? "
17720 no source of strong random numbers was found
17721 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
17725 # If not set in template file, set bytes to use libc memset()
17726 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17727 MEMSET_LOOP_LIMIT=1024
17730 cat >>confdefs.h <<_ACEOF
17731 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17732 _ACEOF
17736 if test "$enable_nls" = yes ; then
17738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17739 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17740 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17741 $as_echo_n "(cached) " >&6
17742 else
17743 ac_func_search_save_LIBS=$LIBS
17744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17745 /* end confdefs.h. */
17747 /* Override any GCC internal prototype to avoid an error.
17748 Use char because int might match the return type of a GCC
17749 builtin and then its argument prototype would still apply. */
17750 #ifdef __cplusplus
17751 extern "C"
17752 #endif
17753 char bind_textdomain_codeset ();
17755 main ()
17757 return bind_textdomain_codeset ();
17759 return 0;
17761 _ACEOF
17762 for ac_lib in '' intl; do
17763 if test -z "$ac_lib"; then
17764 ac_res="none required"
17765 else
17766 ac_res=-l$ac_lib
17767 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17769 if ac_fn_c_try_link "$LINENO"; then :
17770 ac_cv_search_bind_textdomain_codeset=$ac_res
17772 rm -f core conftest.err conftest.$ac_objext \
17773 conftest$ac_exeext
17774 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17775 break
17777 done
17778 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17780 else
17781 ac_cv_search_bind_textdomain_codeset=no
17783 rm conftest.$ac_ext
17784 LIBS=$ac_func_search_save_LIBS
17786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17787 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17788 ac_res=$ac_cv_search_bind_textdomain_codeset
17789 if test "$ac_res" != no; then :
17790 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17792 else
17793 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17796 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17797 if test "x$ac_cv_header_libintl_h" = xyes; then :
17799 else
17800 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
17804 if test -z "$MSGFMT"; then
17805 for ac_prog in msgfmt
17807 # Extract the first word of "$ac_prog", so it can be a program name with args.
17808 set dummy $ac_prog; ac_word=$2
17809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17810 $as_echo_n "checking for $ac_word... " >&6; }
17811 if ${ac_cv_path_MSGFMT+:} false; then :
17812 $as_echo_n "(cached) " >&6
17813 else
17814 case $MSGFMT in
17815 [\\/]* | ?:[\\/]*)
17816 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
17819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17820 for as_dir in $PATH
17822 IFS=$as_save_IFS
17823 test -z "$as_dir" && as_dir=.
17824 for ac_exec_ext in '' $ac_executable_extensions; do
17825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17826 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
17827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17828 break 2
17830 done
17831 done
17832 IFS=$as_save_IFS
17835 esac
17837 MSGFMT=$ac_cv_path_MSGFMT
17838 if test -n "$MSGFMT"; then
17839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17840 $as_echo "$MSGFMT" >&6; }
17841 else
17842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17843 $as_echo "no" >&6; }
17847 test -n "$MSGFMT" && break
17848 done
17850 else
17851 # Report the value of MSGFMT in configure's output in all cases.
17852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
17853 $as_echo_n "checking for MSGFMT... " >&6; }
17854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17855 $as_echo "$MSGFMT" >&6; }
17858 if test -z "$MSGFMT"; then
17859 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
17861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
17862 $as_echo_n "checking for msgfmt flags... " >&6; }
17863 if ${pgac_cv_msgfmt_flags+:} false; then :
17864 $as_echo_n "(cached) " >&6
17865 else
17866 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
17867 pgac_cv_msgfmt_flags=-c
17870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
17871 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
17872 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
17874 if test -z "$MSGMERGE"; then
17875 for ac_prog in msgmerge
17877 # Extract the first word of "$ac_prog", so it can be a program name with args.
17878 set dummy $ac_prog; ac_word=$2
17879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17880 $as_echo_n "checking for $ac_word... " >&6; }
17881 if ${ac_cv_path_MSGMERGE+:} false; then :
17882 $as_echo_n "(cached) " >&6
17883 else
17884 case $MSGMERGE in
17885 [\\/]* | ?:[\\/]*)
17886 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
17889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17890 for as_dir in $PATH
17892 IFS=$as_save_IFS
17893 test -z "$as_dir" && as_dir=.
17894 for ac_exec_ext in '' $ac_executable_extensions; do
17895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17896 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
17897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17898 break 2
17900 done
17901 done
17902 IFS=$as_save_IFS
17905 esac
17907 MSGMERGE=$ac_cv_path_MSGMERGE
17908 if test -n "$MSGMERGE"; then
17909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17910 $as_echo "$MSGMERGE" >&6; }
17911 else
17912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17913 $as_echo "no" >&6; }
17917 test -n "$MSGMERGE" && break
17918 done
17920 else
17921 # Report the value of MSGMERGE in configure's output in all cases.
17922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
17923 $as_echo_n "checking for MSGMERGE... " >&6; }
17924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17925 $as_echo "$MSGMERGE" >&6; }
17928 if test -z "$XGETTEXT"; then
17929 for ac_prog in xgettext
17931 # Extract the first word of "$ac_prog", so it can be a program name with args.
17932 set dummy $ac_prog; ac_word=$2
17933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17934 $as_echo_n "checking for $ac_word... " >&6; }
17935 if ${ac_cv_path_XGETTEXT+:} false; then :
17936 $as_echo_n "(cached) " >&6
17937 else
17938 case $XGETTEXT in
17939 [\\/]* | ?:[\\/]*)
17940 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
17943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17944 for as_dir in $PATH
17946 IFS=$as_save_IFS
17947 test -z "$as_dir" && as_dir=.
17948 for ac_exec_ext in '' $ac_executable_extensions; do
17949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17950 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
17951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17952 break 2
17954 done
17955 done
17956 IFS=$as_save_IFS
17959 esac
17961 XGETTEXT=$ac_cv_path_XGETTEXT
17962 if test -n "$XGETTEXT"; then
17963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
17964 $as_echo "$XGETTEXT" >&6; }
17965 else
17966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17967 $as_echo "no" >&6; }
17971 test -n "$XGETTEXT" && break
17972 done
17974 else
17975 # Report the value of XGETTEXT in configure's output in all cases.
17976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
17977 $as_echo_n "checking for XGETTEXT... " >&6; }
17978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
17979 $as_echo "$XGETTEXT" >&6; }
17985 # Check for Tcl configuration script tclConfig.sh
17986 if test "$with_tcl" = yes; then
17987 if test -z "$TCLSH"; then
17988 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
17990 # Extract the first word of "$ac_prog", so it can be a program name with args.
17991 set dummy $ac_prog; ac_word=$2
17992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17993 $as_echo_n "checking for $ac_word... " >&6; }
17994 if ${ac_cv_path_TCLSH+:} false; then :
17995 $as_echo_n "(cached) " >&6
17996 else
17997 case $TCLSH in
17998 [\\/]* | ?:[\\/]*)
17999 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18003 for as_dir in $PATH
18005 IFS=$as_save_IFS
18006 test -z "$as_dir" && as_dir=.
18007 for ac_exec_ext in '' $ac_executable_extensions; do
18008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18009 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18011 break 2
18013 done
18014 done
18015 IFS=$as_save_IFS
18018 esac
18020 TCLSH=$ac_cv_path_TCLSH
18021 if test -n "$TCLSH"; then
18022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18023 $as_echo "$TCLSH" >&6; }
18024 else
18025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18026 $as_echo "no" >&6; }
18030 test -n "$TCLSH" && break
18031 done
18033 else
18034 # Report the value of TCLSH in configure's output in all cases.
18035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18036 $as_echo_n "checking for TCLSH... " >&6; }
18037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18038 $as_echo "$TCLSH" >&6; }
18041 if test x"$TCLSH" = x""; then
18042 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18046 $as_echo_n "checking for tclConfig.sh... " >&6; }
18047 # Let user override test
18048 if test -z "$TCL_CONFIG_SH"; then
18049 pgac_test_dirs="$with_tclconfig"
18051 set X $pgac_test_dirs; shift
18052 if test $# -eq 0; then
18053 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18054 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18055 # On newer macOS, $auto_path frequently doesn't include the place
18056 # where tclConfig.sh actually lives. Append that to the end, so as not
18057 # to break cases where a non-default Tcl installation is being used.
18058 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18059 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18061 set X $pgac_test_dirs; shift
18064 for pgac_dir do
18065 if test -r "$pgac_dir/tclConfig.sh"; then
18066 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18067 break
18069 done
18072 if test -z "$TCL_CONFIG_SH"; then
18073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18074 $as_echo "no" >&6; }
18075 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18076 else
18077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18078 $as_echo "$TCL_CONFIG_SH" >&6; }
18083 . "$TCL_CONFIG_SH"
18084 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18085 eval TCL_LIBS=\"$TCL_LIBS\"
18086 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18087 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18089 if test "$TCL_SHARED_BUILD" != 1; then
18090 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18091 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18093 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18094 ac_save_CPPFLAGS=$CPPFLAGS
18095 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18096 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18097 if test "x$ac_cv_header_tcl_h" = xyes; then :
18099 else
18100 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18104 CPPFLAGS=$ac_save_CPPFLAGS
18107 # check for <perl.h>
18108 if test "$with_perl" = yes; then
18109 ac_save_CPPFLAGS=$CPPFLAGS
18110 CPPFLAGS="$CPPFLAGS $perl_includespec"
18111 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18113 if test "x$ac_cv_header_perl_h" = xyes; then :
18115 else
18116 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18120 # While we're at it, check that we can link to libperl.
18121 # On most platforms, if perl.h is there then libperl.so will be too, but at
18122 # this writing Debian packages them separately. There is no known reason to
18123 # waste cycles on separate probes for the Tcl or Python libraries, though.
18124 # On some Red Hat platforms, the link attempt can fail if we don't use
18125 # CFLAGS_SL while building the test program.
18126 ac_save_CFLAGS=$CFLAGS
18127 CFLAGS="$CFLAGS $CFLAGS_SL"
18128 pgac_save_LIBS=$LIBS
18129 LIBS="$perl_embed_ldflags"
18130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18131 $as_echo_n "checking for libperl... " >&6; }
18132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18133 /* end confdefs.h. */
18135 #include <EXTERN.h>
18136 #include <perl.h>
18139 main ()
18141 perl_alloc();
18143 return 0;
18145 _ACEOF
18146 if ac_fn_c_try_link "$LINENO"; then :
18147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18148 $as_echo "yes" >&6; }
18149 else
18150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18151 $as_echo "no" >&6; }
18152 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18154 rm -f core conftest.err conftest.$ac_objext \
18155 conftest$ac_exeext conftest.$ac_ext
18156 LIBS=$pgac_save_LIBS
18157 CFLAGS=$ac_save_CFLAGS
18158 CPPFLAGS=$ac_save_CPPFLAGS
18161 # check for <Python.h>
18162 if test "$with_python" = yes; then
18163 ac_save_CPPFLAGS=$CPPFLAGS
18164 CPPFLAGS="$python_includespec $CPPFLAGS"
18165 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18166 if test "x$ac_cv_header_Python_h" = xyes; then :
18168 else
18169 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18173 CPPFLAGS=$ac_save_CPPFLAGS
18177 # Check for documentation-building tools
18179 if test -z "$XMLLINT"; then
18180 for ac_prog in xmllint
18182 # Extract the first word of "$ac_prog", so it can be a program name with args.
18183 set dummy $ac_prog; ac_word=$2
18184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18185 $as_echo_n "checking for $ac_word... " >&6; }
18186 if ${ac_cv_path_XMLLINT+:} false; then :
18187 $as_echo_n "(cached) " >&6
18188 else
18189 case $XMLLINT in
18190 [\\/]* | ?:[\\/]*)
18191 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18194 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18195 for as_dir in $PATH
18197 IFS=$as_save_IFS
18198 test -z "$as_dir" && as_dir=.
18199 for ac_exec_ext in '' $ac_executable_extensions; do
18200 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18201 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18202 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18203 break 2
18205 done
18206 done
18207 IFS=$as_save_IFS
18210 esac
18212 XMLLINT=$ac_cv_path_XMLLINT
18213 if test -n "$XMLLINT"; then
18214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18215 $as_echo "$XMLLINT" >&6; }
18216 else
18217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18218 $as_echo "no" >&6; }
18222 test -n "$XMLLINT" && break
18223 done
18225 else
18226 # Report the value of XMLLINT in configure's output in all cases.
18227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18228 $as_echo_n "checking for XMLLINT... " >&6; }
18229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18230 $as_echo "$XMLLINT" >&6; }
18233 if test -z "$XSLTPROC"; then
18234 for ac_prog in xsltproc
18236 # Extract the first word of "$ac_prog", so it can be a program name with args.
18237 set dummy $ac_prog; ac_word=$2
18238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18239 $as_echo_n "checking for $ac_word... " >&6; }
18240 if ${ac_cv_path_XSLTPROC+:} false; then :
18241 $as_echo_n "(cached) " >&6
18242 else
18243 case $XSLTPROC in
18244 [\\/]* | ?:[\\/]*)
18245 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18249 for as_dir in $PATH
18251 IFS=$as_save_IFS
18252 test -z "$as_dir" && as_dir=.
18253 for ac_exec_ext in '' $ac_executable_extensions; do
18254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18255 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18257 break 2
18259 done
18260 done
18261 IFS=$as_save_IFS
18264 esac
18266 XSLTPROC=$ac_cv_path_XSLTPROC
18267 if test -n "$XSLTPROC"; then
18268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18269 $as_echo "$XSLTPROC" >&6; }
18270 else
18271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18272 $as_echo "no" >&6; }
18276 test -n "$XSLTPROC" && break
18277 done
18279 else
18280 # Report the value of XSLTPROC in configure's output in all cases.
18281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18282 $as_echo_n "checking for XSLTPROC... " >&6; }
18283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18284 $as_echo "$XSLTPROC" >&6; }
18287 if test -z "$FOP"; then
18288 for ac_prog in fop
18290 # Extract the first word of "$ac_prog", so it can be a program name with args.
18291 set dummy $ac_prog; ac_word=$2
18292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18293 $as_echo_n "checking for $ac_word... " >&6; }
18294 if ${ac_cv_path_FOP+:} false; then :
18295 $as_echo_n "(cached) " >&6
18296 else
18297 case $FOP in
18298 [\\/]* | ?:[\\/]*)
18299 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18303 for as_dir in $PATH
18305 IFS=$as_save_IFS
18306 test -z "$as_dir" && as_dir=.
18307 for ac_exec_ext in '' $ac_executable_extensions; do
18308 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18309 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18310 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18311 break 2
18313 done
18314 done
18315 IFS=$as_save_IFS
18318 esac
18320 FOP=$ac_cv_path_FOP
18321 if test -n "$FOP"; then
18322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18323 $as_echo "$FOP" >&6; }
18324 else
18325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18326 $as_echo "no" >&6; }
18330 test -n "$FOP" && break
18331 done
18333 else
18334 # Report the value of FOP in configure's output in all cases.
18335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18336 $as_echo_n "checking for FOP... " >&6; }
18337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18338 $as_echo "$FOP" >&6; }
18341 if test -z "$DBTOEPUB"; then
18342 for ac_prog in dbtoepub
18344 # Extract the first word of "$ac_prog", so it can be a program name with args.
18345 set dummy $ac_prog; ac_word=$2
18346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18347 $as_echo_n "checking for $ac_word... " >&6; }
18348 if ${ac_cv_path_DBTOEPUB+:} false; then :
18349 $as_echo_n "(cached) " >&6
18350 else
18351 case $DBTOEPUB in
18352 [\\/]* | ?:[\\/]*)
18353 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18357 for as_dir in $PATH
18359 IFS=$as_save_IFS
18360 test -z "$as_dir" && as_dir=.
18361 for ac_exec_ext in '' $ac_executable_extensions; do
18362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18363 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18365 break 2
18367 done
18368 done
18369 IFS=$as_save_IFS
18372 esac
18374 DBTOEPUB=$ac_cv_path_DBTOEPUB
18375 if test -n "$DBTOEPUB"; then
18376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18377 $as_echo "$DBTOEPUB" >&6; }
18378 else
18379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18380 $as_echo "no" >&6; }
18384 test -n "$DBTOEPUB" && break
18385 done
18387 else
18388 # Report the value of DBTOEPUB in configure's output in all cases.
18389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18390 $as_echo_n "checking for DBTOEPUB... " >&6; }
18391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18392 $as_echo "$DBTOEPUB" >&6; }
18397 # Check for test tools
18399 if test "$enable_tap_tests" = yes; then
18400 # Make sure we know where prove is.
18401 if test -z "$PROVE"; then
18402 for ac_prog in prove
18404 # Extract the first word of "$ac_prog", so it can be a program name with args.
18405 set dummy $ac_prog; ac_word=$2
18406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18407 $as_echo_n "checking for $ac_word... " >&6; }
18408 if ${ac_cv_path_PROVE+:} false; then :
18409 $as_echo_n "(cached) " >&6
18410 else
18411 case $PROVE in
18412 [\\/]* | ?:[\\/]*)
18413 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18417 for as_dir in $PATH
18419 IFS=$as_save_IFS
18420 test -z "$as_dir" && as_dir=.
18421 for ac_exec_ext in '' $ac_executable_extensions; do
18422 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18423 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18424 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18425 break 2
18427 done
18428 done
18429 IFS=$as_save_IFS
18432 esac
18434 PROVE=$ac_cv_path_PROVE
18435 if test -n "$PROVE"; then
18436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18437 $as_echo "$PROVE" >&6; }
18438 else
18439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18440 $as_echo "no" >&6; }
18444 test -n "$PROVE" && break
18445 done
18447 else
18448 # Report the value of PROVE in configure's output in all cases.
18449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18450 $as_echo_n "checking for PROVE... " >&6; }
18451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18452 $as_echo "$PROVE" >&6; }
18455 if test -z "$PROVE"; then
18456 as_fn_error $? "prove not found" "$LINENO" 5
18458 # Check for necessary Perl modules. You might think we should use
18459 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
18460 # installation than perl, eg on MSys, so we have to check using prove.
18461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
18462 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
18463 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
18464 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
18465 if test $? -eq 0; then
18466 # log the module version details, but don't show them interactively
18467 echo "$modulestderr" >&5
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18469 $as_echo "yes" >&6; }
18470 else
18471 # on failure, though, show the results to the user
18472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
18473 $as_echo "$modulestderr" >&6; }
18474 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18478 # If compiler will take -Wl,--as-needed (or various platform-specific
18479 # spellings thereof) then add that to LDFLAGS. This is much easier than
18480 # trying to filter LIBS to the minimum for each executable.
18481 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18482 # libreadline; therefore we postpone testing it until we know what library
18483 # dependencies readline has. The test code will try to link with $LIBS.
18484 if test "$with_readline" = yes; then
18485 link_test_func=readline
18486 else
18487 link_test_func=exit
18490 if test "$PORTNAME" = "darwin"; then
18491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
18492 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
18493 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
18494 $as_echo_n "(cached) " >&6
18495 else
18496 pgac_save_LDFLAGS=$LDFLAGS
18497 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18498 if test "$cross_compiling" = yes; then :
18499 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
18500 else
18501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18502 /* end confdefs.h. */
18503 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18505 main ()
18509 return 0;
18511 _ACEOF
18512 if ac_fn_c_try_run "$LINENO"; then :
18513 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
18514 else
18515 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
18517 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18518 conftest.$ac_objext conftest.beam conftest.$ac_ext
18521 LDFLAGS="$pgac_save_LDFLAGS"
18523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
18524 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
18525 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
18526 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
18530 elif test "$PORTNAME" = "openbsd"; then
18531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
18532 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
18533 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
18534 $as_echo_n "(cached) " >&6
18535 else
18536 pgac_save_LDFLAGS=$LDFLAGS
18537 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18538 if test "$cross_compiling" = yes; then :
18539 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
18540 else
18541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18542 /* end confdefs.h. */
18543 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18545 main ()
18549 return 0;
18551 _ACEOF
18552 if ac_fn_c_try_run "$LINENO"; then :
18553 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
18554 else
18555 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
18557 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18558 conftest.$ac_objext conftest.beam conftest.$ac_ext
18561 LDFLAGS="$pgac_save_LDFLAGS"
18563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
18564 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
18565 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
18566 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
18570 else
18571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
18572 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
18573 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
18574 $as_echo_n "(cached) " >&6
18575 else
18576 pgac_save_LDFLAGS=$LDFLAGS
18577 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18578 if test "$cross_compiling" = yes; then :
18579 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
18580 else
18581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18582 /* end confdefs.h. */
18583 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18585 main ()
18589 return 0;
18591 _ACEOF
18592 if ac_fn_c_try_run "$LINENO"; then :
18593 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
18594 else
18595 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
18597 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18598 conftest.$ac_objext conftest.beam conftest.$ac_ext
18601 LDFLAGS="$pgac_save_LDFLAGS"
18603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
18604 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
18605 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
18606 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
18612 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
18613 # (backend specific ldflags). One some platforms this will always fail (e.g.,
18614 # windows), but on others it depends on the choice of linker (e.g., solaris).
18615 # macOS uses -export_dynamic instead. (On macOS, the option is only
18616 # needed when also using -flto, but we add it anyway since it's
18617 # harmless.)
18618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
18619 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
18620 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
18621 $as_echo_n "(cached) " >&6
18622 else
18623 pgac_save_LDFLAGS=$LDFLAGS
18624 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
18625 if test "$cross_compiling" = yes; then :
18626 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
18627 else
18628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18629 /* end confdefs.h. */
18630 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18632 main ()
18636 return 0;
18638 _ACEOF
18639 if ac_fn_c_try_run "$LINENO"; then :
18640 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
18641 else
18642 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
18644 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18645 conftest.$ac_objext conftest.beam conftest.$ac_ext
18648 LDFLAGS="$pgac_save_LDFLAGS"
18650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
18651 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
18652 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
18653 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
18656 if test x"$LDFLAGS_EX_BE" = x""; then
18657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE" >&5
18658 $as_echo_n "checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE... " >&6; }
18659 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic+:} false; then :
18660 $as_echo_n "(cached) " >&6
18661 else
18662 pgac_save_LDFLAGS=$LDFLAGS
18663 LDFLAGS="$pgac_save_LDFLAGS -Wl,-export_dynamic"
18664 if test "$cross_compiling" = yes; then :
18665 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic="assuming no"
18666 else
18667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18668 /* end confdefs.h. */
18669 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18671 main ()
18675 return 0;
18677 _ACEOF
18678 if ac_fn_c_try_run "$LINENO"; then :
18679 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=yes
18680 else
18681 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=no
18683 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18684 conftest.$ac_objext conftest.beam conftest.$ac_ext
18687 LDFLAGS="$pgac_save_LDFLAGS"
18689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&5
18690 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&6; }
18691 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" = x"yes"; then
18692 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,-export_dynamic"
18698 # Create compiler version string
18699 if test x"$GCC" = x"yes" ; then
18700 cc_string=`${CC} --version | sed q`
18701 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18702 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18703 cc_string=`${CC} -V 2>&1 | sed q`
18704 else
18705 cc_string=$CC
18709 cat >>confdefs.h <<_ACEOF
18710 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18711 _ACEOF
18714 # Supply a numeric version string for use by 3rd party add-ons
18715 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18716 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
18717 $AWK '{printf "%d%04d", $1, $2}'`"
18719 cat >>confdefs.h <<_ACEOF
18720 #define PG_VERSION_NUM $PG_VERSION_NUM
18721 _ACEOF
18725 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
18726 # literally, so that it's possible to override it at build time using
18727 # a command like "make ... PG_SYSROOT=path". This has to be done after
18728 # we've finished all configure checks that depend on CPPFLAGS.
18729 # The same for LDFLAGS, too.
18730 if test x"$PG_SYSROOT" != x; then
18731 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18732 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18737 # Begin output steps
18739 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18740 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18741 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18742 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18743 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18744 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18745 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18746 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18747 # Currently only used when LLVM is used
18748 if test "$with_llvm" = yes ; then
18749 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18750 $as_echo "$as_me: using CXX=$CXX" >&6;}
18751 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18752 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18753 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18754 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18755 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18756 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18757 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18758 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18761 # prepare build tree if outside source tree
18762 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18763 # Note 2: /bin/pwd might be better than shell's built-in at getting
18764 # a symlink-free name.
18765 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18766 vpath_build=no
18767 else
18768 vpath_build=yes
18769 if test "$no_create" != yes; then
18770 $as_echo_n "preparing build tree... " >&6
18771 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18772 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18773 || as_fn_error $? "failed" "$LINENO" 5
18774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18775 $as_echo "done" >&6; }
18781 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18784 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}"
18787 if test "$PORTNAME" = "win32"; then
18788 ac_config_commands="$ac_config_commands check_win32_symlinks"
18792 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18795 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
18798 cat >confcache <<\_ACEOF
18799 # This file is a shell script that caches the results of configure
18800 # tests run on this system so they can be shared between configure
18801 # scripts and configure runs, see configure's option --config-cache.
18802 # It is not useful on other systems. If it contains results you don't
18803 # want to keep, you may remove or edit it.
18805 # config.status only pays attention to the cache file if you give it
18806 # the --recheck option to rerun configure.
18808 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18809 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18810 # following values.
18812 _ACEOF
18814 # The following way of writing the cache mishandles newlines in values,
18815 # but we know of no workaround that is simple, portable, and efficient.
18816 # So, we kill variables containing newlines.
18817 # Ultrix sh set writes to stderr and can't be redirected directly,
18818 # and sets the high bit in the cache file unless we assign to the vars.
18820 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18821 eval ac_val=\$$ac_var
18822 case $ac_val in #(
18823 *${as_nl}*)
18824 case $ac_var in #(
18825 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18826 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18827 esac
18828 case $ac_var in #(
18829 _ | IFS | as_nl) ;; #(
18830 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18831 *) { eval $ac_var=; unset $ac_var;} ;;
18832 esac ;;
18833 esac
18834 done
18836 (set) 2>&1 |
18837 case $as_nl`(ac_space=' '; set) 2>&1` in #(
18838 *${as_nl}ac_space=\ *)
18839 # `set' does not quote correctly, so add quotes: double-quote
18840 # substitution turns \\\\ into \\, and sed turns \\ into \.
18841 sed -n \
18842 "s/'/'\\\\''/g;
18843 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18844 ;; #(
18846 # `set' quotes correctly as required by POSIX, so do not add quotes.
18847 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18849 esac |
18850 sort
18852 sed '
18853 /^ac_cv_env_/b end
18854 t clear
18855 :clear
18856 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18857 t end
18858 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18859 :end' >>confcache
18860 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18861 if test -w "$cache_file"; then
18862 if test "x$cache_file" != "x/dev/null"; then
18863 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18864 $as_echo "$as_me: updating cache $cache_file" >&6;}
18865 if test ! -f "$cache_file" || test -h "$cache_file"; then
18866 cat confcache >"$cache_file"
18867 else
18868 case $cache_file in #(
18869 */* | ?:*)
18870 mv -f confcache "$cache_file"$$ &&
18871 mv -f "$cache_file"$$ "$cache_file" ;; #(
18873 mv -f confcache "$cache_file" ;;
18874 esac
18877 else
18878 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18879 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18882 rm -f confcache
18884 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18885 # Let make expand exec_prefix.
18886 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18888 DEFS=-DHAVE_CONFIG_H
18890 ac_libobjs=
18891 ac_ltlibobjs=
18893 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18894 # 1. Remove the extension, and $U if already installed.
18895 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18896 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18897 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18898 # will be set to the directory where LIBOBJS objects are built.
18899 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18900 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18901 done
18902 LIBOBJS=$ac_libobjs
18904 LTLIBOBJS=$ac_ltlibobjs
18909 : "${CONFIG_STATUS=./config.status}"
18910 ac_write_fail=0
18911 ac_clean_files_save=$ac_clean_files
18912 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18913 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18914 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18915 as_write_fail=0
18916 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18917 #! $SHELL
18918 # Generated by $as_me.
18919 # Run this file to recreate the current configuration.
18920 # Compiler output produced by configure, useful for debugging
18921 # configure, is in config.log if it exists.
18923 debug=false
18924 ac_cs_recheck=false
18925 ac_cs_silent=false
18927 SHELL=\${CONFIG_SHELL-$SHELL}
18928 export SHELL
18929 _ASEOF
18930 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18931 ## -------------------- ##
18932 ## M4sh Initialization. ##
18933 ## -------------------- ##
18935 # Be more Bourne compatible
18936 DUALCASE=1; export DUALCASE # for MKS sh
18937 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18938 emulate sh
18939 NULLCMD=:
18940 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18941 # is contrary to our usage. Disable this feature.
18942 alias -g '${1+"$@"}'='"$@"'
18943 setopt NO_GLOB_SUBST
18944 else
18945 case `(set -o) 2>/dev/null` in #(
18946 *posix*) :
18947 set -o posix ;; #(
18948 *) :
18950 esac
18954 as_nl='
18956 export as_nl
18957 # Printing a long string crashes Solaris 7 /usr/bin/printf.
18958 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18959 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18960 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18961 # Prefer a ksh shell builtin over an external printf program on Solaris,
18962 # but without wasting forks for bash or zsh.
18963 if test -z "$BASH_VERSION$ZSH_VERSION" \
18964 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18965 as_echo='print -r --'
18966 as_echo_n='print -rn --'
18967 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18968 as_echo='printf %s\n'
18969 as_echo_n='printf %s'
18970 else
18971 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18972 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18973 as_echo_n='/usr/ucb/echo -n'
18974 else
18975 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18976 as_echo_n_body='eval
18977 arg=$1;
18978 case $arg in #(
18979 *"$as_nl"*)
18980 expr "X$arg" : "X\\(.*\\)$as_nl";
18981 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18982 esac;
18983 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18985 export as_echo_n_body
18986 as_echo_n='sh -c $as_echo_n_body as_echo'
18988 export as_echo_body
18989 as_echo='sh -c $as_echo_body as_echo'
18992 # The user is always right.
18993 if test "${PATH_SEPARATOR+set}" != set; then
18994 PATH_SEPARATOR=:
18995 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18996 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18997 PATH_SEPARATOR=';'
19002 # IFS
19003 # We need space, tab and new line, in precisely that order. Quoting is
19004 # there to prevent editors from complaining about space-tab.
19005 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19006 # splitting by setting IFS to empty value.)
19007 IFS=" "" $as_nl"
19009 # Find who we are. Look in the path if we contain no directory separator.
19010 as_myself=
19011 case $0 in #((
19012 *[\\/]* ) as_myself=$0 ;;
19013 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19014 for as_dir in $PATH
19016 IFS=$as_save_IFS
19017 test -z "$as_dir" && as_dir=.
19018 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19019 done
19020 IFS=$as_save_IFS
19023 esac
19024 # We did not find ourselves, most probably we were run as `sh COMMAND'
19025 # in which case we are not to be found in the path.
19026 if test "x$as_myself" = x; then
19027 as_myself=$0
19029 if test ! -f "$as_myself"; then
19030 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19031 exit 1
19034 # Unset variables that we do not need and which cause bugs (e.g. in
19035 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19036 # suppresses any "Segmentation fault" message there. '((' could
19037 # trigger a bug in pdksh 5.2.14.
19038 for as_var in BASH_ENV ENV MAIL MAILPATH
19039 do eval test x\${$as_var+set} = xset \
19040 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19041 done
19042 PS1='$ '
19043 PS2='> '
19044 PS4='+ '
19046 # NLS nuisances.
19047 LC_ALL=C
19048 export LC_ALL
19049 LANGUAGE=C
19050 export LANGUAGE
19052 # CDPATH.
19053 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19056 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19057 # ----------------------------------------
19058 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19059 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19060 # script with STATUS, using 1 if that was 0.
19061 as_fn_error ()
19063 as_status=$1; test $as_status -eq 0 && as_status=1
19064 if test "$4"; then
19065 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19066 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19068 $as_echo "$as_me: error: $2" >&2
19069 as_fn_exit $as_status
19070 } # as_fn_error
19073 # as_fn_set_status STATUS
19074 # -----------------------
19075 # Set $? to STATUS, without forking.
19076 as_fn_set_status ()
19078 return $1
19079 } # as_fn_set_status
19081 # as_fn_exit STATUS
19082 # -----------------
19083 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19084 as_fn_exit ()
19086 set +e
19087 as_fn_set_status $1
19088 exit $1
19089 } # as_fn_exit
19091 # as_fn_unset VAR
19092 # ---------------
19093 # Portably unset VAR.
19094 as_fn_unset ()
19096 { eval $1=; unset $1;}
19098 as_unset=as_fn_unset
19099 # as_fn_append VAR VALUE
19100 # ----------------------
19101 # Append the text in VALUE to the end of the definition contained in VAR. Take
19102 # advantage of any shell optimizations that allow amortized linear growth over
19103 # repeated appends, instead of the typical quadratic growth present in naive
19104 # implementations.
19105 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19106 eval 'as_fn_append ()
19108 eval $1+=\$2
19110 else
19111 as_fn_append ()
19113 eval $1=\$$1\$2
19115 fi # as_fn_append
19117 # as_fn_arith ARG...
19118 # ------------------
19119 # Perform arithmetic evaluation on the ARGs, and store the result in the
19120 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19121 # must be portable across $(()) and expr.
19122 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19123 eval 'as_fn_arith ()
19125 as_val=$(( $* ))
19127 else
19128 as_fn_arith ()
19130 as_val=`expr "$@" || test $? -eq 1`
19132 fi # as_fn_arith
19135 if expr a : '\(a\)' >/dev/null 2>&1 &&
19136 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19137 as_expr=expr
19138 else
19139 as_expr=false
19142 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19143 as_basename=basename
19144 else
19145 as_basename=false
19148 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19149 as_dirname=dirname
19150 else
19151 as_dirname=false
19154 as_me=`$as_basename -- "$0" ||
19155 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19156 X"$0" : 'X\(//\)$' \| \
19157 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19158 $as_echo X/"$0" |
19159 sed '/^.*\/\([^/][^/]*\)\/*$/{
19160 s//\1/
19163 /^X\/\(\/\/\)$/{
19164 s//\1/
19167 /^X\/\(\/\).*/{
19168 s//\1/
19171 s/.*/./; q'`
19173 # Avoid depending upon Character Ranges.
19174 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19175 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19176 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19177 as_cr_digits='0123456789'
19178 as_cr_alnum=$as_cr_Letters$as_cr_digits
19180 ECHO_C= ECHO_N= ECHO_T=
19181 case `echo -n x` in #(((((
19182 -n*)
19183 case `echo 'xy\c'` in
19184 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19185 xy) ECHO_C='\c';;
19186 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19187 ECHO_T=' ';;
19188 esac;;
19190 ECHO_N='-n';;
19191 esac
19193 rm -f conf$$ conf$$.exe conf$$.file
19194 if test -d conf$$.dir; then
19195 rm -f conf$$.dir/conf$$.file
19196 else
19197 rm -f conf$$.dir
19198 mkdir conf$$.dir 2>/dev/null
19200 if (echo >conf$$.file) 2>/dev/null; then
19201 if ln -s conf$$.file conf$$ 2>/dev/null; then
19202 as_ln_s='ln -s'
19203 # ... but there are two gotchas:
19204 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19205 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19206 # In both cases, we have to default to `cp -pR'.
19207 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19208 as_ln_s='cp -pR'
19209 elif ln conf$$.file conf$$ 2>/dev/null; then
19210 as_ln_s=ln
19211 else
19212 as_ln_s='cp -pR'
19214 else
19215 as_ln_s='cp -pR'
19217 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19218 rmdir conf$$.dir 2>/dev/null
19221 # as_fn_mkdir_p
19222 # -------------
19223 # Create "$as_dir" as a directory, including parents if necessary.
19224 as_fn_mkdir_p ()
19227 case $as_dir in #(
19228 -*) as_dir=./$as_dir;;
19229 esac
19230 test -d "$as_dir" || eval $as_mkdir_p || {
19231 as_dirs=
19232 while :; do
19233 case $as_dir in #(
19234 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19235 *) as_qdir=$as_dir;;
19236 esac
19237 as_dirs="'$as_qdir' $as_dirs"
19238 as_dir=`$as_dirname -- "$as_dir" ||
19239 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19240 X"$as_dir" : 'X\(//\)[^/]' \| \
19241 X"$as_dir" : 'X\(//\)$' \| \
19242 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19243 $as_echo X"$as_dir" |
19244 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19245 s//\1/
19248 /^X\(\/\/\)[^/].*/{
19249 s//\1/
19252 /^X\(\/\/\)$/{
19253 s//\1/
19256 /^X\(\/\).*/{
19257 s//\1/
19260 s/.*/./; q'`
19261 test -d "$as_dir" && break
19262 done
19263 test -z "$as_dirs" || eval "mkdir $as_dirs"
19264 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19267 } # as_fn_mkdir_p
19268 if mkdir -p . 2>/dev/null; then
19269 as_mkdir_p='mkdir -p "$as_dir"'
19270 else
19271 test -d ./-p && rmdir ./-p
19272 as_mkdir_p=false
19276 # as_fn_executable_p FILE
19277 # -----------------------
19278 # Test if FILE is an executable regular file.
19279 as_fn_executable_p ()
19281 test -f "$1" && test -x "$1"
19282 } # as_fn_executable_p
19283 as_test_x='test -x'
19284 as_executable_p=as_fn_executable_p
19286 # Sed expression to map a string onto a valid CPP name.
19287 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19289 # Sed expression to map a string onto a valid variable name.
19290 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19293 exec 6>&1
19294 ## ----------------------------------- ##
19295 ## Main body of $CONFIG_STATUS script. ##
19296 ## ----------------------------------- ##
19297 _ASEOF
19298 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19300 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19301 # Save the log message, to keep $0 and so on meaningful, and to
19302 # report actual input values of CONFIG_FILES etc. instead of their
19303 # values after options handling.
19304 ac_log="
19305 This file was extended by PostgreSQL $as_me 18devel, which was
19306 generated by GNU Autoconf 2.69. Invocation command line was
19308 CONFIG_FILES = $CONFIG_FILES
19309 CONFIG_HEADERS = $CONFIG_HEADERS
19310 CONFIG_LINKS = $CONFIG_LINKS
19311 CONFIG_COMMANDS = $CONFIG_COMMANDS
19312 $ $0 $@
19314 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19317 _ACEOF
19319 case $ac_config_files in *"
19320 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19321 esac
19323 case $ac_config_headers in *"
19324 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19325 esac
19328 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19329 # Files that config.status was made for.
19330 config_files="$ac_config_files"
19331 config_headers="$ac_config_headers"
19332 config_links="$ac_config_links"
19333 config_commands="$ac_config_commands"
19335 _ACEOF
19337 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19338 ac_cs_usage="\
19339 \`$as_me' instantiates files and other configuration actions
19340 from templates according to the current configuration. Unless the files
19341 and actions are specified as TAGs, all are instantiated by default.
19343 Usage: $0 [OPTION]... [TAG]...
19345 -h, --help print this help, then exit
19346 -V, --version print version number and configuration settings, then exit
19347 --config print configuration, then exit
19348 -q, --quiet, --silent
19349 do not print progress messages
19350 -d, --debug don't remove temporary files
19351 --recheck update $as_me by reconfiguring in the same conditions
19352 --file=FILE[:TEMPLATE]
19353 instantiate the configuration file FILE
19354 --header=FILE[:TEMPLATE]
19355 instantiate the configuration header FILE
19357 Configuration files:
19358 $config_files
19360 Configuration headers:
19361 $config_headers
19363 Configuration links:
19364 $config_links
19366 Configuration commands:
19367 $config_commands
19369 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19370 PostgreSQL home page: <https://www.postgresql.org/>."
19372 _ACEOF
19373 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19374 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19375 ac_cs_version="\\
19376 PostgreSQL config.status 18devel
19377 configured by $0, generated by GNU Autoconf 2.69,
19378 with options \\"\$ac_cs_config\\"
19380 Copyright (C) 2012 Free Software Foundation, Inc.
19381 This config.status script is free software; the Free Software Foundation
19382 gives unlimited permission to copy, distribute and modify it."
19384 ac_pwd='$ac_pwd'
19385 srcdir='$srcdir'
19386 INSTALL='$INSTALL'
19387 MKDIR_P='$MKDIR_P'
19388 AWK='$AWK'
19389 test -n "\$AWK" || AWK=awk
19390 _ACEOF
19392 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19393 # The default lists apply if the user does not specify any file.
19394 ac_need_defaults=:
19395 while test $# != 0
19397 case $1 in
19398 --*=?*)
19399 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19400 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19401 ac_shift=:
19403 --*=)
19404 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19405 ac_optarg=
19406 ac_shift=:
19409 ac_option=$1
19410 ac_optarg=$2
19411 ac_shift=shift
19413 esac
19415 case $ac_option in
19416 # Handling of the options.
19417 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19418 ac_cs_recheck=: ;;
19419 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19420 $as_echo "$ac_cs_version"; exit ;;
19421 --config | --confi | --conf | --con | --co | --c )
19422 $as_echo "$ac_cs_config"; exit ;;
19423 --debug | --debu | --deb | --de | --d | -d )
19424 debug=: ;;
19425 --file | --fil | --fi | --f )
19426 $ac_shift
19427 case $ac_optarg in
19428 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19429 '') as_fn_error $? "missing file argument" ;;
19430 esac
19431 as_fn_append CONFIG_FILES " '$ac_optarg'"
19432 ac_need_defaults=false;;
19433 --header | --heade | --head | --hea )
19434 $ac_shift
19435 case $ac_optarg in
19436 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19437 esac
19438 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19439 ac_need_defaults=false;;
19440 --he | --h)
19441 # Conflict between --help and --header
19442 as_fn_error $? "ambiguous option: \`$1'
19443 Try \`$0 --help' for more information.";;
19444 --help | --hel | -h )
19445 $as_echo "$ac_cs_usage"; exit ;;
19446 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19447 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19448 ac_cs_silent=: ;;
19450 # This is an error.
19451 -*) as_fn_error $? "unrecognized option: \`$1'
19452 Try \`$0 --help' for more information." ;;
19454 *) as_fn_append ac_config_targets " $1"
19455 ac_need_defaults=false ;;
19457 esac
19458 shift
19459 done
19461 ac_configure_extra_args=
19463 if $ac_cs_silent; then
19464 exec 6>/dev/null
19465 ac_configure_extra_args="$ac_configure_extra_args --silent"
19468 _ACEOF
19469 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19470 if \$ac_cs_recheck; then
19471 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19472 shift
19473 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19474 CONFIG_SHELL='$SHELL'
19475 export CONFIG_SHELL
19476 exec "\$@"
19479 _ACEOF
19480 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19481 exec 5>>config.log
19483 echo
19484 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19485 ## Running $as_me. ##
19486 _ASBOX
19487 $as_echo "$ac_log"
19488 } >&5
19490 _ACEOF
19491 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19492 _ACEOF
19494 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19496 # Handling of arguments.
19497 for ac_config_target in $ac_config_targets
19499 case $ac_config_target in
19500 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19501 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19502 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19503 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19504 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19505 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19506 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19507 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19508 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19509 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19511 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19512 esac
19513 done
19516 # If the user did not use the arguments to specify the items to instantiate,
19517 # then the envvar interface is used. Set only those that are not.
19518 # We use the long form for the default assignment because of an extremely
19519 # bizarre bug on SunOS 4.1.3.
19520 if $ac_need_defaults; then
19521 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19522 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19523 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19524 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19527 # Have a temporary directory for convenience. Make it in the build tree
19528 # simply because there is no reason against having it here, and in addition,
19529 # creating and moving files from /tmp can sometimes cause problems.
19530 # Hook for its removal unless debugging.
19531 # Note that there is a small window in which the directory will not be cleaned:
19532 # after its creation but before its name has been assigned to `$tmp'.
19533 $debug ||
19535 tmp= ac_tmp=
19536 trap 'exit_status=$?
19537 : "${ac_tmp:=$tmp}"
19538 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19540 trap 'as_fn_exit 1' 1 2 13 15
19542 # Create a (secure) tmp directory for tmp files.
19545 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19546 test -d "$tmp"
19547 } ||
19549 tmp=./conf$$-$RANDOM
19550 (umask 077 && mkdir "$tmp")
19551 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19552 ac_tmp=$tmp
19554 # Set up the scripts for CONFIG_FILES section.
19555 # No need to generate them if there are no CONFIG_FILES.
19556 # This happens for instance with `./config.status config.h'.
19557 if test -n "$CONFIG_FILES"; then
19560 ac_cr=`echo X | tr X '\015'`
19561 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19562 # But we know of no other shell where ac_cr would be empty at this
19563 # point, so we can use a bashism as a fallback.
19564 if test "x$ac_cr" = x; then
19565 eval ac_cr=\$\'\\r\'
19567 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19568 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19569 ac_cs_awk_cr='\\r'
19570 else
19571 ac_cs_awk_cr=$ac_cr
19574 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19575 _ACEOF
19579 echo "cat >conf$$subs.awk <<_ACEOF" &&
19580 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19581 echo "_ACEOF"
19582 } >conf$$subs.sh ||
19583 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19584 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19585 ac_delim='%!_!# '
19586 for ac_last_try in false false false false false :; do
19587 . ./conf$$subs.sh ||
19588 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19590 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19591 if test $ac_delim_n = $ac_delim_num; then
19592 break
19593 elif $ac_last_try; then
19594 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19595 else
19596 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19598 done
19599 rm -f conf$$subs.sh
19601 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19602 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19603 _ACEOF
19604 sed -n '
19606 s/^/S["/; s/!.*/"]=/
19609 s/^[^!]*!//
19610 :repl
19611 t repl
19612 s/'"$ac_delim"'$//
19613 t delim
19616 s/\(.\{148\}\)..*/\1/
19617 t more1
19618 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19621 b repl
19622 :more1
19623 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19626 s/.\{148\}//
19627 t nl
19628 :delim
19630 s/\(.\{148\}\)..*/\1/
19631 t more2
19632 s/["\\]/\\&/g; s/^/"/; s/$/"/
19635 :more2
19636 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19639 s/.\{148\}//
19640 t delim
19641 ' <conf$$subs.awk | sed '
19642 /^[^""]/{
19644 s/\n//
19646 ' >>$CONFIG_STATUS || ac_write_fail=1
19647 rm -f conf$$subs.awk
19648 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19649 _ACAWK
19650 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19651 for (key in S) S_is_set[key] = 1
19652 FS = "\a"
19656 line = $ 0
19657 nfields = split(line, field, "@")
19658 substed = 0
19659 len = length(field[1])
19660 for (i = 2; i < nfields; i++) {
19661 key = field[i]
19662 keylen = length(key)
19663 if (S_is_set[key]) {
19664 value = S[key]
19665 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19666 len += length(value) + length(field[++i])
19667 substed = 1
19668 } else
19669 len += 1 + keylen
19672 print line
19675 _ACAWK
19676 _ACEOF
19677 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19678 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19679 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19680 else
19682 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19683 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19684 _ACEOF
19686 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19687 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19688 # trailing colons and then remove the whole line if VPATH becomes empty
19689 # (actually we leave an empty line to preserve line numbers).
19690 if test "x$srcdir" = x.; then
19691 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19693 s///
19694 s/^/:/
19695 s/[ ]*$/:/
19696 s/:\$(srcdir):/:/g
19697 s/:\${srcdir}:/:/g
19698 s/:@srcdir@:/:/g
19699 s/^:*//
19700 s/:*$//
19702 s/\(=[ ]*\).*/\1/
19704 s/\n//
19705 s/^[^=]*=[ ]*$//
19709 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19710 fi # test -n "$CONFIG_FILES"
19712 # Set up the scripts for CONFIG_HEADERS section.
19713 # No need to generate them if there are no CONFIG_HEADERS.
19714 # This happens for instance with `./config.status Makefile'.
19715 if test -n "$CONFIG_HEADERS"; then
19716 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19717 BEGIN {
19718 _ACEOF
19720 # Transform confdefs.h into an awk script `defines.awk', embedded as
19721 # here-document in config.status, that substitutes the proper values into
19722 # config.h.in to produce config.h.
19724 # Create a delimiter string that does not exist in confdefs.h, to ease
19725 # handling of long lines.
19726 ac_delim='%!_!# '
19727 for ac_last_try in false false :; do
19728 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19729 if test -z "$ac_tt"; then
19730 break
19731 elif $ac_last_try; then
19732 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19733 else
19734 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19736 done
19738 # For the awk script, D is an array of macro values keyed by name,
19739 # likewise P contains macro parameters if any. Preserve backslash
19740 # newline sequences.
19742 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19743 sed -n '
19744 s/.\{148\}/&'"$ac_delim"'/g
19745 t rset
19746 :rset
19747 s/^[ ]*#[ ]*define[ ][ ]*/ /
19748 t def
19750 :def
19751 s/\\$//
19752 t bsnl
19753 s/["\\]/\\&/g
19754 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19755 D["\1"]=" \3"/p
19756 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19758 :bsnl
19759 s/["\\]/\\&/g
19760 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19761 D["\1"]=" \3\\\\\\n"\\/p
19762 t cont
19763 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19764 t cont
19766 :cont
19768 s/.\{148\}/&'"$ac_delim"'/g
19769 t clear
19770 :clear
19771 s/\\$//
19772 t bsnlc
19773 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19775 :bsnlc
19776 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19777 b cont
19778 ' <confdefs.h | sed '
19779 s/'"$ac_delim"'/"\\\
19780 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19782 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19783 for (key in D) D_is_set[key] = 1
19784 FS = "\a"
19786 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19787 line = \$ 0
19788 split(line, arg, " ")
19789 if (arg[1] == "#") {
19790 defundef = arg[2]
19791 mac1 = arg[3]
19792 } else {
19793 defundef = substr(arg[1], 2)
19794 mac1 = arg[2]
19796 split(mac1, mac2, "(") #)
19797 macro = mac2[1]
19798 prefix = substr(line, 1, index(line, defundef) - 1)
19799 if (D_is_set[macro]) {
19800 # Preserve the white space surrounding the "#".
19801 print prefix "define", macro P[macro] D[macro]
19802 next
19803 } else {
19804 # Replace #undef with comments. This is necessary, for example,
19805 # in the case of _POSIX_SOURCE, which is predefined and required
19806 # on some systems where configure will not decide to define it.
19807 if (defundef == "undef") {
19808 print "/*", prefix defundef, macro, "*/"
19809 next
19813 { print }
19814 _ACAWK
19815 _ACEOF
19816 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19817 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19818 fi # test -n "$CONFIG_HEADERS"
19821 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
19822 shift
19823 for ac_tag
19825 case $ac_tag in
19826 :[FHLC]) ac_mode=$ac_tag; continue;;
19827 esac
19828 case $ac_mode$ac_tag in
19829 :[FHL]*:*);;
19830 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
19831 :[FH]-) ac_tag=-:-;;
19832 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19833 esac
19834 ac_save_IFS=$IFS
19835 IFS=:
19836 set x $ac_tag
19837 IFS=$ac_save_IFS
19838 shift
19839 ac_file=$1
19840 shift
19842 case $ac_mode in
19843 :L) ac_source=$1;;
19844 :[FH])
19845 ac_file_inputs=
19846 for ac_f
19848 case $ac_f in
19849 -) ac_f="$ac_tmp/stdin";;
19850 *) # Look for the file first in the build tree, then in the source tree
19851 # (if the path is not absolute). The absolute path cannot be DOS-style,
19852 # because $ac_f cannot contain `:'.
19853 test -f "$ac_f" ||
19854 case $ac_f in
19855 [\\/$]*) false;;
19856 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19857 esac ||
19858 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19859 esac
19860 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19861 as_fn_append ac_file_inputs " '$ac_f'"
19862 done
19864 # Let's still pretend it is `configure' which instantiates (i.e., don't
19865 # use $as_me), people would be surprised to read:
19866 # /* config.h. Generated by config.status. */
19867 configure_input='Generated from '`
19868 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19869 `' by configure.'
19870 if test x"$ac_file" != x-; then
19871 configure_input="$ac_file. $configure_input"
19872 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19873 $as_echo "$as_me: creating $ac_file" >&6;}
19875 # Neutralize special characters interpreted by sed in replacement strings.
19876 case $configure_input in #(
19877 *\&* | *\|* | *\\* )
19878 ac_sed_conf_input=`$as_echo "$configure_input" |
19879 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19880 *) ac_sed_conf_input=$configure_input;;
19881 esac
19883 case $ac_tag in
19884 *:-:* | *:-) cat >"$ac_tmp/stdin" \
19885 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
19886 esac
19888 esac
19890 ac_dir=`$as_dirname -- "$ac_file" ||
19891 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19892 X"$ac_file" : 'X\(//\)[^/]' \| \
19893 X"$ac_file" : 'X\(//\)$' \| \
19894 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19895 $as_echo X"$ac_file" |
19896 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19897 s//\1/
19900 /^X\(\/\/\)[^/].*/{
19901 s//\1/
19904 /^X\(\/\/\)$/{
19905 s//\1/
19908 /^X\(\/\).*/{
19909 s//\1/
19912 s/.*/./; q'`
19913 as_dir="$ac_dir"; as_fn_mkdir_p
19914 ac_builddir=.
19916 case "$ac_dir" in
19917 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19919 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19920 # A ".." for each directory in $ac_dir_suffix.
19921 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19922 case $ac_top_builddir_sub in
19923 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19924 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19925 esac ;;
19926 esac
19927 ac_abs_top_builddir=$ac_pwd
19928 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19929 # for backward compatibility:
19930 ac_top_builddir=$ac_top_build_prefix
19932 case $srcdir in
19933 .) # We are building in place.
19934 ac_srcdir=.
19935 ac_top_srcdir=$ac_top_builddir_sub
19936 ac_abs_top_srcdir=$ac_pwd ;;
19937 [\\/]* | ?:[\\/]* ) # Absolute name.
19938 ac_srcdir=$srcdir$ac_dir_suffix;
19939 ac_top_srcdir=$srcdir
19940 ac_abs_top_srcdir=$srcdir ;;
19941 *) # Relative name.
19942 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19943 ac_top_srcdir=$ac_top_build_prefix$srcdir
19944 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19945 esac
19946 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19949 case $ac_mode in
19952 # CONFIG_FILE
19955 case $INSTALL in
19956 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19957 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19958 esac
19959 ac_MKDIR_P=$MKDIR_P
19960 case $MKDIR_P in
19961 [\\/$]* | ?:[\\/]* ) ;;
19962 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
19963 esac
19964 _ACEOF
19966 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19967 # If the template does not know about datarootdir, expand it.
19968 # FIXME: This hack should be removed a few years after 2.60.
19969 ac_datarootdir_hack=; ac_datarootdir_seen=
19970 ac_sed_dataroot='
19971 /datarootdir/ {
19975 /@datadir@/p
19976 /@docdir@/p
19977 /@infodir@/p
19978 /@localedir@/p
19979 /@mandir@/p'
19980 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19981 *datarootdir*) ac_datarootdir_seen=yes;;
19982 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19984 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19985 _ACEOF
19986 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19987 ac_datarootdir_hack='
19988 s&@datadir@&$datadir&g
19989 s&@docdir@&$docdir&g
19990 s&@infodir@&$infodir&g
19991 s&@localedir@&$localedir&g
19992 s&@mandir@&$mandir&g
19993 s&\\\${datarootdir}&$datarootdir&g' ;;
19994 esac
19995 _ACEOF
19997 # Neutralize VPATH when `$srcdir' = `.'.
19998 # Shell code in configure.ac might set extrasub.
19999 # FIXME: do we really want to maintain this feature?
20000 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20001 ac_sed_extra="$ac_vpsub
20002 $extrasub
20003 _ACEOF
20004 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20006 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20007 s|@configure_input@|$ac_sed_conf_input|;t t
20008 s&@top_builddir@&$ac_top_builddir_sub&;t t
20009 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20010 s&@srcdir@&$ac_srcdir&;t t
20011 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20012 s&@top_srcdir@&$ac_top_srcdir&;t t
20013 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20014 s&@builddir@&$ac_builddir&;t t
20015 s&@abs_builddir@&$ac_abs_builddir&;t t
20016 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20017 s&@INSTALL@&$ac_INSTALL&;t t
20018 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20019 $ac_datarootdir_hack
20021 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20022 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20024 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20025 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20026 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20027 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20029 which seems to be undefined. Please make sure it is defined" >&5
20030 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20031 which seems to be undefined. Please make sure it is defined" >&2;}
20033 rm -f "$ac_tmp/stdin"
20034 case $ac_file in
20035 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20036 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20037 esac \
20038 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20042 # CONFIG_HEADER
20044 if test x"$ac_file" != x-; then
20046 $as_echo "/* $configure_input */" \
20047 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20048 } >"$ac_tmp/config.h" \
20049 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20050 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20051 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20052 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20053 else
20054 rm -f "$ac_file"
20055 mv "$ac_tmp/config.h" "$ac_file" \
20056 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20058 else
20059 $as_echo "/* $configure_input */" \
20060 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20061 || as_fn_error $? "could not create -" "$LINENO" 5
20066 # CONFIG_LINK
20069 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20071 else
20072 # Prefer the file from the source tree if names are identical.
20073 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20074 ac_source=$srcdir/$ac_source
20077 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20078 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20080 if test ! -r "$ac_source"; then
20081 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20083 rm -f "$ac_file"
20085 # Try a relative symlink, then a hard link, then a copy.
20086 case $ac_source in
20087 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20088 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20089 esac
20090 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20091 ln "$ac_source" "$ac_file" 2>/dev/null ||
20092 cp -p "$ac_source" "$ac_file" ||
20093 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20096 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20097 $as_echo "$as_me: executing $ac_file commands" >&6;}
20099 esac
20102 case $ac_file$ac_mode in
20103 "check_win32_symlinks":C)
20104 # Links sometimes fail undetected on Mingw -
20105 # so here we detect it and warn the user
20106 for FILE in $CONFIG_LINKS
20108 # test -e works for symlinks in the MinGW console
20109 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20110 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20111 done
20113 "src/include/pg_config.h":H)
20114 # Update timestamp for pg_config.h (see Makefile.global)
20115 echo >src/include/stamp-h
20117 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20119 esac
20120 done # for ac_tag
20123 as_fn_exit 0
20124 _ACEOF
20125 ac_clean_files=$ac_clean_files_save
20127 test $ac_write_fail = 0 ||
20128 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20131 # configure is writing to config.log, and then calls config.status.
20132 # config.status does its own redirection, appending to config.log.
20133 # Unfortunately, on DOS this fails, as config.log is still kept open
20134 # by configure, so config.status won't be able to write to it; its
20135 # output is simply discarded. So we exec the FD to /dev/null,
20136 # effectively closing config.log, so it can be properly (re)opened and
20137 # appended to by config.status. When coming back to configure, we
20138 # need to make the FD available again.
20139 if test "$no_create" != yes; then
20140 ac_cs_success=:
20141 ac_config_status_args=
20142 test "$silent" = yes &&
20143 ac_config_status_args="$ac_config_status_args --quiet"
20144 exec 5>/dev/null
20145 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20146 exec 5>>config.log
20147 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20148 # would make configure fail if this is the last instruction.
20149 $ac_cs_success || as_fn_exit 1
20151 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20153 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20157 # Ensure that any meson build directories would reconfigure and see that
20158 # there's a conflicting in-tree build and can error out.
20159 if test "$vpath_build" = "no"; then
20160 touch meson.build