Fix psql's behavior with \g for a multiple-command string.
[pgsql.git] / configure
blob1caca21b625aa36eda97ae9d5c3ed620ba9d8611
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 16devel.
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
14 # Copyright (c) 1996-2022, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
34 esac
38 as_nl='
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54 else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
86 # IFS
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" "" $as_nl"
93 # Find who we are. Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
104 IFS=$as_save_IFS
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111 as_myself=$0
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there. '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139 # Use a proper internal environment variable to ensure we don't fall
140 # into an infinite loop, continuously re-executing ourselves.
141 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142 _as_can_reexec=no; export _as_can_reexec;
143 # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151 *v*x* | *x*v* ) as_opts=-vx ;;
152 *v* ) as_opts=-v ;;
153 *x* ) as_opts=-x ;;
154 * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
162 # We don't want this to propagate to other subprocesses.
163 { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 emulate sh
167 NULLCMD=:
168 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169 # is contrary to our usage. Disable this feature.
170 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 setopt NO_GLOB_SUBST
172 else
173 case \`(set -o) 2>/dev/null\` in #(
174 *posix*) :
175 set -o posix ;; #(
176 *) :
178 esac
181 as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
194 else
195 exitcode=1; echo positional parameters were not saved.
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204 if (eval "$as_required") 2>/dev/null; then :
205 as_have_required=yes
206 else
207 as_have_required=no
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
211 else
212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
221 for as_base in sh bash ksh sh5; do
222 # Try only shells that exist, to save several forks.
223 as_shell=$as_dir/$as_base
224 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 CONFIG_SHELL=$as_shell as_have_required=yes
227 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228 break 2
231 done;;
232 esac
233 as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237 CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
242 if test "x$CONFIG_SHELL" != x; then :
243 export CONFIG_SHELL
244 # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252 *v*x* | *x*v* ) as_opts=-vx ;;
253 *v* ) as_opts=-v ;;
254 *x* ) as_opts=-x ;;
255 * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
264 if test x$as_have_required = xno; then :
265 $as_echo "$0: This script requires a shell more modern than all"
266 $as_echo "$0: the shells that I found on your system."
267 if test x${ZSH_VERSION+set} = xset ; then
268 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270 else
271 $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@lists.postgresql.org about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
277 exit 1
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
295 { eval $1=; unset $1;}
297 as_unset=as_fn_unset
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
304 return $1
305 } # as_fn_set_status
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
323 case $as_dir in #(
324 -*) as_dir=./$as_dir;;
325 esac
326 test -d "$as_dir" || eval $as_mkdir_p || {
327 as_dirs=
328 while :; do
329 case $as_dir in #(
330 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 *) as_qdir=$as_dir;;
332 esac
333 as_dirs="'$as_qdir' $as_dirs"
334 as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336 X"$as_dir" : 'X\(//\)[^/]' \| \
337 X"$as_dir" : 'X\(//\)$' \| \
338 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341 s//\1/
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
348 /^X\(\/\/\)$/{
349 s//\1/
352 /^X\(\/\).*/{
353 s//\1/
356 s/.*/./; q'`
357 test -d "$as_dir" && break
358 done
359 test -z "$as_dirs" || eval "mkdir $as_dirs"
360 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 } # as_fn_mkdir_p
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
370 test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379 eval 'as_fn_append ()
381 eval $1+=\$2
383 else
384 as_fn_append ()
386 eval $1=\$$1\$2
388 fi # as_fn_append
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396 eval 'as_fn_arith ()
398 as_val=$(( $* ))
400 else
401 as_fn_arith ()
403 as_val=`expr "$@" || test $? -eq 1`
405 fi # as_fn_arith
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
415 as_status=$1; test $as_status -eq 0 && as_status=1
416 if test "$4"; then
417 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422 } # as_fn_error
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425 test "X`expr 00001 : '.*\(...\)'`" = X001; then
426 as_expr=expr
427 else
428 as_expr=false
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 as_basename=basename
433 else
434 as_basename=false
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438 as_dirname=dirname
439 else
440 as_dirname=false
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445 X"$0" : 'X\(//\)$' \| \
446 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448 sed '/^.*\/\([^/][^/]*\)\/*$/{
449 s//\1/
452 /^X\/\(\/\/\)$/{
453 s//\1/
456 /^X\/\(\/\).*/{
457 s//\1/
460 s/.*/./; q'`
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
470 as_lineno_1=$LINENO as_lineno_1a=$LINENO
471 as_lineno_2=$LINENO as_lineno_2a=$LINENO
472 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
475 sed -n '
477 /[$]LINENO/=
478 ' <$as_myself |
479 sed '
480 s/[$]LINENO.*/&-/
481 t lineno
483 :lineno
485 :loop
486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487 t loop
488 s/-\n.*//
489 ' >$as_me.lineno &&
490 chmod +x "$as_me.lineno" ||
491 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
493 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494 # already done that, so ensure we don't try to do so again and fall
495 # in an infinite loop. This has already happened in practice.
496 _as_can_reexec=no; export _as_can_reexec
497 # Don't try to exec as it changes $[0], causing all sort of problems
498 # (the dirname of $[0] is not the place where we might find the
499 # original and so on. Autoconf is especially sensitive to this).
500 . "./$as_me.lineno"
501 # Exit status is that of the last command.
502 exit
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508 case `echo 'xy\c'` in
509 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
510 xy) ECHO_C='\c';;
511 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
512 ECHO_T=' ';;
513 esac;;
515 ECHO_N='-n';;
516 esac
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520 rm -f conf$$.dir/conf$$.file
521 else
522 rm -f conf$$.dir
523 mkdir conf$$.dir 2>/dev/null
525 if (echo >conf$$.file) 2>/dev/null; then
526 if ln -s conf$$.file conf$$ 2>/dev/null; then
527 as_ln_s='ln -s'
528 # ... but there are two gotchas:
529 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531 # In both cases, we have to default to `cp -pR'.
532 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533 as_ln_s='cp -pR'
534 elif ln conf$$.file conf$$ 2>/dev/null; then
535 as_ln_s=ln
536 else
537 as_ln_s='cp -pR'
539 else
540 as_ln_s='cp -pR'
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
545 if mkdir -p . 2>/dev/null; then
546 as_mkdir_p='mkdir -p "$as_dir"'
547 else
548 test -d ./-p && rmdir ./-p
549 as_mkdir_p=false
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 # Initializations.
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='16devel'
586 PACKAGE_STRING='PostgreSQL 16devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 DBTOEPUB
635 XSLTPROC
636 XMLLINT
637 TCL_SHARED_BUILD
638 TCL_LIB_SPEC
639 TCL_LIBS
640 TCL_INCLUDE_SPEC
641 TCL_CONFIG_SH
642 TCLSH
643 XGETTEXT
644 MSGMERGE
645 MSGFMT_FLAGS
646 MSGFMT
647 PG_CRC32C_OBJS
648 CFLAGS_ARMV8_CRC32C
649 CFLAGS_SSE42
650 LIBOBJS
651 ZSTD
653 UUID_LIBS
654 LDAP_LIBS_BE
655 LDAP_LIBS_FE
656 with_ssl
657 PTHREAD_CFLAGS
658 PTHREAD_LIBS
659 PTHREAD_CC
660 ax_pthread_config
661 EGREP
662 GREP
665 python_additional_libs
666 python_libspec
667 python_libdir
668 python_includespec
669 python_version
670 python_majorversion
671 PYTHON
672 perl_embed_ldflags
673 perl_embed_ccflags
674 perl_includespec
675 perl_useshrplib
676 perl_privlibexp
677 perl_archlibexp
678 PERL
679 FLEXFLAGS
680 FLEX
681 BISONFLAGS
682 BISON
683 MKDIR_P
684 LN_S
686 install_bin
687 INSTALL_DATA
688 INSTALL_SCRIPT
689 INSTALL_PROGRAM
690 WINDRES
692 STRIP_SHARED_LIB
693 STRIP_STATIC_LIB
694 STRIP
695 RANLIB
696 with_gnu_ld
698 LDFLAGS_SL
699 LDFLAGS_EX
700 ZSTD_LIBS
701 ZSTD_CFLAGS
702 with_zstd
703 LZ4_LIBS
704 LZ4_CFLAGS
705 with_lz4
706 with_zlib
707 with_system_tzdata
708 with_libxslt
709 XML2_LIBS
710 XML2_CFLAGS
711 XML2_CONFIG
712 with_libxml
713 with_uuid
714 with_readline
715 with_systemd
716 with_selinux
717 with_ldap
718 with_krb_srvnam
719 krb_srvtab
720 with_gssapi
721 with_python
722 with_perl
723 with_tcl
724 ICU_LIBS
725 ICU_CFLAGS
726 with_icu
727 enable_thread_safety
728 INCLUDES
729 autodepend
730 PKG_CONFIG_LIBDIR
731 PKG_CONFIG_PATH
732 PKG_CONFIG
733 DLSUFFIX
737 CFLAGS_SL
738 BITCODE_CXXFLAGS
739 BITCODE_CFLAGS
740 CXXFLAGS_SL_MODULE
741 CFLAGS_SL_MODULE
742 CFLAGS_VECTORIZE
743 CFLAGS_UNROLL_LOOPS
744 PERMIT_DECLARATION_AFTER_STATEMENT
745 LLVM_BINPATH
746 LLVM_CXXFLAGS
747 LLVM_CFLAGS
748 LLVM_CPPFLAGS
749 LLVM_LIBS
750 CLANG
751 LLVM_CONFIG
753 with_llvm
754 SUN_STUDIO_CC
755 ac_ct_CXX
756 CXXFLAGS
758 OBJEXT
759 EXEEXT
760 ac_ct_CC
761 CPPFLAGS
762 LDFLAGS
763 CFLAGS
765 enable_tap_tests
766 enable_dtrace
767 DTRACEFLAGS
768 DTRACE
769 enable_coverage
770 GENHTML
771 LCOV
772 GCOV
773 enable_debug
774 enable_rpath
775 default_port
776 WANTED_LANGUAGES
777 enable_nls
778 PORTNAME
779 host_os
780 host_vendor
781 host_cpu
782 host
783 build_os
784 build_vendor
785 build_cpu
786 build
787 PG_MAJORVERSION
788 target_alias
789 host_alias
790 build_alias
791 LIBS
792 ECHO_T
793 ECHO_N
794 ECHO_C
795 DEFS
796 mandir
797 localedir
798 libdir
799 psdir
800 pdfdir
801 dvidir
802 htmldir
803 infodir
804 docdir
805 oldincludedir
806 includedir
807 localstatedir
808 sharedstatedir
809 sysconfdir
810 datadir
811 datarootdir
812 libexecdir
813 sbindir
814 bindir
815 program_transform_name
816 prefix
817 exec_prefix
818 PACKAGE_URL
819 PACKAGE_BUGREPORT
820 PACKAGE_STRING
821 PACKAGE_VERSION
822 PACKAGE_TARNAME
823 PACKAGE_NAME
824 PATH_SEPARATOR
825 SHELL'
826 ac_subst_files=''
827 ac_user_opts='
828 enable_option_checking
829 with_extra_version
830 with_template
831 with_includes
832 with_libraries
833 with_libs
834 enable_integer_datetimes
835 enable_nls
836 with_pgport
837 enable_rpath
838 enable_spinlocks
839 enable_atomics
840 enable_debug
841 enable_profiling
842 enable_coverage
843 enable_dtrace
844 enable_tap_tests
845 with_blocksize
846 with_segsize
847 with_wal_blocksize
848 with_CC
849 with_llvm
850 enable_depend
851 enable_cassert
852 enable_thread_safety
853 with_icu
854 with_tcl
855 with_tclconfig
856 with_perl
857 with_python
858 with_gssapi
859 with_krb_srvnam
860 with_pam
861 with_bsd_auth
862 with_ldap
863 with_bonjour
864 with_selinux
865 with_systemd
866 with_readline
867 with_libedit_preferred
868 with_uuid
869 with_ossp_uuid
870 with_libxml
871 with_libxslt
872 with_system_tzdata
873 with_zlib
874 with_lz4
875 with_zstd
876 with_gnu_ld
877 with_ssl
878 with_openssl
879 enable_largefile
881 ac_precious_vars='build_alias
882 host_alias
883 target_alias
885 CFLAGS
886 LDFLAGS
887 LIBS
888 CPPFLAGS
890 CXXFLAGS
892 LLVM_CONFIG
893 CLANG
895 PKG_CONFIG
896 PKG_CONFIG_PATH
897 PKG_CONFIG_LIBDIR
898 ICU_CFLAGS
899 ICU_LIBS
900 XML2_CONFIG
901 XML2_CFLAGS
902 XML2_LIBS
903 LZ4_CFLAGS
904 LZ4_LIBS
905 ZSTD_CFLAGS
906 ZSTD_LIBS
907 LDFLAGS_EX
908 LDFLAGS_SL
909 PERL
910 PYTHON
911 MSGFMT
912 TCLSH'
915 # Initialize some variables set by options.
916 ac_init_help=
917 ac_init_version=false
918 ac_unrecognized_opts=
919 ac_unrecognized_sep=
920 # The variables have the same names as the options, with
921 # dashes changed to underlines.
922 cache_file=/dev/null
923 exec_prefix=NONE
924 no_create=
925 no_recursion=
926 prefix=NONE
927 program_prefix=NONE
928 program_suffix=NONE
929 program_transform_name=s,x,x,
930 silent=
931 site=
932 srcdir=
933 verbose=
934 x_includes=NONE
935 x_libraries=NONE
937 # Installation directory options.
938 # These are left unexpanded so users can "make install exec_prefix=/foo"
939 # and all the variables that are supposed to be based on exec_prefix
940 # by default will actually change.
941 # Use braces instead of parens because sh, perl, etc. also accept them.
942 # (The list follows the same order as the GNU Coding Standards.)
943 bindir='${exec_prefix}/bin'
944 sbindir='${exec_prefix}/sbin'
945 libexecdir='${exec_prefix}/libexec'
946 datarootdir='${prefix}/share'
947 datadir='${datarootdir}'
948 sysconfdir='${prefix}/etc'
949 sharedstatedir='${prefix}/com'
950 localstatedir='${prefix}/var'
951 includedir='${prefix}/include'
952 oldincludedir='/usr/include'
953 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
954 infodir='${datarootdir}/info'
955 htmldir='${docdir}'
956 dvidir='${docdir}'
957 pdfdir='${docdir}'
958 psdir='${docdir}'
959 libdir='${exec_prefix}/lib'
960 localedir='${datarootdir}/locale'
961 mandir='${datarootdir}/man'
963 ac_prev=
964 ac_dashdash=
965 for ac_option
967 # If the previous option needs an argument, assign it.
968 if test -n "$ac_prev"; then
969 eval $ac_prev=\$ac_option
970 ac_prev=
971 continue
974 case $ac_option in
975 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
976 *=) ac_optarg= ;;
977 *) ac_optarg=yes ;;
978 esac
980 # Accept the important Cygnus configure options, so we can diagnose typos.
982 case $ac_dashdash$ac_option in
984 ac_dashdash=yes ;;
986 -bindir | --bindir | --bindi | --bind | --bin | --bi)
987 ac_prev=bindir ;;
988 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
989 bindir=$ac_optarg ;;
991 -build | --build | --buil | --bui | --bu)
992 ac_prev=build_alias ;;
993 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
994 build_alias=$ac_optarg ;;
996 -cache-file | --cache-file | --cache-fil | --cache-fi \
997 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
998 ac_prev=cache_file ;;
999 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1000 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1001 cache_file=$ac_optarg ;;
1003 --config-cache | -C)
1004 cache_file=config.cache ;;
1006 -datadir | --datadir | --datadi | --datad)
1007 ac_prev=datadir ;;
1008 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1009 datadir=$ac_optarg ;;
1011 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1012 | --dataroo | --dataro | --datar)
1013 ac_prev=datarootdir ;;
1014 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1015 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1016 datarootdir=$ac_optarg ;;
1018 -disable-* | --disable-*)
1019 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1020 # Reject names that are not valid shell variable names.
1021 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1022 as_fn_error $? "invalid feature name: $ac_useropt"
1023 ac_useropt_orig=$ac_useropt
1024 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1025 case $ac_user_opts in
1027 "enable_$ac_useropt"
1028 "*) ;;
1029 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1030 ac_unrecognized_sep=', ';;
1031 esac
1032 eval enable_$ac_useropt=no ;;
1034 -docdir | --docdir | --docdi | --doc | --do)
1035 ac_prev=docdir ;;
1036 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1037 docdir=$ac_optarg ;;
1039 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1040 ac_prev=dvidir ;;
1041 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1042 dvidir=$ac_optarg ;;
1044 -enable-* | --enable-*)
1045 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1046 # Reject names that are not valid shell variable names.
1047 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1048 as_fn_error $? "invalid feature name: $ac_useropt"
1049 ac_useropt_orig=$ac_useropt
1050 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1051 case $ac_user_opts in
1053 "enable_$ac_useropt"
1054 "*) ;;
1055 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1056 ac_unrecognized_sep=', ';;
1057 esac
1058 eval enable_$ac_useropt=\$ac_optarg ;;
1060 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1061 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1062 | --exec | --exe | --ex)
1063 ac_prev=exec_prefix ;;
1064 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1065 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1066 | --exec=* | --exe=* | --ex=*)
1067 exec_prefix=$ac_optarg ;;
1069 -gas | --gas | --ga | --g)
1070 # Obsolete; use --with-gas.
1071 with_gas=yes ;;
1073 -help | --help | --hel | --he | -h)
1074 ac_init_help=long ;;
1075 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1076 ac_init_help=recursive ;;
1077 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1078 ac_init_help=short ;;
1080 -host | --host | --hos | --ho)
1081 ac_prev=host_alias ;;
1082 -host=* | --host=* | --hos=* | --ho=*)
1083 host_alias=$ac_optarg ;;
1085 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1086 ac_prev=htmldir ;;
1087 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1088 | --ht=*)
1089 htmldir=$ac_optarg ;;
1091 -includedir | --includedir | --includedi | --included | --include \
1092 | --includ | --inclu | --incl | --inc)
1093 ac_prev=includedir ;;
1094 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1095 | --includ=* | --inclu=* | --incl=* | --inc=*)
1096 includedir=$ac_optarg ;;
1098 -infodir | --infodir | --infodi | --infod | --info | --inf)
1099 ac_prev=infodir ;;
1100 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1101 infodir=$ac_optarg ;;
1103 -libdir | --libdir | --libdi | --libd)
1104 ac_prev=libdir ;;
1105 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1106 libdir=$ac_optarg ;;
1108 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1109 | --libexe | --libex | --libe)
1110 ac_prev=libexecdir ;;
1111 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1112 | --libexe=* | --libex=* | --libe=*)
1113 libexecdir=$ac_optarg ;;
1115 -localedir | --localedir | --localedi | --localed | --locale)
1116 ac_prev=localedir ;;
1117 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1118 localedir=$ac_optarg ;;
1120 -localstatedir | --localstatedir | --localstatedi | --localstated \
1121 | --localstate | --localstat | --localsta | --localst | --locals)
1122 ac_prev=localstatedir ;;
1123 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1124 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1125 localstatedir=$ac_optarg ;;
1127 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1128 ac_prev=mandir ;;
1129 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1130 mandir=$ac_optarg ;;
1132 -nfp | --nfp | --nf)
1133 # Obsolete; use --without-fp.
1134 with_fp=no ;;
1136 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1137 | --no-cr | --no-c | -n)
1138 no_create=yes ;;
1140 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1141 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1142 no_recursion=yes ;;
1144 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1145 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1146 | --oldin | --oldi | --old | --ol | --o)
1147 ac_prev=oldincludedir ;;
1148 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1149 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1150 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1151 oldincludedir=$ac_optarg ;;
1153 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1154 ac_prev=prefix ;;
1155 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1156 prefix=$ac_optarg ;;
1158 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1159 | --program-pre | --program-pr | --program-p)
1160 ac_prev=program_prefix ;;
1161 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1162 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1163 program_prefix=$ac_optarg ;;
1165 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1166 | --program-suf | --program-su | --program-s)
1167 ac_prev=program_suffix ;;
1168 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1169 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1170 program_suffix=$ac_optarg ;;
1172 -program-transform-name | --program-transform-name \
1173 | --program-transform-nam | --program-transform-na \
1174 | --program-transform-n | --program-transform- \
1175 | --program-transform | --program-transfor \
1176 | --program-transfo | --program-transf \
1177 | --program-trans | --program-tran \
1178 | --progr-tra | --program-tr | --program-t)
1179 ac_prev=program_transform_name ;;
1180 -program-transform-name=* | --program-transform-name=* \
1181 | --program-transform-nam=* | --program-transform-na=* \
1182 | --program-transform-n=* | --program-transform-=* \
1183 | --program-transform=* | --program-transfor=* \
1184 | --program-transfo=* | --program-transf=* \
1185 | --program-trans=* | --program-tran=* \
1186 | --progr-tra=* | --program-tr=* | --program-t=*)
1187 program_transform_name=$ac_optarg ;;
1189 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1190 ac_prev=pdfdir ;;
1191 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1192 pdfdir=$ac_optarg ;;
1194 -psdir | --psdir | --psdi | --psd | --ps)
1195 ac_prev=psdir ;;
1196 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1197 psdir=$ac_optarg ;;
1199 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1200 | -silent | --silent | --silen | --sile | --sil)
1201 silent=yes ;;
1203 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1204 ac_prev=sbindir ;;
1205 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1206 | --sbi=* | --sb=*)
1207 sbindir=$ac_optarg ;;
1209 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1210 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1211 | --sharedst | --shareds | --shared | --share | --shar \
1212 | --sha | --sh)
1213 ac_prev=sharedstatedir ;;
1214 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1215 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1216 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1217 | --sha=* | --sh=*)
1218 sharedstatedir=$ac_optarg ;;
1220 -site | --site | --sit)
1221 ac_prev=site ;;
1222 -site=* | --site=* | --sit=*)
1223 site=$ac_optarg ;;
1225 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1226 ac_prev=srcdir ;;
1227 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1228 srcdir=$ac_optarg ;;
1230 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1231 | --syscon | --sysco | --sysc | --sys | --sy)
1232 ac_prev=sysconfdir ;;
1233 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1234 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1235 sysconfdir=$ac_optarg ;;
1237 -target | --target | --targe | --targ | --tar | --ta | --t)
1238 ac_prev=target_alias ;;
1239 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1240 target_alias=$ac_optarg ;;
1242 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1243 verbose=yes ;;
1245 -version | --version | --versio | --versi | --vers | -V)
1246 ac_init_version=: ;;
1248 -with-* | --with-*)
1249 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1250 # Reject names that are not valid shell variable names.
1251 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1252 as_fn_error $? "invalid package name: $ac_useropt"
1253 ac_useropt_orig=$ac_useropt
1254 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1255 case $ac_user_opts in
1257 "with_$ac_useropt"
1258 "*) ;;
1259 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1260 ac_unrecognized_sep=', ';;
1261 esac
1262 eval with_$ac_useropt=\$ac_optarg ;;
1264 -without-* | --without-*)
1265 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1266 # Reject names that are not valid shell variable names.
1267 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1268 as_fn_error $? "invalid package name: $ac_useropt"
1269 ac_useropt_orig=$ac_useropt
1270 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1271 case $ac_user_opts in
1273 "with_$ac_useropt"
1274 "*) ;;
1275 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1276 ac_unrecognized_sep=', ';;
1277 esac
1278 eval with_$ac_useropt=no ;;
1280 --x)
1281 # Obsolete; use --with-x.
1282 with_x=yes ;;
1284 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1285 | --x-incl | --x-inc | --x-in | --x-i)
1286 ac_prev=x_includes ;;
1287 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1288 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1289 x_includes=$ac_optarg ;;
1291 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1292 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1293 ac_prev=x_libraries ;;
1294 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1295 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1296 x_libraries=$ac_optarg ;;
1298 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1299 Try \`$0 --help' for more information"
1302 *=*)
1303 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1304 # Reject names that are not valid shell variable names.
1305 case $ac_envvar in #(
1306 '' | [0-9]* | *[!_$as_cr_alnum]* )
1307 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1308 esac
1309 eval $ac_envvar=\$ac_optarg
1310 export $ac_envvar ;;
1313 # FIXME: should be removed in autoconf 3.0.
1314 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1315 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1316 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1317 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1320 esac
1321 done
1323 if test -n "$ac_prev"; then
1324 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1325 as_fn_error $? "missing argument to $ac_option"
1328 if test -n "$ac_unrecognized_opts"; then
1329 case $enable_option_checking in
1330 no) ;;
1331 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1332 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1333 esac
1336 # Check all directory arguments for consistency.
1337 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1338 datadir sysconfdir sharedstatedir localstatedir includedir \
1339 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1340 libdir localedir mandir
1342 eval ac_val=\$$ac_var
1343 # Remove trailing slashes.
1344 case $ac_val in
1345 */ )
1346 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1347 eval $ac_var=\$ac_val;;
1348 esac
1349 # Be sure to have absolute directory names.
1350 case $ac_val in
1351 [\\/$]* | ?:[\\/]* ) continue;;
1352 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1353 esac
1354 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1355 done
1357 # There might be people who depend on the old broken behavior: `$host'
1358 # used to hold the argument of --host etc.
1359 # FIXME: To remove some day.
1360 build=$build_alias
1361 host=$host_alias
1362 target=$target_alias
1364 # FIXME: To remove some day.
1365 if test "x$host_alias" != x; then
1366 if test "x$build_alias" = x; then
1367 cross_compiling=maybe
1368 elif test "x$build_alias" != "x$host_alias"; then
1369 cross_compiling=yes
1373 ac_tool_prefix=
1374 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1376 test "$silent" = yes && exec 6>/dev/null
1379 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1380 ac_ls_di=`ls -di .` &&
1381 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1382 as_fn_error $? "working directory cannot be determined"
1383 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1384 as_fn_error $? "pwd does not report name of working directory"
1387 # Find the source files, if location was not specified.
1388 if test -z "$srcdir"; then
1389 ac_srcdir_defaulted=yes
1390 # Try the directory containing this script, then the parent directory.
1391 ac_confdir=`$as_dirname -- "$as_myself" ||
1392 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1393 X"$as_myself" : 'X\(//\)[^/]' \| \
1394 X"$as_myself" : 'X\(//\)$' \| \
1395 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1396 $as_echo X"$as_myself" |
1397 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1398 s//\1/
1401 /^X\(\/\/\)[^/].*/{
1402 s//\1/
1405 /^X\(\/\/\)$/{
1406 s//\1/
1409 /^X\(\/\).*/{
1410 s//\1/
1413 s/.*/./; q'`
1414 srcdir=$ac_confdir
1415 if test ! -r "$srcdir/$ac_unique_file"; then
1416 srcdir=..
1418 else
1419 ac_srcdir_defaulted=no
1421 if test ! -r "$srcdir/$ac_unique_file"; then
1422 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1423 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1425 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1426 ac_abs_confdir=`(
1427 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1428 pwd)`
1429 # When building in place, set srcdir=.
1430 if test "$ac_abs_confdir" = "$ac_pwd"; then
1431 srcdir=.
1433 # Remove unnecessary trailing slashes from srcdir.
1434 # Double slashes in file names in object file debugging info
1435 # mess up M-x gdb in Emacs.
1436 case $srcdir in
1437 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1438 esac
1439 for ac_var in $ac_precious_vars; do
1440 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1441 eval ac_env_${ac_var}_value=\$${ac_var}
1442 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1443 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1444 done
1447 # Report the --help message.
1449 if test "$ac_init_help" = "long"; then
1450 # Omit some internal or obsolete options to make the list less imposing.
1451 # This message is too long to be a string in the A/UX 3.1 sh.
1452 cat <<_ACEOF
1453 \`configure' configures PostgreSQL 16devel to adapt to many kinds of systems.
1455 Usage: $0 [OPTION]... [VAR=VALUE]...
1457 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1458 VAR=VALUE. See below for descriptions of some of the useful variables.
1460 Defaults for the options are specified in brackets.
1462 Configuration:
1463 -h, --help display this help and exit
1464 --help=short display options specific to this package
1465 --help=recursive display the short help of all the included packages
1466 -V, --version display version information and exit
1467 -q, --quiet, --silent do not print \`checking ...' messages
1468 --cache-file=FILE cache test results in FILE [disabled]
1469 -C, --config-cache alias for \`--cache-file=config.cache'
1470 -n, --no-create do not create output files
1471 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1473 Installation directories:
1474 --prefix=PREFIX install architecture-independent files in PREFIX
1475 [$ac_default_prefix]
1476 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1477 [PREFIX]
1479 By default, \`make install' will install all the files in
1480 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1481 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1482 for instance \`--prefix=\$HOME'.
1484 For better control, use the options below.
1486 Fine tuning of the installation directories:
1487 --bindir=DIR user executables [EPREFIX/bin]
1488 --sbindir=DIR system admin executables [EPREFIX/sbin]
1489 --libexecdir=DIR program executables [EPREFIX/libexec]
1490 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1491 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1492 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1493 --libdir=DIR object code libraries [EPREFIX/lib]
1494 --includedir=DIR C header files [PREFIX/include]
1495 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1496 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1497 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1498 --infodir=DIR info documentation [DATAROOTDIR/info]
1499 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1500 --mandir=DIR man documentation [DATAROOTDIR/man]
1501 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1502 --htmldir=DIR html documentation [DOCDIR]
1503 --dvidir=DIR dvi documentation [DOCDIR]
1504 --pdfdir=DIR pdf documentation [DOCDIR]
1505 --psdir=DIR ps documentation [DOCDIR]
1506 _ACEOF
1508 cat <<\_ACEOF
1510 System types:
1511 --build=BUILD configure for building on BUILD [guessed]
1512 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1513 _ACEOF
1516 if test -n "$ac_init_help"; then
1517 case $ac_init_help in
1518 short | recursive ) echo "Configuration of PostgreSQL 16devel:";;
1519 esac
1520 cat <<\_ACEOF
1522 Optional Features:
1523 --disable-option-checking ignore unrecognized --enable/--with options
1524 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1525 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1526 --disable-integer-datetimes
1527 obsolete option, no longer supported
1528 --enable-nls[=LANGUAGES]
1529 enable Native Language Support
1530 --disable-rpath do not embed shared library search path in
1531 executables
1532 --disable-spinlocks do not use spinlocks
1533 --disable-atomics do not use atomic operations
1534 --enable-debug build with debugging symbols (-g)
1535 --enable-profiling build with profiling enabled
1536 --enable-coverage build with coverage testing instrumentation
1537 --enable-dtrace build with DTrace support
1538 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1539 --enable-depend turn on automatic dependency tracking
1540 --enable-cassert enable assertion checks (for debugging)
1541 --disable-thread-safety disable thread-safety in client libraries
1542 --disable-largefile omit support for large files
1544 Optional Packages:
1545 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1546 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1547 --with-extra-version=STRING
1548 append STRING to version
1549 --with-template=NAME override operating system template
1550 --with-includes=DIRS look for additional header files in DIRS
1551 --with-libraries=DIRS look for additional libraries in DIRS
1552 --with-libs=DIRS alternative spelling of --with-libraries
1553 --with-pgport=PORTNUM set default port number [5432]
1554 --with-blocksize=BLOCKSIZE
1555 set table block size in kB [8]
1556 --with-segsize=SEGSIZE set table segment size in GB [1]
1557 --with-wal-blocksize=BLOCKSIZE
1558 set WAL block size in kB [8]
1559 --with-CC=CMD set compiler (deprecated)
1560 --with-llvm build with LLVM based JIT support
1561 --with-icu build with ICU support
1562 --with-tcl build Tcl modules (PL/Tcl)
1563 --with-tclconfig=DIR tclConfig.sh is in DIR
1564 --with-perl build Perl modules (PL/Perl)
1565 --with-python build Python modules (PL/Python)
1566 --with-gssapi build with GSSAPI support
1567 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1568 [postgres]
1569 --with-pam build with PAM support
1570 --with-bsd-auth build with BSD Authentication support
1571 --with-ldap build with LDAP support
1572 --with-bonjour build with Bonjour support
1573 --with-selinux build with SELinux support
1574 --with-systemd build with systemd support
1575 --without-readline do not use GNU Readline nor BSD Libedit for editing
1576 --with-libedit-preferred
1577 prefer BSD Libedit over GNU Readline
1578 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1579 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1580 --with-libxml build with XML support
1581 --with-libxslt use XSLT support when building contrib/xml2
1582 --with-system-tzdata=DIR
1583 use system time zone data in DIR
1584 --without-zlib do not use Zlib
1585 --with-lz4 build with LZ4 support
1586 --with-zstd build with ZSTD support
1587 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1588 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1589 --with-openssl obsolete spelling of --with-ssl=openssl
1591 Some influential environment variables:
1592 CC C compiler command
1593 CFLAGS C compiler flags
1594 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1595 nonstandard directory <lib dir>
1596 LIBS libraries to pass to the linker, e.g. -l<library>
1597 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1598 you have headers in a nonstandard directory <include dir>
1599 CXX C++ compiler command
1600 CXXFLAGS C++ compiler flags
1601 LLVM_CONFIG path to llvm-config command
1602 CLANG path to clang compiler to generate bitcode
1603 CPP C preprocessor
1604 PKG_CONFIG path to pkg-config utility
1605 PKG_CONFIG_PATH
1606 directories to add to pkg-config's search path
1607 PKG_CONFIG_LIBDIR
1608 path overriding pkg-config's built-in search path
1609 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1610 ICU_LIBS linker flags for ICU, overriding pkg-config
1611 XML2_CONFIG path to xml2-config utility
1612 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1613 XML2_LIBS linker flags for XML2, overriding pkg-config
1614 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1615 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1616 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1617 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1618 LDFLAGS_EX extra linker flags for linking executables only
1619 LDFLAGS_SL extra linker flags for linking shared libraries only
1620 PERL Perl program
1621 PYTHON Python program
1622 MSGFMT msgfmt program for NLS
1623 TCLSH Tcl interpreter program (tclsh)
1625 Use these variables to override the choices made by `configure' or to help
1626 it to find libraries and programs with nonstandard names/locations.
1628 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1629 PostgreSQL home page: <https://www.postgresql.org/>.
1630 _ACEOF
1631 ac_status=$?
1634 if test "$ac_init_help" = "recursive"; then
1635 # If there are subdirs, report their specific --help.
1636 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1637 test -d "$ac_dir" ||
1638 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1639 continue
1640 ac_builddir=.
1642 case "$ac_dir" in
1643 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1645 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1646 # A ".." for each directory in $ac_dir_suffix.
1647 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1648 case $ac_top_builddir_sub in
1649 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1650 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1651 esac ;;
1652 esac
1653 ac_abs_top_builddir=$ac_pwd
1654 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1655 # for backward compatibility:
1656 ac_top_builddir=$ac_top_build_prefix
1658 case $srcdir in
1659 .) # We are building in place.
1660 ac_srcdir=.
1661 ac_top_srcdir=$ac_top_builddir_sub
1662 ac_abs_top_srcdir=$ac_pwd ;;
1663 [\\/]* | ?:[\\/]* ) # Absolute name.
1664 ac_srcdir=$srcdir$ac_dir_suffix;
1665 ac_top_srcdir=$srcdir
1666 ac_abs_top_srcdir=$srcdir ;;
1667 *) # Relative name.
1668 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1669 ac_top_srcdir=$ac_top_build_prefix$srcdir
1670 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1671 esac
1672 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1674 cd "$ac_dir" || { ac_status=$?; continue; }
1675 # Check for guested configure.
1676 if test -f "$ac_srcdir/configure.gnu"; then
1677 echo &&
1678 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1679 elif test -f "$ac_srcdir/configure"; then
1680 echo &&
1681 $SHELL "$ac_srcdir/configure" --help=recursive
1682 else
1683 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1684 fi || ac_status=$?
1685 cd "$ac_pwd" || { ac_status=$?; break; }
1686 done
1689 test -n "$ac_init_help" && exit $ac_status
1690 if $ac_init_version; then
1691 cat <<\_ACEOF
1692 PostgreSQL configure 16devel
1693 generated by GNU Autoconf 2.69
1695 Copyright (C) 2012 Free Software Foundation, Inc.
1696 This configure script is free software; the Free Software Foundation
1697 gives unlimited permission to copy, distribute and modify it.
1699 Copyright (c) 1996-2022, PostgreSQL Global Development Group
1700 _ACEOF
1701 exit
1704 ## ------------------------ ##
1705 ## Autoconf initialization. ##
1706 ## ------------------------ ##
1708 # ac_fn_c_try_compile LINENO
1709 # --------------------------
1710 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1711 ac_fn_c_try_compile ()
1713 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1714 rm -f conftest.$ac_objext
1715 if { { ac_try="$ac_compile"
1716 case "(($ac_try" in
1717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1718 *) ac_try_echo=$ac_try;;
1719 esac
1720 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1721 $as_echo "$ac_try_echo"; } >&5
1722 (eval "$ac_compile") 2>conftest.err
1723 ac_status=$?
1724 if test -s conftest.err; then
1725 grep -v '^ *+' conftest.err >conftest.er1
1726 cat conftest.er1 >&5
1727 mv -f conftest.er1 conftest.err
1729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1730 test $ac_status = 0; } && {
1731 test -z "$ac_c_werror_flag" ||
1732 test ! -s conftest.err
1733 } && test -s conftest.$ac_objext; then :
1734 ac_retval=0
1735 else
1736 $as_echo "$as_me: failed program was:" >&5
1737 sed 's/^/| /' conftest.$ac_ext >&5
1739 ac_retval=1
1741 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1742 as_fn_set_status $ac_retval
1744 } # ac_fn_c_try_compile
1746 # ac_fn_cxx_try_compile LINENO
1747 # ----------------------------
1748 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1749 ac_fn_cxx_try_compile ()
1751 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1752 rm -f conftest.$ac_objext
1753 if { { ac_try="$ac_compile"
1754 case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757 esac
1758 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759 $as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_compile") 2>conftest.err
1761 ac_status=$?
1762 if test -s conftest.err; then
1763 grep -v '^ *+' conftest.err >conftest.er1
1764 cat conftest.er1 >&5
1765 mv -f conftest.er1 conftest.err
1767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1768 test $ac_status = 0; } && {
1769 test -z "$ac_cxx_werror_flag" ||
1770 test ! -s conftest.err
1771 } && test -s conftest.$ac_objext; then :
1772 ac_retval=0
1773 else
1774 $as_echo "$as_me: failed program was:" >&5
1775 sed 's/^/| /' conftest.$ac_ext >&5
1777 ac_retval=1
1779 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1780 as_fn_set_status $ac_retval
1782 } # ac_fn_cxx_try_compile
1784 # ac_fn_c_try_link LINENO
1785 # -----------------------
1786 # Try to link conftest.$ac_ext, and return whether this succeeded.
1787 ac_fn_c_try_link ()
1789 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1790 rm -f conftest.$ac_objext conftest$ac_exeext
1791 if { { ac_try="$ac_link"
1792 case "(($ac_try" in
1793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1794 *) ac_try_echo=$ac_try;;
1795 esac
1796 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1797 $as_echo "$ac_try_echo"; } >&5
1798 (eval "$ac_link") 2>conftest.err
1799 ac_status=$?
1800 if test -s conftest.err; then
1801 grep -v '^ *+' conftest.err >conftest.er1
1802 cat conftest.er1 >&5
1803 mv -f conftest.er1 conftest.err
1805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1806 test $ac_status = 0; } && {
1807 test -z "$ac_c_werror_flag" ||
1808 test ! -s conftest.err
1809 } && test -s conftest$ac_exeext && {
1810 test "$cross_compiling" = yes ||
1811 test -x conftest$ac_exeext
1812 }; then :
1813 ac_retval=0
1814 else
1815 $as_echo "$as_me: failed program was:" >&5
1816 sed 's/^/| /' conftest.$ac_ext >&5
1818 ac_retval=1
1820 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1821 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1822 # interfere with the next link command; also delete a directory that is
1823 # left behind by Apple's compiler. We do this before executing the actions.
1824 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1826 as_fn_set_status $ac_retval
1828 } # ac_fn_c_try_link
1830 # ac_fn_c_try_cpp LINENO
1831 # ----------------------
1832 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1833 ac_fn_c_try_cpp ()
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 if { { ac_try="$ac_cpp conftest.$ac_ext"
1837 case "(($ac_try" in
1838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1839 *) ac_try_echo=$ac_try;;
1840 esac
1841 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1842 $as_echo "$ac_try_echo"; } >&5
1843 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1844 ac_status=$?
1845 if test -s conftest.err; then
1846 grep -v '^ *+' conftest.err >conftest.er1
1847 cat conftest.er1 >&5
1848 mv -f conftest.er1 conftest.err
1850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1851 test $ac_status = 0; } > conftest.i && {
1852 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1853 test ! -s conftest.err
1854 }; then :
1855 ac_retval=0
1856 else
1857 $as_echo "$as_me: failed program was:" >&5
1858 sed 's/^/| /' conftest.$ac_ext >&5
1860 ac_retval=1
1862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863 as_fn_set_status $ac_retval
1865 } # ac_fn_c_try_cpp
1867 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1868 # -------------------------------------------------------
1869 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1870 # the include files in INCLUDES and setting the cache variable VAR
1871 # accordingly.
1872 ac_fn_c_check_header_mongrel ()
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 if eval \${$3+:} false; then :
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1877 $as_echo_n "checking for $2... " >&6; }
1878 if eval \${$3+:} false; then :
1879 $as_echo_n "(cached) " >&6
1881 eval ac_res=\$$3
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1883 $as_echo "$ac_res" >&6; }
1884 else
1885 # Is the header compilable?
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1887 $as_echo_n "checking $2 usability... " >&6; }
1888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1889 /* end confdefs.h. */
1891 #include <$2>
1892 _ACEOF
1893 if ac_fn_c_try_compile "$LINENO"; then :
1894 ac_header_compiler=yes
1895 else
1896 ac_header_compiler=no
1898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1900 $as_echo "$ac_header_compiler" >&6; }
1902 # Is the header present?
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1904 $as_echo_n "checking $2 presence... " >&6; }
1905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1906 /* end confdefs.h. */
1907 #include <$2>
1908 _ACEOF
1909 if ac_fn_c_try_cpp "$LINENO"; then :
1910 ac_header_preproc=yes
1911 else
1912 ac_header_preproc=no
1914 rm -f conftest.err conftest.i conftest.$ac_ext
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1916 $as_echo "$ac_header_preproc" >&6; }
1918 # So? What about this header?
1919 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1920 yes:no: )
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1922 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1924 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1926 no:yes:* )
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1928 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1930 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1932 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1934 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1936 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1937 ( $as_echo "## ---------------------------------------------- ##
1938 ## Report this to pgsql-bugs@lists.postgresql.org ##
1939 ## ---------------------------------------------- ##"
1940 ) | sed "s/^/$as_me: WARNING: /" >&2
1942 esac
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1944 $as_echo_n "checking for $2... " >&6; }
1945 if eval \${$3+:} false; then :
1946 $as_echo_n "(cached) " >&6
1947 else
1948 eval "$3=\$ac_header_compiler"
1950 eval ac_res=\$$3
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1952 $as_echo "$ac_res" >&6; }
1954 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1956 } # ac_fn_c_check_header_mongrel
1958 # ac_fn_c_try_run LINENO
1959 # ----------------------
1960 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1961 # that executables *can* be run.
1962 ac_fn_c_try_run ()
1964 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1965 if { { ac_try="$ac_link"
1966 case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969 esac
1970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971 $as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_link") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1976 { { case "(($ac_try" in
1977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978 *) ac_try_echo=$ac_try;;
1979 esac
1980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981 $as_echo "$ac_try_echo"; } >&5
1982 (eval "$ac_try") 2>&5
1983 ac_status=$?
1984 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1985 test $ac_status = 0; }; }; then :
1986 ac_retval=0
1987 else
1988 $as_echo "$as_me: program exited with status $ac_status" >&5
1989 $as_echo "$as_me: failed program was:" >&5
1990 sed 's/^/| /' conftest.$ac_ext >&5
1992 ac_retval=$ac_status
1994 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1995 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1996 as_fn_set_status $ac_retval
1998 } # ac_fn_c_try_run
2000 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2001 # -------------------------------------------------------
2002 # Tests whether HEADER exists and can be compiled using the include files in
2003 # INCLUDES, setting the cache variable VAR accordingly.
2004 ac_fn_c_check_header_compile ()
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2008 $as_echo_n "checking for $2... " >&6; }
2009 if eval \${$3+:} false; then :
2010 $as_echo_n "(cached) " >&6
2011 else
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013 /* end confdefs.h. */
2015 #include <$2>
2016 _ACEOF
2017 if ac_fn_c_try_compile "$LINENO"; then :
2018 eval "$3=yes"
2019 else
2020 eval "$3=no"
2022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2024 eval ac_res=\$$3
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026 $as_echo "$ac_res" >&6; }
2027 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029 } # ac_fn_c_check_header_compile
2031 # ac_fn_c_check_func LINENO FUNC VAR
2032 # ----------------------------------
2033 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2034 ac_fn_c_check_func ()
2036 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2038 $as_echo_n "checking for $2... " >&6; }
2039 if eval \${$3+:} false; then :
2040 $as_echo_n "(cached) " >&6
2041 else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043 /* end confdefs.h. */
2044 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2045 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2046 #define $2 innocuous_$2
2048 /* System header to define __stub macros and hopefully few prototypes,
2049 which can conflict with char $2 (); below.
2050 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2051 <limits.h> exists even on freestanding compilers. */
2053 #ifdef __STDC__
2054 # include <limits.h>
2055 #else
2056 # include <assert.h>
2057 #endif
2059 #undef $2
2061 /* Override any GCC internal prototype to avoid an error.
2062 Use char because int might match the return type of a GCC
2063 builtin and then its argument prototype would still apply. */
2064 #ifdef __cplusplus
2065 extern "C"
2066 #endif
2067 char $2 ();
2068 /* The GNU C library defines this for functions which it implements
2069 to always fail with ENOSYS. Some functions are actually named
2070 something starting with __ and the normal name is an alias. */
2071 #if defined __stub_$2 || defined __stub___$2
2072 choke me
2073 #endif
2076 main ()
2078 return $2 ();
2080 return 0;
2082 _ACEOF
2083 if ac_fn_c_try_link "$LINENO"; then :
2084 eval "$3=yes"
2085 else
2086 eval "$3=no"
2088 rm -f core conftest.err conftest.$ac_objext \
2089 conftest$ac_exeext conftest.$ac_ext
2091 eval ac_res=\$$3
2092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2093 $as_echo "$ac_res" >&6; }
2094 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2096 } # ac_fn_c_check_func
2098 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2099 # -------------------------------------------
2100 # Tests whether TYPE exists after having included INCLUDES, setting cache
2101 # variable VAR accordingly.
2102 ac_fn_c_check_type ()
2104 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2106 $as_echo_n "checking for $2... " >&6; }
2107 if eval \${$3+:} false; then :
2108 $as_echo_n "(cached) " >&6
2109 else
2110 eval "$3=no"
2111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2112 /* end confdefs.h. */
2115 main ()
2117 if (sizeof ($2))
2118 return 0;
2120 return 0;
2122 _ACEOF
2123 if ac_fn_c_try_compile "$LINENO"; then :
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h. */
2128 main ()
2130 if (sizeof (($2)))
2131 return 0;
2133 return 0;
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2138 else
2139 eval "$3=yes"
2141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 eval ac_res=\$$3
2146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2147 $as_echo "$ac_res" >&6; }
2148 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2150 } # ac_fn_c_check_type
2152 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2153 # ----------------------------------------------------
2154 # Tries to find if the field MEMBER exists in type AGGR, after including
2155 # INCLUDES, setting cache variable VAR accordingly.
2156 ac_fn_c_check_member ()
2158 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2160 $as_echo_n "checking for $2.$3... " >&6; }
2161 if eval \${$4+:} false; then :
2162 $as_echo_n "(cached) " >&6
2163 else
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165 /* end confdefs.h. */
2168 main ()
2170 static $2 ac_aggr;
2171 if (ac_aggr.$3)
2172 return 0;
2174 return 0;
2176 _ACEOF
2177 if ac_fn_c_try_compile "$LINENO"; then :
2178 eval "$4=yes"
2179 else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181 /* end confdefs.h. */
2184 main ()
2186 static $2 ac_aggr;
2187 if (sizeof ac_aggr.$3)
2188 return 0;
2190 return 0;
2192 _ACEOF
2193 if ac_fn_c_try_compile "$LINENO"; then :
2194 eval "$4=yes"
2195 else
2196 eval "$4=no"
2198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202 eval ac_res=\$$4
2203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2204 $as_echo "$ac_res" >&6; }
2205 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2207 } # ac_fn_c_check_member
2209 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2210 # --------------------------------------------
2211 # Tries to find the compile-time value of EXPR in a program that includes
2212 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2213 # computed
2214 ac_fn_c_compute_int ()
2216 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217 if test "$cross_compiling" = yes; then
2218 # Depending upon the size, compute the lo and hi bounds.
2219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220 /* end confdefs.h. */
2223 main ()
2225 static int test_array [1 - 2 * !(($2) >= 0)];
2226 test_array [0] = 0;
2227 return test_array [0];
2230 return 0;
2232 _ACEOF
2233 if ac_fn_c_try_compile "$LINENO"; then :
2234 ac_lo=0 ac_mid=0
2235 while :; do
2236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2237 /* end confdefs.h. */
2240 main ()
2242 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2243 test_array [0] = 0;
2244 return test_array [0];
2247 return 0;
2249 _ACEOF
2250 if ac_fn_c_try_compile "$LINENO"; then :
2251 ac_hi=$ac_mid; break
2252 else
2253 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2254 if test $ac_lo -le $ac_mid; then
2255 ac_lo= ac_hi=
2256 break
2258 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2261 done
2262 else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264 /* end confdefs.h. */
2267 main ()
2269 static int test_array [1 - 2 * !(($2) < 0)];
2270 test_array [0] = 0;
2271 return test_array [0];
2274 return 0;
2276 _ACEOF
2277 if ac_fn_c_try_compile "$LINENO"; then :
2278 ac_hi=-1 ac_mid=-1
2279 while :; do
2280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281 /* end confdefs.h. */
2284 main ()
2286 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2287 test_array [0] = 0;
2288 return test_array [0];
2291 return 0;
2293 _ACEOF
2294 if ac_fn_c_try_compile "$LINENO"; then :
2295 ac_lo=$ac_mid; break
2296 else
2297 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2298 if test $ac_mid -le $ac_hi; then
2299 ac_lo= ac_hi=
2300 break
2302 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2305 done
2306 else
2307 ac_lo= ac_hi=
2309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312 # Binary search between lo and hi bounds.
2313 while test "x$ac_lo" != "x$ac_hi"; do
2314 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h. */
2319 main ()
2321 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2322 test_array [0] = 0;
2323 return test_array [0];
2326 return 0;
2328 _ACEOF
2329 if ac_fn_c_try_compile "$LINENO"; then :
2330 ac_hi=$ac_mid
2331 else
2332 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335 done
2336 case $ac_lo in #((
2337 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2338 '') ac_retval=1 ;;
2339 esac
2340 else
2341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2342 /* end confdefs.h. */
2344 static long int longval () { return $2; }
2345 static unsigned long int ulongval () { return $2; }
2346 #include <stdio.h>
2347 #include <stdlib.h>
2349 main ()
2352 FILE *f = fopen ("conftest.val", "w");
2353 if (! f)
2354 return 1;
2355 if (($2) < 0)
2357 long int i = longval ();
2358 if (i != ($2))
2359 return 1;
2360 fprintf (f, "%ld", i);
2362 else
2364 unsigned long int i = ulongval ();
2365 if (i != ($2))
2366 return 1;
2367 fprintf (f, "%lu", i);
2369 /* Do not output a trailing newline, as this causes \r\n confusion
2370 on some platforms. */
2371 return ferror (f) || fclose (f) != 0;
2374 return 0;
2376 _ACEOF
2377 if ac_fn_c_try_run "$LINENO"; then :
2378 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2379 else
2380 ac_retval=1
2382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2383 conftest.$ac_objext conftest.beam conftest.$ac_ext
2384 rm -f conftest.val
2387 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2388 as_fn_set_status $ac_retval
2390 } # ac_fn_c_compute_int
2392 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2393 # ---------------------------------------------
2394 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2395 # accordingly.
2396 ac_fn_c_check_decl ()
2398 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2400 as_decl_name=`echo $2|sed 's/ *(.*//'`
2401 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2403 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2404 if eval \${$3+:} false; then :
2405 $as_echo_n "(cached) " >&6
2406 else
2407 ac_save_werror_flag=$ac_c_werror_flag
2408 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2410 /* end confdefs.h. */
2413 main ()
2415 #ifndef $as_decl_name
2416 #ifdef __cplusplus
2417 (void) $as_decl_use;
2418 #else
2419 (void) $as_decl_name;
2420 #endif
2421 #endif
2424 return 0;
2426 _ACEOF
2427 if ac_fn_c_try_compile "$LINENO"; then :
2428 eval "$3=yes"
2429 else
2430 eval "$3=no"
2432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2433 ac_c_werror_flag=$ac_save_werror_flag
2435 eval ac_res=\$$3
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437 $as_echo "$ac_res" >&6; }
2438 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2440 } # ac_fn_c_check_decl
2441 cat >config.log <<_ACEOF
2442 This file contains any messages produced by compilers while
2443 running configure, to aid debugging if configure makes a mistake.
2445 It was created by PostgreSQL $as_me 16devel, which was
2446 generated by GNU Autoconf 2.69. Invocation command line was
2448 $ $0 $@
2450 _ACEOF
2451 exec 5>>config.log
2453 cat <<_ASUNAME
2454 ## --------- ##
2455 ## Platform. ##
2456 ## --------- ##
2458 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2459 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2460 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2461 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2462 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2464 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2465 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2467 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2468 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2469 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2470 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2471 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2472 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2473 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2475 _ASUNAME
2477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2478 for as_dir in $PATH
2480 IFS=$as_save_IFS
2481 test -z "$as_dir" && as_dir=.
2482 $as_echo "PATH: $as_dir"
2483 done
2484 IFS=$as_save_IFS
2486 } >&5
2488 cat >&5 <<_ACEOF
2491 ## ----------- ##
2492 ## Core tests. ##
2493 ## ----------- ##
2495 _ACEOF
2498 # Keep a trace of the command line.
2499 # Strip out --no-create and --no-recursion so they do not pile up.
2500 # Strip out --silent because we don't want to record it for future runs.
2501 # Also quote any args containing shell meta-characters.
2502 # Make two passes to allow for proper duplicate-argument suppression.
2503 ac_configure_args=
2504 ac_configure_args0=
2505 ac_configure_args1=
2506 ac_must_keep_next=false
2507 for ac_pass in 1 2
2509 for ac_arg
2511 case $ac_arg in
2512 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2513 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2514 | -silent | --silent | --silen | --sile | --sil)
2515 continue ;;
2516 *\'*)
2517 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2518 esac
2519 case $ac_pass in
2520 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2522 as_fn_append ac_configure_args1 " '$ac_arg'"
2523 if test $ac_must_keep_next = true; then
2524 ac_must_keep_next=false # Got value, back to normal.
2525 else
2526 case $ac_arg in
2527 *=* | --config-cache | -C | -disable-* | --disable-* \
2528 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2529 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2530 | -with-* | --with-* | -without-* | --without-* | --x)
2531 case "$ac_configure_args0 " in
2532 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2533 esac
2535 -* ) ac_must_keep_next=true ;;
2536 esac
2538 as_fn_append ac_configure_args " '$ac_arg'"
2540 esac
2541 done
2542 done
2543 { ac_configure_args0=; unset ac_configure_args0;}
2544 { ac_configure_args1=; unset ac_configure_args1;}
2546 # When interrupted or exit'd, cleanup temporary files, and complete
2547 # config.log. We remove comments because anyway the quotes in there
2548 # would cause problems or look ugly.
2549 # WARNING: Use '\'' to represent an apostrophe within the trap.
2550 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2551 trap 'exit_status=$?
2552 # Save into config.log some information that might help in debugging.
2554 echo
2556 $as_echo "## ---------------- ##
2557 ## Cache variables. ##
2558 ## ---------------- ##"
2559 echo
2560 # The following way of writing the cache mishandles newlines in values,
2562 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2563 eval ac_val=\$$ac_var
2564 case $ac_val in #(
2565 *${as_nl}*)
2566 case $ac_var in #(
2567 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2568 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2569 esac
2570 case $ac_var in #(
2571 _ | IFS | as_nl) ;; #(
2572 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2573 *) { eval $ac_var=; unset $ac_var;} ;;
2574 esac ;;
2575 esac
2576 done
2577 (set) 2>&1 |
2578 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2579 *${as_nl}ac_space=\ *)
2580 sed -n \
2581 "s/'\''/'\''\\\\'\'''\''/g;
2582 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2583 ;; #(
2585 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2587 esac |
2588 sort
2590 echo
2592 $as_echo "## ----------------- ##
2593 ## Output variables. ##
2594 ## ----------------- ##"
2595 echo
2596 for ac_var in $ac_subst_vars
2598 eval ac_val=\$$ac_var
2599 case $ac_val in
2600 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2601 esac
2602 $as_echo "$ac_var='\''$ac_val'\''"
2603 done | sort
2604 echo
2606 if test -n "$ac_subst_files"; then
2607 $as_echo "## ------------------- ##
2608 ## File substitutions. ##
2609 ## ------------------- ##"
2610 echo
2611 for ac_var in $ac_subst_files
2613 eval ac_val=\$$ac_var
2614 case $ac_val in
2615 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2616 esac
2617 $as_echo "$ac_var='\''$ac_val'\''"
2618 done | sort
2619 echo
2622 if test -s confdefs.h; then
2623 $as_echo "## ----------- ##
2624 ## confdefs.h. ##
2625 ## ----------- ##"
2626 echo
2627 cat confdefs.h
2628 echo
2630 test "$ac_signal" != 0 &&
2631 $as_echo "$as_me: caught signal $ac_signal"
2632 $as_echo "$as_me: exit $exit_status"
2633 } >&5
2634 rm -f core *.core core.conftest.* &&
2635 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2636 exit $exit_status
2638 for ac_signal in 1 2 13 15; do
2639 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2640 done
2641 ac_signal=0
2643 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2644 rm -f -r conftest* confdefs.h
2646 $as_echo "/* confdefs.h */" > confdefs.h
2648 # Predefined preprocessor variables.
2650 cat >>confdefs.h <<_ACEOF
2651 #define PACKAGE_NAME "$PACKAGE_NAME"
2652 _ACEOF
2654 cat >>confdefs.h <<_ACEOF
2655 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2656 _ACEOF
2658 cat >>confdefs.h <<_ACEOF
2659 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2660 _ACEOF
2662 cat >>confdefs.h <<_ACEOF
2663 #define PACKAGE_STRING "$PACKAGE_STRING"
2664 _ACEOF
2666 cat >>confdefs.h <<_ACEOF
2667 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2668 _ACEOF
2670 cat >>confdefs.h <<_ACEOF
2671 #define PACKAGE_URL "$PACKAGE_URL"
2672 _ACEOF
2675 # Let the site file select an alternate cache file if it wants to.
2676 # Prefer an explicitly selected file to automatically selected ones.
2677 ac_site_file1=NONE
2678 ac_site_file2=NONE
2679 if test -n "$CONFIG_SITE"; then
2680 # We do not want a PATH search for config.site.
2681 case $CONFIG_SITE in #((
2682 -*) ac_site_file1=./$CONFIG_SITE;;
2683 */*) ac_site_file1=$CONFIG_SITE;;
2684 *) ac_site_file1=./$CONFIG_SITE;;
2685 esac
2686 elif test "x$prefix" != xNONE; then
2687 ac_site_file1=$prefix/share/config.site
2688 ac_site_file2=$prefix/etc/config.site
2689 else
2690 ac_site_file1=$ac_default_prefix/share/config.site
2691 ac_site_file2=$ac_default_prefix/etc/config.site
2693 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2695 test "x$ac_site_file" = xNONE && continue
2696 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2698 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2699 sed 's/^/| /' "$ac_site_file" >&5
2700 . "$ac_site_file" \
2701 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2702 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2703 as_fn_error $? "failed to load site script $ac_site_file
2704 See \`config.log' for more details" "$LINENO" 5; }
2706 done
2708 if test -r "$cache_file"; then
2709 # Some versions of bash will fail to source /dev/null (special files
2710 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2711 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2713 $as_echo "$as_me: loading cache $cache_file" >&6;}
2714 case $cache_file in
2715 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2716 *) . "./$cache_file";;
2717 esac
2719 else
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2721 $as_echo "$as_me: creating cache $cache_file" >&6;}
2722 >$cache_file
2725 # Check that the precious variables saved in the cache have kept the same
2726 # value.
2727 ac_cache_corrupted=false
2728 for ac_var in $ac_precious_vars; do
2729 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2730 eval ac_new_set=\$ac_env_${ac_var}_set
2731 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2732 eval ac_new_val=\$ac_env_${ac_var}_value
2733 case $ac_old_set,$ac_new_set in
2734 set,)
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2736 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2737 ac_cache_corrupted=: ;;
2738 ,set)
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2740 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2741 ac_cache_corrupted=: ;;
2742 ,);;
2744 if test "x$ac_old_val" != "x$ac_new_val"; then
2745 # differences in whitespace do not lead to failure.
2746 ac_old_val_w=`echo x $ac_old_val`
2747 ac_new_val_w=`echo x $ac_new_val`
2748 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2750 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2751 ac_cache_corrupted=:
2752 else
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2754 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2755 eval $ac_var=\$ac_old_val
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2758 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2760 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2761 fi;;
2762 esac
2763 # Pass precious variables to config.status.
2764 if test "$ac_new_set" = set; then
2765 case $ac_new_val in
2766 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2767 *) ac_arg=$ac_var=$ac_new_val ;;
2768 esac
2769 case " $ac_configure_args " in
2770 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2771 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2772 esac
2774 done
2775 if $ac_cache_corrupted; then
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2777 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2779 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2780 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2782 ## -------------------- ##
2783 ## Main body of script. ##
2784 ## -------------------- ##
2786 ac_ext=c
2787 ac_cpp='$CPP $CPPFLAGS'
2788 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2789 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2797 ac_aux_dir=
2798 for ac_dir in config "$srcdir"/config; do
2799 if test -f "$ac_dir/install-sh"; then
2800 ac_aux_dir=$ac_dir
2801 ac_install_sh="$ac_aux_dir/install-sh -c"
2802 break
2803 elif test -f "$ac_dir/install.sh"; then
2804 ac_aux_dir=$ac_dir
2805 ac_install_sh="$ac_aux_dir/install.sh -c"
2806 break
2807 elif test -f "$ac_dir/shtool"; then
2808 ac_aux_dir=$ac_dir
2809 ac_install_sh="$ac_aux_dir/shtool install -c"
2810 break
2812 done
2813 if test -z "$ac_aux_dir"; then
2814 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2817 # These three variables are undocumented and unsupported,
2818 # and are intended to be withdrawn in a future Autoconf release.
2819 # They can cause serious problems if a builder's source tree is in a directory
2820 # whose full name contains unusual characters.
2821 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2822 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2823 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2828 cat >>confdefs.h <<_ACEOF
2829 #define CONFIGURE_ARGS "$ac_configure_args"
2830 _ACEOF
2833 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2834 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2835 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2838 cat >>confdefs.h <<_ACEOF
2839 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2840 _ACEOF
2843 cat >>confdefs.h <<_ACEOF
2844 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2845 _ACEOF
2848 cat >>confdefs.h <<_ACEOF
2849 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2850 _ACEOF
2856 # Check whether --with-extra-version was given.
2857 if test "${with_extra_version+set}" = set; then :
2858 withval=$with_extra_version;
2859 case $withval in
2860 yes)
2861 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2864 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2867 PG_VERSION="$PACKAGE_VERSION$withval"
2869 esac
2871 else
2872 PG_VERSION="$PACKAGE_VERSION"
2877 cat >>confdefs.h <<_ACEOF
2878 #define PG_VERSION "$PG_VERSION"
2879 _ACEOF
2882 # Make sure we can run config.sub.
2883 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2884 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2887 $as_echo_n "checking build system type... " >&6; }
2888 if ${ac_cv_build+:} false; then :
2889 $as_echo_n "(cached) " >&6
2890 else
2891 ac_build_alias=$build_alias
2892 test "x$ac_build_alias" = x &&
2893 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2894 test "x$ac_build_alias" = x &&
2895 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2896 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2897 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2901 $as_echo "$ac_cv_build" >&6; }
2902 case $ac_cv_build in
2903 *-*-*) ;;
2904 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2905 esac
2906 build=$ac_cv_build
2907 ac_save_IFS=$IFS; IFS='-'
2908 set x $ac_cv_build
2909 shift
2910 build_cpu=$1
2911 build_vendor=$2
2912 shift; shift
2913 # Remember, the first character of IFS is used to create $*,
2914 # except with old shells:
2915 build_os=$*
2916 IFS=$ac_save_IFS
2917 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2921 $as_echo_n "checking host system type... " >&6; }
2922 if ${ac_cv_host+:} false; then :
2923 $as_echo_n "(cached) " >&6
2924 else
2925 if test "x$host_alias" = x; then
2926 ac_cv_host=$ac_cv_build
2927 else
2928 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2929 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2934 $as_echo "$ac_cv_host" >&6; }
2935 case $ac_cv_host in
2936 *-*-*) ;;
2937 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2938 esac
2939 host=$ac_cv_host
2940 ac_save_IFS=$IFS; IFS='-'
2941 set x $ac_cv_host
2942 shift
2943 host_cpu=$1
2944 host_vendor=$2
2945 shift; shift
2946 # Remember, the first character of IFS is used to create $*,
2947 # except with old shells:
2948 host_os=$*
2949 IFS=$ac_save_IFS
2950 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2954 template=
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2956 $as_echo_n "checking which template to use... " >&6; }
2961 # Check whether --with-template was given.
2962 if test "${with_template+set}" = set; then :
2963 withval=$with_template;
2964 case $withval in
2965 yes)
2966 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2969 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2973 case $withval in
2974 list) echo; ls "$srcdir/src/template"; exit;;
2975 *) if test -f "$srcdir/src/template/$with_template" ; then
2976 template=$withval
2977 else
2978 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2979 fi;;
2980 esac
2983 esac
2985 else
2987 # --with-template not given
2989 case $host_os in
2990 aix*) template=aix ;;
2991 cygwin*|msys*) template=cygwin ;;
2992 darwin*) template=darwin ;;
2993 dragonfly*) template=netbsd ;;
2994 freebsd*) template=freebsd ;;
2995 linux*|gnu*|k*bsd*-gnu)
2996 template=linux ;;
2997 mingw*) template=win32 ;;
2998 netbsd*) template=netbsd ;;
2999 openbsd*) template=openbsd ;;
3000 solaris*) template=solaris ;;
3001 esac
3003 if test x"$template" = x"" ; then
3004 as_fn_error $? "
3005 *******************************************************************
3006 PostgreSQL has apparently not been ported to your platform yet.
3007 To try a manual configuration, look into the src/template directory
3008 for a similar platform and use the '--with-template=' option.
3010 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3011 rectifying this. Include the above 'checking host system type...'
3012 line.
3013 *******************************************************************
3014 " "$LINENO" 5
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3023 $as_echo "$template" >&6; }
3025 PORTNAME=$template
3028 # Initialize default assumption that we do not need separate assembly code
3029 # for TAS (test-and-set). This can be overridden by the template file
3030 # when it's executed.
3031 need_tas=no
3032 tas_file=dummy.s
3034 # Default, works for most platforms, override in template file if needed
3035 DLSUFFIX=".so"
3040 ## Command line options
3044 # Add non-standard directories to the include path
3049 # Check whether --with-includes was given.
3050 if test "${with_includes+set}" = set; then :
3051 withval=$with_includes;
3052 case $withval in
3053 yes)
3054 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3057 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3062 esac
3070 # Add non-standard directories to the library search path
3075 # Check whether --with-libraries was given.
3076 if test "${with_libraries+set}" = set; then :
3077 withval=$with_libraries;
3078 case $withval in
3079 yes)
3080 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3083 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3086 LIBRARY_DIRS=$withval
3088 esac
3097 # Check whether --with-libs was given.
3098 if test "${with_libs+set}" = set; then :
3099 withval=$with_libs;
3100 case $withval in
3101 yes)
3102 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3105 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3108 LIBRARY_DIRS=$withval
3110 esac
3118 # 64-bit integer date/time storage is now the only option, but to avoid
3119 # unnecessary breakage of build scripts, continue to accept an explicit
3120 # "--enable-integer-datetimes" switch.
3124 # Check whether --enable-integer-datetimes was given.
3125 if test "${enable_integer_datetimes+set}" = set; then :
3126 enableval=$enable_integer_datetimes;
3127 case $enableval in
3128 yes)
3132 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3135 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3137 esac
3139 else
3140 enable_integer_datetimes=yes
3148 # NLS
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3151 $as_echo_n "checking whether NLS is wanted... " >&6; }
3154 # Check whether --enable-nls was given.
3155 if test "${enable_nls+set}" = set; then :
3156 enableval=$enable_nls;
3157 case $enableval in
3158 yes)
3165 enable_nls=yes
3166 WANTED_LANGUAGES=$enableval
3168 esac
3170 else
3171 enable_nls=no
3176 if test "$enable_nls" = yes; then
3178 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3183 $as_echo "$enable_nls" >&6; }
3188 # Default port number (--with-pgport), default 5432
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3191 $as_echo_n "checking for default port number... " >&6; }
3195 # Check whether --with-pgport was given.
3196 if test "${with_pgport+set}" = set; then :
3197 withval=$with_pgport;
3198 case $withval in
3199 yes)
3200 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3203 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3206 default_port=$withval
3208 esac
3210 else
3211 default_port=5432
3215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3216 $as_echo "$default_port" >&6; }
3217 # Need both of these because some places want an integer and some a string
3219 cat >>confdefs.h <<_ACEOF
3220 #define DEF_PGPORT ${default_port}
3221 _ACEOF
3224 cat >>confdefs.h <<_ACEOF
3225 #define DEF_PGPORT_STR "${default_port}"
3226 _ACEOF
3230 # It's worth validating port; you can get very confusing errors otherwise
3231 if test x"$default_port" = x""; then
3232 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3233 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3234 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3235 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3236 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3237 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3238 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3242 # '-rpath'-like feature can be disabled
3246 # Check whether --enable-rpath was given.
3247 if test "${enable_rpath+set}" = set; then :
3248 enableval=$enable_rpath;
3249 case $enableval in
3250 yes)
3257 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3259 esac
3261 else
3262 enable_rpath=yes
3270 # Spinlocks
3274 # Check whether --enable-spinlocks was given.
3275 if test "${enable_spinlocks+set}" = set; then :
3276 enableval=$enable_spinlocks;
3277 case $enableval in
3278 yes)
3285 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3287 esac
3289 else
3290 enable_spinlocks=yes
3297 # Atomic operations
3301 # Check whether --enable-atomics was given.
3302 if test "${enable_atomics+set}" = set; then :
3303 enableval=$enable_atomics;
3304 case $enableval in
3305 yes)
3312 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3314 esac
3316 else
3317 enable_atomics=yes
3324 # --enable-debug adds -g to compiler flags
3328 # Check whether --enable-debug was given.
3329 if test "${enable_debug+set}" = set; then :
3330 enableval=$enable_debug;
3331 case $enableval in
3332 yes)
3339 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3341 esac
3343 else
3344 enable_debug=no
3352 # --enable-profiling enables gcc profiling
3356 # Check whether --enable-profiling was given.
3357 if test "${enable_profiling+set}" = set; then :
3358 enableval=$enable_profiling;
3359 case $enableval in
3360 yes)
3367 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3369 esac
3371 else
3372 enable_profiling=no
3379 # --enable-coverage enables generation of code coverage metrics with gcov
3383 # Check whether --enable-coverage was given.
3384 if test "${enable_coverage+set}" = set; then :
3385 enableval=$enable_coverage;
3386 case $enableval in
3387 yes)
3388 if test -z "$GCOV"; then
3389 for ac_prog in gcov
3391 # Extract the first word of "$ac_prog", so it can be a program name with args.
3392 set dummy $ac_prog; ac_word=$2
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3394 $as_echo_n "checking for $ac_word... " >&6; }
3395 if ${ac_cv_path_GCOV+:} false; then :
3396 $as_echo_n "(cached) " >&6
3397 else
3398 case $GCOV in
3399 [\\/]* | ?:[\\/]*)
3400 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3404 for as_dir in $PATH
3406 IFS=$as_save_IFS
3407 test -z "$as_dir" && as_dir=.
3408 for ac_exec_ext in '' $ac_executable_extensions; do
3409 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3410 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3412 break 2
3414 done
3415 done
3416 IFS=$as_save_IFS
3419 esac
3421 GCOV=$ac_cv_path_GCOV
3422 if test -n "$GCOV"; then
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3424 $as_echo "$GCOV" >&6; }
3425 else
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3427 $as_echo "no" >&6; }
3431 test -n "$GCOV" && break
3432 done
3434 else
3435 # Report the value of GCOV in configure's output in all cases.
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3437 $as_echo_n "checking for GCOV... " >&6; }
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3439 $as_echo "$GCOV" >&6; }
3442 if test -z "$GCOV"; then
3443 as_fn_error $? "gcov not found" "$LINENO" 5
3445 if test -z "$LCOV"; then
3446 for ac_prog in lcov
3448 # Extract the first word of "$ac_prog", so it can be a program name with args.
3449 set dummy $ac_prog; ac_word=$2
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451 $as_echo_n "checking for $ac_word... " >&6; }
3452 if ${ac_cv_path_LCOV+:} false; then :
3453 $as_echo_n "(cached) " >&6
3454 else
3455 case $LCOV in
3456 [\\/]* | ?:[\\/]*)
3457 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3461 for as_dir in $PATH
3463 IFS=$as_save_IFS
3464 test -z "$as_dir" && as_dir=.
3465 for ac_exec_ext in '' $ac_executable_extensions; do
3466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3467 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3469 break 2
3471 done
3472 done
3473 IFS=$as_save_IFS
3476 esac
3478 LCOV=$ac_cv_path_LCOV
3479 if test -n "$LCOV"; then
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3481 $as_echo "$LCOV" >&6; }
3482 else
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3484 $as_echo "no" >&6; }
3488 test -n "$LCOV" && break
3489 done
3491 else
3492 # Report the value of LCOV in configure's output in all cases.
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3494 $as_echo_n "checking for LCOV... " >&6; }
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3496 $as_echo "$LCOV" >&6; }
3499 if test -z "$LCOV"; then
3500 as_fn_error $? "lcov not found" "$LINENO" 5
3502 if test -z "$GENHTML"; then
3503 for ac_prog in genhtml
3505 # Extract the first word of "$ac_prog", so it can be a program name with args.
3506 set dummy $ac_prog; ac_word=$2
3507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3508 $as_echo_n "checking for $ac_word... " >&6; }
3509 if ${ac_cv_path_GENHTML+:} false; then :
3510 $as_echo_n "(cached) " >&6
3511 else
3512 case $GENHTML in
3513 [\\/]* | ?:[\\/]*)
3514 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3518 for as_dir in $PATH
3520 IFS=$as_save_IFS
3521 test -z "$as_dir" && as_dir=.
3522 for ac_exec_ext in '' $ac_executable_extensions; do
3523 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3524 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3526 break 2
3528 done
3529 done
3530 IFS=$as_save_IFS
3533 esac
3535 GENHTML=$ac_cv_path_GENHTML
3536 if test -n "$GENHTML"; then
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3538 $as_echo "$GENHTML" >&6; }
3539 else
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3541 $as_echo "no" >&6; }
3545 test -n "$GENHTML" && break
3546 done
3548 else
3549 # Report the value of GENHTML in configure's output in all cases.
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3551 $as_echo_n "checking for GENHTML... " >&6; }
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3553 $as_echo "$GENHTML" >&6; }
3556 if test -z "$GENHTML"; then
3557 as_fn_error $? "genhtml not found" "$LINENO" 5
3564 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3566 esac
3568 else
3569 enable_coverage=no
3577 # DTrace
3581 # Check whether --enable-dtrace was given.
3582 if test "${enable_dtrace+set}" = set; then :
3583 enableval=$enable_dtrace;
3584 case $enableval in
3585 yes)
3586 if test -z "$DTRACE"; then
3587 for ac_prog in dtrace
3589 # Extract the first word of "$ac_prog", so it can be a program name with args.
3590 set dummy $ac_prog; ac_word=$2
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592 $as_echo_n "checking for $ac_word... " >&6; }
3593 if ${ac_cv_path_DTRACE+:} false; then :
3594 $as_echo_n "(cached) " >&6
3595 else
3596 case $DTRACE in
3597 [\\/]* | ?:[\\/]*)
3598 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3602 for as_dir in $PATH
3604 IFS=$as_save_IFS
3605 test -z "$as_dir" && as_dir=.
3606 for ac_exec_ext in '' $ac_executable_extensions; do
3607 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3608 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3609 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3610 break 2
3612 done
3613 done
3614 IFS=$as_save_IFS
3617 esac
3619 DTRACE=$ac_cv_path_DTRACE
3620 if test -n "$DTRACE"; then
3621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3622 $as_echo "$DTRACE" >&6; }
3623 else
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3625 $as_echo "no" >&6; }
3629 test -n "$DTRACE" && break
3630 done
3632 else
3633 # Report the value of DTRACE in configure's output in all cases.
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3635 $as_echo_n "checking for DTRACE... " >&6; }
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3637 $as_echo "$DTRACE" >&6; }
3640 if test -z "$DTRACE"; then
3641 as_fn_error $? "dtrace not found" "$LINENO" 5
3649 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3651 esac
3653 else
3654 enable_dtrace=no
3662 # TAP tests
3666 # Check whether --enable-tap-tests was given.
3667 if test "${enable_tap_tests+set}" = set; then :
3668 enableval=$enable_tap_tests;
3669 case $enableval in
3670 yes)
3677 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3679 esac
3681 else
3682 enable_tap_tests=no
3690 # Block size
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3693 $as_echo_n "checking for block size... " >&6; }
3697 # Check whether --with-blocksize was given.
3698 if test "${with_blocksize+set}" = set; then :
3699 withval=$with_blocksize;
3700 case $withval in
3701 yes)
3702 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3705 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3708 blocksize=$withval
3710 esac
3712 else
3713 blocksize=8
3717 case ${blocksize} in
3718 1) BLCKSZ=1024;;
3719 2) BLCKSZ=2048;;
3720 4) BLCKSZ=4096;;
3721 8) BLCKSZ=8192;;
3722 16) BLCKSZ=16384;;
3723 32) BLCKSZ=32768;;
3724 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3725 esac
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3727 $as_echo "${blocksize}kB" >&6; }
3730 cat >>confdefs.h <<_ACEOF
3731 #define BLCKSZ ${BLCKSZ}
3732 _ACEOF
3736 # Relation segment size
3738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3739 $as_echo_n "checking for segment size... " >&6; }
3743 # Check whether --with-segsize was given.
3744 if test "${with_segsize+set}" = set; then :
3745 withval=$with_segsize;
3746 case $withval in
3747 yes)
3748 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3751 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3754 segsize=$withval
3756 esac
3758 else
3759 segsize=1
3763 # this expression is set up to avoid unnecessary integer overflow
3764 # blocksize is already guaranteed to be a factor of 1024
3765 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3766 test $? -eq 0 || exit 1
3767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3768 $as_echo "${segsize}GB" >&6; }
3771 cat >>confdefs.h <<_ACEOF
3772 #define RELSEG_SIZE ${RELSEG_SIZE}
3773 _ACEOF
3777 # WAL block size
3779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3780 $as_echo_n "checking for WAL block size... " >&6; }
3784 # Check whether --with-wal-blocksize was given.
3785 if test "${with_wal_blocksize+set}" = set; then :
3786 withval=$with_wal_blocksize;
3787 case $withval in
3788 yes)
3789 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3792 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3795 wal_blocksize=$withval
3797 esac
3799 else
3800 wal_blocksize=8
3804 case ${wal_blocksize} in
3805 1) XLOG_BLCKSZ=1024;;
3806 2) XLOG_BLCKSZ=2048;;
3807 4) XLOG_BLCKSZ=4096;;
3808 8) XLOG_BLCKSZ=8192;;
3809 16) XLOG_BLCKSZ=16384;;
3810 32) XLOG_BLCKSZ=32768;;
3811 64) XLOG_BLCKSZ=65536;;
3812 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3813 esac
3814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3815 $as_echo "${wal_blocksize}kB" >&6; }
3818 cat >>confdefs.h <<_ACEOF
3819 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3820 _ACEOF
3824 # C compiler
3827 # For historical reasons you can also use --with-CC to specify the C compiler
3828 # to use, although the standard way to do this is to set the CC environment
3829 # variable.
3833 # Check whether --with-CC was given.
3834 if test "${with_CC+set}" = set; then :
3835 withval=$with_CC;
3836 case $withval in
3837 yes)
3838 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3841 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3844 CC=$with_CC
3846 esac
3852 case $template in
3853 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3854 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3855 esac
3857 ac_ext=c
3858 ac_cpp='$CPP $CPPFLAGS'
3859 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3860 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3861 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3862 if test -n "$ac_tool_prefix"; then
3863 for ac_prog in $pgac_cc_list
3865 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3866 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3868 $as_echo_n "checking for $ac_word... " >&6; }
3869 if ${ac_cv_prog_CC+:} false; then :
3870 $as_echo_n "(cached) " >&6
3871 else
3872 if test -n "$CC"; then
3873 ac_cv_prog_CC="$CC" # Let the user override the test.
3874 else
3875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3876 for as_dir in $PATH
3878 IFS=$as_save_IFS
3879 test -z "$as_dir" && as_dir=.
3880 for ac_exec_ext in '' $ac_executable_extensions; do
3881 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3882 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3884 break 2
3886 done
3887 done
3888 IFS=$as_save_IFS
3892 CC=$ac_cv_prog_CC
3893 if test -n "$CC"; then
3894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3895 $as_echo "$CC" >&6; }
3896 else
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3898 $as_echo "no" >&6; }
3902 test -n "$CC" && break
3903 done
3905 if test -z "$CC"; then
3906 ac_ct_CC=$CC
3907 for ac_prog in $pgac_cc_list
3909 # Extract the first word of "$ac_prog", so it can be a program name with args.
3910 set dummy $ac_prog; ac_word=$2
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3912 $as_echo_n "checking for $ac_word... " >&6; }
3913 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3914 $as_echo_n "(cached) " >&6
3915 else
3916 if test -n "$ac_ct_CC"; then
3917 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3918 else
3919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3920 for as_dir in $PATH
3922 IFS=$as_save_IFS
3923 test -z "$as_dir" && as_dir=.
3924 for ac_exec_ext in '' $ac_executable_extensions; do
3925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3926 ac_cv_prog_ac_ct_CC="$ac_prog"
3927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3928 break 2
3930 done
3931 done
3932 IFS=$as_save_IFS
3936 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3937 if test -n "$ac_ct_CC"; then
3938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3939 $as_echo "$ac_ct_CC" >&6; }
3940 else
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3942 $as_echo "no" >&6; }
3946 test -n "$ac_ct_CC" && break
3947 done
3949 if test "x$ac_ct_CC" = x; then
3950 CC=""
3951 else
3952 case $cross_compiling:$ac_tool_warned in
3953 yes:)
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3955 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3956 ac_tool_warned=yes ;;
3957 esac
3958 CC=$ac_ct_CC
3963 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3964 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3965 as_fn_error $? "no acceptable C compiler found in \$PATH
3966 See \`config.log' for more details" "$LINENO" 5; }
3968 # Provide some information about the compiler.
3969 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3970 set X $ac_compile
3971 ac_compiler=$2
3972 for ac_option in --version -v -V -qversion; do
3973 { { ac_try="$ac_compiler $ac_option >&5"
3974 case "(($ac_try" in
3975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3976 *) ac_try_echo=$ac_try;;
3977 esac
3978 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3979 $as_echo "$ac_try_echo"; } >&5
3980 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3981 ac_status=$?
3982 if test -s conftest.err; then
3983 sed '10a\
3984 ... rest of stderr output deleted ...
3985 10q' conftest.err >conftest.er1
3986 cat conftest.er1 >&5
3988 rm -f conftest.er1 conftest.err
3989 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3990 test $ac_status = 0; }
3991 done
3993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3994 /* end confdefs.h. */
3997 main ()
4001 return 0;
4003 _ACEOF
4004 ac_clean_files_save=$ac_clean_files
4005 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4006 # Try to create an executable without -o first, disregard a.out.
4007 # It will help us diagnose broken compilers, and finding out an intuition
4008 # of exeext.
4009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4010 $as_echo_n "checking whether the C compiler works... " >&6; }
4011 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4013 # The possible output files:
4014 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4016 ac_rmfiles=
4017 for ac_file in $ac_files
4019 case $ac_file in
4020 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4021 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4022 esac
4023 done
4024 rm -f $ac_rmfiles
4026 if { { ac_try="$ac_link_default"
4027 case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030 esac
4031 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032 $as_echo "$ac_try_echo"; } >&5
4033 (eval "$ac_link_default") 2>&5
4034 ac_status=$?
4035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }; then :
4037 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4038 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4039 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4040 # so that the user can short-circuit this test for compilers unknown to
4041 # Autoconf.
4042 for ac_file in $ac_files ''
4044 test -f "$ac_file" || continue
4045 case $ac_file in
4046 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4048 [ab].out )
4049 # We found the default executable, but exeext='' is most
4050 # certainly right.
4051 break;;
4052 *.* )
4053 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4054 then :; else
4055 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4057 # We set ac_cv_exeext here because the later test for it is not
4058 # safe: cross compilers may not add the suffix if given an `-o'
4059 # argument, so we may need to know it at that point already.
4060 # Even if this section looks crufty: it has the advantage of
4061 # actually working.
4062 break;;
4064 break;;
4065 esac
4066 done
4067 test "$ac_cv_exeext" = no && ac_cv_exeext=
4069 else
4070 ac_file=''
4072 if test -z "$ac_file"; then :
4073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4074 $as_echo "no" >&6; }
4075 $as_echo "$as_me: failed program was:" >&5
4076 sed 's/^/| /' conftest.$ac_ext >&5
4078 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4079 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4080 as_fn_error 77 "C compiler cannot create executables
4081 See \`config.log' for more details" "$LINENO" 5; }
4082 else
4083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4084 $as_echo "yes" >&6; }
4086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4087 $as_echo_n "checking for C compiler default output file name... " >&6; }
4088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4089 $as_echo "$ac_file" >&6; }
4090 ac_exeext=$ac_cv_exeext
4092 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4093 ac_clean_files=$ac_clean_files_save
4094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4095 $as_echo_n "checking for suffix of executables... " >&6; }
4096 if { { ac_try="$ac_link"
4097 case "(($ac_try" in
4098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4099 *) ac_try_echo=$ac_try;;
4100 esac
4101 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4102 $as_echo "$ac_try_echo"; } >&5
4103 (eval "$ac_link") 2>&5
4104 ac_status=$?
4105 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4106 test $ac_status = 0; }; then :
4107 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4108 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4109 # work properly (i.e., refer to `conftest.exe'), while it won't with
4110 # `rm'.
4111 for ac_file in conftest.exe conftest conftest.*; do
4112 test -f "$ac_file" || continue
4113 case $ac_file in
4114 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4115 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4116 break;;
4117 * ) break;;
4118 esac
4119 done
4120 else
4121 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4122 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4123 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4124 See \`config.log' for more details" "$LINENO" 5; }
4126 rm -f conftest conftest$ac_cv_exeext
4127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4128 $as_echo "$ac_cv_exeext" >&6; }
4130 rm -f conftest.$ac_ext
4131 EXEEXT=$ac_cv_exeext
4132 ac_exeext=$EXEEXT
4133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4134 /* end confdefs.h. */
4135 #include <stdio.h>
4137 main ()
4139 FILE *f = fopen ("conftest.out", "w");
4140 return ferror (f) || fclose (f) != 0;
4143 return 0;
4145 _ACEOF
4146 ac_clean_files="$ac_clean_files conftest.out"
4147 # Check that the compiler produces executables we can run. If not, either
4148 # the compiler is broken, or we cross compile.
4149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4150 $as_echo_n "checking whether we are cross compiling... " >&6; }
4151 if test "$cross_compiling" != yes; then
4152 { { ac_try="$ac_link"
4153 case "(($ac_try" in
4154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4155 *) ac_try_echo=$ac_try;;
4156 esac
4157 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4158 $as_echo "$ac_try_echo"; } >&5
4159 (eval "$ac_link") 2>&5
4160 ac_status=$?
4161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4162 test $ac_status = 0; }
4163 if { ac_try='./conftest$ac_cv_exeext'
4164 { { case "(($ac_try" in
4165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4166 *) ac_try_echo=$ac_try;;
4167 esac
4168 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4169 $as_echo "$ac_try_echo"; } >&5
4170 (eval "$ac_try") 2>&5
4171 ac_status=$?
4172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4173 test $ac_status = 0; }; }; then
4174 cross_compiling=no
4175 else
4176 if test "$cross_compiling" = maybe; then
4177 cross_compiling=yes
4178 else
4179 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4180 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4181 as_fn_error $? "cannot run C compiled programs.
4182 If you meant to cross compile, use \`--host'.
4183 See \`config.log' for more details" "$LINENO" 5; }
4187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4188 $as_echo "$cross_compiling" >&6; }
4190 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4191 ac_clean_files=$ac_clean_files_save
4192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4193 $as_echo_n "checking for suffix of object files... " >&6; }
4194 if ${ac_cv_objext+:} false; then :
4195 $as_echo_n "(cached) " >&6
4196 else
4197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4198 /* end confdefs.h. */
4201 main ()
4205 return 0;
4207 _ACEOF
4208 rm -f conftest.o conftest.obj
4209 if { { ac_try="$ac_compile"
4210 case "(($ac_try" in
4211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4212 *) ac_try_echo=$ac_try;;
4213 esac
4214 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4215 $as_echo "$ac_try_echo"; } >&5
4216 (eval "$ac_compile") 2>&5
4217 ac_status=$?
4218 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4219 test $ac_status = 0; }; then :
4220 for ac_file in conftest.o conftest.obj conftest.*; do
4221 test -f "$ac_file" || continue;
4222 case $ac_file in
4223 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4224 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4225 break;;
4226 esac
4227 done
4228 else
4229 $as_echo "$as_me: failed program was:" >&5
4230 sed 's/^/| /' conftest.$ac_ext >&5
4232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4233 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4234 as_fn_error $? "cannot compute suffix of object files: cannot compile
4235 See \`config.log' for more details" "$LINENO" 5; }
4237 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4240 $as_echo "$ac_cv_objext" >&6; }
4241 OBJEXT=$ac_cv_objext
4242 ac_objext=$OBJEXT
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4244 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4245 if ${ac_cv_c_compiler_gnu+:} false; then :
4246 $as_echo_n "(cached) " >&6
4247 else
4248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4249 /* end confdefs.h. */
4252 main ()
4254 #ifndef __GNUC__
4255 choke me
4256 #endif
4259 return 0;
4261 _ACEOF
4262 if ac_fn_c_try_compile "$LINENO"; then :
4263 ac_compiler_gnu=yes
4264 else
4265 ac_compiler_gnu=no
4267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4268 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4272 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4273 if test $ac_compiler_gnu = yes; then
4274 GCC=yes
4275 else
4276 GCC=
4278 ac_test_CFLAGS=${CFLAGS+set}
4279 ac_save_CFLAGS=$CFLAGS
4280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4281 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4282 if ${ac_cv_prog_cc_g+:} false; then :
4283 $as_echo_n "(cached) " >&6
4284 else
4285 ac_save_c_werror_flag=$ac_c_werror_flag
4286 ac_c_werror_flag=yes
4287 ac_cv_prog_cc_g=no
4288 CFLAGS="-g"
4289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4290 /* end confdefs.h. */
4293 main ()
4297 return 0;
4299 _ACEOF
4300 if ac_fn_c_try_compile "$LINENO"; then :
4301 ac_cv_prog_cc_g=yes
4302 else
4303 CFLAGS=""
4304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4305 /* end confdefs.h. */
4308 main ()
4312 return 0;
4314 _ACEOF
4315 if ac_fn_c_try_compile "$LINENO"; then :
4317 else
4318 ac_c_werror_flag=$ac_save_c_werror_flag
4319 CFLAGS="-g"
4320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4321 /* end confdefs.h. */
4324 main ()
4328 return 0;
4330 _ACEOF
4331 if ac_fn_c_try_compile "$LINENO"; then :
4332 ac_cv_prog_cc_g=yes
4334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4339 ac_c_werror_flag=$ac_save_c_werror_flag
4341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4342 $as_echo "$ac_cv_prog_cc_g" >&6; }
4343 if test "$ac_test_CFLAGS" = set; then
4344 CFLAGS=$ac_save_CFLAGS
4345 elif test $ac_cv_prog_cc_g = yes; then
4346 if test "$GCC" = yes; then
4347 CFLAGS="-g -O2"
4348 else
4349 CFLAGS="-g"
4351 else
4352 if test "$GCC" = yes; then
4353 CFLAGS="-O2"
4354 else
4355 CFLAGS=
4358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4359 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4360 if ${ac_cv_prog_cc_c89+:} false; then :
4361 $as_echo_n "(cached) " >&6
4362 else
4363 ac_cv_prog_cc_c89=no
4364 ac_save_CC=$CC
4365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4366 /* end confdefs.h. */
4367 #include <stdarg.h>
4368 #include <stdio.h>
4369 struct stat;
4370 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4371 struct buf { int x; };
4372 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4373 static char *e (p, i)
4374 char **p;
4375 int i;
4377 return p[i];
4379 static char *f (char * (*g) (char **, int), char **p, ...)
4381 char *s;
4382 va_list v;
4383 va_start (v,p);
4384 s = g (p, va_arg (v,int));
4385 va_end (v);
4386 return s;
4389 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4390 function prototypes and stuff, but not '\xHH' hex character constants.
4391 These don't provoke an error unfortunately, instead are silently treated
4392 as 'x'. The following induces an error, until -std is added to get
4393 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4394 array size at least. It's necessary to write '\x00'==0 to get something
4395 that's true only with -std. */
4396 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4398 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4399 inside strings and character constants. */
4400 #define FOO(x) 'x'
4401 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4403 int test (int i, double x);
4404 struct s1 {int (*f) (int a);};
4405 struct s2 {int (*f) (double a);};
4406 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4407 int argc;
4408 char **argv;
4410 main ()
4412 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4414 return 0;
4416 _ACEOF
4417 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4418 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4420 CC="$ac_save_CC $ac_arg"
4421 if ac_fn_c_try_compile "$LINENO"; then :
4422 ac_cv_prog_cc_c89=$ac_arg
4424 rm -f core conftest.err conftest.$ac_objext
4425 test "x$ac_cv_prog_cc_c89" != "xno" && break
4426 done
4427 rm -f conftest.$ac_ext
4428 CC=$ac_save_CC
4431 # AC_CACHE_VAL
4432 case "x$ac_cv_prog_cc_c89" in
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4435 $as_echo "none needed" >&6; } ;;
4436 xno)
4437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4438 $as_echo "unsupported" >&6; } ;;
4440 CC="$CC $ac_cv_prog_cc_c89"
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4442 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4443 esac
4444 if test "x$ac_cv_prog_cc_c89" != xno; then :
4448 ac_ext=c
4449 ac_cpp='$CPP $CPPFLAGS'
4450 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4451 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4452 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4455 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4456 if ${ac_cv_prog_cc_c99+:} false; then :
4457 $as_echo_n "(cached) " >&6
4458 else
4459 ac_cv_prog_cc_c99=no
4460 ac_save_CC=$CC
4461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462 /* end confdefs.h. */
4463 #include <stdarg.h>
4464 #include <stdbool.h>
4465 #include <stdlib.h>
4466 #include <wchar.h>
4467 #include <stdio.h>
4469 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4470 #define debug(...) fprintf (stderr, __VA_ARGS__)
4471 #define showlist(...) puts (#__VA_ARGS__)
4472 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4473 static void
4474 test_varargs_macros (void)
4476 int x = 1234;
4477 int y = 5678;
4478 debug ("Flag");
4479 debug ("X = %d\n", x);
4480 showlist (The first, second, and third items.);
4481 report (x>y, "x is %d but y is %d", x, y);
4484 // Check long long types.
4485 #define BIG64 18446744073709551615ull
4486 #define BIG32 4294967295ul
4487 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4488 #if !BIG_OK
4489 your preprocessor is broken;
4490 #endif
4491 #if BIG_OK
4492 #else
4493 your preprocessor is broken;
4494 #endif
4495 static long long int bignum = -9223372036854775807LL;
4496 static unsigned long long int ubignum = BIG64;
4498 struct incomplete_array
4500 int datasize;
4501 double data[];
4504 struct named_init {
4505 int number;
4506 const wchar_t *name;
4507 double average;
4510 typedef const char *ccp;
4512 static inline int
4513 test_restrict (ccp restrict text)
4515 // See if C++-style comments work.
4516 // Iterate through items via the restricted pointer.
4517 // Also check for declarations in for loops.
4518 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4519 continue;
4520 return 0;
4523 // Check varargs and va_copy.
4524 static void
4525 test_varargs (const char *format, ...)
4527 va_list args;
4528 va_start (args, format);
4529 va_list args_copy;
4530 va_copy (args_copy, args);
4532 const char *str;
4533 int number;
4534 float fnumber;
4536 while (*format)
4538 switch (*format++)
4540 case 's': // string
4541 str = va_arg (args_copy, const char *);
4542 break;
4543 case 'd': // int
4544 number = va_arg (args_copy, int);
4545 break;
4546 case 'f': // float
4547 fnumber = va_arg (args_copy, double);
4548 break;
4549 default:
4550 break;
4553 va_end (args_copy);
4554 va_end (args);
4558 main ()
4561 // Check bool.
4562 _Bool success = false;
4564 // Check restrict.
4565 if (test_restrict ("String literal") == 0)
4566 success = true;
4567 char *restrict newvar = "Another string";
4569 // Check varargs.
4570 test_varargs ("s, d' f .", "string", 65, 34.234);
4571 test_varargs_macros ();
4573 // Check flexible array members.
4574 struct incomplete_array *ia =
4575 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4576 ia->datasize = 10;
4577 for (int i = 0; i < ia->datasize; ++i)
4578 ia->data[i] = i * 1.234;
4580 // Check named initializers.
4581 struct named_init ni = {
4582 .number = 34,
4583 .name = L"Test wide string",
4584 .average = 543.34343,
4587 ni.number = 58;
4589 int dynamic_array[ni.number];
4590 dynamic_array[ni.number - 1] = 543;
4592 // work around unused variable warnings
4593 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4594 || dynamic_array[ni.number - 1] != 543);
4597 return 0;
4599 _ACEOF
4600 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4602 CC="$ac_save_CC $ac_arg"
4603 if ac_fn_c_try_compile "$LINENO"; then :
4604 ac_cv_prog_cc_c99=$ac_arg
4606 rm -f core conftest.err conftest.$ac_objext
4607 test "x$ac_cv_prog_cc_c99" != "xno" && break
4608 done
4609 rm -f conftest.$ac_ext
4610 CC=$ac_save_CC
4613 # AC_CACHE_VAL
4614 case "x$ac_cv_prog_cc_c99" in
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4617 $as_echo "none needed" >&6; } ;;
4618 xno)
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4620 $as_echo "unsupported" >&6; } ;;
4622 CC="$CC $ac_cv_prog_cc_c99"
4623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4624 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4625 esac
4626 if test "x$ac_cv_prog_cc_c99" != xno; then :
4632 # Error out if the compiler does not support C99, as the codebase
4633 # relies on that.
4634 if test "$ac_cv_prog_cc_c99" = no; then
4635 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4638 ac_ext=cpp
4639 ac_cpp='$CXXCPP $CPPFLAGS'
4640 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4641 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4642 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4643 if test -z "$CXX"; then
4644 if test -n "$CCC"; then
4645 CXX=$CCC
4646 else
4647 if test -n "$ac_tool_prefix"; then
4648 for ac_prog in $pgac_cxx_list
4650 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4651 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4653 $as_echo_n "checking for $ac_word... " >&6; }
4654 if ${ac_cv_prog_CXX+:} false; then :
4655 $as_echo_n "(cached) " >&6
4656 else
4657 if test -n "$CXX"; then
4658 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4659 else
4660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4661 for as_dir in $PATH
4663 IFS=$as_save_IFS
4664 test -z "$as_dir" && as_dir=.
4665 for ac_exec_ext in '' $ac_executable_extensions; do
4666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4667 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4669 break 2
4671 done
4672 done
4673 IFS=$as_save_IFS
4677 CXX=$ac_cv_prog_CXX
4678 if test -n "$CXX"; then
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4680 $as_echo "$CXX" >&6; }
4681 else
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4683 $as_echo "no" >&6; }
4687 test -n "$CXX" && break
4688 done
4690 if test -z "$CXX"; then
4691 ac_ct_CXX=$CXX
4692 for ac_prog in $pgac_cxx_list
4694 # Extract the first word of "$ac_prog", so it can be a program name with args.
4695 set dummy $ac_prog; ac_word=$2
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4697 $as_echo_n "checking for $ac_word... " >&6; }
4698 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4699 $as_echo_n "(cached) " >&6
4700 else
4701 if test -n "$ac_ct_CXX"; then
4702 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4703 else
4704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4705 for as_dir in $PATH
4707 IFS=$as_save_IFS
4708 test -z "$as_dir" && as_dir=.
4709 for ac_exec_ext in '' $ac_executable_extensions; do
4710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4711 ac_cv_prog_ac_ct_CXX="$ac_prog"
4712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4713 break 2
4715 done
4716 done
4717 IFS=$as_save_IFS
4721 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4722 if test -n "$ac_ct_CXX"; then
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4724 $as_echo "$ac_ct_CXX" >&6; }
4725 else
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4727 $as_echo "no" >&6; }
4731 test -n "$ac_ct_CXX" && break
4732 done
4734 if test "x$ac_ct_CXX" = x; then
4735 CXX="g++"
4736 else
4737 case $cross_compiling:$ac_tool_warned in
4738 yes:)
4739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4740 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4741 ac_tool_warned=yes ;;
4742 esac
4743 CXX=$ac_ct_CXX
4749 # Provide some information about the compiler.
4750 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4751 set X $ac_compile
4752 ac_compiler=$2
4753 for ac_option in --version -v -V -qversion; do
4754 { { ac_try="$ac_compiler $ac_option >&5"
4755 case "(($ac_try" in
4756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4757 *) ac_try_echo=$ac_try;;
4758 esac
4759 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4760 $as_echo "$ac_try_echo"; } >&5
4761 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4762 ac_status=$?
4763 if test -s conftest.err; then
4764 sed '10a\
4765 ... rest of stderr output deleted ...
4766 10q' conftest.err >conftest.er1
4767 cat conftest.er1 >&5
4769 rm -f conftest.er1 conftest.err
4770 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4771 test $ac_status = 0; }
4772 done
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4775 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4776 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4777 $as_echo_n "(cached) " >&6
4778 else
4779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4780 /* end confdefs.h. */
4783 main ()
4785 #ifndef __GNUC__
4786 choke me
4787 #endif
4790 return 0;
4792 _ACEOF
4793 if ac_fn_cxx_try_compile "$LINENO"; then :
4794 ac_compiler_gnu=yes
4795 else
4796 ac_compiler_gnu=no
4798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4799 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4803 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4804 if test $ac_compiler_gnu = yes; then
4805 GXX=yes
4806 else
4807 GXX=
4809 ac_test_CXXFLAGS=${CXXFLAGS+set}
4810 ac_save_CXXFLAGS=$CXXFLAGS
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4812 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4813 if ${ac_cv_prog_cxx_g+:} false; then :
4814 $as_echo_n "(cached) " >&6
4815 else
4816 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4817 ac_cxx_werror_flag=yes
4818 ac_cv_prog_cxx_g=no
4819 CXXFLAGS="-g"
4820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4821 /* end confdefs.h. */
4824 main ()
4828 return 0;
4830 _ACEOF
4831 if ac_fn_cxx_try_compile "$LINENO"; then :
4832 ac_cv_prog_cxx_g=yes
4833 else
4834 CXXFLAGS=""
4835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4836 /* end confdefs.h. */
4839 main ()
4843 return 0;
4845 _ACEOF
4846 if ac_fn_cxx_try_compile "$LINENO"; then :
4848 else
4849 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4850 CXXFLAGS="-g"
4851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4852 /* end confdefs.h. */
4855 main ()
4859 return 0;
4861 _ACEOF
4862 if ac_fn_cxx_try_compile "$LINENO"; then :
4863 ac_cv_prog_cxx_g=yes
4865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4870 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4873 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4874 if test "$ac_test_CXXFLAGS" = set; then
4875 CXXFLAGS=$ac_save_CXXFLAGS
4876 elif test $ac_cv_prog_cxx_g = yes; then
4877 if test "$GXX" = yes; then
4878 CXXFLAGS="-g -O2"
4879 else
4880 CXXFLAGS="-g"
4882 else
4883 if test "$GXX" = yes; then
4884 CXXFLAGS="-O2"
4885 else
4886 CXXFLAGS=
4889 ac_ext=c
4890 ac_cpp='$CPP $CPPFLAGS'
4891 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4892 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4893 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4896 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4897 # but has idiosyncrasies of its own. We assume icc will define
4898 # __INTEL_COMPILER regardless of CFLAGS.
4900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4901 /* end confdefs.h. */
4904 main ()
4906 #ifndef __INTEL_COMPILER
4907 choke me
4908 #endif
4910 return 0;
4912 _ACEOF
4913 if ac_fn_c_try_compile "$LINENO"; then :
4914 ICC=yes
4915 else
4916 ICC=no
4918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4920 # Check if it's Sun Studio compiler. We assume that
4921 # __SUNPRO_C will be defined for Sun Studio compilers
4922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4923 /* end confdefs.h. */
4926 main ()
4928 #ifndef __SUNPRO_C
4929 choke me
4930 #endif
4932 return 0;
4934 _ACEOF
4935 if ac_fn_c_try_compile "$LINENO"; then :
4936 SUN_STUDIO_CC=yes
4937 else
4938 SUN_STUDIO_CC=no
4940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4946 # LLVM
4948 # Checked early because subsequent tests depend on it.
4952 # Check whether --with-llvm was given.
4953 if test "${with_llvm+set}" = set; then :
4954 withval=$with_llvm;
4955 case $withval in
4956 yes)
4958 $as_echo "#define USE_LLVM 1" >>confdefs.h
4965 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4967 esac
4969 else
4970 with_llvm=no
4976 for ac_prog in gawk mawk nawk awk
4978 # Extract the first word of "$ac_prog", so it can be a program name with args.
4979 set dummy $ac_prog; ac_word=$2
4980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981 $as_echo_n "checking for $ac_word... " >&6; }
4982 if ${ac_cv_prog_AWK+:} false; then :
4983 $as_echo_n "(cached) " >&6
4984 else
4985 if test -n "$AWK"; then
4986 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4987 else
4988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989 for as_dir in $PATH
4991 IFS=$as_save_IFS
4992 test -z "$as_dir" && as_dir=.
4993 for ac_exec_ext in '' $ac_executable_extensions; do
4994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995 ac_cv_prog_AWK="$ac_prog"
4996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997 break 2
4999 done
5000 done
5001 IFS=$as_save_IFS
5005 AWK=$ac_cv_prog_AWK
5006 if test -n "$AWK"; then
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5008 $as_echo "$AWK" >&6; }
5009 else
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5011 $as_echo "no" >&6; }
5015 test -n "$AWK" && break
5016 done
5018 if test "$with_llvm" = yes; then :
5024 if test -z "$LLVM_CONFIG"; then
5025 for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
5027 # Extract the first word of "$ac_prog", so it can be a program name with args.
5028 set dummy $ac_prog; ac_word=$2
5029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030 $as_echo_n "checking for $ac_word... " >&6; }
5031 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5032 $as_echo_n "(cached) " >&6
5033 else
5034 case $LLVM_CONFIG in
5035 [\\/]* | ?:[\\/]*)
5036 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040 for as_dir in $PATH
5042 IFS=$as_save_IFS
5043 test -z "$as_dir" && as_dir=.
5044 for ac_exec_ext in '' $ac_executable_extensions; do
5045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5046 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048 break 2
5050 done
5051 done
5052 IFS=$as_save_IFS
5055 esac
5057 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5058 if test -n "$LLVM_CONFIG"; then
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5060 $as_echo "$LLVM_CONFIG" >&6; }
5061 else
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063 $as_echo "no" >&6; }
5067 test -n "$LLVM_CONFIG" && break
5068 done
5070 else
5071 # Report the value of LLVM_CONFIG in configure's output in all cases.
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5073 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5075 $as_echo "$LLVM_CONFIG" >&6; }
5079 # no point continuing if llvm wasn't found
5080 if test -z "$LLVM_CONFIG"; then
5081 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5083 # check if detected $LLVM_CONFIG is executable
5084 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5085 if test "x$pgac_llvm_version" = "xno"; then
5086 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5088 # and whether the version is supported
5089 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5090 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5093 # need clang to create some bitcode files
5095 if test -z "$CLANG"; then
5096 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5098 # Extract the first word of "$ac_prog", so it can be a program name with args.
5099 set dummy $ac_prog; ac_word=$2
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101 $as_echo_n "checking for $ac_word... " >&6; }
5102 if ${ac_cv_path_CLANG+:} false; then :
5103 $as_echo_n "(cached) " >&6
5104 else
5105 case $CLANG in
5106 [\\/]* | ?:[\\/]*)
5107 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111 for as_dir in $PATH
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
5115 for ac_exec_ext in '' $ac_executable_extensions; do
5116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5117 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5119 break 2
5121 done
5122 done
5123 IFS=$as_save_IFS
5126 esac
5128 CLANG=$ac_cv_path_CLANG
5129 if test -n "$CLANG"; then
5130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5131 $as_echo "$CLANG" >&6; }
5132 else
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134 $as_echo "no" >&6; }
5138 test -n "$CLANG" && break
5139 done
5141 else
5142 # Report the value of CLANG in configure's output in all cases.
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5144 $as_echo_n "checking for CLANG... " >&6; }
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5146 $as_echo "$CLANG" >&6; }
5149 if test -z "$CLANG"; then
5150 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5152 # make sure clang is executable
5153 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5154 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5156 # Could check clang version, but it doesn't seem that
5157 # important. Systems with a new enough LLVM version are usually
5158 # going to have a decent clang version too. It's also not entirely
5159 # clear what the minimum version is.
5161 # Collect compiler flags necessary to build the LLVM dependent
5162 # shared library.
5163 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5164 case $pgac_option in
5165 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5166 esac
5167 done
5169 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5170 case $pgac_option in
5171 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5172 esac
5173 done
5175 # ABI influencing options, standard influencing options
5176 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5177 case $pgac_option in
5178 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5179 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5180 esac
5181 done
5183 # Look for components we're interested in, collect necessary
5184 # libs. As some components are optional, we can't just list all of
5185 # them as it'd raise an error.
5186 pgac_components='';
5187 for pgac_component in `$LLVM_CONFIG --components`; do
5188 case $pgac_component in
5189 engine) pgac_components="$pgac_components $pgac_component";;
5190 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5191 orcjit) pgac_components="$pgac_components $pgac_component";;
5192 passes) pgac_components="$pgac_components $pgac_component";;
5193 native) pgac_components="$pgac_components $pgac_component";;
5194 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5195 esac
5196 done;
5198 # And then get the libraries that need to be linked in for the
5199 # selected components. They're large libraries, we only want to
5200 # link them into the LLVM using shared library.
5201 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5202 case $pgac_option in
5203 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5204 esac
5205 done
5207 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5217 fi # fi
5220 unset CFLAGS
5221 unset CXXFLAGS
5224 # Read the template
5226 . "$srcdir/src/template/$template" || exit
5228 # C[XX]FLAGS are selected so:
5229 # If the user specifies something in the environment, that is used.
5230 # else: If the template file set something, that is used.
5231 # else: If coverage was enabled, don't set anything.
5232 # else: If the compiler is GCC, then we use -O2.
5233 # else: If the compiler is something else, then we use -O, unless debugging.
5235 if test "$ac_env_CFLAGS_set" = set; then
5236 CFLAGS=$ac_env_CFLAGS_value
5237 elif test "${CFLAGS+set}" = set; then
5238 : # (keep what template set)
5239 elif test "$enable_coverage" = yes; then
5240 : # no optimization by default
5241 elif test "$GCC" = yes; then
5242 CFLAGS="-O2"
5243 else
5244 # if the user selected debug mode, don't use -O
5245 if test "$enable_debug" != yes; then
5246 CFLAGS="-O"
5250 if test "$ac_env_CXXFLAGS_set" = set; then
5251 CXXFLAGS=$ac_env_CXXFLAGS_value
5252 elif test "${CXXFLAGS+set}" = set; then
5253 : # (keep what template set)
5254 elif test "$enable_coverage" = yes; then
5255 : # no optimization by default
5256 elif test "$GCC" = yes; then
5257 CXXFLAGS="-O2"
5258 else
5259 # if the user selected debug mode, don't use -O
5260 if test "$enable_debug" != yes; then
5261 CXXFLAGS="-O"
5265 # When generating bitcode (for inlining) we always want to use -O2
5266 # even when --enable-debug is specified. The bitcode is not going to
5267 # be used for line-by-line debugging, and JIT inlining doesn't work
5268 # without at least -O1 (otherwise clang will emit 'noinline'
5269 # attributes everywhere), which is bad for testing. Still allow the
5270 # environment to override if done explicitly.
5271 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5272 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5273 else
5274 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5276 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5277 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5278 else
5279 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5282 # C[XX]FLAGS we determined above will be added back at the end
5283 user_CFLAGS=$CFLAGS
5284 CFLAGS=""
5285 user_CXXFLAGS=$CXXFLAGS
5286 CXXFLAGS=""
5287 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5288 BITCODE_CFLAGS=""
5289 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5290 BITCODE_CXXFLAGS=""
5292 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5293 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5294 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5296 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5297 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5300 # Some versions of GCC support some additional useful warning flags.
5301 # Check whether they are supported, and add them to CFLAGS if so.
5302 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5303 # but has its own. Also check other compiler-specific flags here.
5305 if test "$GCC" = yes -a "$ICC" = no; then
5306 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5307 CXXFLAGS="-Wall -Wpointer-arith"
5308 # These work in some but not all gcc versions
5309 save_CFLAGS=$CFLAGS
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5312 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5313 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5314 $as_echo_n "(cached) " >&6
5315 else
5316 pgac_save_CFLAGS=$CFLAGS
5317 pgac_save_CC=$CC
5318 CC=${CC}
5319 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5320 ac_save_c_werror_flag=$ac_c_werror_flag
5321 ac_c_werror_flag=yes
5322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5323 /* end confdefs.h. */
5326 main ()
5330 return 0;
5332 _ACEOF
5333 if ac_fn_c_try_compile "$LINENO"; then :
5334 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5335 else
5336 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5339 ac_c_werror_flag=$ac_save_c_werror_flag
5340 CFLAGS="$pgac_save_CFLAGS"
5341 CC="$pgac_save_CC"
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5344 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5345 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5346 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5350 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5351 # disable it, so AC_SUBST the negative form.
5352 PERMIT_DECLARATION_AFTER_STATEMENT=
5353 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5354 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5357 # Really don't want VLAs to be used in our dialect of C
5359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5360 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5361 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5362 $as_echo_n "(cached) " >&6
5363 else
5364 pgac_save_CFLAGS=$CFLAGS
5365 pgac_save_CC=$CC
5366 CC=${CC}
5367 CFLAGS="${CFLAGS} -Werror=vla"
5368 ac_save_c_werror_flag=$ac_c_werror_flag
5369 ac_c_werror_flag=yes
5370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5371 /* end confdefs.h. */
5374 main ()
5378 return 0;
5380 _ACEOF
5381 if ac_fn_c_try_compile "$LINENO"; then :
5382 pgac_cv_prog_CC_cflags__Werror_vla=yes
5383 else
5384 pgac_cv_prog_CC_cflags__Werror_vla=no
5386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5387 ac_c_werror_flag=$ac_save_c_werror_flag
5388 CFLAGS="$pgac_save_CFLAGS"
5389 CC="$pgac_save_CC"
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5392 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5393 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5394 CFLAGS="${CFLAGS} -Werror=vla"
5398 # On macOS, complain about usage of symbols newer than the deployment target
5400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5401 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5402 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5403 $as_echo_n "(cached) " >&6
5404 else
5405 pgac_save_CFLAGS=$CFLAGS
5406 pgac_save_CC=$CC
5407 CC=${CC}
5408 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5409 ac_save_c_werror_flag=$ac_c_werror_flag
5410 ac_c_werror_flag=yes
5411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5412 /* end confdefs.h. */
5415 main ()
5419 return 0;
5421 _ACEOF
5422 if ac_fn_c_try_compile "$LINENO"; then :
5423 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5424 else
5425 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5428 ac_c_werror_flag=$ac_save_c_werror_flag
5429 CFLAGS="$pgac_save_CFLAGS"
5430 CC="$pgac_save_CC"
5432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5433 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5434 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5435 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5440 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5441 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5442 $as_echo_n "(cached) " >&6
5443 else
5444 pgac_save_CXXFLAGS=$CXXFLAGS
5445 pgac_save_CXX=$CXX
5446 CXX=${CXX}
5447 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5448 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5449 ac_cxx_werror_flag=yes
5450 ac_ext=cpp
5451 ac_cpp='$CXXCPP $CPPFLAGS'
5452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5453 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5457 /* end confdefs.h. */
5460 main ()
5464 return 0;
5466 _ACEOF
5467 if ac_fn_cxx_try_compile "$LINENO"; then :
5468 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5469 else
5470 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5473 ac_ext=c
5474 ac_cpp='$CPP $CPPFLAGS'
5475 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5476 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5477 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5479 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5480 CXXFLAGS="$pgac_save_CXXFLAGS"
5481 CXX="$pgac_save_CXX"
5483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5484 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5485 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5486 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5490 # -Wvla is not applicable for C++
5492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5493 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5494 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5495 $as_echo_n "(cached) " >&6
5496 else
5497 pgac_save_CFLAGS=$CFLAGS
5498 pgac_save_CC=$CC
5499 CC=${CC}
5500 CFLAGS="${CFLAGS} -Wendif-labels"
5501 ac_save_c_werror_flag=$ac_c_werror_flag
5502 ac_c_werror_flag=yes
5503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5504 /* end confdefs.h. */
5507 main ()
5511 return 0;
5513 _ACEOF
5514 if ac_fn_c_try_compile "$LINENO"; then :
5515 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5516 else
5517 pgac_cv_prog_CC_cflags__Wendif_labels=no
5519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5520 ac_c_werror_flag=$ac_save_c_werror_flag
5521 CFLAGS="$pgac_save_CFLAGS"
5522 CC="$pgac_save_CC"
5524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5525 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5526 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5527 CFLAGS="${CFLAGS} -Wendif-labels"
5531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5532 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5533 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5534 $as_echo_n "(cached) " >&6
5535 else
5536 pgac_save_CXXFLAGS=$CXXFLAGS
5537 pgac_save_CXX=$CXX
5538 CXX=${CXX}
5539 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5540 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5541 ac_cxx_werror_flag=yes
5542 ac_ext=cpp
5543 ac_cpp='$CXXCPP $CPPFLAGS'
5544 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5545 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5546 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5549 /* end confdefs.h. */
5552 main ()
5556 return 0;
5558 _ACEOF
5559 if ac_fn_cxx_try_compile "$LINENO"; then :
5560 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5561 else
5562 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5565 ac_ext=c
5566 ac_cpp='$CPP $CPPFLAGS'
5567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5571 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5572 CXXFLAGS="$pgac_save_CXXFLAGS"
5573 CXX="$pgac_save_CXX"
5575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5576 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5577 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5578 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5584 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5585 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5586 $as_echo_n "(cached) " >&6
5587 else
5588 pgac_save_CFLAGS=$CFLAGS
5589 pgac_save_CC=$CC
5590 CC=${CC}
5591 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5592 ac_save_c_werror_flag=$ac_c_werror_flag
5593 ac_c_werror_flag=yes
5594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5595 /* end confdefs.h. */
5598 main ()
5602 return 0;
5604 _ACEOF
5605 if ac_fn_c_try_compile "$LINENO"; then :
5606 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5607 else
5608 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5611 ac_c_werror_flag=$ac_save_c_werror_flag
5612 CFLAGS="$pgac_save_CFLAGS"
5613 CC="$pgac_save_CC"
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5616 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5617 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5618 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5623 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5624 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5625 $as_echo_n "(cached) " >&6
5626 else
5627 pgac_save_CXXFLAGS=$CXXFLAGS
5628 pgac_save_CXX=$CXX
5629 CXX=${CXX}
5630 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5631 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5632 ac_cxx_werror_flag=yes
5633 ac_ext=cpp
5634 ac_cpp='$CXXCPP $CPPFLAGS'
5635 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5636 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5637 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5640 /* end confdefs.h. */
5643 main ()
5647 return 0;
5649 _ACEOF
5650 if ac_fn_cxx_try_compile "$LINENO"; then :
5651 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5652 else
5653 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5656 ac_ext=c
5657 ac_cpp='$CPP $CPPFLAGS'
5658 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5659 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5660 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5662 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5663 CXXFLAGS="$pgac_save_CXXFLAGS"
5664 CXX="$pgac_save_CXX"
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5667 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5668 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5669 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5675 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5676 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5677 $as_echo_n "(cached) " >&6
5678 else
5679 pgac_save_CFLAGS=$CFLAGS
5680 pgac_save_CC=$CC
5681 CC=${CC}
5682 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5683 ac_save_c_werror_flag=$ac_c_werror_flag
5684 ac_c_werror_flag=yes
5685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5686 /* end confdefs.h. */
5689 main ()
5693 return 0;
5695 _ACEOF
5696 if ac_fn_c_try_compile "$LINENO"; then :
5697 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5698 else
5699 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5702 ac_c_werror_flag=$ac_save_c_werror_flag
5703 CFLAGS="$pgac_save_CFLAGS"
5704 CC="$pgac_save_CC"
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5707 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5708 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5709 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5714 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5715 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5716 $as_echo_n "(cached) " >&6
5717 else
5718 pgac_save_CXXFLAGS=$CXXFLAGS
5719 pgac_save_CXX=$CXX
5720 CXX=${CXX}
5721 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5722 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5723 ac_cxx_werror_flag=yes
5724 ac_ext=cpp
5725 ac_cpp='$CXXCPP $CPPFLAGS'
5726 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5727 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5728 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5731 /* end confdefs.h. */
5734 main ()
5738 return 0;
5740 _ACEOF
5741 if ac_fn_cxx_try_compile "$LINENO"; then :
5742 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5743 else
5744 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5747 ac_ext=c
5748 ac_cpp='$CPP $CPPFLAGS'
5749 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5750 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5751 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5753 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5754 CXXFLAGS="$pgac_save_CXXFLAGS"
5755 CXX="$pgac_save_CXX"
5757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5758 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5759 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5760 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5766 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5767 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5768 $as_echo_n "(cached) " >&6
5769 else
5770 pgac_save_CFLAGS=$CFLAGS
5771 pgac_save_CC=$CC
5772 CC=${CC}
5773 CFLAGS="${CFLAGS} -Wcast-function-type"
5774 ac_save_c_werror_flag=$ac_c_werror_flag
5775 ac_c_werror_flag=yes
5776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5777 /* end confdefs.h. */
5780 main ()
5784 return 0;
5786 _ACEOF
5787 if ac_fn_c_try_compile "$LINENO"; then :
5788 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5789 else
5790 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5793 ac_c_werror_flag=$ac_save_c_werror_flag
5794 CFLAGS="$pgac_save_CFLAGS"
5795 CC="$pgac_save_CC"
5797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5798 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5799 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5800 CFLAGS="${CFLAGS} -Wcast-function-type"
5804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5805 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5806 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5807 $as_echo_n "(cached) " >&6
5808 else
5809 pgac_save_CXXFLAGS=$CXXFLAGS
5810 pgac_save_CXX=$CXX
5811 CXX=${CXX}
5812 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5813 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5814 ac_cxx_werror_flag=yes
5815 ac_ext=cpp
5816 ac_cpp='$CXXCPP $CPPFLAGS'
5817 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5818 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5819 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5822 /* end confdefs.h. */
5825 main ()
5829 return 0;
5831 _ACEOF
5832 if ac_fn_cxx_try_compile "$LINENO"; then :
5833 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5834 else
5835 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5838 ac_ext=c
5839 ac_cpp='$CPP $CPPFLAGS'
5840 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5841 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5842 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5844 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5845 CXXFLAGS="$pgac_save_CXXFLAGS"
5846 CXX="$pgac_save_CXX"
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5849 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5850 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5851 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5855 # This was included in -Wall/-Wformat in older GCC versions
5857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5858 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5859 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5860 $as_echo_n "(cached) " >&6
5861 else
5862 pgac_save_CFLAGS=$CFLAGS
5863 pgac_save_CC=$CC
5864 CC=${CC}
5865 CFLAGS="${CFLAGS} -Wformat-security"
5866 ac_save_c_werror_flag=$ac_c_werror_flag
5867 ac_c_werror_flag=yes
5868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5869 /* end confdefs.h. */
5872 main ()
5876 return 0;
5878 _ACEOF
5879 if ac_fn_c_try_compile "$LINENO"; then :
5880 pgac_cv_prog_CC_cflags__Wformat_security=yes
5881 else
5882 pgac_cv_prog_CC_cflags__Wformat_security=no
5884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5885 ac_c_werror_flag=$ac_save_c_werror_flag
5886 CFLAGS="$pgac_save_CFLAGS"
5887 CC="$pgac_save_CC"
5889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5890 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5891 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5892 CFLAGS="${CFLAGS} -Wformat-security"
5896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5897 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5898 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5899 $as_echo_n "(cached) " >&6
5900 else
5901 pgac_save_CXXFLAGS=$CXXFLAGS
5902 pgac_save_CXX=$CXX
5903 CXX=${CXX}
5904 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5905 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5906 ac_cxx_werror_flag=yes
5907 ac_ext=cpp
5908 ac_cpp='$CXXCPP $CPPFLAGS'
5909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5914 /* end confdefs.h. */
5917 main ()
5921 return 0;
5923 _ACEOF
5924 if ac_fn_cxx_try_compile "$LINENO"; then :
5925 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5926 else
5927 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5930 ac_ext=c
5931 ac_cpp='$CPP $CPPFLAGS'
5932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5936 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5937 CXXFLAGS="$pgac_save_CXXFLAGS"
5938 CXX="$pgac_save_CXX"
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5941 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5942 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5943 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5947 # Disable strict-aliasing rules; needed for gcc 3.3+
5949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5950 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5951 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5952 $as_echo_n "(cached) " >&6
5953 else
5954 pgac_save_CFLAGS=$CFLAGS
5955 pgac_save_CC=$CC
5956 CC=${CC}
5957 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5958 ac_save_c_werror_flag=$ac_c_werror_flag
5959 ac_c_werror_flag=yes
5960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5961 /* end confdefs.h. */
5964 main ()
5968 return 0;
5970 _ACEOF
5971 if ac_fn_c_try_compile "$LINENO"; then :
5972 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5973 else
5974 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5977 ac_c_werror_flag=$ac_save_c_werror_flag
5978 CFLAGS="$pgac_save_CFLAGS"
5979 CC="$pgac_save_CC"
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5982 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5983 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5984 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5989 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5990 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5991 $as_echo_n "(cached) " >&6
5992 else
5993 pgac_save_CXXFLAGS=$CXXFLAGS
5994 pgac_save_CXX=$CXX
5995 CXX=${CXX}
5996 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5997 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5998 ac_cxx_werror_flag=yes
5999 ac_ext=cpp
6000 ac_cpp='$CXXCPP $CPPFLAGS'
6001 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6002 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6003 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6006 /* end confdefs.h. */
6009 main ()
6013 return 0;
6015 _ACEOF
6016 if ac_fn_cxx_try_compile "$LINENO"; then :
6017 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6018 else
6019 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6022 ac_ext=c
6023 ac_cpp='$CPP $CPPFLAGS'
6024 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6025 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6026 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6028 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6029 CXXFLAGS="$pgac_save_CXXFLAGS"
6030 CXX="$pgac_save_CXX"
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6033 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6034 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6035 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6039 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6042 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6043 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6044 $as_echo_n "(cached) " >&6
6045 else
6046 pgac_save_CFLAGS=$CFLAGS
6047 pgac_save_CC=$CC
6048 CC=${CC}
6049 CFLAGS="${CFLAGS} -fwrapv"
6050 ac_save_c_werror_flag=$ac_c_werror_flag
6051 ac_c_werror_flag=yes
6052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6053 /* end confdefs.h. */
6056 main ()
6060 return 0;
6062 _ACEOF
6063 if ac_fn_c_try_compile "$LINENO"; then :
6064 pgac_cv_prog_CC_cflags__fwrapv=yes
6065 else
6066 pgac_cv_prog_CC_cflags__fwrapv=no
6068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6069 ac_c_werror_flag=$ac_save_c_werror_flag
6070 CFLAGS="$pgac_save_CFLAGS"
6071 CC="$pgac_save_CC"
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6074 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6075 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6076 CFLAGS="${CFLAGS} -fwrapv"
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6081 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6082 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6083 $as_echo_n "(cached) " >&6
6084 else
6085 pgac_save_CXXFLAGS=$CXXFLAGS
6086 pgac_save_CXX=$CXX
6087 CXX=${CXX}
6088 CXXFLAGS="${CXXFLAGS} -fwrapv"
6089 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6090 ac_cxx_werror_flag=yes
6091 ac_ext=cpp
6092 ac_cpp='$CXXCPP $CPPFLAGS'
6093 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6094 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6095 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6098 /* end confdefs.h. */
6101 main ()
6105 return 0;
6107 _ACEOF
6108 if ac_fn_cxx_try_compile "$LINENO"; then :
6109 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6110 else
6111 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6114 ac_ext=c
6115 ac_cpp='$CPP $CPPFLAGS'
6116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6120 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6121 CXXFLAGS="$pgac_save_CXXFLAGS"
6122 CXX="$pgac_save_CXX"
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6125 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6126 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6127 CXXFLAGS="${CXXFLAGS} -fwrapv"
6131 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6134 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6135 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6136 $as_echo_n "(cached) " >&6
6137 else
6138 pgac_save_CFLAGS=$CFLAGS
6139 pgac_save_CC=$CC
6140 CC=${CC}
6141 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6142 ac_save_c_werror_flag=$ac_c_werror_flag
6143 ac_c_werror_flag=yes
6144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6145 /* end confdefs.h. */
6148 main ()
6152 return 0;
6154 _ACEOF
6155 if ac_fn_c_try_compile "$LINENO"; then :
6156 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6157 else
6158 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6161 ac_c_werror_flag=$ac_save_c_werror_flag
6162 CFLAGS="$pgac_save_CFLAGS"
6163 CC="$pgac_save_CC"
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6166 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6167 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6168 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6173 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6174 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6175 $as_echo_n "(cached) " >&6
6176 else
6177 pgac_save_CXXFLAGS=$CXXFLAGS
6178 pgac_save_CXX=$CXX
6179 CXX=${CXX}
6180 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6181 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6182 ac_cxx_werror_flag=yes
6183 ac_ext=cpp
6184 ac_cpp='$CXXCPP $CPPFLAGS'
6185 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6186 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6187 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6190 /* end confdefs.h. */
6193 main ()
6197 return 0;
6199 _ACEOF
6200 if ac_fn_cxx_try_compile "$LINENO"; then :
6201 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6202 else
6203 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6206 ac_ext=c
6207 ac_cpp='$CPP $CPPFLAGS'
6208 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6209 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6210 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6212 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6213 CXXFLAGS="$pgac_save_CXXFLAGS"
6214 CXX="$pgac_save_CXX"
6216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6217 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6218 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6219 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6223 # Optimization flags for specific files that benefit from loop unrolling
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6225 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6226 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6227 $as_echo_n "(cached) " >&6
6228 else
6229 pgac_save_CFLAGS=$CFLAGS
6230 pgac_save_CC=$CC
6231 CC=${CC}
6232 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6233 ac_save_c_werror_flag=$ac_c_werror_flag
6234 ac_c_werror_flag=yes
6235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6236 /* end confdefs.h. */
6239 main ()
6243 return 0;
6245 _ACEOF
6246 if ac_fn_c_try_compile "$LINENO"; then :
6247 pgac_cv_prog_CC_cflags__funroll_loops=yes
6248 else
6249 pgac_cv_prog_CC_cflags__funroll_loops=no
6251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6252 ac_c_werror_flag=$ac_save_c_werror_flag
6253 CFLAGS="$pgac_save_CFLAGS"
6254 CC="$pgac_save_CC"
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6257 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6258 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6259 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6263 # Optimization flags for specific files that benefit from vectorization
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6265 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6266 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6267 $as_echo_n "(cached) " >&6
6268 else
6269 pgac_save_CFLAGS=$CFLAGS
6270 pgac_save_CC=$CC
6271 CC=${CC}
6272 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6273 ac_save_c_werror_flag=$ac_c_werror_flag
6274 ac_c_werror_flag=yes
6275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6276 /* end confdefs.h. */
6279 main ()
6283 return 0;
6285 _ACEOF
6286 if ac_fn_c_try_compile "$LINENO"; then :
6287 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6288 else
6289 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6292 ac_c_werror_flag=$ac_save_c_werror_flag
6293 CFLAGS="$pgac_save_CFLAGS"
6294 CC="$pgac_save_CC"
6296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6297 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6298 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6299 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6304 # The following tests want to suppress various unhelpful warnings by adding
6305 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6306 # switches, so we have to test for the positive form and if that works,
6307 # add the negative form. Note that tests of this form typically need to
6308 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6310 # Suppress clang's unhelpful unused-command-line-argument warnings.
6311 NOT_THE_CFLAGS=""
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6313 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6314 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6315 $as_echo_n "(cached) " >&6
6316 else
6317 pgac_save_CFLAGS=$CFLAGS
6318 pgac_save_CC=$CC
6319 CC=${CC}
6320 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6321 ac_save_c_werror_flag=$ac_c_werror_flag
6322 ac_c_werror_flag=yes
6323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6324 /* end confdefs.h. */
6327 main ()
6331 return 0;
6333 _ACEOF
6334 if ac_fn_c_try_compile "$LINENO"; then :
6335 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6336 else
6337 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6340 ac_c_werror_flag=$ac_save_c_werror_flag
6341 CFLAGS="$pgac_save_CFLAGS"
6342 CC="$pgac_save_CC"
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6345 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6346 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6347 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6351 if test -n "$NOT_THE_CFLAGS"; then
6352 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6354 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6355 # of warnings when building plperl because of usages in the Perl headers.
6356 NOT_THE_CFLAGS=""
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6358 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6359 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6360 $as_echo_n "(cached) " >&6
6361 else
6362 pgac_save_CFLAGS=$CFLAGS
6363 pgac_save_CC=$CC
6364 CC=${CC}
6365 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6366 ac_save_c_werror_flag=$ac_c_werror_flag
6367 ac_c_werror_flag=yes
6368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6369 /* end confdefs.h. */
6372 main ()
6376 return 0;
6378 _ACEOF
6379 if ac_fn_c_try_compile "$LINENO"; then :
6380 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6381 else
6382 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6385 ac_c_werror_flag=$ac_save_c_werror_flag
6386 CFLAGS="$pgac_save_CFLAGS"
6387 CC="$pgac_save_CC"
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6390 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6391 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6392 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6396 if test -n "$NOT_THE_CFLAGS"; then
6397 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6399 # Similarly disable useless truncation warnings from gcc 8+
6400 NOT_THE_CFLAGS=""
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6402 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6403 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6404 $as_echo_n "(cached) " >&6
6405 else
6406 pgac_save_CFLAGS=$CFLAGS
6407 pgac_save_CC=$CC
6408 CC=${CC}
6409 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6410 ac_save_c_werror_flag=$ac_c_werror_flag
6411 ac_c_werror_flag=yes
6412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6413 /* end confdefs.h. */
6416 main ()
6420 return 0;
6422 _ACEOF
6423 if ac_fn_c_try_compile "$LINENO"; then :
6424 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6425 else
6426 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6429 ac_c_werror_flag=$ac_save_c_werror_flag
6430 CFLAGS="$pgac_save_CFLAGS"
6431 CC="$pgac_save_CC"
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6434 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6435 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6436 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6440 if test -n "$NOT_THE_CFLAGS"; then
6441 CFLAGS="$CFLAGS -Wno-format-truncation"
6443 NOT_THE_CFLAGS=""
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6445 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6446 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6447 $as_echo_n "(cached) " >&6
6448 else
6449 pgac_save_CFLAGS=$CFLAGS
6450 pgac_save_CC=$CC
6451 CC=${CC}
6452 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6453 ac_save_c_werror_flag=$ac_c_werror_flag
6454 ac_c_werror_flag=yes
6455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6456 /* end confdefs.h. */
6459 main ()
6463 return 0;
6465 _ACEOF
6466 if ac_fn_c_try_compile "$LINENO"; then :
6467 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6468 else
6469 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6472 ac_c_werror_flag=$ac_save_c_werror_flag
6473 CFLAGS="$pgac_save_CFLAGS"
6474 CC="$pgac_save_CC"
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6477 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6478 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6479 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6483 if test -n "$NOT_THE_CFLAGS"; then
6484 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6486 elif test "$ICC" = yes; then
6487 # Intel's compiler has a bug/misoptimization in checking for
6488 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6491 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6492 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6493 $as_echo_n "(cached) " >&6
6494 else
6495 pgac_save_CFLAGS=$CFLAGS
6496 pgac_save_CC=$CC
6497 CC=${CC}
6498 CFLAGS="${CFLAGS} -mp1"
6499 ac_save_c_werror_flag=$ac_c_werror_flag
6500 ac_c_werror_flag=yes
6501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6502 /* end confdefs.h. */
6505 main ()
6509 return 0;
6511 _ACEOF
6512 if ac_fn_c_try_compile "$LINENO"; then :
6513 pgac_cv_prog_CC_cflags__mp1=yes
6514 else
6515 pgac_cv_prog_CC_cflags__mp1=no
6517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6518 ac_c_werror_flag=$ac_save_c_werror_flag
6519 CFLAGS="$pgac_save_CFLAGS"
6520 CC="$pgac_save_CC"
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6523 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6524 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6525 CFLAGS="${CFLAGS} -mp1"
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6530 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6531 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6532 $as_echo_n "(cached) " >&6
6533 else
6534 pgac_save_CXXFLAGS=$CXXFLAGS
6535 pgac_save_CXX=$CXX
6536 CXX=${CXX}
6537 CXXFLAGS="${CXXFLAGS} -mp1"
6538 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6539 ac_cxx_werror_flag=yes
6540 ac_ext=cpp
6541 ac_cpp='$CXXCPP $CPPFLAGS'
6542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6547 /* end confdefs.h. */
6550 main ()
6554 return 0;
6556 _ACEOF
6557 if ac_fn_cxx_try_compile "$LINENO"; then :
6558 pgac_cv_prog_CXX_cxxflags__mp1=yes
6559 else
6560 pgac_cv_prog_CXX_cxxflags__mp1=no
6562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6563 ac_ext=c
6564 ac_cpp='$CPP $CPPFLAGS'
6565 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6566 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6567 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6569 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6570 CXXFLAGS="$pgac_save_CXXFLAGS"
6571 CXX="$pgac_save_CXX"
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6574 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6575 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6576 CXXFLAGS="${CXXFLAGS} -mp1"
6580 # Make sure strict aliasing is off (though this is said to be the default)
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6583 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6584 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6585 $as_echo_n "(cached) " >&6
6586 else
6587 pgac_save_CFLAGS=$CFLAGS
6588 pgac_save_CC=$CC
6589 CC=${CC}
6590 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6591 ac_save_c_werror_flag=$ac_c_werror_flag
6592 ac_c_werror_flag=yes
6593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6594 /* end confdefs.h. */
6597 main ()
6601 return 0;
6603 _ACEOF
6604 if ac_fn_c_try_compile "$LINENO"; then :
6605 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6606 else
6607 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6610 ac_c_werror_flag=$ac_save_c_werror_flag
6611 CFLAGS="$pgac_save_CFLAGS"
6612 CC="$pgac_save_CC"
6614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6615 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6616 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6617 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6622 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6623 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6624 $as_echo_n "(cached) " >&6
6625 else
6626 pgac_save_CXXFLAGS=$CXXFLAGS
6627 pgac_save_CXX=$CXX
6628 CXX=${CXX}
6629 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6630 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6631 ac_cxx_werror_flag=yes
6632 ac_ext=cpp
6633 ac_cpp='$CXXCPP $CPPFLAGS'
6634 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6635 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6636 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6639 /* end confdefs.h. */
6642 main ()
6646 return 0;
6648 _ACEOF
6649 if ac_fn_cxx_try_compile "$LINENO"; then :
6650 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6651 else
6652 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6654 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6655 ac_ext=c
6656 ac_cpp='$CPP $CPPFLAGS'
6657 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6658 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6659 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6661 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6662 CXXFLAGS="$pgac_save_CXXFLAGS"
6663 CXX="$pgac_save_CXX"
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6666 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6667 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6668 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6672 elif test "$PORTNAME" = "aix"; then
6673 # AIX's xlc has to have strict aliasing turned off too
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6676 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6677 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6678 $as_echo_n "(cached) " >&6
6679 else
6680 pgac_save_CFLAGS=$CFLAGS
6681 pgac_save_CC=$CC
6682 CC=${CC}
6683 CFLAGS="${CFLAGS} -qnoansialias"
6684 ac_save_c_werror_flag=$ac_c_werror_flag
6685 ac_c_werror_flag=yes
6686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6687 /* end confdefs.h. */
6690 main ()
6694 return 0;
6696 _ACEOF
6697 if ac_fn_c_try_compile "$LINENO"; then :
6698 pgac_cv_prog_CC_cflags__qnoansialias=yes
6699 else
6700 pgac_cv_prog_CC_cflags__qnoansialias=no
6702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6703 ac_c_werror_flag=$ac_save_c_werror_flag
6704 CFLAGS="$pgac_save_CFLAGS"
6705 CC="$pgac_save_CC"
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6708 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6709 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6710 CFLAGS="${CFLAGS} -qnoansialias"
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6715 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6716 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6717 $as_echo_n "(cached) " >&6
6718 else
6719 pgac_save_CXXFLAGS=$CXXFLAGS
6720 pgac_save_CXX=$CXX
6721 CXX=${CXX}
6722 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6723 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6724 ac_cxx_werror_flag=yes
6725 ac_ext=cpp
6726 ac_cpp='$CXXCPP $CPPFLAGS'
6727 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6728 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6729 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6732 /* end confdefs.h. */
6735 main ()
6739 return 0;
6741 _ACEOF
6742 if ac_fn_cxx_try_compile "$LINENO"; then :
6743 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6744 else
6745 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6748 ac_ext=c
6749 ac_cpp='$CPP $CPPFLAGS'
6750 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6751 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6752 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6754 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6755 CXXFLAGS="$pgac_save_CXXFLAGS"
6756 CXX="$pgac_save_CXX"
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6759 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6760 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6761 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6767 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6768 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6769 $as_echo_n "(cached) " >&6
6770 else
6771 pgac_save_CFLAGS=$CFLAGS
6772 pgac_save_CC=$CC
6773 CC=${CC}
6774 CFLAGS="${CFLAGS} -qlonglong"
6775 ac_save_c_werror_flag=$ac_c_werror_flag
6776 ac_c_werror_flag=yes
6777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6778 /* end confdefs.h. */
6781 main ()
6785 return 0;
6787 _ACEOF
6788 if ac_fn_c_try_compile "$LINENO"; then :
6789 pgac_cv_prog_CC_cflags__qlonglong=yes
6790 else
6791 pgac_cv_prog_CC_cflags__qlonglong=no
6793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6794 ac_c_werror_flag=$ac_save_c_werror_flag
6795 CFLAGS="$pgac_save_CFLAGS"
6796 CC="$pgac_save_CC"
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6799 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6800 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6801 CFLAGS="${CFLAGS} -qlonglong"
6805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6806 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6807 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6808 $as_echo_n "(cached) " >&6
6809 else
6810 pgac_save_CXXFLAGS=$CXXFLAGS
6811 pgac_save_CXX=$CXX
6812 CXX=${CXX}
6813 CXXFLAGS="${CXXFLAGS} -qlonglong"
6814 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6815 ac_cxx_werror_flag=yes
6816 ac_ext=cpp
6817 ac_cpp='$CXXCPP $CPPFLAGS'
6818 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6819 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6820 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6823 /* end confdefs.h. */
6826 main ()
6830 return 0;
6832 _ACEOF
6833 if ac_fn_cxx_try_compile "$LINENO"; then :
6834 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6835 else
6836 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6839 ac_ext=c
6840 ac_cpp='$CPP $CPPFLAGS'
6841 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6842 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6843 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6845 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6846 CXXFLAGS="$pgac_save_CXXFLAGS"
6847 CXX="$pgac_save_CXX"
6849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6850 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6851 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6852 CXXFLAGS="${CXXFLAGS} -qlonglong"
6858 # If the compiler knows how to hide symbols, add the switch needed for that to
6859 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6861 # This is done separately from the above because -fvisibility is supported by
6862 # quite a few different compilers, making the required repetition bothersome.
6864 # We might need to add a separate test to check if
6865 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6866 # compiler that supports one of the supported variants of -fvisibility=hidden
6867 # but uses a different syntax to mark a symbol as exported.
6868 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6870 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6871 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
6872 $as_echo_n "(cached) " >&6
6873 else
6874 pgac_save_CFLAGS=$CFLAGS
6875 pgac_save_CC=$CC
6876 CC=${CC}
6877 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6878 ac_save_c_werror_flag=$ac_c_werror_flag
6879 ac_c_werror_flag=yes
6880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6881 /* end confdefs.h. */
6884 main ()
6888 return 0;
6890 _ACEOF
6891 if ac_fn_c_try_compile "$LINENO"; then :
6892 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
6893 else
6894 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
6896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6897 ac_c_werror_flag=$ac_save_c_werror_flag
6898 CFLAGS="$pgac_save_CFLAGS"
6899 CC="$pgac_save_CC"
6901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
6902 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
6903 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
6904 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6908 # For C++ we additionally want -fvisibility-inlines-hidden
6909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
6910 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6911 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
6912 $as_echo_n "(cached) " >&6
6913 else
6914 pgac_save_CXXFLAGS=$CXXFLAGS
6915 pgac_save_CXX=$CXX
6916 CXX=${CXX}
6917 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6918 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6919 ac_cxx_werror_flag=yes
6920 ac_ext=cpp
6921 ac_cpp='$CXXCPP $CPPFLAGS'
6922 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6923 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6924 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927 /* end confdefs.h. */
6930 main ()
6934 return 0;
6936 _ACEOF
6937 if ac_fn_cxx_try_compile "$LINENO"; then :
6938 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
6939 else
6940 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
6942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6943 ac_ext=c
6944 ac_cpp='$CPP $CPPFLAGS'
6945 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6946 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6947 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6949 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6950 CXXFLAGS="$pgac_save_CXXFLAGS"
6951 CXX="$pgac_save_CXX"
6953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
6954 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
6955 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
6956 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
6960 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6961 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
6962 $as_echo_n "(cached) " >&6
6963 else
6964 pgac_save_CXXFLAGS=$CXXFLAGS
6965 pgac_save_CXX=$CXX
6966 CXX=${CXX}
6967 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6968 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6969 ac_cxx_werror_flag=yes
6970 ac_ext=cpp
6971 ac_cpp='$CXXCPP $CPPFLAGS'
6972 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6973 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6974 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6977 /* end confdefs.h. */
6980 main ()
6984 return 0;
6986 _ACEOF
6987 if ac_fn_cxx_try_compile "$LINENO"; then :
6988 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
6989 else
6990 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
6992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6993 ac_ext=c
6994 ac_cpp='$CPP $CPPFLAGS'
6995 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6996 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6997 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6999 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7000 CXXFLAGS="$pgac_save_CXXFLAGS"
7001 CXX="$pgac_save_CXX"
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
7004 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
7005 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
7006 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7009 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7010 elif test "$PORTNAME" = "aix"; then
7011 # Note that xlc accepts -fvisibility=hidden as a file.
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7013 $as_echo_n "checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7014 if ${pgac_cv_prog_CC_cflags__qvisibility_hidden+:} false; then :
7015 $as_echo_n "(cached) " >&6
7016 else
7017 pgac_save_CFLAGS=$CFLAGS
7018 pgac_save_CC=$CC
7019 CC=${CC}
7020 CFLAGS="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7021 ac_save_c_werror_flag=$ac_c_werror_flag
7022 ac_c_werror_flag=yes
7023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7024 /* end confdefs.h. */
7027 main ()
7031 return 0;
7033 _ACEOF
7034 if ac_fn_c_try_compile "$LINENO"; then :
7035 pgac_cv_prog_CC_cflags__qvisibility_hidden=yes
7036 else
7037 pgac_cv_prog_CC_cflags__qvisibility_hidden=no
7039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7040 ac_c_werror_flag=$ac_save_c_werror_flag
7041 CFLAGS="$pgac_save_CFLAGS"
7042 CC="$pgac_save_CC"
7044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qvisibility_hidden" >&5
7045 $as_echo "$pgac_cv_prog_CC_cflags__qvisibility_hidden" >&6; }
7046 if test x"$pgac_cv_prog_CC_cflags__qvisibility_hidden" = x"yes"; then
7047 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7052 $as_echo_n "checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7053 if ${pgac_cv_prog_CXX_cxxflags__qvisibility_hidden+:} false; then :
7054 $as_echo_n "(cached) " >&6
7055 else
7056 pgac_save_CXXFLAGS=$CXXFLAGS
7057 pgac_save_CXX=$CXX
7058 CXX=${CXX}
7059 CXXFLAGS="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7060 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7061 ac_cxx_werror_flag=yes
7062 ac_ext=cpp
7063 ac_cpp='$CXXCPP $CPPFLAGS'
7064 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7065 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7066 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7069 /* end confdefs.h. */
7072 main ()
7076 return 0;
7078 _ACEOF
7079 if ac_fn_cxx_try_compile "$LINENO"; then :
7080 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=yes
7081 else
7082 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=no
7084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7085 ac_ext=c
7086 ac_cpp='$CPP $CPPFLAGS'
7087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7091 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7092 CXXFLAGS="$pgac_save_CXXFLAGS"
7093 CXX="$pgac_save_CXX"
7095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&5
7096 $as_echo "$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&6; }
7097 if test x"$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" = x"yes"; then
7098 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7101 have_visibility_attribute=$pgac_cv_prog_CC_cflags__qvisibility_hidden
7102 # Old xlc versions (<13.1) don't have support for -qvisibility. Use expfull to force
7103 # all extension module symbols to be exported.
7104 if test "$pgac_cv_prog_CC_cflags__qvisibility_hidden" != "yes"; then
7105 CFLAGS_SL_MODULE="$CFLAGS_SL_MODULE -Wl,-b,expfull"
7109 if test "$have_visibility_attribute" = "yes"; then
7111 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7120 # Determine flags used to emit bitcode for JIT inlining.
7121 # 1. We must duplicate any behaviour-changing compiler flags used above,
7122 # to keep compatibility with the compiler used for normal Postgres code.
7123 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7124 # warning in the main build is enough.
7125 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7126 if test "$with_llvm" = yes ; then
7127 CLANGXX="$CLANG -xc++"
7129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7130 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7131 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7132 $as_echo_n "(cached) " >&6
7133 else
7134 pgac_save_CFLAGS=$CFLAGS
7135 pgac_save_CC=$CC
7136 CC=${CLANG}
7137 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7138 ac_save_c_werror_flag=$ac_c_werror_flag
7139 ac_c_werror_flag=yes
7140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7141 /* end confdefs.h. */
7144 main ()
7148 return 0;
7150 _ACEOF
7151 if ac_fn_c_try_compile "$LINENO"; then :
7152 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7153 else
7154 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7157 ac_c_werror_flag=$ac_save_c_werror_flag
7158 CFLAGS="$pgac_save_CFLAGS"
7159 CC="$pgac_save_CC"
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7162 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7163 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7164 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7168 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7169 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7170 $as_echo_n "(cached) " >&6
7171 else
7172 pgac_save_CXXFLAGS=$CXXFLAGS
7173 pgac_save_CXX=$CXX
7174 CXX=${CLANGXX}
7175 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7176 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7177 ac_cxx_werror_flag=yes
7178 ac_ext=cpp
7179 ac_cpp='$CXXCPP $CPPFLAGS'
7180 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7181 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7182 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7185 /* end confdefs.h. */
7188 main ()
7192 return 0;
7194 _ACEOF
7195 if ac_fn_cxx_try_compile "$LINENO"; then :
7196 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7197 else
7198 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7201 ac_ext=c
7202 ac_cpp='$CPP $CPPFLAGS'
7203 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7204 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7205 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7207 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7208 CXXFLAGS="$pgac_save_CXXFLAGS"
7209 CXX="$pgac_save_CXX"
7211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7212 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7213 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7214 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7218 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7219 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7220 $as_echo_n "(cached) " >&6
7221 else
7222 pgac_save_CFLAGS=$CFLAGS
7223 pgac_save_CC=$CC
7224 CC=${CLANG}
7225 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7226 ac_save_c_werror_flag=$ac_c_werror_flag
7227 ac_c_werror_flag=yes
7228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7229 /* end confdefs.h. */
7232 main ()
7236 return 0;
7238 _ACEOF
7239 if ac_fn_c_try_compile "$LINENO"; then :
7240 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7241 else
7242 pgac_cv_prog_CLANG_cflags__fwrapv=no
7244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7245 ac_c_werror_flag=$ac_save_c_werror_flag
7246 CFLAGS="$pgac_save_CFLAGS"
7247 CC="$pgac_save_CC"
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7250 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7251 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7252 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7256 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7257 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7258 $as_echo_n "(cached) " >&6
7259 else
7260 pgac_save_CXXFLAGS=$CXXFLAGS
7261 pgac_save_CXX=$CXX
7262 CXX=${CLANGXX}
7263 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7264 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7265 ac_cxx_werror_flag=yes
7266 ac_ext=cpp
7267 ac_cpp='$CXXCPP $CPPFLAGS'
7268 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7269 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7270 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7273 /* end confdefs.h. */
7276 main ()
7280 return 0;
7282 _ACEOF
7283 if ac_fn_cxx_try_compile "$LINENO"; then :
7284 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7285 else
7286 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7289 ac_ext=c
7290 ac_cpp='$CPP $CPPFLAGS'
7291 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7292 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7293 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7295 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7296 CXXFLAGS="$pgac_save_CXXFLAGS"
7297 CXX="$pgac_save_CXX"
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7300 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7301 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7302 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7306 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7307 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7308 $as_echo_n "(cached) " >&6
7309 else
7310 pgac_save_CFLAGS=$CFLAGS
7311 pgac_save_CC=$CC
7312 CC=${CLANG}
7313 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7314 ac_save_c_werror_flag=$ac_c_werror_flag
7315 ac_c_werror_flag=yes
7316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7317 /* end confdefs.h. */
7320 main ()
7324 return 0;
7326 _ACEOF
7327 if ac_fn_c_try_compile "$LINENO"; then :
7328 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7329 else
7330 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7333 ac_c_werror_flag=$ac_save_c_werror_flag
7334 CFLAGS="$pgac_save_CFLAGS"
7335 CC="$pgac_save_CC"
7337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7338 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7339 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7340 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7344 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7345 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7346 $as_echo_n "(cached) " >&6
7347 else
7348 pgac_save_CXXFLAGS=$CXXFLAGS
7349 pgac_save_CXX=$CXX
7350 CXX=${CLANGXX}
7351 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7352 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7353 ac_cxx_werror_flag=yes
7354 ac_ext=cpp
7355 ac_cpp='$CXXCPP $CPPFLAGS'
7356 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7357 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7358 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7361 /* end confdefs.h. */
7364 main ()
7368 return 0;
7370 _ACEOF
7371 if ac_fn_cxx_try_compile "$LINENO"; then :
7372 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7373 else
7374 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7377 ac_ext=c
7378 ac_cpp='$CPP $CPPFLAGS'
7379 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7380 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7381 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7383 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7384 CXXFLAGS="$pgac_save_CXXFLAGS"
7385 CXX="$pgac_save_CXX"
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7388 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7389 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7390 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7394 NOT_THE_CFLAGS=""
7395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7396 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7397 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7398 $as_echo_n "(cached) " >&6
7399 else
7400 pgac_save_CFLAGS=$CFLAGS
7401 pgac_save_CC=$CC
7402 CC=${CLANG}
7403 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7404 ac_save_c_werror_flag=$ac_c_werror_flag
7405 ac_c_werror_flag=yes
7406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7407 /* end confdefs.h. */
7410 main ()
7414 return 0;
7416 _ACEOF
7417 if ac_fn_c_try_compile "$LINENO"; then :
7418 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7419 else
7420 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7423 ac_c_werror_flag=$ac_save_c_werror_flag
7424 CFLAGS="$pgac_save_CFLAGS"
7425 CC="$pgac_save_CC"
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7428 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7429 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7430 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7433 if test -n "$NOT_THE_CFLAGS"; then
7434 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7436 NOT_THE_CFLAGS=""
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7438 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7439 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7440 $as_echo_n "(cached) " >&6
7441 else
7442 pgac_save_CFLAGS=$CFLAGS
7443 pgac_save_CC=$CC
7444 CC=${CLANG}
7445 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7446 ac_save_c_werror_flag=$ac_c_werror_flag
7447 ac_c_werror_flag=yes
7448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7449 /* end confdefs.h. */
7452 main ()
7456 return 0;
7458 _ACEOF
7459 if ac_fn_c_try_compile "$LINENO"; then :
7460 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7461 else
7462 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7465 ac_c_werror_flag=$ac_save_c_werror_flag
7466 CFLAGS="$pgac_save_CFLAGS"
7467 CC="$pgac_save_CC"
7469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7470 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7471 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7472 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7475 if test -n "$NOT_THE_CFLAGS"; then
7476 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7478 NOT_THE_CFLAGS=""
7479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7480 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7481 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7482 $as_echo_n "(cached) " >&6
7483 else
7484 pgac_save_CFLAGS=$CFLAGS
7485 pgac_save_CC=$CC
7486 CC=${CLANG}
7487 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7488 ac_save_c_werror_flag=$ac_c_werror_flag
7489 ac_c_werror_flag=yes
7490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7491 /* end confdefs.h. */
7494 main ()
7498 return 0;
7500 _ACEOF
7501 if ac_fn_c_try_compile "$LINENO"; then :
7502 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7503 else
7504 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7507 ac_c_werror_flag=$ac_save_c_werror_flag
7508 CFLAGS="$pgac_save_CFLAGS"
7509 CC="$pgac_save_CC"
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7512 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7513 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7514 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7517 if test -n "$NOT_THE_CFLAGS"; then
7518 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7520 NOT_THE_CFLAGS=""
7521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7522 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7523 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7524 $as_echo_n "(cached) " >&6
7525 else
7526 pgac_save_CFLAGS=$CFLAGS
7527 pgac_save_CC=$CC
7528 CC=${CLANG}
7529 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7530 ac_save_c_werror_flag=$ac_c_werror_flag
7531 ac_c_werror_flag=yes
7532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7533 /* end confdefs.h. */
7536 main ()
7540 return 0;
7542 _ACEOF
7543 if ac_fn_c_try_compile "$LINENO"; then :
7544 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7545 else
7546 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7549 ac_c_werror_flag=$ac_save_c_werror_flag
7550 CFLAGS="$pgac_save_CFLAGS"
7551 CC="$pgac_save_CC"
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7554 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7555 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7556 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7559 if test -n "$NOT_THE_CFLAGS"; then
7560 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7564 # supply -g if --enable-debug
7565 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7566 CFLAGS="$CFLAGS -g"
7569 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7570 CXXFLAGS="$CXXFLAGS -g"
7573 # enable code coverage if --enable-coverage
7574 if test "$enable_coverage" = yes; then
7575 if test "$GCC" = yes; then
7576 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7577 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7578 else
7579 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7583 # enable profiling if --enable-profiling
7584 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7585 if test "$GCC" = yes; then
7587 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7589 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7590 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7591 else
7592 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7596 # On Solaris, we need this #define to get POSIX-conforming versions
7597 # of many interfaces (sigwait, getpwuid_r, ...).
7598 if test "$PORTNAME" = "solaris"; then
7599 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7602 # We already have this in Makefile.win32, but configure needs it too
7603 if test "$PORTNAME" = "win32"; then
7604 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7607 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7608 # user-specified flags (if any) at the end. This lets users override
7609 # the automatic additions.
7610 CFLAGS="$CFLAGS $user_CFLAGS"
7611 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7612 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7613 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7618 # The template file must set up CFLAGS_SL; we don't support user override
7621 # Check if the compiler still works with the final flag settings
7622 # (note, we're not checking that for CXX, which is optional)
7623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7624 $as_echo_n "checking whether the C compiler still works... " >&6; }
7625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7626 /* end confdefs.h. */
7629 main ()
7631 return 0;
7633 return 0;
7635 _ACEOF
7636 if ac_fn_c_try_link "$LINENO"; then :
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7638 $as_echo "yes" >&6; }
7639 else
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7641 $as_echo "no" >&6; }
7642 as_fn_error $? "cannot proceed" "$LINENO" 5
7644 rm -f core conftest.err conftest.$ac_objext \
7645 conftest$ac_exeext conftest.$ac_ext
7647 # Defend against gcc -ffast-math
7648 if test "$GCC" = yes; then
7649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7650 /* end confdefs.h. */
7653 main ()
7655 #ifdef __FAST_MATH__
7656 choke me
7657 #endif
7659 return 0;
7661 _ACEOF
7662 if ac_fn_c_try_compile "$LINENO"; then :
7664 else
7665 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7670 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7671 # versions of clang do not understand -fexcess-precision=standard, the use of
7672 # x87 floating point operations leads to problems like isinf possibly returning
7673 # false for a value that is infinite when converted from the 80bit register to
7674 # the 8byte memory representation.
7676 # Only perform the test if the compiler doesn't understand
7677 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7678 # automatically.
7679 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7681 /* end confdefs.h. */
7684 main ()
7687 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7688 choke me
7689 #endif
7692 return 0;
7694 _ACEOF
7695 if ac_fn_c_try_compile "$LINENO"; then :
7697 else
7698 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7703 ac_ext=c
7704 ac_cpp='$CPP $CPPFLAGS'
7705 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7706 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7707 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7709 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7710 # On Suns, sometimes $CPP names a directory.
7711 if test -n "$CPP" && test -d "$CPP"; then
7712 CPP=
7714 if test -z "$CPP"; then
7715 if ${ac_cv_prog_CPP+:} false; then :
7716 $as_echo_n "(cached) " >&6
7717 else
7718 # Double quotes because CPP needs to be expanded
7719 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7721 ac_preproc_ok=false
7722 for ac_c_preproc_warn_flag in '' yes
7724 # Use a header file that comes with gcc, so configuring glibc
7725 # with a fresh cross-compiler works.
7726 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7727 # <limits.h> exists even on freestanding compilers.
7728 # On the NeXT, cc -E runs the code through the compiler's parser,
7729 # not just through cpp. "Syntax error" is here to catch this case.
7730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7731 /* end confdefs.h. */
7732 #ifdef __STDC__
7733 # include <limits.h>
7734 #else
7735 # include <assert.h>
7736 #endif
7737 Syntax error
7738 _ACEOF
7739 if ac_fn_c_try_cpp "$LINENO"; then :
7741 else
7742 # Broken: fails on valid input.
7743 continue
7745 rm -f conftest.err conftest.i conftest.$ac_ext
7747 # OK, works on sane cases. Now check whether nonexistent headers
7748 # can be detected and how.
7749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7750 /* end confdefs.h. */
7751 #include <ac_nonexistent.h>
7752 _ACEOF
7753 if ac_fn_c_try_cpp "$LINENO"; then :
7754 # Broken: success on invalid input.
7755 continue
7756 else
7757 # Passes both tests.
7758 ac_preproc_ok=:
7759 break
7761 rm -f conftest.err conftest.i conftest.$ac_ext
7763 done
7764 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7765 rm -f conftest.i conftest.err conftest.$ac_ext
7766 if $ac_preproc_ok; then :
7767 break
7770 done
7771 ac_cv_prog_CPP=$CPP
7774 CPP=$ac_cv_prog_CPP
7775 else
7776 ac_cv_prog_CPP=$CPP
7778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7779 $as_echo "$CPP" >&6; }
7780 ac_preproc_ok=false
7781 for ac_c_preproc_warn_flag in '' yes
7783 # Use a header file that comes with gcc, so configuring glibc
7784 # with a fresh cross-compiler works.
7785 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7786 # <limits.h> exists even on freestanding compilers.
7787 # On the NeXT, cc -E runs the code through the compiler's parser,
7788 # not just through cpp. "Syntax error" is here to catch this case.
7789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7790 /* end confdefs.h. */
7791 #ifdef __STDC__
7792 # include <limits.h>
7793 #else
7794 # include <assert.h>
7795 #endif
7796 Syntax error
7797 _ACEOF
7798 if ac_fn_c_try_cpp "$LINENO"; then :
7800 else
7801 # Broken: fails on valid input.
7802 continue
7804 rm -f conftest.err conftest.i conftest.$ac_ext
7806 # OK, works on sane cases. Now check whether nonexistent headers
7807 # can be detected and how.
7808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7809 /* end confdefs.h. */
7810 #include <ac_nonexistent.h>
7811 _ACEOF
7812 if ac_fn_c_try_cpp "$LINENO"; then :
7813 # Broken: success on invalid input.
7814 continue
7815 else
7816 # Passes both tests.
7817 ac_preproc_ok=:
7818 break
7820 rm -f conftest.err conftest.i conftest.$ac_ext
7822 done
7823 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7824 rm -f conftest.i conftest.err conftest.$ac_ext
7825 if $ac_preproc_ok; then :
7827 else
7828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7829 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7830 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7831 See \`config.log' for more details" "$LINENO" 5; }
7834 ac_ext=c
7835 ac_cpp='$CPP $CPPFLAGS'
7836 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7837 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7838 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7844 # Set up TAS assembly code if needed; the template file has now had its
7845 # chance to request this.
7847 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7850 if test "$need_tas" = yes ; then
7851 TAS=tas.o
7852 else
7853 TAS=""
7858 cat >>confdefs.h <<_ACEOF
7859 #define DLSUFFIX "$DLSUFFIX"
7860 _ACEOF
7864 # Set up pkg_config in case we need it below
7873 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7874 if test -n "$ac_tool_prefix"; then
7875 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7876 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7878 $as_echo_n "checking for $ac_word... " >&6; }
7879 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7880 $as_echo_n "(cached) " >&6
7881 else
7882 case $PKG_CONFIG in
7883 [\\/]* | ?:[\\/]*)
7884 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7888 for as_dir in $PATH
7890 IFS=$as_save_IFS
7891 test -z "$as_dir" && as_dir=.
7892 for ac_exec_ext in '' $ac_executable_extensions; do
7893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7894 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7896 break 2
7898 done
7899 done
7900 IFS=$as_save_IFS
7903 esac
7905 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7906 if test -n "$PKG_CONFIG"; then
7907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7908 $as_echo "$PKG_CONFIG" >&6; }
7909 else
7910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7911 $as_echo "no" >&6; }
7916 if test -z "$ac_cv_path_PKG_CONFIG"; then
7917 ac_pt_PKG_CONFIG=$PKG_CONFIG
7918 # Extract the first word of "pkg-config", so it can be a program name with args.
7919 set dummy pkg-config; ac_word=$2
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7921 $as_echo_n "checking for $ac_word... " >&6; }
7922 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7923 $as_echo_n "(cached) " >&6
7924 else
7925 case $ac_pt_PKG_CONFIG in
7926 [\\/]* | ?:[\\/]*)
7927 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7931 for as_dir in $PATH
7933 IFS=$as_save_IFS
7934 test -z "$as_dir" && as_dir=.
7935 for ac_exec_ext in '' $ac_executable_extensions; do
7936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7937 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7939 break 2
7941 done
7942 done
7943 IFS=$as_save_IFS
7946 esac
7948 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7949 if test -n "$ac_pt_PKG_CONFIG"; then
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7951 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7952 else
7953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7954 $as_echo "no" >&6; }
7957 if test "x$ac_pt_PKG_CONFIG" = x; then
7958 PKG_CONFIG=""
7959 else
7960 case $cross_compiling:$ac_tool_warned in
7961 yes:)
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7963 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7964 ac_tool_warned=yes ;;
7965 esac
7966 PKG_CONFIG=$ac_pt_PKG_CONFIG
7968 else
7969 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7973 if test -n "$PKG_CONFIG"; then
7974 _pkg_min_version=0.9.0
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7976 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7977 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7979 $as_echo "yes" >&6; }
7980 else
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7982 $as_echo "no" >&6; }
7983 PKG_CONFIG=""
7988 # Automatic dependency tracking
7992 # Check whether --enable-depend was given.
7993 if test "${enable_depend+set}" = set; then :
7994 enableval=$enable_depend;
7995 case $enableval in
7996 yes)
7997 autodepend=yes
8003 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
8005 esac
8007 else
8008 enable_depend=no
8017 # Enable assert checks
8021 # Check whether --enable-cassert was given.
8022 if test "${enable_cassert+set}" = set; then :
8023 enableval=$enable_cassert;
8024 case $enableval in
8025 yes)
8027 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8034 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8036 esac
8038 else
8039 enable_cassert=no
8047 # Include directories
8049 ac_save_IFS=$IFS
8050 IFS="${IFS}${PATH_SEPARATOR}"
8051 # SRCH_INC comes from the template file
8052 for dir in $with_includes $SRCH_INC; do
8053 if test -d "$dir"; then
8054 INCLUDES="$INCLUDES -I$dir"
8055 else
8056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8057 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8059 done
8060 IFS=$ac_save_IFS
8065 # Library directories
8067 ac_save_IFS=$IFS
8068 IFS="${IFS}${PATH_SEPARATOR}"
8069 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8070 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8071 if test -d "$dir"; then
8072 LIBDIRS="$LIBDIRS -L$dir"
8073 else
8074 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8075 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8077 done
8078 IFS=$ac_save_IFS
8081 # Enable thread-safe client libraries
8083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
8084 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
8087 # Check whether --enable-thread-safety was given.
8088 if test "${enable_thread_safety+set}" = set; then :
8089 enableval=$enable_thread_safety;
8090 case $enableval in
8091 yes)
8098 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
8100 esac
8102 else
8103 enable_thread_safety=yes
8108 if test "$enable_thread_safety" = yes; then
8110 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
8114 $as_echo "$enable_thread_safety" >&6; }
8118 # ICU
8120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8121 $as_echo_n "checking whether to build with ICU support... " >&6; }
8125 # Check whether --with-icu was given.
8126 if test "${with_icu+set}" = set; then :
8127 withval=$with_icu;
8128 case $withval in
8129 yes)
8131 $as_echo "#define USE_ICU 1" >>confdefs.h
8138 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8140 esac
8142 else
8143 with_icu=no
8148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8149 $as_echo "$with_icu" >&6; }
8152 if test "$with_icu" = yes; then
8154 pkg_failed=no
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8156 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8158 if test -n "$ICU_CFLAGS"; then
8159 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8160 elif test -n "$PKG_CONFIG"; then
8161 if test -n "$PKG_CONFIG" && \
8162 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8163 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8164 ac_status=$?
8165 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8166 test $ac_status = 0; }; then
8167 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8168 test "x$?" != "x0" && pkg_failed=yes
8169 else
8170 pkg_failed=yes
8172 else
8173 pkg_failed=untried
8175 if test -n "$ICU_LIBS"; then
8176 pkg_cv_ICU_LIBS="$ICU_LIBS"
8177 elif test -n "$PKG_CONFIG"; then
8178 if test -n "$PKG_CONFIG" && \
8179 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8180 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8181 ac_status=$?
8182 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8183 test $ac_status = 0; }; then
8184 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8185 test "x$?" != "x0" && pkg_failed=yes
8186 else
8187 pkg_failed=yes
8189 else
8190 pkg_failed=untried
8195 if test $pkg_failed = yes; then
8196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8197 $as_echo "no" >&6; }
8199 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8200 _pkg_short_errors_supported=yes
8201 else
8202 _pkg_short_errors_supported=no
8204 if test $_pkg_short_errors_supported = yes; then
8205 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8206 else
8207 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8209 # Put the nasty error message in config.log where it belongs
8210 echo "$ICU_PKG_ERRORS" >&5
8212 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8214 $ICU_PKG_ERRORS
8216 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8217 installed software in a non-standard prefix.
8219 Alternatively, you may set the environment variables ICU_CFLAGS
8220 and ICU_LIBS to avoid the need to call pkg-config.
8221 See the pkg-config man page for more details." "$LINENO" 5
8222 elif test $pkg_failed = untried; then
8223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8224 $as_echo "no" >&6; }
8225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8227 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8228 is in your PATH or set the PKG_CONFIG environment variable to the full
8229 path to pkg-config.
8231 Alternatively, you may set the environment variables ICU_CFLAGS
8232 and ICU_LIBS to avoid the need to call pkg-config.
8233 See the pkg-config man page for more details.
8235 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8236 See \`config.log' for more details" "$LINENO" 5; }
8237 else
8238 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8239 ICU_LIBS=$pkg_cv_ICU_LIBS
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8241 $as_echo "yes" >&6; }
8247 # Optionally build Tcl modules (PL/Tcl)
8249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8250 $as_echo_n "checking whether to build with Tcl... " >&6; }
8254 # Check whether --with-tcl was given.
8255 if test "${with_tcl+set}" = set; then :
8256 withval=$with_tcl;
8257 case $withval in
8258 yes)
8265 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8267 esac
8269 else
8270 with_tcl=no
8275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8276 $as_echo "$with_tcl" >&6; }
8279 # We see if the path to the Tcl/Tk configuration scripts is specified.
8280 # This will override the use of tclsh to find the paths to search.
8285 # Check whether --with-tclconfig was given.
8286 if test "${with_tclconfig+set}" = set; then :
8287 withval=$with_tclconfig;
8288 case $withval in
8289 yes)
8290 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8293 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8298 esac
8305 # Optionally build Perl modules (PL/Perl)
8307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8308 $as_echo_n "checking whether to build Perl modules... " >&6; }
8312 # Check whether --with-perl was given.
8313 if test "${with_perl+set}" = set; then :
8314 withval=$with_perl;
8315 case $withval in
8316 yes)
8323 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8325 esac
8327 else
8328 with_perl=no
8333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8334 $as_echo "$with_perl" >&6; }
8338 # Optionally build Python modules (PL/Python)
8340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8341 $as_echo_n "checking whether to build Python modules... " >&6; }
8345 # Check whether --with-python was given.
8346 if test "${with_python+set}" = set; then :
8347 withval=$with_python;
8348 case $withval in
8349 yes)
8356 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8358 esac
8360 else
8361 with_python=no
8366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8367 $as_echo "$with_python" >&6; }
8371 # GSSAPI
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8374 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8378 # Check whether --with-gssapi was given.
8379 if test "${with_gssapi+set}" = set; then :
8380 withval=$with_gssapi;
8381 case $withval in
8382 yes)
8385 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8387 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8394 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8396 esac
8398 else
8399 with_gssapi=no
8404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8405 $as_echo "$with_gssapi" >&6; }
8413 # Kerberos configuration parameters
8418 # Check whether --with-krb-srvnam was given.
8419 if test "${with_krb_srvnam+set}" = set; then :
8420 withval=$with_krb_srvnam;
8421 case $withval in
8422 yes)
8423 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8426 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8431 esac
8433 else
8434 with_krb_srvnam="postgres"
8440 cat >>confdefs.h <<_ACEOF
8441 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8442 _ACEOF
8447 # PAM
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8450 $as_echo_n "checking whether to build with PAM support... " >&6; }
8454 # Check whether --with-pam was given.
8455 if test "${with_pam+set}" = set; then :
8456 withval=$with_pam;
8457 case $withval in
8458 yes)
8460 $as_echo "#define USE_PAM 1" >>confdefs.h
8467 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8469 esac
8471 else
8472 with_pam=no
8477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8478 $as_echo "$with_pam" >&6; }
8482 # BSD AUTH
8484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8485 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8489 # Check whether --with-bsd-auth was given.
8490 if test "${with_bsd_auth+set}" = set; then :
8491 withval=$with_bsd_auth;
8492 case $withval in
8493 yes)
8495 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8502 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8504 esac
8506 else
8507 with_bsd_auth=no
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8513 $as_echo "$with_bsd_auth" >&6; }
8517 # LDAP
8519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8520 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8524 # Check whether --with-ldap was given.
8525 if test "${with_ldap+set}" = set; then :
8526 withval=$with_ldap;
8527 case $withval in
8528 yes)
8530 $as_echo "#define USE_LDAP 1" >>confdefs.h
8537 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8539 esac
8541 else
8542 with_ldap=no
8547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8548 $as_echo "$with_ldap" >&6; }
8553 # Bonjour
8555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8556 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8560 # Check whether --with-bonjour was given.
8561 if test "${with_bonjour+set}" = set; then :
8562 withval=$with_bonjour;
8563 case $withval in
8564 yes)
8566 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8573 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8575 esac
8577 else
8578 with_bonjour=no
8583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8584 $as_echo "$with_bonjour" >&6; }
8588 # SELinux
8590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8591 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8595 # Check whether --with-selinux was given.
8596 if test "${with_selinux+set}" = set; then :
8597 withval=$with_selinux;
8598 case $withval in
8599 yes)
8606 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8608 esac
8610 else
8611 with_selinux=no
8617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8618 $as_echo "$with_selinux" >&6; }
8621 # Systemd
8623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8624 $as_echo_n "checking whether to build with systemd support... " >&6; }
8628 # Check whether --with-systemd was given.
8629 if test "${with_systemd+set}" = set; then :
8630 withval=$with_systemd;
8631 case $withval in
8632 yes)
8634 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8641 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8643 esac
8645 else
8646 with_systemd=no
8652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8653 $as_echo "$with_systemd" >&6; }
8656 # Readline
8661 # Check whether --with-readline was given.
8662 if test "${with_readline+set}" = set; then :
8663 withval=$with_readline;
8664 case $withval in
8665 yes)
8672 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8674 esac
8676 else
8677 with_readline=yes
8682 # readline on MinGW has problems with backslashes in psql and other bugs.
8683 # This is particularly a problem with non-US code pages.
8684 # Therefore disable its use until we understand the cause. 2004-07-20
8685 if test "$PORTNAME" = "win32"; then
8686 if test "$with_readline" = yes; then
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8688 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8689 with_readline=no
8696 # Prefer libedit
8701 # Check whether --with-libedit-preferred was given.
8702 if test "${with_libedit_preferred+set}" = set; then :
8703 withval=$with_libedit_preferred;
8704 case $withval in
8705 yes)
8712 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8714 esac
8716 else
8717 with_libedit_preferred=no
8725 # UUID library
8727 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8728 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8729 # UUID library. More than one of these might be present on a given platform,
8730 # so we make the user say which one she wants.
8735 # Check whether --with-uuid was given.
8736 if test "${with_uuid+set}" = set; then :
8737 withval=$with_uuid;
8738 case $withval in
8739 yes)
8740 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8743 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8748 esac
8753 if test x"$with_uuid" = x"" ; then
8754 with_uuid=no
8759 # Check whether --with-ossp-uuid was given.
8760 if test "${with_ossp_uuid+set}" = set; then :
8761 withval=$with_ossp_uuid;
8762 case $withval in
8763 yes)
8770 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8772 esac
8774 else
8775 with_ossp_uuid=no
8780 if test "$with_ossp_uuid" = yes ; then
8781 with_uuid=ossp
8784 if test "$with_uuid" != no ; then
8785 if test "$with_uuid" = bsd ; then
8787 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8789 elif test "$with_uuid" = e2fs ; then
8791 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8793 elif test "$with_uuid" = ossp ; then
8795 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8797 else
8798 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8805 # XML
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8808 $as_echo_n "checking whether to build with XML support... " >&6; }
8812 # Check whether --with-libxml was given.
8813 if test "${with_libxml+set}" = set; then :
8814 withval=$with_libxml;
8815 case $withval in
8816 yes)
8818 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8825 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8827 esac
8829 else
8830 with_libxml=no
8835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8836 $as_echo "$with_libxml" >&6; }
8839 if test "$with_libxml" = yes ; then
8840 # Check pkg-config, then xml2-config. But for backwards compatibility,
8841 # setting XML2_CONFIG overrides pkg-config.
8842 have_libxml2_pkg_config=no
8843 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8845 pkg_failed=no
8846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8847 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8849 if test -n "$XML2_CFLAGS"; then
8850 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8851 elif test -n "$PKG_CONFIG"; then
8852 if test -n "$PKG_CONFIG" && \
8853 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8854 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8855 ac_status=$?
8856 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8857 test $ac_status = 0; }; then
8858 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8859 test "x$?" != "x0" && pkg_failed=yes
8860 else
8861 pkg_failed=yes
8863 else
8864 pkg_failed=untried
8866 if test -n "$XML2_LIBS"; then
8867 pkg_cv_XML2_LIBS="$XML2_LIBS"
8868 elif test -n "$PKG_CONFIG"; then
8869 if test -n "$PKG_CONFIG" && \
8870 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8871 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8872 ac_status=$?
8873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8874 test $ac_status = 0; }; then
8875 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8876 test "x$?" != "x0" && pkg_failed=yes
8877 else
8878 pkg_failed=yes
8880 else
8881 pkg_failed=untried
8886 if test $pkg_failed = yes; then
8887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8888 $as_echo "no" >&6; }
8890 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8891 _pkg_short_errors_supported=yes
8892 else
8893 _pkg_short_errors_supported=no
8895 if test $_pkg_short_errors_supported = yes; then
8896 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8897 else
8898 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8900 # Put the nasty error message in config.log where it belongs
8901 echo "$XML2_PKG_ERRORS" >&5
8903 # do nothing
8904 elif test $pkg_failed = untried; then
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8906 $as_echo "no" >&6; }
8907 # do nothing
8908 else
8909 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8910 XML2_LIBS=$pkg_cv_XML2_LIBS
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8912 $as_echo "yes" >&6; }
8913 have_libxml2_pkg_config=yes
8916 if test "$have_libxml2_pkg_config" = no ; then
8917 if test -z "$XML2_CONFIG"; then
8918 for ac_prog in xml2-config
8920 # Extract the first word of "$ac_prog", so it can be a program name with args.
8921 set dummy $ac_prog; ac_word=$2
8922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8923 $as_echo_n "checking for $ac_word... " >&6; }
8924 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8925 $as_echo_n "(cached) " >&6
8926 else
8927 case $XML2_CONFIG in
8928 [\\/]* | ?:[\\/]*)
8929 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8933 for as_dir in $PATH
8935 IFS=$as_save_IFS
8936 test -z "$as_dir" && as_dir=.
8937 for ac_exec_ext in '' $ac_executable_extensions; do
8938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8939 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8941 break 2
8943 done
8944 done
8945 IFS=$as_save_IFS
8948 esac
8950 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8951 if test -n "$XML2_CONFIG"; then
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8953 $as_echo "$XML2_CONFIG" >&6; }
8954 else
8955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8956 $as_echo "no" >&6; }
8960 test -n "$XML2_CONFIG" && break
8961 done
8963 else
8964 # Report the value of XML2_CONFIG in configure's output in all cases.
8965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8966 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8968 $as_echo "$XML2_CONFIG" >&6; }
8971 if test -n "$XML2_CONFIG"; then
8972 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8973 XML2_LIBS=`$XML2_CONFIG --libs`
8976 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8977 for pgac_option in $XML2_CFLAGS; do
8978 case $pgac_option in
8979 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8980 esac
8981 done
8982 for pgac_option in $XML2_LIBS; do
8983 case $pgac_option in
8984 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8985 esac
8986 done
8991 # XSLT
8996 # Check whether --with-libxslt was given.
8997 if test "${with_libxslt+set}" = set; then :
8998 withval=$with_libxslt;
8999 case $withval in
9000 yes)
9002 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
9009 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
9011 esac
9013 else
9014 with_libxslt=no
9024 # tzdata
9029 # Check whether --with-system-tzdata was given.
9030 if test "${with_system_tzdata+set}" = set; then :
9031 withval=$with_system_tzdata;
9032 case $withval in
9033 yes)
9034 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9037 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9042 esac
9050 # Zlib
9055 # Check whether --with-zlib was given.
9056 if test "${with_zlib+set}" = set; then :
9057 withval=$with_zlib;
9058 case $withval in
9059 yes)
9066 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9068 esac
9070 else
9071 with_zlib=yes
9079 # LZ4
9081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9082 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9086 # Check whether --with-lz4 was given.
9087 if test "${with_lz4+set}" = set; then :
9088 withval=$with_lz4;
9089 case $withval in
9090 yes)
9092 $as_echo "#define USE_LZ4 1" >>confdefs.h
9099 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9101 esac
9103 else
9104 with_lz4=no
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9110 $as_echo "$with_lz4" >&6; }
9113 if test "$with_lz4" = yes; then
9115 pkg_failed=no
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9117 $as_echo_n "checking for liblz4... " >&6; }
9119 if test -n "$LZ4_CFLAGS"; then
9120 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9121 elif test -n "$PKG_CONFIG"; then
9122 if test -n "$PKG_CONFIG" && \
9123 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9124 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9125 ac_status=$?
9126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9127 test $ac_status = 0; }; then
9128 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9129 test "x$?" != "x0" && pkg_failed=yes
9130 else
9131 pkg_failed=yes
9133 else
9134 pkg_failed=untried
9136 if test -n "$LZ4_LIBS"; then
9137 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9138 elif test -n "$PKG_CONFIG"; then
9139 if test -n "$PKG_CONFIG" && \
9140 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9141 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9142 ac_status=$?
9143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9144 test $ac_status = 0; }; then
9145 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9146 test "x$?" != "x0" && pkg_failed=yes
9147 else
9148 pkg_failed=yes
9150 else
9151 pkg_failed=untried
9156 if test $pkg_failed = yes; then
9157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158 $as_echo "no" >&6; }
9160 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9161 _pkg_short_errors_supported=yes
9162 else
9163 _pkg_short_errors_supported=no
9165 if test $_pkg_short_errors_supported = yes; then
9166 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9167 else
9168 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9170 # Put the nasty error message in config.log where it belongs
9171 echo "$LZ4_PKG_ERRORS" >&5
9173 as_fn_error $? "Package requirements (liblz4) were not met:
9175 $LZ4_PKG_ERRORS
9177 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9178 installed software in a non-standard prefix.
9180 Alternatively, you may set the environment variables LZ4_CFLAGS
9181 and LZ4_LIBS to avoid the need to call pkg-config.
9182 See the pkg-config man page for more details." "$LINENO" 5
9183 elif test $pkg_failed = untried; then
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9185 $as_echo "no" >&6; }
9186 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9187 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9188 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9189 is in your PATH or set the PKG_CONFIG environment variable to the full
9190 path to pkg-config.
9192 Alternatively, you may set the environment variables LZ4_CFLAGS
9193 and LZ4_LIBS to avoid the need to call pkg-config.
9194 See the pkg-config man page for more details.
9196 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9197 See \`config.log' for more details" "$LINENO" 5; }
9198 else
9199 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9200 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9202 $as_echo "yes" >&6; }
9205 # We only care about -I, -D, and -L switches;
9206 # note that -llz4 will be added by AC_CHECK_LIB below.
9207 for pgac_option in $LZ4_CFLAGS; do
9208 case $pgac_option in
9209 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9210 esac
9211 done
9212 for pgac_option in $LZ4_LIBS; do
9213 case $pgac_option in
9214 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9215 esac
9216 done
9220 # ZSTD
9222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9223 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9227 # Check whether --with-zstd was given.
9228 if test "${with_zstd+set}" = set; then :
9229 withval=$with_zstd;
9230 case $withval in
9231 yes)
9233 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9240 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9242 esac
9244 else
9245 with_zstd=no
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9251 $as_echo "$with_zstd" >&6; }
9254 if test "$with_zstd" = yes; then
9256 pkg_failed=no
9257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9258 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9260 if test -n "$ZSTD_CFLAGS"; then
9261 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9262 elif test -n "$PKG_CONFIG"; then
9263 if test -n "$PKG_CONFIG" && \
9264 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9265 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9266 ac_status=$?
9267 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9268 test $ac_status = 0; }; then
9269 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9270 test "x$?" != "x0" && pkg_failed=yes
9271 else
9272 pkg_failed=yes
9274 else
9275 pkg_failed=untried
9277 if test -n "$ZSTD_LIBS"; then
9278 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9279 elif test -n "$PKG_CONFIG"; then
9280 if test -n "$PKG_CONFIG" && \
9281 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9282 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9283 ac_status=$?
9284 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9285 test $ac_status = 0; }; then
9286 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9287 test "x$?" != "x0" && pkg_failed=yes
9288 else
9289 pkg_failed=yes
9291 else
9292 pkg_failed=untried
9297 if test $pkg_failed = yes; then
9298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9299 $as_echo "no" >&6; }
9301 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9302 _pkg_short_errors_supported=yes
9303 else
9304 _pkg_short_errors_supported=no
9306 if test $_pkg_short_errors_supported = yes; then
9307 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9308 else
9309 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9311 # Put the nasty error message in config.log where it belongs
9312 echo "$ZSTD_PKG_ERRORS" >&5
9314 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9316 $ZSTD_PKG_ERRORS
9318 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9319 installed software in a non-standard prefix.
9321 Alternatively, you may set the environment variables ZSTD_CFLAGS
9322 and ZSTD_LIBS to avoid the need to call pkg-config.
9323 See the pkg-config man page for more details." "$LINENO" 5
9324 elif test $pkg_failed = untried; then
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9326 $as_echo "no" >&6; }
9327 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9328 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9329 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9330 is in your PATH or set the PKG_CONFIG environment variable to the full
9331 path to pkg-config.
9333 Alternatively, you may set the environment variables ZSTD_CFLAGS
9334 and ZSTD_LIBS to avoid the need to call pkg-config.
9335 See the pkg-config man page for more details.
9337 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9338 See \`config.log' for more details" "$LINENO" 5; }
9339 else
9340 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9341 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9343 $as_echo "yes" >&6; }
9346 # We only care about -I, -D, and -L switches;
9347 # note that -lzstd will be added by AC_CHECK_LIB below.
9348 for pgac_option in $ZSTD_CFLAGS; do
9349 case $pgac_option in
9350 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9351 esac
9352 done
9353 for pgac_option in $ZSTD_LIBS; do
9354 case $pgac_option in
9355 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9356 esac
9357 done
9360 # Assignments
9363 CPPFLAGS="$CPPFLAGS $INCLUDES"
9364 LDFLAGS="$LDFLAGS $LIBDIRS"
9370 # Check whether --with-gnu-ld was given.
9371 if test "${with_gnu_ld+set}" = set; then :
9372 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9373 else
9374 with_gnu_ld=no
9377 ac_prog=ld
9378 if test "$GCC" = yes; then
9379 # Check if gcc -print-prog-name=ld gives a path.
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9381 $as_echo_n "checking for ld used by GCC... " >&6; }
9382 case $host in
9383 *-*-mingw*)
9384 # gcc leaves a trailing carriage return which upsets mingw
9385 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9387 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9388 esac
9389 case "$ac_prog" in
9390 # Accept absolute paths.
9391 [\\/]* | [A-Za-z]:[\\/]*)
9392 re_direlt='/[^/][^/]*/\.\./'
9393 # Canonicalize the path of ld
9394 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9395 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9396 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9397 done
9398 test -z "$LD" && LD="$ac_prog"
9401 # If it fails, then pretend we aren't using GCC.
9402 ac_prog=ld
9405 # If it is relative, then search for the first ld in PATH.
9406 with_gnu_ld=unknown
9408 esac
9409 elif test "$with_gnu_ld" = yes; then
9410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9411 $as_echo_n "checking for GNU ld... " >&6; }
9412 else
9413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9414 $as_echo_n "checking for non-GNU ld... " >&6; }
9416 if ${ac_cv_path_LD+:} false; then :
9417 $as_echo_n "(cached) " >&6
9418 else
9419 if test -z "$LD"; then
9420 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9421 for ac_dir in $PATH; do
9422 test -z "$ac_dir" && ac_dir=.
9423 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9424 ac_cv_path_LD="$ac_dir/$ac_prog"
9425 # Check to see if the program is GNU ld. I'd rather use --version,
9426 # but apparently some GNU ld's only accept -v.
9427 # Break only if it was the GNU/non-GNU ld that we prefer.
9428 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9429 test "$with_gnu_ld" != no && break
9430 else
9431 test "$with_gnu_ld" != yes && break
9434 done
9435 IFS="$ac_save_ifs"
9436 else
9437 ac_cv_path_LD="$LD" # Let the user override the test with a path.
9441 LD="$ac_cv_path_LD"
9442 if test -n "$LD"; then
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9444 $as_echo "$LD" >&6; }
9445 else
9446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9447 $as_echo "no" >&6; }
9449 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9451 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9452 if ${ac_cv_prog_gnu_ld+:} false; then :
9453 $as_echo_n "(cached) " >&6
9454 else
9455 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9456 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9457 ac_cv_prog_gnu_ld=yes
9458 else
9459 ac_cv_prog_gnu_ld=no
9462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
9463 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
9464 with_gnu_ld=$ac_cv_prog_gnu_ld
9469 if test -n "$ac_tool_prefix"; then
9470 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9471 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9473 $as_echo_n "checking for $ac_word... " >&6; }
9474 if ${ac_cv_prog_RANLIB+:} false; then :
9475 $as_echo_n "(cached) " >&6
9476 else
9477 if test -n "$RANLIB"; then
9478 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9479 else
9480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9481 for as_dir in $PATH
9483 IFS=$as_save_IFS
9484 test -z "$as_dir" && as_dir=.
9485 for ac_exec_ext in '' $ac_executable_extensions; do
9486 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9487 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9489 break 2
9491 done
9492 done
9493 IFS=$as_save_IFS
9497 RANLIB=$ac_cv_prog_RANLIB
9498 if test -n "$RANLIB"; then
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9500 $as_echo "$RANLIB" >&6; }
9501 else
9502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503 $as_echo "no" >&6; }
9508 if test -z "$ac_cv_prog_RANLIB"; then
9509 ac_ct_RANLIB=$RANLIB
9510 # Extract the first word of "ranlib", so it can be a program name with args.
9511 set dummy ranlib; ac_word=$2
9512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9513 $as_echo_n "checking for $ac_word... " >&6; }
9514 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
9515 $as_echo_n "(cached) " >&6
9516 else
9517 if test -n "$ac_ct_RANLIB"; then
9518 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9519 else
9520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9521 for as_dir in $PATH
9523 IFS=$as_save_IFS
9524 test -z "$as_dir" && as_dir=.
9525 for ac_exec_ext in '' $ac_executable_extensions; do
9526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9527 ac_cv_prog_ac_ct_RANLIB="ranlib"
9528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9529 break 2
9531 done
9532 done
9533 IFS=$as_save_IFS
9537 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9538 if test -n "$ac_ct_RANLIB"; then
9539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9540 $as_echo "$ac_ct_RANLIB" >&6; }
9541 else
9542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9543 $as_echo "no" >&6; }
9546 if test "x$ac_ct_RANLIB" = x; then
9547 RANLIB=":"
9548 else
9549 case $cross_compiling:$ac_tool_warned in
9550 yes:)
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9552 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9553 ac_tool_warned=yes ;;
9554 esac
9555 RANLIB=$ac_ct_RANLIB
9557 else
9558 RANLIB="$ac_cv_prog_RANLIB"
9562 if test -n "$ac_tool_prefix"; then
9563 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9564 set dummy ${ac_tool_prefix}strip; ac_word=$2
9565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9566 $as_echo_n "checking for $ac_word... " >&6; }
9567 if ${ac_cv_prog_STRIP+:} false; then :
9568 $as_echo_n "(cached) " >&6
9569 else
9570 if test -n "$STRIP"; then
9571 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9572 else
9573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9574 for as_dir in $PATH
9576 IFS=$as_save_IFS
9577 test -z "$as_dir" && as_dir=.
9578 for ac_exec_ext in '' $ac_executable_extensions; do
9579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9580 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9582 break 2
9584 done
9585 done
9586 IFS=$as_save_IFS
9590 STRIP=$ac_cv_prog_STRIP
9591 if test -n "$STRIP"; then
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9593 $as_echo "$STRIP" >&6; }
9594 else
9595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596 $as_echo "no" >&6; }
9601 if test -z "$ac_cv_prog_STRIP"; then
9602 ac_ct_STRIP=$STRIP
9603 # Extract the first word of "strip", so it can be a program name with args.
9604 set dummy strip; ac_word=$2
9605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9606 $as_echo_n "checking for $ac_word... " >&6; }
9607 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9608 $as_echo_n "(cached) " >&6
9609 else
9610 if test -n "$ac_ct_STRIP"; then
9611 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9612 else
9613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9614 for as_dir in $PATH
9616 IFS=$as_save_IFS
9617 test -z "$as_dir" && as_dir=.
9618 for ac_exec_ext in '' $ac_executable_extensions; do
9619 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9620 ac_cv_prog_ac_ct_STRIP="strip"
9621 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9622 break 2
9624 done
9625 done
9626 IFS=$as_save_IFS
9630 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9631 if test -n "$ac_ct_STRIP"; then
9632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9633 $as_echo "$ac_ct_STRIP" >&6; }
9634 else
9635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9636 $as_echo "no" >&6; }
9639 if test "x$ac_ct_STRIP" = x; then
9640 STRIP=":"
9641 else
9642 case $cross_compiling:$ac_tool_warned in
9643 yes:)
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9645 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9646 ac_tool_warned=yes ;;
9647 esac
9648 STRIP=$ac_ct_STRIP
9650 else
9651 STRIP="$ac_cv_prog_STRIP"
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9656 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9657 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9658 STRIP_STATIC_LIB="$STRIP -x"
9659 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9661 $as_echo "yes" >&6; }
9662 else
9663 case $host_os in
9664 darwin*)
9665 STRIP="$STRIP -x"
9666 STRIP_STATIC_LIB=$STRIP
9667 STRIP_SHARED_LIB=$STRIP
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9669 $as_echo "yes" >&6; }
9672 STRIP_STATIC_LIB=:
9673 STRIP_SHARED_LIB=:
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9675 $as_echo "no" >&6; }
9677 esac
9682 if test -n "$ac_tool_prefix"; then
9683 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9684 set dummy ${ac_tool_prefix}ar; ac_word=$2
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9686 $as_echo_n "checking for $ac_word... " >&6; }
9687 if ${ac_cv_prog_AR+:} false; then :
9688 $as_echo_n "(cached) " >&6
9689 else
9690 if test -n "$AR"; then
9691 ac_cv_prog_AR="$AR" # Let the user override the test.
9692 else
9693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9694 for as_dir in $PATH
9696 IFS=$as_save_IFS
9697 test -z "$as_dir" && as_dir=.
9698 for ac_exec_ext in '' $ac_executable_extensions; do
9699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9700 ac_cv_prog_AR="${ac_tool_prefix}ar"
9701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9702 break 2
9704 done
9705 done
9706 IFS=$as_save_IFS
9710 AR=$ac_cv_prog_AR
9711 if test -n "$AR"; then
9712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9713 $as_echo "$AR" >&6; }
9714 else
9715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9716 $as_echo "no" >&6; }
9721 if test -z "$ac_cv_prog_AR"; then
9722 ac_ct_AR=$AR
9723 # Extract the first word of "ar", so it can be a program name with args.
9724 set dummy ar; ac_word=$2
9725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9726 $as_echo_n "checking for $ac_word... " >&6; }
9727 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9728 $as_echo_n "(cached) " >&6
9729 else
9730 if test -n "$ac_ct_AR"; then
9731 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9732 else
9733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9734 for as_dir in $PATH
9736 IFS=$as_save_IFS
9737 test -z "$as_dir" && as_dir=.
9738 for ac_exec_ext in '' $ac_executable_extensions; do
9739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9740 ac_cv_prog_ac_ct_AR="ar"
9741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9742 break 2
9744 done
9745 done
9746 IFS=$as_save_IFS
9750 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9751 if test -n "$ac_ct_AR"; then
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9753 $as_echo "$ac_ct_AR" >&6; }
9754 else
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756 $as_echo "no" >&6; }
9759 if test "x$ac_ct_AR" = x; then
9760 AR="ar"
9761 else
9762 case $cross_compiling:$ac_tool_warned in
9763 yes:)
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9765 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9766 ac_tool_warned=yes ;;
9767 esac
9768 AR=$ac_ct_AR
9770 else
9771 AR="$ac_cv_prog_AR"
9774 if test "$PORTNAME" = "win32"; then
9775 if test -n "$ac_tool_prefix"; then
9776 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9777 set dummy ${ac_tool_prefix}windres; ac_word=$2
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9779 $as_echo_n "checking for $ac_word... " >&6; }
9780 if ${ac_cv_prog_WINDRES+:} false; then :
9781 $as_echo_n "(cached) " >&6
9782 else
9783 if test -n "$WINDRES"; then
9784 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9785 else
9786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9787 for as_dir in $PATH
9789 IFS=$as_save_IFS
9790 test -z "$as_dir" && as_dir=.
9791 for ac_exec_ext in '' $ac_executable_extensions; do
9792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9793 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9795 break 2
9797 done
9798 done
9799 IFS=$as_save_IFS
9803 WINDRES=$ac_cv_prog_WINDRES
9804 if test -n "$WINDRES"; then
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9806 $as_echo "$WINDRES" >&6; }
9807 else
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9809 $as_echo "no" >&6; }
9814 if test -z "$ac_cv_prog_WINDRES"; then
9815 ac_ct_WINDRES=$WINDRES
9816 # Extract the first word of "windres", so it can be a program name with args.
9817 set dummy windres; ac_word=$2
9818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9819 $as_echo_n "checking for $ac_word... " >&6; }
9820 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9821 $as_echo_n "(cached) " >&6
9822 else
9823 if test -n "$ac_ct_WINDRES"; then
9824 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9825 else
9826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9827 for as_dir in $PATH
9829 IFS=$as_save_IFS
9830 test -z "$as_dir" && as_dir=.
9831 for ac_exec_ext in '' $ac_executable_extensions; do
9832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9833 ac_cv_prog_ac_ct_WINDRES="windres"
9834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9835 break 2
9837 done
9838 done
9839 IFS=$as_save_IFS
9843 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9844 if test -n "$ac_ct_WINDRES"; then
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9846 $as_echo "$ac_ct_WINDRES" >&6; }
9847 else
9848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9849 $as_echo "no" >&6; }
9852 if test "x$ac_ct_WINDRES" = x; then
9853 WINDRES="windres"
9854 else
9855 case $cross_compiling:$ac_tool_warned in
9856 yes:)
9857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9858 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9859 ac_tool_warned=yes ;;
9860 esac
9861 WINDRES=$ac_ct_WINDRES
9863 else
9864 WINDRES="$ac_cv_prog_WINDRES"
9869 # Find a good install program. We prefer a C program (faster),
9870 # so one script is as good as another. But avoid the broken or
9871 # incompatible versions:
9872 # SysV /etc/install, /usr/sbin/install
9873 # SunOS /usr/etc/install
9874 # IRIX /sbin/install
9875 # AIX /bin/install
9876 # AmigaOS /C/install, which installs bootblocks on floppy discs
9877 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9878 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9879 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9880 # OS/2's system install, which has a completely different semantic
9881 # ./install, which can be erroneously created by make from ./install.sh.
9882 # Reject install programs that cannot install multiple files.
9883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9884 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9885 if test -z "$INSTALL"; then
9886 if ${ac_cv_path_install+:} false; then :
9887 $as_echo_n "(cached) " >&6
9888 else
9889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9890 for as_dir in $PATH
9892 IFS=$as_save_IFS
9893 test -z "$as_dir" && as_dir=.
9894 # Account for people who put trailing slashes in PATH elements.
9895 case $as_dir/ in #((
9896 ./ | .// | /[cC]/* | \
9897 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9898 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9899 /usr/ucb/* ) ;;
9901 # OSF1 and SCO ODT 3.0 have their own names for install.
9902 # Don't use installbsd from OSF since it installs stuff as root
9903 # by default.
9904 for ac_prog in ginstall scoinst install; do
9905 for ac_exec_ext in '' $ac_executable_extensions; do
9906 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9907 if test $ac_prog = install &&
9908 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9909 # AIX install. It has an incompatible calling convention.
9911 elif test $ac_prog = install &&
9912 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9913 # program-specific install script used by HP pwplus--don't use.
9915 else
9916 rm -rf conftest.one conftest.two conftest.dir
9917 echo one > conftest.one
9918 echo two > conftest.two
9919 mkdir conftest.dir
9920 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9921 test -s conftest.one && test -s conftest.two &&
9922 test -s conftest.dir/conftest.one &&
9923 test -s conftest.dir/conftest.two
9924 then
9925 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9926 break 3
9930 done
9931 done
9933 esac
9935 done
9936 IFS=$as_save_IFS
9938 rm -rf conftest.one conftest.two conftest.dir
9941 if test "${ac_cv_path_install+set}" = set; then
9942 INSTALL=$ac_cv_path_install
9943 else
9944 # As a last resort, use the slow shell script. Don't cache a
9945 # value for INSTALL within a source directory, because that will
9946 # break other packages using the cache if that directory is
9947 # removed, or if the value is a relative name.
9948 INSTALL=$ac_install_sh
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9952 $as_echo "$INSTALL" >&6; }
9954 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9955 # It thinks the first close brace ends the variable substitution.
9956 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9958 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9960 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9962 # When Autoconf chooses install-sh as install program it tries to generate
9963 # a relative path to it in each makefile where it substitutes it. This clashes
9964 # with our Makefile.global concept. This workaround helps.
9965 case $INSTALL in
9966 *install-sh*) install_bin='';;
9967 *) install_bin=$INSTALL;;
9968 esac
9971 if test -z "$TAR"; then
9972 for ac_prog in tar
9974 # Extract the first word of "$ac_prog", so it can be a program name with args.
9975 set dummy $ac_prog; ac_word=$2
9976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9977 $as_echo_n "checking for $ac_word... " >&6; }
9978 if ${ac_cv_path_TAR+:} false; then :
9979 $as_echo_n "(cached) " >&6
9980 else
9981 case $TAR in
9982 [\\/]* | ?:[\\/]*)
9983 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9987 for as_dir in $PATH
9989 IFS=$as_save_IFS
9990 test -z "$as_dir" && as_dir=.
9991 for ac_exec_ext in '' $ac_executable_extensions; do
9992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9993 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9995 break 2
9997 done
9998 done
9999 IFS=$as_save_IFS
10002 esac
10004 TAR=$ac_cv_path_TAR
10005 if test -n "$TAR"; then
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10007 $as_echo "$TAR" >&6; }
10008 else
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010 $as_echo "no" >&6; }
10014 test -n "$TAR" && break
10015 done
10017 else
10018 # Report the value of TAR in configure's output in all cases.
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10020 $as_echo_n "checking for TAR... " >&6; }
10021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10022 $as_echo "$TAR" >&6; }
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10026 $as_echo_n "checking whether ln -s works... " >&6; }
10027 LN_S=$as_ln_s
10028 if test "$LN_S" = "ln -s"; then
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10030 $as_echo "yes" >&6; }
10031 else
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10033 $as_echo "no, using $LN_S" >&6; }
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
10037 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
10038 if test -z "$MKDIR_P"; then
10039 if ${ac_cv_path_mkdir+:} false; then :
10040 $as_echo_n "(cached) " >&6
10041 else
10042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10043 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
10045 IFS=$as_save_IFS
10046 test -z "$as_dir" && as_dir=.
10047 for ac_prog in mkdir gmkdir; do
10048 for ac_exec_ext in '' $ac_executable_extensions; do
10049 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
10050 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
10051 'mkdir (GNU coreutils) '* | \
10052 'mkdir (coreutils) '* | \
10053 'mkdir (fileutils) '4.1*)
10054 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
10055 break 3;;
10056 esac
10057 done
10058 done
10059 done
10060 IFS=$as_save_IFS
10064 test -d ./--version && rmdir ./--version
10065 if test "${ac_cv_path_mkdir+set}" = set; then
10066 MKDIR_P="$ac_cv_path_mkdir -p"
10067 else
10068 # As a last resort, use the slow shell script. Don't cache a
10069 # value for MKDIR_P within a source directory, because that will
10070 # break other packages using the cache if that directory is
10071 # removed, or if the value is a relative name.
10072 MKDIR_P="$ac_install_sh -d"
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
10076 $as_echo "$MKDIR_P" >&6; }
10078 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
10079 # a relative path to it in each makefile where it substitutes it. This clashes
10080 # with our Makefile.global concept. This workaround helps.
10081 case $MKDIR_P in
10082 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
10083 esac
10085 if test -z "$BISON"; then
10086 for ac_prog in bison
10088 # Extract the first word of "$ac_prog", so it can be a program name with args.
10089 set dummy $ac_prog; ac_word=$2
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10091 $as_echo_n "checking for $ac_word... " >&6; }
10092 if ${ac_cv_path_BISON+:} false; then :
10093 $as_echo_n "(cached) " >&6
10094 else
10095 case $BISON in
10096 [\\/]* | ?:[\\/]*)
10097 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
10100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10101 for as_dir in $PATH
10103 IFS=$as_save_IFS
10104 test -z "$as_dir" && as_dir=.
10105 for ac_exec_ext in '' $ac_executable_extensions; do
10106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10107 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
10108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10109 break 2
10111 done
10112 done
10113 IFS=$as_save_IFS
10116 esac
10118 BISON=$ac_cv_path_BISON
10119 if test -n "$BISON"; then
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10121 $as_echo "$BISON" >&6; }
10122 else
10123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10124 $as_echo "no" >&6; }
10128 test -n "$BISON" && break
10129 done
10131 else
10132 # Report the value of BISON in configure's output in all cases.
10133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
10134 $as_echo_n "checking for BISON... " >&6; }
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10136 $as_echo "$BISON" >&6; }
10140 if test "$BISON"; then
10141 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10143 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10144 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
10145 then
10146 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10147 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10148 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&5
10149 $as_echo "$as_me: WARNING:
10150 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10151 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&2;}
10152 BISON=""
10154 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10155 # of the now preferred %name-prefix "base_yy", but the latter
10156 # doesn't work with Bison 2.3 or less. So for now we silence the
10157 # deprecation warnings.
10158 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10159 then
10160 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10164 if test -z "$BISON"; then
10165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10166 *** Without Bison you will not be able to build PostgreSQL from Git nor
10167 *** change any of the parser definition files. You can obtain Bison from
10168 *** a GNU mirror site. (If you are using the official distribution of
10169 *** PostgreSQL then you do not need to worry about this, because the Bison
10170 *** output is pre-generated.)" >&5
10171 $as_echo "$as_me: WARNING:
10172 *** Without Bison you will not be able to build PostgreSQL from Git nor
10173 *** change any of the parser definition files. You can obtain Bison from
10174 *** a GNU mirror site. (If you are using the official distribution of
10175 *** PostgreSQL then you do not need to worry about this, because the Bison
10176 *** output is pre-generated.)" >&2;}
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
10181 $as_echo_n "checking for flex... " >&6; }
10182 if ${pgac_cv_path_flex+:} false; then :
10183 $as_echo_n "(cached) " >&6
10184 else
10185 # Let the user override the test
10186 if test -n "$FLEX"; then
10187 pgac_cv_path_flex=$FLEX
10188 else
10189 pgac_save_IFS=$IFS
10190 IFS=$PATH_SEPARATOR
10191 for pgac_dir in $PATH; do
10192 IFS=$pgac_save_IFS
10193 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
10194 pgac_dir=`pwd`
10196 for pgac_prog in flex lex; do
10197 pgac_candidate="$pgac_dir/$pgac_prog"
10198 if test -f "$pgac_candidate" \
10199 && $pgac_candidate --version </dev/null >/dev/null 2>&1
10200 then
10201 echo '%%' > conftest.l
10202 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
10203 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
10204 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;}'
10205 then
10206 pgac_cv_path_flex=$pgac_candidate
10207 break 2
10208 else
10209 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10210 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10211 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&5
10212 $as_echo "$as_me: WARNING:
10213 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10214 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&2;}
10218 done
10219 done
10220 rm -f conftest.l lex.yy.c
10221 : ${pgac_cv_path_flex=no}
10225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10226 $as_echo "$pgac_cv_path_flex" >&6; }
10227 if test x"$pgac_cv_path_flex" = x"no"; then
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10229 *** Without Flex you will not be able to build PostgreSQL from Git nor
10230 *** change any of the scanner definition files. You can obtain Flex from
10231 *** a GNU mirror site. (If you are using the official distribution of
10232 *** PostgreSQL then you do not need to worry about this because the Flex
10233 *** output is pre-generated.)" >&5
10234 $as_echo "$as_me: WARNING:
10235 *** Without Flex you will not be able to build PostgreSQL from Git nor
10236 *** change any of the scanner definition files. You can obtain Flex from
10237 *** a GNU mirror site. (If you are using the official distribution of
10238 *** PostgreSQL then you do not need to worry about this because the Flex
10239 *** output is pre-generated.)" >&2;}
10241 FLEX=
10242 else
10243 FLEX=$pgac_cv_path_flex
10244 pgac_flex_version=`$FLEX --version 2>/dev/null`
10245 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10246 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10253 if test -z "$PERL"; then
10254 for ac_prog in perl
10256 # Extract the first word of "$ac_prog", so it can be a program name with args.
10257 set dummy $ac_prog; ac_word=$2
10258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10259 $as_echo_n "checking for $ac_word... " >&6; }
10260 if ${ac_cv_path_PERL+:} false; then :
10261 $as_echo_n "(cached) " >&6
10262 else
10263 case $PERL in
10264 [\\/]* | ?:[\\/]*)
10265 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10269 for as_dir in $PATH
10271 IFS=$as_save_IFS
10272 test -z "$as_dir" && as_dir=.
10273 for ac_exec_ext in '' $ac_executable_extensions; do
10274 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10275 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10277 break 2
10279 done
10280 done
10281 IFS=$as_save_IFS
10284 esac
10286 PERL=$ac_cv_path_PERL
10287 if test -n "$PERL"; then
10288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10289 $as_echo "$PERL" >&6; }
10290 else
10291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10292 $as_echo "no" >&6; }
10296 test -n "$PERL" && break
10297 done
10299 else
10300 # Report the value of PERL in configure's output in all cases.
10301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10302 $as_echo_n "checking for PERL... " >&6; }
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10304 $as_echo "$PERL" >&6; }
10308 if test "$PERL"; then
10309 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'`
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10311 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10312 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10313 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10314 then
10315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10316 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10317 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&5
10318 $as_echo "$as_me: WARNING:
10319 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10320 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&2;}
10321 PERL=""
10325 if test -z "$PERL"; then
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10327 *** Without Perl you will not be able to build PostgreSQL from Git.
10328 *** You can obtain Perl from any CPAN mirror site.
10329 *** (If you are using the official distribution of PostgreSQL then you do not
10330 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10331 $as_echo "$as_me: WARNING:
10332 *** Without Perl you will not be able to build PostgreSQL from Git.
10333 *** You can obtain Perl from any CPAN mirror site.
10334 *** (If you are using the official distribution of PostgreSQL then you do not
10335 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10338 if test "$with_perl" = yes; then
10339 if test -z "$PERL"; then
10340 as_fn_error $? "Perl not found" "$LINENO" 5
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10344 $as_echo_n "checking for Perl archlibexp... " >&6; }
10345 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10346 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10348 $as_echo "$perl_archlibexp" >&6; }
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10350 $as_echo_n "checking for Perl privlibexp... " >&6; }
10351 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10352 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10354 $as_echo "$perl_privlibexp" >&6; }
10355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10356 $as_echo_n "checking for Perl useshrplib... " >&6; }
10357 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10358 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10360 $as_echo "$perl_useshrplib" >&6; }
10361 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10362 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10363 You might have to rebuild your Perl installation. Refer to the
10364 documentation for details. Use --without-perl to disable building
10365 PL/Perl." "$LINENO" 5
10367 # On most platforms, archlibexp is also where the Perl include files live ...
10368 perl_includespec="-I$perl_archlibexp/CORE"
10369 # ... but on newer macOS versions, we must use -iwithsysroot to look
10370 # under $PG_SYSROOT
10371 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10372 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10373 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10378 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10379 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10381 $as_echo "$perl_ccflags" >&6; }
10382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10383 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10384 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10386 $as_echo "$perl_embed_ccflags" >&6; }
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10390 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10391 if test "$PORTNAME" = "win32" ; then
10392 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10393 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10394 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10395 else
10396 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10397 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10398 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10401 else
10402 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10403 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10404 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10406 if test -z "$perl_embed_ldflags" ; then
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10408 $as_echo "no" >&6; }
10409 as_fn_error $? "could not determine flags for linking embedded Perl.
10410 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10411 installed." "$LINENO" 5
10412 else
10413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10414 $as_echo "$perl_embed_ldflags" >&6; }
10419 if test "$with_python" = yes; then
10420 if test -z "$PYTHON"; then
10421 for ac_prog in python3 python
10423 # Extract the first word of "$ac_prog", so it can be a program name with args.
10424 set dummy $ac_prog; ac_word=$2
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10426 $as_echo_n "checking for $ac_word... " >&6; }
10427 if ${ac_cv_path_PYTHON+:} false; then :
10428 $as_echo_n "(cached) " >&6
10429 else
10430 case $PYTHON in
10431 [\\/]* | ?:[\\/]*)
10432 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10436 for as_dir in $PATH
10438 IFS=$as_save_IFS
10439 test -z "$as_dir" && as_dir=.
10440 for ac_exec_ext in '' $ac_executable_extensions; do
10441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10442 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10444 break 2
10446 done
10447 done
10448 IFS=$as_save_IFS
10451 esac
10453 PYTHON=$ac_cv_path_PYTHON
10454 if test -n "$PYTHON"; then
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10456 $as_echo "$PYTHON" >&6; }
10457 else
10458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459 $as_echo "no" >&6; }
10463 test -n "$PYTHON" && break
10464 done
10466 else
10467 # Report the value of PYTHON in configure's output in all cases.
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10469 $as_echo_n "checking for PYTHON... " >&6; }
10470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10471 $as_echo "$PYTHON" >&6; }
10474 if test x"$PYTHON" = x""; then
10475 as_fn_error $? "Python not found" "$LINENO" 5
10479 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10480 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10481 $as_echo "$as_me: using python $python_fullversion" >&6;}
10482 # python_fullversion is typically n.n.n plus some trailing junk
10483 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10484 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10485 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10486 # Reject unsupported Python versions as soon as practical.
10487 if test "$python_majorversion" -lt 3; then
10488 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10492 $as_echo_n "checking for Python sysconfig module... " >&6; }
10493 if "${PYTHON}" -c 'import sysconfig' 2>&5
10494 then
10495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10496 $as_echo "yes" >&6; }
10497 else
10498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10499 $as_echo "no" >&6; }
10500 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10504 $as_echo_n "checking Python configuration directory... " >&6; }
10505 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10507 $as_echo "$python_configdir" >&6; }
10509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10510 $as_echo_n "checking Python include directory... " >&6; }
10511 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10512 if test "$PORTNAME" = win32 ; then
10513 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10516 $as_echo "$python_includespec" >&6; }
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10521 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10523 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10524 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10526 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10527 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10528 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10529 then
10530 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10531 found_shlib=1
10532 else
10533 # Otherwise, guess the base name of the shlib.
10534 # LDVERSION was added in Python 3.2, before that use VERSION,
10535 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10536 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10537 if test x"${python_ldversion}" != x""; then
10538 ldlibrary="python${python_ldversion}"
10539 else
10540 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10541 if test x"${python_version_var}" != x""; then
10542 ldlibrary="python${python_version_var}"
10543 else
10544 ldlibrary="python${python_version}"
10547 # Search for a likely-looking file.
10548 found_shlib=0
10549 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10551 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10552 python_libdir="$d"
10553 found_shlib=1
10554 break 2
10556 done
10557 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10558 # (".so.n.n") as well. However, check this only after failing to find
10559 # ".so" anywhere, because yet other platforms (Debian) put the .so
10560 # symlink in a different directory from the underlying versioned shlib.
10561 if test "$found_shlib" != 1; then
10562 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10564 for f in "$d/lib${ldlibrary}.so."* ; do
10565 if test -e "$f"; then
10566 python_libdir="$d"
10567 found_shlib=1
10568 break 2
10570 done
10571 done
10573 # As usual, Windows has its own ideas. Possible default library
10574 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10575 # and the "lib" prefix might not be there.
10576 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10577 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10579 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10580 if test -e "$f"; then
10581 python_libdir="$d"
10582 found_shlib=1
10583 break 2
10585 done
10586 done
10589 if test "$found_shlib" != 1; then
10590 as_fn_error $? "could not find shared library for Python
10591 You might have to rebuild your Python installation. Refer to the
10592 documentation for details. Use --without-python to disable building
10593 PL/Python." "$LINENO" 5
10595 python_libspec="-L${python_libdir} -l${ldlibrary}"
10597 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10600 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10606 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10607 if test -z "$ZIC"; then
10608 for ac_prog in zic
10610 # Extract the first word of "$ac_prog", so it can be a program name with args.
10611 set dummy $ac_prog; ac_word=$2
10612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10613 $as_echo_n "checking for $ac_word... " >&6; }
10614 if ${ac_cv_path_ZIC+:} false; then :
10615 $as_echo_n "(cached) " >&6
10616 else
10617 case $ZIC in
10618 [\\/]* | ?:[\\/]*)
10619 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10623 for as_dir in $PATH
10625 IFS=$as_save_IFS
10626 test -z "$as_dir" && as_dir=.
10627 for ac_exec_ext in '' $ac_executable_extensions; do
10628 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10629 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10630 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10631 break 2
10633 done
10634 done
10635 IFS=$as_save_IFS
10638 esac
10640 ZIC=$ac_cv_path_ZIC
10641 if test -n "$ZIC"; then
10642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10643 $as_echo "$ZIC" >&6; }
10644 else
10645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10646 $as_echo "no" >&6; }
10650 test -n "$ZIC" && break
10651 done
10653 else
10654 # Report the value of ZIC in configure's output in all cases.
10655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10656 $as_echo_n "checking for ZIC... " >&6; }
10657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10658 $as_echo "$ZIC" >&6; }
10661 if test -z "$ZIC"; then
10662 as_fn_error $? "
10663 When cross-compiling, either use the option --with-system-tzdata to use
10664 existing time-zone data, or set the environment variable ZIC to a zic
10665 program to use during the build." "$LINENO" 5
10670 # Pthreads
10672 # For each platform, we need to know about any special compile and link
10673 # libraries, and whether the normal C function names are thread-safe.
10674 # See the comment at the top of src/port/thread.c for more information.
10675 # WIN32 doesn't need the pthread tests; it always uses threads
10677 # These tests are run before the library-tests, because linking with the
10678 # other libraries can pull in the pthread functions as a side-effect. We
10679 # want to use the -pthread or similar flags directly, and not rely on
10680 # the side-effects of linking with some other library.
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10683 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10684 if ${ac_cv_path_SED+:} false; then :
10685 $as_echo_n "(cached) " >&6
10686 else
10687 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10688 for ac_i in 1 2 3 4 5 6 7; do
10689 ac_script="$ac_script$as_nl$ac_script"
10690 done
10691 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10692 { ac_script=; unset ac_script;}
10693 if test -z "$SED"; then
10694 ac_path_SED_found=false
10695 # Loop through the user's path and test for each of PROGNAME-LIST
10696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10697 for as_dir in $PATH
10699 IFS=$as_save_IFS
10700 test -z "$as_dir" && as_dir=.
10701 for ac_prog in sed gsed; do
10702 for ac_exec_ext in '' $ac_executable_extensions; do
10703 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10704 as_fn_executable_p "$ac_path_SED" || continue
10705 # Check for GNU ac_path_SED and select it if it is found.
10706 # Check for GNU $ac_path_SED
10707 case `"$ac_path_SED" --version 2>&1` in
10708 *GNU*)
10709 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10711 ac_count=0
10712 $as_echo_n 0123456789 >"conftest.in"
10713 while :
10715 cat "conftest.in" "conftest.in" >"conftest.tmp"
10716 mv "conftest.tmp" "conftest.in"
10717 cp "conftest.in" "conftest.nl"
10718 $as_echo '' >> "conftest.nl"
10719 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10720 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10721 as_fn_arith $ac_count + 1 && ac_count=$as_val
10722 if test $ac_count -gt ${ac_path_SED_max-0}; then
10723 # Best one so far, save it but keep looking for a better one
10724 ac_cv_path_SED="$ac_path_SED"
10725 ac_path_SED_max=$ac_count
10727 # 10*(2^10) chars as input seems more than enough
10728 test $ac_count -gt 10 && break
10729 done
10730 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10731 esac
10733 $ac_path_SED_found && break 3
10734 done
10735 done
10736 done
10737 IFS=$as_save_IFS
10738 if test -z "$ac_cv_path_SED"; then
10739 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10741 else
10742 ac_cv_path_SED=$SED
10746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10747 $as_echo "$ac_cv_path_SED" >&6; }
10748 SED="$ac_cv_path_SED"
10749 rm -f conftest.sed
10752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10753 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10754 if ${ac_cv_path_GREP+:} false; then :
10755 $as_echo_n "(cached) " >&6
10756 else
10757 if test -z "$GREP"; then
10758 ac_path_GREP_found=false
10759 # Loop through the user's path and test for each of PROGNAME-LIST
10760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10761 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10763 IFS=$as_save_IFS
10764 test -z "$as_dir" && as_dir=.
10765 for ac_prog in grep ggrep; do
10766 for ac_exec_ext in '' $ac_executable_extensions; do
10767 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10768 as_fn_executable_p "$ac_path_GREP" || continue
10769 # Check for GNU ac_path_GREP and select it if it is found.
10770 # Check for GNU $ac_path_GREP
10771 case `"$ac_path_GREP" --version 2>&1` in
10772 *GNU*)
10773 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10775 ac_count=0
10776 $as_echo_n 0123456789 >"conftest.in"
10777 while :
10779 cat "conftest.in" "conftest.in" >"conftest.tmp"
10780 mv "conftest.tmp" "conftest.in"
10781 cp "conftest.in" "conftest.nl"
10782 $as_echo 'GREP' >> "conftest.nl"
10783 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10784 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10785 as_fn_arith $ac_count + 1 && ac_count=$as_val
10786 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10787 # Best one so far, save it but keep looking for a better one
10788 ac_cv_path_GREP="$ac_path_GREP"
10789 ac_path_GREP_max=$ac_count
10791 # 10*(2^10) chars as input seems more than enough
10792 test $ac_count -gt 10 && break
10793 done
10794 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10795 esac
10797 $ac_path_GREP_found && break 3
10798 done
10799 done
10800 done
10801 IFS=$as_save_IFS
10802 if test -z "$ac_cv_path_GREP"; then
10803 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10805 else
10806 ac_cv_path_GREP=$GREP
10810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10811 $as_echo "$ac_cv_path_GREP" >&6; }
10812 GREP="$ac_cv_path_GREP"
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10816 $as_echo_n "checking for egrep... " >&6; }
10817 if ${ac_cv_path_EGREP+:} false; then :
10818 $as_echo_n "(cached) " >&6
10819 else
10820 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10821 then ac_cv_path_EGREP="$GREP -E"
10822 else
10823 if test -z "$EGREP"; then
10824 ac_path_EGREP_found=false
10825 # Loop through the user's path and test for each of PROGNAME-LIST
10826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10827 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10829 IFS=$as_save_IFS
10830 test -z "$as_dir" && as_dir=.
10831 for ac_prog in egrep; do
10832 for ac_exec_ext in '' $ac_executable_extensions; do
10833 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10834 as_fn_executable_p "$ac_path_EGREP" || continue
10835 # Check for GNU ac_path_EGREP and select it if it is found.
10836 # Check for GNU $ac_path_EGREP
10837 case `"$ac_path_EGREP" --version 2>&1` in
10838 *GNU*)
10839 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10841 ac_count=0
10842 $as_echo_n 0123456789 >"conftest.in"
10843 while :
10845 cat "conftest.in" "conftest.in" >"conftest.tmp"
10846 mv "conftest.tmp" "conftest.in"
10847 cp "conftest.in" "conftest.nl"
10848 $as_echo 'EGREP' >> "conftest.nl"
10849 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10850 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10851 as_fn_arith $ac_count + 1 && ac_count=$as_val
10852 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10853 # Best one so far, save it but keep looking for a better one
10854 ac_cv_path_EGREP="$ac_path_EGREP"
10855 ac_path_EGREP_max=$ac_count
10857 # 10*(2^10) chars as input seems more than enough
10858 test $ac_count -gt 10 && break
10859 done
10860 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10861 esac
10863 $ac_path_EGREP_found && break 3
10864 done
10865 done
10866 done
10867 IFS=$as_save_IFS
10868 if test -z "$ac_cv_path_EGREP"; then
10869 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10871 else
10872 ac_cv_path_EGREP=$EGREP
10877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10878 $as_echo "$ac_cv_path_EGREP" >&6; }
10879 EGREP="$ac_cv_path_EGREP"
10882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10883 $as_echo_n "checking for ANSI C header files... " >&6; }
10884 if ${ac_cv_header_stdc+:} false; then :
10885 $as_echo_n "(cached) " >&6
10886 else
10887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10888 /* end confdefs.h. */
10889 #include <stdlib.h>
10890 #include <stdarg.h>
10891 #include <string.h>
10892 #include <float.h>
10895 main ()
10899 return 0;
10901 _ACEOF
10902 if ac_fn_c_try_compile "$LINENO"; then :
10903 ac_cv_header_stdc=yes
10904 else
10905 ac_cv_header_stdc=no
10907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10909 if test $ac_cv_header_stdc = yes; then
10910 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10912 /* end confdefs.h. */
10913 #include <string.h>
10915 _ACEOF
10916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10917 $EGREP "memchr" >/dev/null 2>&1; then :
10919 else
10920 ac_cv_header_stdc=no
10922 rm -f conftest*
10926 if test $ac_cv_header_stdc = yes; then
10927 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10929 /* end confdefs.h. */
10930 #include <stdlib.h>
10932 _ACEOF
10933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10934 $EGREP "free" >/dev/null 2>&1; then :
10936 else
10937 ac_cv_header_stdc=no
10939 rm -f conftest*
10943 if test $ac_cv_header_stdc = yes; then
10944 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10945 if test "$cross_compiling" = yes; then :
10947 else
10948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10949 /* end confdefs.h. */
10950 #include <ctype.h>
10951 #include <stdlib.h>
10952 #if ((' ' & 0x0FF) == 0x020)
10953 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10954 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10955 #else
10956 # define ISLOWER(c) \
10957 (('a' <= (c) && (c) <= 'i') \
10958 || ('j' <= (c) && (c) <= 'r') \
10959 || ('s' <= (c) && (c) <= 'z'))
10960 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10961 #endif
10963 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10965 main ()
10967 int i;
10968 for (i = 0; i < 256; i++)
10969 if (XOR (islower (i), ISLOWER (i))
10970 || toupper (i) != TOUPPER (i))
10971 return 2;
10972 return 0;
10974 _ACEOF
10975 if ac_fn_c_try_run "$LINENO"; then :
10977 else
10978 ac_cv_header_stdc=no
10980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10981 conftest.$ac_objext conftest.beam conftest.$ac_ext
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10987 $as_echo "$ac_cv_header_stdc" >&6; }
10988 if test $ac_cv_header_stdc = yes; then
10990 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10994 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10995 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10996 inttypes.h stdint.h unistd.h
10997 do :
10998 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10999 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
11001 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11002 cat >>confdefs.h <<_ACEOF
11003 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11004 _ACEOF
11008 done
11011 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
11012 # then
11017 ac_ext=c
11018 ac_cpp='$CPP $CPPFLAGS'
11019 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11020 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11021 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11023 ax_pthread_ok=no
11025 # We used to check for pthread.h first, but this fails if pthread.h
11026 # requires special compiler flags (e.g. on Tru64 or Sequent).
11027 # It gets checked for in the link test anyway.
11029 # First of all, check if the user has set any of the PTHREAD_LIBS,
11030 # etcetera environment variables, and if threads linking works using
11031 # them:
11032 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
11033 ax_pthread_save_CC="$CC"
11034 ax_pthread_save_CFLAGS="$CFLAGS"
11035 ax_pthread_save_LIBS="$LIBS"
11036 if test "x$PTHREAD_CC" != "x"; then :
11037 CC="$PTHREAD_CC"
11039 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11040 LIBS="$PTHREAD_LIBS $LIBS"
11041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
11042 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
11043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11044 /* end confdefs.h. */
11046 /* Override any GCC internal prototype to avoid an error.
11047 Use char because int might match the return type of a GCC
11048 builtin and then its argument prototype would still apply. */
11049 #ifdef __cplusplus
11050 extern "C"
11051 #endif
11052 char pthread_join ();
11054 main ()
11056 return pthread_join ();
11058 return 0;
11060 _ACEOF
11061 if ac_fn_c_try_link "$LINENO"; then :
11062 ax_pthread_ok=yes
11064 rm -f core conftest.err conftest.$ac_objext \
11065 conftest$ac_exeext conftest.$ac_ext
11066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11067 $as_echo "$ax_pthread_ok" >&6; }
11068 if test "x$ax_pthread_ok" = "xno"; then
11069 PTHREAD_LIBS=""
11070 PTHREAD_CFLAGS=""
11072 CC="$ax_pthread_save_CC"
11073 CFLAGS="$ax_pthread_save_CFLAGS"
11074 LIBS="$ax_pthread_save_LIBS"
11077 # We must check for the threads library under a number of different
11078 # names; the ordering is very important because some systems
11079 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
11080 # libraries is broken (non-POSIX).
11082 # Create a list of thread flags to try. Items starting with a "-" are
11083 # C compiler flags, and other items are library names, except for "none"
11084 # which indicates that we try without any flags at all, and "pthread-config"
11085 # which is a program returning the flags for the Pth emulation library.
11087 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
11089 # The ordering *is* (sometimes) important. Some notes on the
11090 # individual items follow:
11092 # pthreads: AIX (must check this before -lpthread)
11093 # none: in case threads are in libc; should be tried before -Kthread and
11094 # other compiler flags to prevent continual compiler warnings
11095 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
11096 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
11097 # (Note: HP C rejects this with "bad form for `-t' option")
11098 # -pthreads: Solaris/gcc (Note: HP C also rejects)
11099 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
11100 # doesn't hurt to check since this sometimes defines pthreads and
11101 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
11102 # is present but should not be used directly; and before -mthreads,
11103 # because the compiler interprets this as "-mt" + "-hreads")
11104 # -mthreads: Mingw32/gcc, Lynx/gcc
11105 # pthread: Linux, etcetera
11106 # --thread-safe: KAI C++
11107 # pthread-config: use pthread-config program (for GNU Pth library)
11109 case $host_os in
11111 freebsd*)
11113 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
11114 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
11116 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
11119 hpux*)
11121 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
11122 # multi-threading and also sets -lpthread."
11124 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
11127 openedition*)
11129 # IBM z/OS requires a feature-test macro to be defined in order to
11130 # enable POSIX threads at all, so give the user a hint if this is
11131 # not set. (We don't define these ourselves, as they can affect
11132 # other portions of the system API in unpredictable ways.)
11134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11135 /* end confdefs.h. */
11137 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11138 AX_PTHREAD_ZOS_MISSING
11139 # endif
11141 _ACEOF
11142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11143 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11144 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11145 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11147 rm -f conftest*
11151 solaris*)
11153 # On Solaris (at least, for some versions), libc contains stubbed
11154 # (non-functional) versions of the pthreads routines, so link-based
11155 # tests will erroneously succeed. (N.B.: The stubs are missing
11156 # pthread_cleanup_push, or rather a function called by this macro,
11157 # so we could check for that, but who knows whether they'll stub
11158 # that too in a future libc.) So we'll check first for the
11159 # standard Solaris way of linking pthreads (-mt -lpthread).
11161 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11163 esac
11165 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11167 if test "x$GCC" = "xyes"; then :
11168 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11171 # The presence of a feature test macro requesting re-entrant function
11172 # definitions is, on some systems, a strong hint that pthreads support is
11173 # correctly enabled
11175 case $host_os in
11176 darwin* | hpux* | linux* | osf* | solaris*)
11177 ax_pthread_check_macro="_REENTRANT"
11180 aix*)
11181 ax_pthread_check_macro="_THREAD_SAFE"
11185 ax_pthread_check_macro="--"
11187 esac
11188 if test "x$ax_pthread_check_macro" = "x--"; then :
11189 ax_pthread_check_cond=0
11190 else
11191 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11194 # Are we compiling with Clang?
11196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11197 $as_echo_n "checking whether $CC is Clang... " >&6; }
11198 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11199 $as_echo_n "(cached) " >&6
11200 else
11201 ax_cv_PTHREAD_CLANG=no
11202 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11203 if test "x$GCC" = "xyes"; then
11204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11205 /* end confdefs.h. */
11206 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11207 # if defined(__clang__) && defined(__llvm__)
11208 AX_PTHREAD_CC_IS_CLANG
11209 # endif
11211 _ACEOF
11212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11213 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11214 ax_cv_PTHREAD_CLANG=yes
11216 rm -f conftest*
11221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11222 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11223 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11225 ax_pthread_clang_warning=no
11227 # Clang needs special handling, because older versions handle the -pthread
11228 # option in a rather... idiosyncratic way
11230 if test "x$ax_pthread_clang" = "xyes"; then
11232 # Clang takes -pthread; it has never supported any other flag
11234 # (Note 1: This will need to be revisited if a system that Clang
11235 # supports has POSIX threads in a separate library. This tends not
11236 # to be the way of modern systems, but it's conceivable.)
11238 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11239 # to get POSIX threads support; the API is always present and
11240 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11241 # -pthread does define _REENTRANT, and while the Darwin headers
11242 # ignore this macro, third-party headers might not.)
11244 PTHREAD_CFLAGS="-pthread"
11245 PTHREAD_LIBS=
11247 ax_pthread_ok=yes
11249 # However, older versions of Clang make a point of warning the user
11250 # that, in an invocation where only linking and no compilation is
11251 # taking place, the -pthread option has no effect ("argument unused
11252 # during compilation"). They expect -pthread to be passed in only
11253 # when source code is being compiled.
11255 # Problem is, this is at odds with the way Automake and most other
11256 # C build frameworks function, which is that the same flags used in
11257 # compilation (CFLAGS) are also used in linking. Many systems
11258 # supported by AX_PTHREAD require exactly this for POSIX threads
11259 # support, and in fact it is often not straightforward to specify a
11260 # flag that is used only in the compilation phase and not in
11261 # linking. Such a scenario is extremely rare in practice.
11263 # Even though use of the -pthread flag in linking would only print
11264 # a warning, this can be a nuisance for well-run software projects
11265 # that build with -Werror. So if the active version of Clang has
11266 # this misfeature, we search for an option to squash it.
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11269 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11270 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11271 $as_echo_n "(cached) " >&6
11272 else
11273 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11274 # Create an alternate version of $ac_link that compiles and
11275 # links in two steps (.c -> .o, .o -> exe) instead of one
11276 # (.c -> exe), because the warning occurs only in the second
11277 # step
11278 ax_pthread_save_ac_link="$ac_link"
11279 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11280 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11281 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11282 ax_pthread_save_CFLAGS="$CFLAGS"
11283 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11284 if test "x$ax_pthread_try" = "xunknown"; then :
11285 break
11287 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11288 ac_link="$ax_pthread_save_ac_link"
11289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11290 /* end confdefs.h. */
11291 int main(void){return 0;}
11292 _ACEOF
11293 if ac_fn_c_try_link "$LINENO"; then :
11294 ac_link="$ax_pthread_2step_ac_link"
11295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11296 /* end confdefs.h. */
11297 int main(void){return 0;}
11298 _ACEOF
11299 if ac_fn_c_try_link "$LINENO"; then :
11300 break
11302 rm -f core conftest.err conftest.$ac_objext \
11303 conftest$ac_exeext conftest.$ac_ext
11306 rm -f core conftest.err conftest.$ac_objext \
11307 conftest$ac_exeext conftest.$ac_ext
11308 done
11309 ac_link="$ax_pthread_save_ac_link"
11310 CFLAGS="$ax_pthread_save_CFLAGS"
11311 if test "x$ax_pthread_try" = "x"; then :
11312 ax_pthread_try=no
11314 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11318 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11320 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11321 no | unknown) ;;
11322 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11323 esac
11325 fi # $ax_pthread_clang = yes
11327 if test "x$ax_pthread_ok" = "xno"; then
11328 for ax_pthread_try_flag in $ax_pthread_flags; do
11330 case $ax_pthread_try_flag in
11331 none)
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11333 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11336 -mt,pthread)
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11338 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11339 PTHREAD_CFLAGS="-mt"
11340 PTHREAD_LIBS="-lpthread"
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11345 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11346 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11349 pthread-config)
11350 # Extract the first word of "pthread-config", so it can be a program name with args.
11351 set dummy pthread-config; ac_word=$2
11352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11353 $as_echo_n "checking for $ac_word... " >&6; }
11354 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11355 $as_echo_n "(cached) " >&6
11356 else
11357 if test -n "$ax_pthread_config"; then
11358 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11359 else
11360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11361 for as_dir in $PATH
11363 IFS=$as_save_IFS
11364 test -z "$as_dir" && as_dir=.
11365 for ac_exec_ext in '' $ac_executable_extensions; do
11366 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11367 ac_cv_prog_ax_pthread_config="yes"
11368 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11369 break 2
11371 done
11372 done
11373 IFS=$as_save_IFS
11375 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11378 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11379 if test -n "$ax_pthread_config"; then
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11381 $as_echo "$ax_pthread_config" >&6; }
11382 else
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11384 $as_echo "no" >&6; }
11388 if test "x$ax_pthread_config" = "xno"; then :
11389 continue
11391 PTHREAD_CFLAGS="`pthread-config --cflags`"
11392 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11397 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11398 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11400 esac
11402 ax_pthread_save_CFLAGS="$CFLAGS"
11403 ax_pthread_save_LIBS="$LIBS"
11404 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11405 LIBS="$PTHREAD_LIBS $LIBS"
11407 # Check for various functions. We must include pthread.h,
11408 # since some functions may be macros. (On the Sequent, we
11409 # need a special flag -Kthread to make this header compile.)
11410 # We check for pthread_join because it is in -lpthread on IRIX
11411 # while pthread_create is in libc. We check for pthread_attr_init
11412 # due to DEC craziness with -lpthreads. We check for
11413 # pthread_cleanup_push because it is one of the few pthread
11414 # functions on Solaris that doesn't have a non-functional libc stub.
11415 # We try pthread_create on general principles.
11417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418 /* end confdefs.h. */
11419 #include <pthread.h>
11420 # if $ax_pthread_check_cond
11421 # error "$ax_pthread_check_macro must be defined"
11422 # endif
11423 static void routine(void *a) { a = 0; }
11424 static void *start_routine(void *a) { return a; }
11426 main ()
11428 pthread_t th; pthread_attr_t attr;
11429 pthread_create(&th, 0, start_routine, 0);
11430 pthread_join(th, 0);
11431 pthread_attr_init(&attr);
11432 pthread_cleanup_push(routine, 0);
11433 pthread_cleanup_pop(0) /* ; */
11435 return 0;
11437 _ACEOF
11438 if ac_fn_c_try_link "$LINENO"; then :
11439 ax_pthread_ok=yes
11441 rm -f core conftest.err conftest.$ac_objext \
11442 conftest$ac_exeext conftest.$ac_ext
11444 CFLAGS="$ax_pthread_save_CFLAGS"
11445 LIBS="$ax_pthread_save_LIBS"
11447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11448 $as_echo "$ax_pthread_ok" >&6; }
11449 if test "x$ax_pthread_ok" = "xyes"; then :
11450 break
11453 PTHREAD_LIBS=""
11454 PTHREAD_CFLAGS=""
11455 done
11458 # Various other checks:
11459 if test "x$ax_pthread_ok" = "xyes"; then
11460 ax_pthread_save_CFLAGS="$CFLAGS"
11461 ax_pthread_save_LIBS="$LIBS"
11462 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11463 LIBS="$PTHREAD_LIBS $LIBS"
11465 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11467 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11468 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11469 $as_echo_n "(cached) " >&6
11470 else
11471 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11472 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11474 /* end confdefs.h. */
11475 #include <pthread.h>
11477 main ()
11479 int attr = $ax_pthread_attr; return attr /* ; */
11481 return 0;
11483 _ACEOF
11484 if ac_fn_c_try_link "$LINENO"; then :
11485 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11487 rm -f core conftest.err conftest.$ac_objext \
11488 conftest$ac_exeext conftest.$ac_ext
11489 done
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11493 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11494 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11495 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11496 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11498 cat >>confdefs.h <<_ACEOF
11499 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11500 _ACEOF
11502 ax_pthread_joinable_attr_defined=yes
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11507 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11508 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11509 $as_echo_n "(cached) " >&6
11510 else
11511 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11512 case $host_os in
11513 solaris*)
11514 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11516 esac
11519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11520 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11521 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11522 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11523 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11524 ax_pthread_special_flags_added=yes
11527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11528 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11529 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11530 $as_echo_n "(cached) " >&6
11531 else
11532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11533 /* end confdefs.h. */
11534 #include <pthread.h>
11536 main ()
11538 int i = PTHREAD_PRIO_INHERIT;
11540 return 0;
11542 _ACEOF
11543 if ac_fn_c_try_link "$LINENO"; then :
11544 ax_cv_PTHREAD_PRIO_INHERIT=yes
11545 else
11546 ax_cv_PTHREAD_PRIO_INHERIT=no
11548 rm -f core conftest.err conftest.$ac_objext \
11549 conftest$ac_exeext conftest.$ac_ext
11552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11553 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11554 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11555 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11557 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11559 ax_pthread_prio_inherit_defined=yes
11563 CFLAGS="$ax_pthread_save_CFLAGS"
11564 LIBS="$ax_pthread_save_LIBS"
11566 # More AIX lossage: compile with *_r variant
11567 if test "x$GCC" != "xyes"; then
11568 case $host_os in
11569 aix*)
11570 case "x/$CC" in #(
11571 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11572 #handle absolute path differently from PATH based program lookup
11573 case "x$CC" in #(
11574 x/*) :
11575 if as_fn_executable_p ${CC}_r; then :
11576 PTHREAD_CC="${CC}_r"
11577 fi ;; #(
11578 *) :
11579 for ac_prog in ${CC}_r
11581 # Extract the first word of "$ac_prog", so it can be a program name with args.
11582 set dummy $ac_prog; ac_word=$2
11583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11584 $as_echo_n "checking for $ac_word... " >&6; }
11585 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11586 $as_echo_n "(cached) " >&6
11587 else
11588 if test -n "$PTHREAD_CC"; then
11589 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11590 else
11591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11592 for as_dir in $PATH
11594 IFS=$as_save_IFS
11595 test -z "$as_dir" && as_dir=.
11596 for ac_exec_ext in '' $ac_executable_extensions; do
11597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11598 ac_cv_prog_PTHREAD_CC="$ac_prog"
11599 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11600 break 2
11602 done
11603 done
11604 IFS=$as_save_IFS
11608 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11609 if test -n "$PTHREAD_CC"; then
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11611 $as_echo "$PTHREAD_CC" >&6; }
11612 else
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11614 $as_echo "no" >&6; }
11618 test -n "$PTHREAD_CC" && break
11619 done
11620 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11622 esac ;; #(
11623 *) :
11625 esac
11627 esac
11631 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11637 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11638 if test "x$ax_pthread_ok" = "xyes"; then
11640 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11643 else
11644 ax_pthread_ok=no
11647 ac_ext=c
11648 ac_cpp='$CPP $CPPFLAGS'
11649 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11650 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11651 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11653 # set thread flags
11655 # Some platforms use these, so just define them. They can't hurt if they
11656 # are not supported.
11657 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11659 # Check for *_r functions
11660 _CFLAGS="$CFLAGS"
11661 _LIBS="$LIBS"
11662 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11663 LIBS="$LIBS $PTHREAD_LIBS"
11665 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11666 if test "x$ac_cv_header_pthread_h" = xyes; then :
11668 else
11669 as_fn_error $? "
11670 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11675 for ac_func in strerror_r
11676 do :
11677 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11678 if test "x$ac_cv_func_strerror_r" = xyes; then :
11679 cat >>confdefs.h <<_ACEOF
11680 #define HAVE_STRERROR_R 1
11681 _ACEOF
11684 done
11687 # Do test here with the proper thread flags
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11689 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11690 if ${pgac_cv_func_strerror_r_int+:} false; then :
11691 $as_echo_n "(cached) " >&6
11692 else
11693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11694 /* end confdefs.h. */
11695 #include <string.h>
11697 main ()
11699 char buf[100];
11700 switch (strerror_r(1, buf, sizeof(buf)))
11701 { case 0: break; default: break; }
11704 return 0;
11706 _ACEOF
11707 if ac_fn_c_try_compile "$LINENO"; then :
11708 pgac_cv_func_strerror_r_int=yes
11709 else
11710 pgac_cv_func_strerror_r_int=no
11712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11715 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11716 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11718 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11723 CFLAGS="$_CFLAGS"
11724 LIBS="$_LIBS"
11727 else
11728 # else
11729 # do not use values from template file
11730 PTHREAD_CFLAGS=
11731 PTHREAD_LIBS=
11733 fi # fi
11740 ## Libraries
11742 ## Most libraries are included only if they demonstrably provide a function
11743 ## we need, but libm is an exception: always include it, because there are
11744 ## too many compilers that play cute optimization games that will break
11745 ## probes for standard functions such as pow().
11748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11749 $as_echo_n "checking for main in -lm... " >&6; }
11750 if ${ac_cv_lib_m_main+:} false; then :
11751 $as_echo_n "(cached) " >&6
11752 else
11753 ac_check_lib_save_LIBS=$LIBS
11754 LIBS="-lm $LIBS"
11755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11756 /* end confdefs.h. */
11760 main ()
11762 return main ();
11764 return 0;
11766 _ACEOF
11767 if ac_fn_c_try_link "$LINENO"; then :
11768 ac_cv_lib_m_main=yes
11769 else
11770 ac_cv_lib_m_main=no
11772 rm -f core conftest.err conftest.$ac_objext \
11773 conftest$ac_exeext conftest.$ac_ext
11774 LIBS=$ac_check_lib_save_LIBS
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11777 $as_echo "$ac_cv_lib_m_main" >&6; }
11778 if test "x$ac_cv_lib_m_main" = xyes; then :
11779 cat >>confdefs.h <<_ACEOF
11780 #define HAVE_LIBM 1
11781 _ACEOF
11783 LIBS="-lm $LIBS"
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11788 $as_echo_n "checking for library containing setproctitle... " >&6; }
11789 if ${ac_cv_search_setproctitle+:} false; then :
11790 $as_echo_n "(cached) " >&6
11791 else
11792 ac_func_search_save_LIBS=$LIBS
11793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11794 /* end confdefs.h. */
11796 /* Override any GCC internal prototype to avoid an error.
11797 Use char because int might match the return type of a GCC
11798 builtin and then its argument prototype would still apply. */
11799 #ifdef __cplusplus
11800 extern "C"
11801 #endif
11802 char setproctitle ();
11804 main ()
11806 return setproctitle ();
11808 return 0;
11810 _ACEOF
11811 for ac_lib in '' util; do
11812 if test -z "$ac_lib"; then
11813 ac_res="none required"
11814 else
11815 ac_res=-l$ac_lib
11816 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11818 if ac_fn_c_try_link "$LINENO"; then :
11819 ac_cv_search_setproctitle=$ac_res
11821 rm -f core conftest.err conftest.$ac_objext \
11822 conftest$ac_exeext
11823 if ${ac_cv_search_setproctitle+:} false; then :
11824 break
11826 done
11827 if ${ac_cv_search_setproctitle+:} false; then :
11829 else
11830 ac_cv_search_setproctitle=no
11832 rm conftest.$ac_ext
11833 LIBS=$ac_func_search_save_LIBS
11835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11836 $as_echo "$ac_cv_search_setproctitle" >&6; }
11837 ac_res=$ac_cv_search_setproctitle
11838 if test "$ac_res" != no; then :
11839 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11843 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11844 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11845 # required. Just checking for dlsym() ought to suffice.
11846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11847 $as_echo_n "checking for library containing dlsym... " >&6; }
11848 if ${ac_cv_search_dlsym+:} false; then :
11849 $as_echo_n "(cached) " >&6
11850 else
11851 ac_func_search_save_LIBS=$LIBS
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h. */
11855 /* Override any GCC internal prototype to avoid an error.
11856 Use char because int might match the return type of a GCC
11857 builtin and then its argument prototype would still apply. */
11858 #ifdef __cplusplus
11859 extern "C"
11860 #endif
11861 char dlsym ();
11863 main ()
11865 return dlsym ();
11867 return 0;
11869 _ACEOF
11870 for ac_lib in '' dl; do
11871 if test -z "$ac_lib"; then
11872 ac_res="none required"
11873 else
11874 ac_res=-l$ac_lib
11875 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11877 if ac_fn_c_try_link "$LINENO"; then :
11878 ac_cv_search_dlsym=$ac_res
11880 rm -f core conftest.err conftest.$ac_objext \
11881 conftest$ac_exeext
11882 if ${ac_cv_search_dlsym+:} false; then :
11883 break
11885 done
11886 if ${ac_cv_search_dlsym+:} false; then :
11888 else
11889 ac_cv_search_dlsym=no
11891 rm conftest.$ac_ext
11892 LIBS=$ac_func_search_save_LIBS
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11895 $as_echo "$ac_cv_search_dlsym" >&6; }
11896 ac_res=$ac_cv_search_dlsym
11897 if test "$ac_res" != no; then :
11898 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11903 $as_echo_n "checking for library containing socket... " >&6; }
11904 if ${ac_cv_search_socket+:} false; then :
11905 $as_echo_n "(cached) " >&6
11906 else
11907 ac_func_search_save_LIBS=$LIBS
11908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11909 /* end confdefs.h. */
11911 /* Override any GCC internal prototype to avoid an error.
11912 Use char because int might match the return type of a GCC
11913 builtin and then its argument prototype would still apply. */
11914 #ifdef __cplusplus
11915 extern "C"
11916 #endif
11917 char socket ();
11919 main ()
11921 return socket ();
11923 return 0;
11925 _ACEOF
11926 for ac_lib in '' socket ws2_32; do
11927 if test -z "$ac_lib"; then
11928 ac_res="none required"
11929 else
11930 ac_res=-l$ac_lib
11931 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11933 if ac_fn_c_try_link "$LINENO"; then :
11934 ac_cv_search_socket=$ac_res
11936 rm -f core conftest.err conftest.$ac_objext \
11937 conftest$ac_exeext
11938 if ${ac_cv_search_socket+:} false; then :
11939 break
11941 done
11942 if ${ac_cv_search_socket+:} false; then :
11944 else
11945 ac_cv_search_socket=no
11947 rm conftest.$ac_ext
11948 LIBS=$ac_func_search_save_LIBS
11950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11951 $as_echo "$ac_cv_search_socket" >&6; }
11952 ac_res=$ac_cv_search_socket
11953 if test "$ac_res" != no; then :
11954 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11959 $as_echo_n "checking for library containing getopt_long... " >&6; }
11960 if ${ac_cv_search_getopt_long+:} false; then :
11961 $as_echo_n "(cached) " >&6
11962 else
11963 ac_func_search_save_LIBS=$LIBS
11964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11965 /* end confdefs.h. */
11967 /* Override any GCC internal prototype to avoid an error.
11968 Use char because int might match the return type of a GCC
11969 builtin and then its argument prototype would still apply. */
11970 #ifdef __cplusplus
11971 extern "C"
11972 #endif
11973 char getopt_long ();
11975 main ()
11977 return getopt_long ();
11979 return 0;
11981 _ACEOF
11982 for ac_lib in '' getopt gnugetopt; do
11983 if test -z "$ac_lib"; then
11984 ac_res="none required"
11985 else
11986 ac_res=-l$ac_lib
11987 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11989 if ac_fn_c_try_link "$LINENO"; then :
11990 ac_cv_search_getopt_long=$ac_res
11992 rm -f core conftest.err conftest.$ac_objext \
11993 conftest$ac_exeext
11994 if ${ac_cv_search_getopt_long+:} false; then :
11995 break
11997 done
11998 if ${ac_cv_search_getopt_long+:} false; then :
12000 else
12001 ac_cv_search_getopt_long=no
12003 rm conftest.$ac_ext
12004 LIBS=$ac_func_search_save_LIBS
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
12007 $as_echo "$ac_cv_search_getopt_long" >&6; }
12008 ac_res=$ac_cv_search_getopt_long
12009 if test "$ac_res" != no; then :
12010 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
12015 $as_echo_n "checking for library containing shm_open... " >&6; }
12016 if ${ac_cv_search_shm_open+:} false; then :
12017 $as_echo_n "(cached) " >&6
12018 else
12019 ac_func_search_save_LIBS=$LIBS
12020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12021 /* end confdefs.h. */
12023 /* Override any GCC internal prototype to avoid an error.
12024 Use char because int might match the return type of a GCC
12025 builtin and then its argument prototype would still apply. */
12026 #ifdef __cplusplus
12027 extern "C"
12028 #endif
12029 char shm_open ();
12031 main ()
12033 return shm_open ();
12035 return 0;
12037 _ACEOF
12038 for ac_lib in '' rt; do
12039 if test -z "$ac_lib"; then
12040 ac_res="none required"
12041 else
12042 ac_res=-l$ac_lib
12043 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12045 if ac_fn_c_try_link "$LINENO"; then :
12046 ac_cv_search_shm_open=$ac_res
12048 rm -f core conftest.err conftest.$ac_objext \
12049 conftest$ac_exeext
12050 if ${ac_cv_search_shm_open+:} false; then :
12051 break
12053 done
12054 if ${ac_cv_search_shm_open+:} false; then :
12056 else
12057 ac_cv_search_shm_open=no
12059 rm conftest.$ac_ext
12060 LIBS=$ac_func_search_save_LIBS
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
12063 $as_echo "$ac_cv_search_shm_open" >&6; }
12064 ac_res=$ac_cv_search_shm_open
12065 if test "$ac_res" != no; then :
12066 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
12071 $as_echo_n "checking for library containing shm_unlink... " >&6; }
12072 if ${ac_cv_search_shm_unlink+:} false; then :
12073 $as_echo_n "(cached) " >&6
12074 else
12075 ac_func_search_save_LIBS=$LIBS
12076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12077 /* end confdefs.h. */
12079 /* Override any GCC internal prototype to avoid an error.
12080 Use char because int might match the return type of a GCC
12081 builtin and then its argument prototype would still apply. */
12082 #ifdef __cplusplus
12083 extern "C"
12084 #endif
12085 char shm_unlink ();
12087 main ()
12089 return shm_unlink ();
12091 return 0;
12093 _ACEOF
12094 for ac_lib in '' rt; do
12095 if test -z "$ac_lib"; then
12096 ac_res="none required"
12097 else
12098 ac_res=-l$ac_lib
12099 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12101 if ac_fn_c_try_link "$LINENO"; then :
12102 ac_cv_search_shm_unlink=$ac_res
12104 rm -f core conftest.err conftest.$ac_objext \
12105 conftest$ac_exeext
12106 if ${ac_cv_search_shm_unlink+:} false; then :
12107 break
12109 done
12110 if ${ac_cv_search_shm_unlink+:} false; then :
12112 else
12113 ac_cv_search_shm_unlink=no
12115 rm conftest.$ac_ext
12116 LIBS=$ac_func_search_save_LIBS
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12119 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12120 ac_res=$ac_cv_search_shm_unlink
12121 if test "$ac_res" != no; then :
12122 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12127 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12128 if ${ac_cv_search_clock_gettime+:} false; then :
12129 $as_echo_n "(cached) " >&6
12130 else
12131 ac_func_search_save_LIBS=$LIBS
12132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12133 /* end confdefs.h. */
12135 /* Override any GCC internal prototype to avoid an error.
12136 Use char because int might match the return type of a GCC
12137 builtin and then its argument prototype would still apply. */
12138 #ifdef __cplusplus
12139 extern "C"
12140 #endif
12141 char clock_gettime ();
12143 main ()
12145 return clock_gettime ();
12147 return 0;
12149 _ACEOF
12150 for ac_lib in '' rt posix4; do
12151 if test -z "$ac_lib"; then
12152 ac_res="none required"
12153 else
12154 ac_res=-l$ac_lib
12155 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12157 if ac_fn_c_try_link "$LINENO"; then :
12158 ac_cv_search_clock_gettime=$ac_res
12160 rm -f core conftest.err conftest.$ac_objext \
12161 conftest$ac_exeext
12162 if ${ac_cv_search_clock_gettime+:} false; then :
12163 break
12165 done
12166 if ${ac_cv_search_clock_gettime+:} false; then :
12168 else
12169 ac_cv_search_clock_gettime=no
12171 rm conftest.$ac_ext
12172 LIBS=$ac_func_search_save_LIBS
12174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12175 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12176 ac_res=$ac_cv_search_clock_gettime
12177 if test "$ac_res" != no; then :
12178 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12182 # Solaris:
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
12184 $as_echo_n "checking for library containing fdatasync... " >&6; }
12185 if ${ac_cv_search_fdatasync+:} false; then :
12186 $as_echo_n "(cached) " >&6
12187 else
12188 ac_func_search_save_LIBS=$LIBS
12189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12190 /* end confdefs.h. */
12192 /* Override any GCC internal prototype to avoid an error.
12193 Use char because int might match the return type of a GCC
12194 builtin and then its argument prototype would still apply. */
12195 #ifdef __cplusplus
12196 extern "C"
12197 #endif
12198 char fdatasync ();
12200 main ()
12202 return fdatasync ();
12204 return 0;
12206 _ACEOF
12207 for ac_lib in '' rt posix4; do
12208 if test -z "$ac_lib"; then
12209 ac_res="none required"
12210 else
12211 ac_res=-l$ac_lib
12212 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12214 if ac_fn_c_try_link "$LINENO"; then :
12215 ac_cv_search_fdatasync=$ac_res
12217 rm -f core conftest.err conftest.$ac_objext \
12218 conftest$ac_exeext
12219 if ${ac_cv_search_fdatasync+:} false; then :
12220 break
12222 done
12223 if ${ac_cv_search_fdatasync+:} false; then :
12225 else
12226 ac_cv_search_fdatasync=no
12228 rm conftest.$ac_ext
12229 LIBS=$ac_func_search_save_LIBS
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
12232 $as_echo "$ac_cv_search_fdatasync" >&6; }
12233 ac_res=$ac_cv_search_fdatasync
12234 if test "$ac_res" != no; then :
12235 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12239 # Cygwin:
12240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12241 $as_echo_n "checking for library containing shmget... " >&6; }
12242 if ${ac_cv_search_shmget+:} false; then :
12243 $as_echo_n "(cached) " >&6
12244 else
12245 ac_func_search_save_LIBS=$LIBS
12246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12247 /* end confdefs.h. */
12249 /* Override any GCC internal prototype to avoid an error.
12250 Use char because int might match the return type of a GCC
12251 builtin and then its argument prototype would still apply. */
12252 #ifdef __cplusplus
12253 extern "C"
12254 #endif
12255 char shmget ();
12257 main ()
12259 return shmget ();
12261 return 0;
12263 _ACEOF
12264 for ac_lib in '' cygipc; do
12265 if test -z "$ac_lib"; then
12266 ac_res="none required"
12267 else
12268 ac_res=-l$ac_lib
12269 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12271 if ac_fn_c_try_link "$LINENO"; then :
12272 ac_cv_search_shmget=$ac_res
12274 rm -f core conftest.err conftest.$ac_objext \
12275 conftest$ac_exeext
12276 if ${ac_cv_search_shmget+:} false; then :
12277 break
12279 done
12280 if ${ac_cv_search_shmget+:} false; then :
12282 else
12283 ac_cv_search_shmget=no
12285 rm conftest.$ac_ext
12286 LIBS=$ac_func_search_save_LIBS
12288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12289 $as_echo "$ac_cv_search_shmget" >&6; }
12290 ac_res=$ac_cv_search_shmget
12291 if test "$ac_res" != no; then :
12292 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12296 # *BSD:
12297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12298 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12299 if ${ac_cv_search_backtrace_symbols+:} false; then :
12300 $as_echo_n "(cached) " >&6
12301 else
12302 ac_func_search_save_LIBS=$LIBS
12303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12304 /* end confdefs.h. */
12306 /* Override any GCC internal prototype to avoid an error.
12307 Use char because int might match the return type of a GCC
12308 builtin and then its argument prototype would still apply. */
12309 #ifdef __cplusplus
12310 extern "C"
12311 #endif
12312 char backtrace_symbols ();
12314 main ()
12316 return backtrace_symbols ();
12318 return 0;
12320 _ACEOF
12321 for ac_lib in '' execinfo; do
12322 if test -z "$ac_lib"; then
12323 ac_res="none required"
12324 else
12325 ac_res=-l$ac_lib
12326 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12328 if ac_fn_c_try_link "$LINENO"; then :
12329 ac_cv_search_backtrace_symbols=$ac_res
12331 rm -f core conftest.err conftest.$ac_objext \
12332 conftest$ac_exeext
12333 if ${ac_cv_search_backtrace_symbols+:} false; then :
12334 break
12336 done
12337 if ${ac_cv_search_backtrace_symbols+:} false; then :
12339 else
12340 ac_cv_search_backtrace_symbols=no
12342 rm conftest.$ac_ext
12343 LIBS=$ac_func_search_save_LIBS
12345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12346 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12347 ac_res=$ac_cv_search_backtrace_symbols
12348 if test "$ac_res" != no; then :
12349 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12354 if test "$enable_thread_safety" = yes; then
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12356 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12357 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12358 $as_echo_n "(cached) " >&6
12359 else
12360 ac_func_search_save_LIBS=$LIBS
12361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12362 /* end confdefs.h. */
12364 /* Override any GCC internal prototype to avoid an error.
12365 Use char because int might match the return type of a GCC
12366 builtin and then its argument prototype would still apply. */
12367 #ifdef __cplusplus
12368 extern "C"
12369 #endif
12370 char pthread_barrier_wait ();
12372 main ()
12374 return pthread_barrier_wait ();
12376 return 0;
12378 _ACEOF
12379 for ac_lib in '' pthread; do
12380 if test -z "$ac_lib"; then
12381 ac_res="none required"
12382 else
12383 ac_res=-l$ac_lib
12384 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12386 if ac_fn_c_try_link "$LINENO"; then :
12387 ac_cv_search_pthread_barrier_wait=$ac_res
12389 rm -f core conftest.err conftest.$ac_objext \
12390 conftest$ac_exeext
12391 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12392 break
12394 done
12395 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12397 else
12398 ac_cv_search_pthread_barrier_wait=no
12400 rm conftest.$ac_ext
12401 LIBS=$ac_func_search_save_LIBS
12403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12404 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12405 ac_res=$ac_cv_search_pthread_barrier_wait
12406 if test "$ac_res" != no; then :
12407 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12413 if test "$with_readline" = yes; then
12416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12417 $as_echo_n "checking for library containing readline... " >&6; }
12418 if ${pgac_cv_check_readline+:} false; then :
12419 $as_echo_n "(cached) " >&6
12420 else
12421 pgac_cv_check_readline=no
12422 pgac_save_LIBS=$LIBS
12423 if test x"$with_libedit_preferred" != x"yes"
12424 then READLINE_ORDER="-lreadline -ledit"
12425 else READLINE_ORDER="-ledit -lreadline"
12427 for pgac_rllib in $READLINE_ORDER ; do
12428 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12429 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12431 /* end confdefs.h. */
12433 /* Override any GCC internal prototype to avoid an error.
12434 Use char because int might match the return type of a GCC
12435 builtin and then its argument prototype would still apply. */
12436 #ifdef __cplusplus
12437 extern "C"
12438 #endif
12439 char readline ();
12441 main ()
12443 return readline ();
12445 return 0;
12447 _ACEOF
12448 if ac_fn_c_try_link "$LINENO"; then :
12450 # Older NetBSD and OpenBSD have a broken linker that does not
12451 # recognize dependent libraries; assume curses is needed if we didn't
12452 # find any dependency.
12453 case $host_os in
12454 netbsd* | openbsd*)
12455 if test x"$pgac_lib" = x"" ; then
12456 pgac_lib=" -lcurses"
12457 fi ;;
12458 esac
12460 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12461 break
12464 rm -f core conftest.err conftest.$ac_objext \
12465 conftest$ac_exeext conftest.$ac_ext
12466 done
12467 if test "$pgac_cv_check_readline" != no ; then
12468 break
12470 done
12471 LIBS=$pgac_save_LIBS
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12475 $as_echo "$pgac_cv_check_readline" >&6; }
12476 if test "$pgac_cv_check_readline" != no ; then
12477 LIBS="$pgac_cv_check_readline $LIBS"
12479 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12484 if test x"$pgac_cv_check_readline" = x"no"; then
12485 as_fn_error $? "readline library not found
12486 If you have readline already installed, see config.log for details on the
12487 failure. It is possible the compiler isn't looking in the proper directory.
12488 Use --without-readline to disable readline support." "$LINENO" 5
12492 if test "$with_zlib" = yes; then
12493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12494 $as_echo_n "checking for inflate in -lz... " >&6; }
12495 if ${ac_cv_lib_z_inflate+:} false; then :
12496 $as_echo_n "(cached) " >&6
12497 else
12498 ac_check_lib_save_LIBS=$LIBS
12499 LIBS="-lz $LIBS"
12500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12501 /* end confdefs.h. */
12503 /* Override any GCC internal prototype to avoid an error.
12504 Use char because int might match the return type of a GCC
12505 builtin and then its argument prototype would still apply. */
12506 #ifdef __cplusplus
12507 extern "C"
12508 #endif
12509 char inflate ();
12511 main ()
12513 return inflate ();
12515 return 0;
12517 _ACEOF
12518 if ac_fn_c_try_link "$LINENO"; then :
12519 ac_cv_lib_z_inflate=yes
12520 else
12521 ac_cv_lib_z_inflate=no
12523 rm -f core conftest.err conftest.$ac_objext \
12524 conftest$ac_exeext conftest.$ac_ext
12525 LIBS=$ac_check_lib_save_LIBS
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12528 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12529 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12530 cat >>confdefs.h <<_ACEOF
12531 #define HAVE_LIBZ 1
12532 _ACEOF
12534 LIBS="-lz $LIBS"
12536 else
12537 as_fn_error $? "zlib library not found
12538 If you have zlib already installed, see config.log for details on the
12539 failure. It is possible the compiler isn't looking in the proper directory.
12540 Use --without-zlib to disable zlib support." "$LINENO" 5
12545 if test "$enable_spinlocks" = yes; then
12547 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12549 else
12550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12551 *** Not using spinlocks will cause poor performance." >&5
12552 $as_echo "$as_me: WARNING:
12553 *** Not using spinlocks will cause poor performance." >&2;}
12556 if test "$enable_atomics" = yes; then
12558 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12560 else
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12562 *** Not using atomic operations will cause poor performance." >&5
12563 $as_echo "$as_me: WARNING:
12564 *** Not using atomic operations will cause poor performance." >&2;}
12567 if test "$with_gssapi" = yes ; then
12568 if test "$PORTNAME" != "win32"; then
12569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12570 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12571 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12572 $as_echo_n "(cached) " >&6
12573 else
12574 ac_func_search_save_LIBS=$LIBS
12575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12576 /* end confdefs.h. */
12578 /* Override any GCC internal prototype to avoid an error.
12579 Use char because int might match the return type of a GCC
12580 builtin and then its argument prototype would still apply. */
12581 #ifdef __cplusplus
12582 extern "C"
12583 #endif
12584 char gss_init_sec_context ();
12586 main ()
12588 return gss_init_sec_context ();
12590 return 0;
12592 _ACEOF
12593 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12594 if test -z "$ac_lib"; then
12595 ac_res="none required"
12596 else
12597 ac_res=-l$ac_lib
12598 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12600 if ac_fn_c_try_link "$LINENO"; then :
12601 ac_cv_search_gss_init_sec_context=$ac_res
12603 rm -f core conftest.err conftest.$ac_objext \
12604 conftest$ac_exeext
12605 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12606 break
12608 done
12609 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12611 else
12612 ac_cv_search_gss_init_sec_context=no
12614 rm conftest.$ac_ext
12615 LIBS=$ac_func_search_save_LIBS
12617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12618 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12619 ac_res=$ac_cv_search_gss_init_sec_context
12620 if test "$ac_res" != no; then :
12621 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12623 else
12624 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12627 else
12628 LIBS="$LIBS -lgssapi32"
12633 # SSL Library
12635 # There is currently only one supported SSL/TLS library: OpenSSL.
12640 # Check whether --with-ssl was given.
12641 if test "${with_ssl+set}" = set; then :
12642 withval=$with_ssl;
12643 case $withval in
12644 yes)
12645 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12648 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12653 esac
12658 if test x"$with_ssl" = x"" ; then
12659 with_ssl=no
12664 # Check whether --with-openssl was given.
12665 if test "${with_openssl+set}" = set; then :
12666 withval=$with_openssl;
12667 case $withval in
12668 yes)
12675 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12677 esac
12679 else
12680 with_openssl=no
12685 if test "$with_openssl" = yes ; then
12686 with_ssl=openssl
12689 if test "$with_ssl" = openssl ; then
12690 # Minimum required OpenSSL version is 1.0.1
12692 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12694 if test "$PORTNAME" != "win32"; then
12695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12696 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12697 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12698 $as_echo_n "(cached) " >&6
12699 else
12700 ac_check_lib_save_LIBS=$LIBS
12701 LIBS="-lcrypto $LIBS"
12702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12703 /* end confdefs.h. */
12705 /* Override any GCC internal prototype to avoid an error.
12706 Use char because int might match the return type of a GCC
12707 builtin and then its argument prototype would still apply. */
12708 #ifdef __cplusplus
12709 extern "C"
12710 #endif
12711 char CRYPTO_new_ex_data ();
12713 main ()
12715 return CRYPTO_new_ex_data ();
12717 return 0;
12719 _ACEOF
12720 if ac_fn_c_try_link "$LINENO"; then :
12721 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12722 else
12723 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12725 rm -f core conftest.err conftest.$ac_objext \
12726 conftest$ac_exeext conftest.$ac_ext
12727 LIBS=$ac_check_lib_save_LIBS
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12730 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12731 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12732 cat >>confdefs.h <<_ACEOF
12733 #define HAVE_LIBCRYPTO 1
12734 _ACEOF
12736 LIBS="-lcrypto $LIBS"
12738 else
12739 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12743 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12744 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12745 $as_echo_n "(cached) " >&6
12746 else
12747 ac_check_lib_save_LIBS=$LIBS
12748 LIBS="-lssl $LIBS"
12749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12750 /* end confdefs.h. */
12752 /* Override any GCC internal prototype to avoid an error.
12753 Use char because int might match the return type of a GCC
12754 builtin and then its argument prototype would still apply. */
12755 #ifdef __cplusplus
12756 extern "C"
12757 #endif
12758 char SSL_new ();
12760 main ()
12762 return SSL_new ();
12764 return 0;
12766 _ACEOF
12767 if ac_fn_c_try_link "$LINENO"; then :
12768 ac_cv_lib_ssl_SSL_new=yes
12769 else
12770 ac_cv_lib_ssl_SSL_new=no
12772 rm -f core conftest.err conftest.$ac_objext \
12773 conftest$ac_exeext conftest.$ac_ext
12774 LIBS=$ac_check_lib_save_LIBS
12776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12777 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12778 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12779 cat >>confdefs.h <<_ACEOF
12780 #define HAVE_LIBSSL 1
12781 _ACEOF
12783 LIBS="-lssl $LIBS"
12785 else
12786 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12789 else
12790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12791 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12792 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12793 $as_echo_n "(cached) " >&6
12794 else
12795 ac_func_search_save_LIBS=$LIBS
12796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12797 /* end confdefs.h. */
12799 /* Override any GCC internal prototype to avoid an error.
12800 Use char because int might match the return type of a GCC
12801 builtin and then its argument prototype would still apply. */
12802 #ifdef __cplusplus
12803 extern "C"
12804 #endif
12805 char CRYPTO_new_ex_data ();
12807 main ()
12809 return CRYPTO_new_ex_data ();
12811 return 0;
12813 _ACEOF
12814 for ac_lib in '' eay32 crypto; do
12815 if test -z "$ac_lib"; then
12816 ac_res="none required"
12817 else
12818 ac_res=-l$ac_lib
12819 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12821 if ac_fn_c_try_link "$LINENO"; then :
12822 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12824 rm -f core conftest.err conftest.$ac_objext \
12825 conftest$ac_exeext
12826 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12827 break
12829 done
12830 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12832 else
12833 ac_cv_search_CRYPTO_new_ex_data=no
12835 rm conftest.$ac_ext
12836 LIBS=$ac_func_search_save_LIBS
12838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12839 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12840 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12841 if test "$ac_res" != no; then :
12842 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12844 else
12845 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12849 $as_echo_n "checking for library containing SSL_new... " >&6; }
12850 if ${ac_cv_search_SSL_new+:} false; then :
12851 $as_echo_n "(cached) " >&6
12852 else
12853 ac_func_search_save_LIBS=$LIBS
12854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12855 /* end confdefs.h. */
12857 /* Override any GCC internal prototype to avoid an error.
12858 Use char because int might match the return type of a GCC
12859 builtin and then its argument prototype would still apply. */
12860 #ifdef __cplusplus
12861 extern "C"
12862 #endif
12863 char SSL_new ();
12865 main ()
12867 return SSL_new ();
12869 return 0;
12871 _ACEOF
12872 for ac_lib in '' ssleay32 ssl; do
12873 if test -z "$ac_lib"; then
12874 ac_res="none required"
12875 else
12876 ac_res=-l$ac_lib
12877 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12879 if ac_fn_c_try_link "$LINENO"; then :
12880 ac_cv_search_SSL_new=$ac_res
12882 rm -f core conftest.err conftest.$ac_objext \
12883 conftest$ac_exeext
12884 if ${ac_cv_search_SSL_new+:} false; then :
12885 break
12887 done
12888 if ${ac_cv_search_SSL_new+:} false; then :
12890 else
12891 ac_cv_search_SSL_new=no
12893 rm conftest.$ac_ext
12894 LIBS=$ac_func_search_save_LIBS
12896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12897 $as_echo "$ac_cv_search_SSL_new" >&6; }
12898 ac_res=$ac_cv_search_SSL_new
12899 if test "$ac_res" != no; then :
12900 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12902 else
12903 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12907 # Function introduced in OpenSSL 1.0.2.
12908 for ac_func in X509_get_signature_nid
12909 do :
12910 ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
12911 if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
12912 cat >>confdefs.h <<_ACEOF
12913 #define HAVE_X509_GET_SIGNATURE_NID 1
12914 _ACEOF
12917 done
12919 # Functions introduced in OpenSSL 1.1.0. We used to check for
12920 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12921 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12922 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12923 # functions.
12924 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12925 do :
12926 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12927 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12928 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12929 cat >>confdefs.h <<_ACEOF
12930 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12931 _ACEOF
12934 done
12936 # OpenSSL versions before 1.1.0 required setting callback functions, for
12937 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12938 # function was removed.
12939 for ac_func in CRYPTO_lock
12940 do :
12941 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12942 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12943 cat >>confdefs.h <<_ACEOF
12944 #define HAVE_CRYPTO_LOCK 1
12945 _ACEOF
12948 done
12951 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12953 elif test "$with_ssl" != no ; then
12954 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12958 if test "$with_pam" = yes ; then
12959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12960 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12961 if ${ac_cv_lib_pam_pam_start+:} false; then :
12962 $as_echo_n "(cached) " >&6
12963 else
12964 ac_check_lib_save_LIBS=$LIBS
12965 LIBS="-lpam $LIBS"
12966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12967 /* end confdefs.h. */
12969 /* Override any GCC internal prototype to avoid an error.
12970 Use char because int might match the return type of a GCC
12971 builtin and then its argument prototype would still apply. */
12972 #ifdef __cplusplus
12973 extern "C"
12974 #endif
12975 char pam_start ();
12977 main ()
12979 return pam_start ();
12981 return 0;
12983 _ACEOF
12984 if ac_fn_c_try_link "$LINENO"; then :
12985 ac_cv_lib_pam_pam_start=yes
12986 else
12987 ac_cv_lib_pam_pam_start=no
12989 rm -f core conftest.err conftest.$ac_objext \
12990 conftest$ac_exeext conftest.$ac_ext
12991 LIBS=$ac_check_lib_save_LIBS
12993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12994 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12995 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12996 cat >>confdefs.h <<_ACEOF
12997 #define HAVE_LIBPAM 1
12998 _ACEOF
13000 LIBS="-lpam $LIBS"
13002 else
13003 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
13008 if test "$with_libxml" = yes ; then
13009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
13010 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
13011 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
13012 $as_echo_n "(cached) " >&6
13013 else
13014 ac_check_lib_save_LIBS=$LIBS
13015 LIBS="-lxml2 $LIBS"
13016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13017 /* end confdefs.h. */
13019 /* Override any GCC internal prototype to avoid an error.
13020 Use char because int might match the return type of a GCC
13021 builtin and then its argument prototype would still apply. */
13022 #ifdef __cplusplus
13023 extern "C"
13024 #endif
13025 char xmlSaveToBuffer ();
13027 main ()
13029 return xmlSaveToBuffer ();
13031 return 0;
13033 _ACEOF
13034 if ac_fn_c_try_link "$LINENO"; then :
13035 ac_cv_lib_xml2_xmlSaveToBuffer=yes
13036 else
13037 ac_cv_lib_xml2_xmlSaveToBuffer=no
13039 rm -f core conftest.err conftest.$ac_objext \
13040 conftest$ac_exeext conftest.$ac_ext
13041 LIBS=$ac_check_lib_save_LIBS
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13044 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13045 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13046 cat >>confdefs.h <<_ACEOF
13047 #define HAVE_LIBXML2 1
13048 _ACEOF
13050 LIBS="-lxml2 $LIBS"
13052 else
13053 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13058 if test "$with_libxslt" = yes ; then
13059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13060 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13061 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13062 $as_echo_n "(cached) " >&6
13063 else
13064 ac_check_lib_save_LIBS=$LIBS
13065 LIBS="-lxslt $LIBS"
13066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13067 /* end confdefs.h. */
13069 /* Override any GCC internal prototype to avoid an error.
13070 Use char because int might match the return type of a GCC
13071 builtin and then its argument prototype would still apply. */
13072 #ifdef __cplusplus
13073 extern "C"
13074 #endif
13075 char xsltCleanupGlobals ();
13077 main ()
13079 return xsltCleanupGlobals ();
13081 return 0;
13083 _ACEOF
13084 if ac_fn_c_try_link "$LINENO"; then :
13085 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13086 else
13087 ac_cv_lib_xslt_xsltCleanupGlobals=no
13089 rm -f core conftest.err conftest.$ac_objext \
13090 conftest$ac_exeext conftest.$ac_ext
13091 LIBS=$ac_check_lib_save_LIBS
13093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13094 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13095 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13096 cat >>confdefs.h <<_ACEOF
13097 #define HAVE_LIBXSLT 1
13098 _ACEOF
13100 LIBS="-lxslt $LIBS"
13102 else
13103 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13108 if test "$with_lz4" = yes ; then
13109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13110 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13111 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13112 $as_echo_n "(cached) " >&6
13113 else
13114 ac_check_lib_save_LIBS=$LIBS
13115 LIBS="-llz4 $LIBS"
13116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13117 /* end confdefs.h. */
13119 /* Override any GCC internal prototype to avoid an error.
13120 Use char because int might match the return type of a GCC
13121 builtin and then its argument prototype would still apply. */
13122 #ifdef __cplusplus
13123 extern "C"
13124 #endif
13125 char LZ4_compress_default ();
13127 main ()
13129 return LZ4_compress_default ();
13131 return 0;
13133 _ACEOF
13134 if ac_fn_c_try_link "$LINENO"; then :
13135 ac_cv_lib_lz4_LZ4_compress_default=yes
13136 else
13137 ac_cv_lib_lz4_LZ4_compress_default=no
13139 rm -f core conftest.err conftest.$ac_objext \
13140 conftest$ac_exeext conftest.$ac_ext
13141 LIBS=$ac_check_lib_save_LIBS
13143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
13144 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13145 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13146 cat >>confdefs.h <<_ACEOF
13147 #define HAVE_LIBLZ4 1
13148 _ACEOF
13150 LIBS="-llz4 $LIBS"
13152 else
13153 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13158 if test "$with_zstd" = yes ; then
13159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
13160 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
13161 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
13162 $as_echo_n "(cached) " >&6
13163 else
13164 ac_check_lib_save_LIBS=$LIBS
13165 LIBS="-lzstd $LIBS"
13166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13167 /* end confdefs.h. */
13169 /* Override any GCC internal prototype to avoid an error.
13170 Use char because int might match the return type of a GCC
13171 builtin and then its argument prototype would still apply. */
13172 #ifdef __cplusplus
13173 extern "C"
13174 #endif
13175 char ZSTD_compress ();
13177 main ()
13179 return ZSTD_compress ();
13181 return 0;
13183 _ACEOF
13184 if ac_fn_c_try_link "$LINENO"; then :
13185 ac_cv_lib_zstd_ZSTD_compress=yes
13186 else
13187 ac_cv_lib_zstd_ZSTD_compress=no
13189 rm -f core conftest.err conftest.$ac_objext \
13190 conftest$ac_exeext conftest.$ac_ext
13191 LIBS=$ac_check_lib_save_LIBS
13193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
13194 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
13195 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
13196 cat >>confdefs.h <<_ACEOF
13197 #define HAVE_LIBZSTD 1
13198 _ACEOF
13200 LIBS="-lzstd $LIBS"
13202 else
13203 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
13208 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
13209 # also, on AIX, we may need to have openssl in LIBS for this step.
13210 if test "$with_ldap" = yes ; then
13211 _LIBS="$LIBS"
13212 if test "$PORTNAME" != "win32"; then
13213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13214 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13215 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13216 $as_echo_n "(cached) " >&6
13217 else
13218 ac_check_lib_save_LIBS=$LIBS
13219 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
13220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13221 /* end confdefs.h. */
13223 /* Override any GCC internal prototype to avoid an error.
13224 Use char because int might match the return type of a GCC
13225 builtin and then its argument prototype would still apply. */
13226 #ifdef __cplusplus
13227 extern "C"
13228 #endif
13229 char ldap_bind ();
13231 main ()
13233 return ldap_bind ();
13235 return 0;
13237 _ACEOF
13238 if ac_fn_c_try_link "$LINENO"; then :
13239 ac_cv_lib_ldap_ldap_bind=yes
13240 else
13241 ac_cv_lib_ldap_ldap_bind=no
13243 rm -f core conftest.err conftest.$ac_objext \
13244 conftest$ac_exeext conftest.$ac_ext
13245 LIBS=$ac_check_lib_save_LIBS
13247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
13248 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13249 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13250 cat >>confdefs.h <<_ACEOF
13251 #define HAVE_LIBLDAP 1
13252 _ACEOF
13254 LIBS="-lldap $LIBS"
13256 else
13257 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13260 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13261 # This test is carried out against libldap.
13262 for ac_func in ldap_initialize
13263 do :
13264 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13265 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13266 cat >>confdefs.h <<_ACEOF
13267 #define HAVE_LDAP_INITIALIZE 1
13268 _ACEOF
13271 done
13273 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
13274 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
13275 # library from a separate OpenLDAP installation). The most reliable
13276 # way to check that is to check for a function introduced in 2.5.
13277 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
13278 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
13279 thread_safe_libldap=yes
13280 else
13281 thread_safe_libldap=no
13284 if test "$enable_thread_safety" = yes -a "$thread_safe_libldap" = no; then
13285 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13286 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13287 LIBS="$_LIBS"
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13289 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13290 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13291 $as_echo_n "(cached) " >&6
13292 else
13293 ac_check_lib_save_LIBS=$LIBS
13294 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13296 /* end confdefs.h. */
13298 /* Override any GCC internal prototype to avoid an error.
13299 Use char because int might match the return type of a GCC
13300 builtin and then its argument prototype would still apply. */
13301 #ifdef __cplusplus
13302 extern "C"
13303 #endif
13304 char ldap_bind ();
13306 main ()
13308 return ldap_bind ();
13310 return 0;
13312 _ACEOF
13313 if ac_fn_c_try_link "$LINENO"; then :
13314 ac_cv_lib_ldap_r_ldap_bind=yes
13315 else
13316 ac_cv_lib_ldap_r_ldap_bind=no
13318 rm -f core conftest.err conftest.$ac_objext \
13319 conftest$ac_exeext conftest.$ac_ext
13320 LIBS=$ac_check_lib_save_LIBS
13322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13323 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13324 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13325 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13326 else
13327 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13330 else
13331 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13333 else
13334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13335 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13336 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13337 $as_echo_n "(cached) " >&6
13338 else
13339 ac_check_lib_save_LIBS=$LIBS
13340 LIBS="-lwldap32 $LIBS"
13341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13342 /* end confdefs.h. */
13344 /* Override any GCC internal prototype to avoid an error.
13345 Use char because int might match the return type of a GCC
13346 builtin and then its argument prototype would still apply. */
13347 #ifdef __cplusplus
13348 extern "C"
13349 #endif
13350 char ldap_bind ();
13352 main ()
13354 return ldap_bind ();
13356 return 0;
13358 _ACEOF
13359 if ac_fn_c_try_link "$LINENO"; then :
13360 ac_cv_lib_wldap32_ldap_bind=yes
13361 else
13362 ac_cv_lib_wldap32_ldap_bind=no
13364 rm -f core conftest.err conftest.$ac_objext \
13365 conftest$ac_exeext conftest.$ac_ext
13366 LIBS=$ac_check_lib_save_LIBS
13368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13369 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13370 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13371 cat >>confdefs.h <<_ACEOF
13372 #define HAVE_LIBWLDAP32 1
13373 _ACEOF
13375 LIBS="-lwldap32 $LIBS"
13377 else
13378 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13381 LDAP_LIBS_FE="-lwldap32"
13382 LDAP_LIBS_BE="-lwldap32"
13384 LIBS="$_LIBS"
13389 # for contrib/sepgsql
13390 if test "$with_selinux" = yes; then
13391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13392 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13393 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13394 $as_echo_n "(cached) " >&6
13395 else
13396 ac_check_lib_save_LIBS=$LIBS
13397 LIBS="-lselinux $LIBS"
13398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13399 /* end confdefs.h. */
13401 /* Override any GCC internal prototype to avoid an error.
13402 Use char because int might match the return type of a GCC
13403 builtin and then its argument prototype would still apply. */
13404 #ifdef __cplusplus
13405 extern "C"
13406 #endif
13407 char security_compute_create_name ();
13409 main ()
13411 return security_compute_create_name ();
13413 return 0;
13415 _ACEOF
13416 if ac_fn_c_try_link "$LINENO"; then :
13417 ac_cv_lib_selinux_security_compute_create_name=yes
13418 else
13419 ac_cv_lib_selinux_security_compute_create_name=no
13421 rm -f core conftest.err conftest.$ac_objext \
13422 conftest$ac_exeext conftest.$ac_ext
13423 LIBS=$ac_check_lib_save_LIBS
13425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13426 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13427 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13428 cat >>confdefs.h <<_ACEOF
13429 #define HAVE_LIBSELINUX 1
13430 _ACEOF
13432 LIBS="-lselinux $LIBS"
13434 else
13435 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13440 # for contrib/uuid-ossp
13441 if test "$with_uuid" = bsd ; then
13442 # On BSD, the UUID functions are in libc
13443 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13444 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13445 UUID_LIBS=""
13446 else
13447 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13450 elif test "$with_uuid" = e2fs ; then
13451 # On macOS, the UUID functions are in libc
13452 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13453 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13454 UUID_LIBS=""
13455 else
13456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13457 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13458 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13459 $as_echo_n "(cached) " >&6
13460 else
13461 ac_check_lib_save_LIBS=$LIBS
13462 LIBS="-luuid $LIBS"
13463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13464 /* end confdefs.h. */
13466 /* Override any GCC internal prototype to avoid an error.
13467 Use char because int might match the return type of a GCC
13468 builtin and then its argument prototype would still apply. */
13469 #ifdef __cplusplus
13470 extern "C"
13471 #endif
13472 char uuid_generate ();
13474 main ()
13476 return uuid_generate ();
13478 return 0;
13480 _ACEOF
13481 if ac_fn_c_try_link "$LINENO"; then :
13482 ac_cv_lib_uuid_uuid_generate=yes
13483 else
13484 ac_cv_lib_uuid_uuid_generate=no
13486 rm -f core conftest.err conftest.$ac_objext \
13487 conftest$ac_exeext conftest.$ac_ext
13488 LIBS=$ac_check_lib_save_LIBS
13490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13491 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13492 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13493 UUID_LIBS="-luuid"
13494 else
13495 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13500 elif test "$with_uuid" = ossp ; then
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13502 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13503 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13504 $as_echo_n "(cached) " >&6
13505 else
13506 ac_check_lib_save_LIBS=$LIBS
13507 LIBS="-lossp-uuid $LIBS"
13508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13509 /* end confdefs.h. */
13511 /* Override any GCC internal prototype to avoid an error.
13512 Use char because int might match the return type of a GCC
13513 builtin and then its argument prototype would still apply. */
13514 #ifdef __cplusplus
13515 extern "C"
13516 #endif
13517 char uuid_export ();
13519 main ()
13521 return uuid_export ();
13523 return 0;
13525 _ACEOF
13526 if ac_fn_c_try_link "$LINENO"; then :
13527 ac_cv_lib_ossp_uuid_uuid_export=yes
13528 else
13529 ac_cv_lib_ossp_uuid_uuid_export=no
13531 rm -f core conftest.err conftest.$ac_objext \
13532 conftest$ac_exeext conftest.$ac_ext
13533 LIBS=$ac_check_lib_save_LIBS
13535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13536 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13537 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13538 UUID_LIBS="-lossp-uuid"
13539 else
13540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13541 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13542 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13543 $as_echo_n "(cached) " >&6
13544 else
13545 ac_check_lib_save_LIBS=$LIBS
13546 LIBS="-luuid $LIBS"
13547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13548 /* end confdefs.h. */
13550 /* Override any GCC internal prototype to avoid an error.
13551 Use char because int might match the return type of a GCC
13552 builtin and then its argument prototype would still apply. */
13553 #ifdef __cplusplus
13554 extern "C"
13555 #endif
13556 char uuid_export ();
13558 main ()
13560 return uuid_export ();
13562 return 0;
13564 _ACEOF
13565 if ac_fn_c_try_link "$LINENO"; then :
13566 ac_cv_lib_uuid_uuid_export=yes
13567 else
13568 ac_cv_lib_uuid_uuid_export=no
13570 rm -f core conftest.err conftest.$ac_objext \
13571 conftest$ac_exeext conftest.$ac_ext
13572 LIBS=$ac_check_lib_save_LIBS
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13575 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13576 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13577 UUID_LIBS="-luuid"
13578 else
13579 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13589 ## Header files
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13593 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13594 if ${ac_cv_header_stdbool_h+:} false; then :
13595 $as_echo_n "(cached) " >&6
13596 else
13597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13598 /* end confdefs.h. */
13600 #include <stdbool.h>
13601 #ifndef bool
13602 "error: bool is not defined"
13603 #endif
13604 #ifndef false
13605 "error: false is not defined"
13606 #endif
13607 #if false
13608 "error: false is not 0"
13609 #endif
13610 #ifndef true
13611 "error: true is not defined"
13612 #endif
13613 #if true != 1
13614 "error: true is not 1"
13615 #endif
13616 #ifndef __bool_true_false_are_defined
13617 "error: __bool_true_false_are_defined is not defined"
13618 #endif
13620 struct s { _Bool s: 1; _Bool t; } s;
13622 char a[true == 1 ? 1 : -1];
13623 char b[false == 0 ? 1 : -1];
13624 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13625 char d[(bool) 0.5 == true ? 1 : -1];
13626 /* See body of main program for 'e'. */
13627 char f[(_Bool) 0.0 == false ? 1 : -1];
13628 char g[true];
13629 char h[sizeof (_Bool)];
13630 char i[sizeof s.t];
13631 enum { j = false, k = true, l = false * true, m = true * 256 };
13632 /* The following fails for
13633 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13634 _Bool n[m];
13635 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13636 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13637 /* Catch a bug in an HP-UX C compiler. See
13638 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13639 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13641 _Bool q = true;
13642 _Bool *pq = &q;
13645 main ()
13648 bool e = &s;
13649 *pq |= q;
13650 *pq |= ! q;
13651 /* Refer to every declared value, to avoid compiler optimizations. */
13652 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13653 + !m + !n + !o + !p + !q + !pq);
13656 return 0;
13658 _ACEOF
13659 if ac_fn_c_try_compile "$LINENO"; then :
13660 ac_cv_header_stdbool_h=yes
13661 else
13662 ac_cv_header_stdbool_h=no
13664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13667 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13668 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13669 if test "x$ac_cv_type__Bool" = xyes; then :
13671 cat >>confdefs.h <<_ACEOF
13672 #define HAVE__BOOL 1
13673 _ACEOF
13679 if test $ac_cv_header_stdbool_h = yes; then
13681 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13686 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h
13687 do :
13688 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13689 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13690 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13691 cat >>confdefs.h <<_ACEOF
13692 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13693 _ACEOF
13697 done
13700 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13701 for ac_header in readline/readline.h
13702 do :
13703 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13704 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13705 cat >>confdefs.h <<_ACEOF
13706 #define HAVE_READLINE_READLINE_H 1
13707 _ACEOF
13709 else
13710 for ac_header in readline.h
13711 do :
13712 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13713 if test "x$ac_cv_header_readline_h" = xyes; then :
13714 cat >>confdefs.h <<_ACEOF
13715 #define HAVE_READLINE_H 1
13716 _ACEOF
13718 else
13719 as_fn_error $? "readline header not found
13720 If you have readline already installed, see config.log for details on the
13721 failure. It is possible the compiler isn't looking in the proper directory.
13722 Use --without-readline to disable readline support." "$LINENO" 5
13725 done
13729 done
13731 for ac_header in readline/history.h
13732 do :
13733 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13734 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13735 cat >>confdefs.h <<_ACEOF
13736 #define HAVE_READLINE_HISTORY_H 1
13737 _ACEOF
13739 else
13740 for ac_header in history.h
13741 do :
13742 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13743 if test "x$ac_cv_header_history_h" = xyes; then :
13744 cat >>confdefs.h <<_ACEOF
13745 #define HAVE_HISTORY_H 1
13746 _ACEOF
13748 else
13749 as_fn_error $? "history header not found
13750 If you have readline already installed, see config.log for details on the
13751 failure. It is possible the compiler isn't looking in the proper directory.
13752 Use --without-readline to disable readline support." "$LINENO" 5
13755 done
13759 done
13763 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13764 # Some installations of libedit usurp /usr/include/readline/, which seems
13765 # bad practice, since in combined installations readline will have its headers
13766 # there. We might have to resort to AC_EGREP checks to make sure we found
13767 # the proper header...
13768 for ac_header in editline/readline.h
13769 do :
13770 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13771 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13772 cat >>confdefs.h <<_ACEOF
13773 #define HAVE_EDITLINE_READLINE_H 1
13774 _ACEOF
13776 else
13777 for ac_header in readline.h
13778 do :
13779 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13780 if test "x$ac_cv_header_readline_h" = xyes; then :
13781 cat >>confdefs.h <<_ACEOF
13782 #define HAVE_READLINE_H 1
13783 _ACEOF
13785 else
13786 for ac_header in readline/readline.h
13787 do :
13788 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13789 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13790 cat >>confdefs.h <<_ACEOF
13791 #define HAVE_READLINE_READLINE_H 1
13792 _ACEOF
13794 else
13795 as_fn_error $? "readline header not found
13796 If you have libedit already installed, see config.log for details on the
13797 failure. It is possible the compiler isn't looking in the proper directory.
13798 Use --without-readline to disable libedit support." "$LINENO" 5
13801 done
13805 done
13809 done
13811 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13812 # not be there at all. Hence, don't complain if not found. We must check
13813 # though, since in yet other versions it is an independent header.
13814 for ac_header in editline/history.h
13815 do :
13816 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13817 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13818 cat >>confdefs.h <<_ACEOF
13819 #define HAVE_EDITLINE_HISTORY_H 1
13820 _ACEOF
13822 else
13823 for ac_header in history.h
13824 do :
13825 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13826 if test "x$ac_cv_header_history_h" = xyes; then :
13827 cat >>confdefs.h <<_ACEOF
13828 #define HAVE_HISTORY_H 1
13829 _ACEOF
13831 else
13832 for ac_header in readline/history.h
13833 do :
13834 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13835 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13836 cat >>confdefs.h <<_ACEOF
13837 #define HAVE_READLINE_HISTORY_H 1
13838 _ACEOF
13842 done
13846 done
13850 done
13854 if test "$with_zlib" = yes; then
13855 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13856 if test "x$ac_cv_header_zlib_h" = xyes; then :
13858 else
13859 as_fn_error $? "zlib header not found
13860 If you have zlib already installed, see config.log for details on the
13861 failure. It is possible the compiler isn't looking in the proper directory.
13862 Use --without-zlib to disable zlib support." "$LINENO" 5
13868 if test -z "$LZ4"; then
13869 for ac_prog in lz4
13871 # Extract the first word of "$ac_prog", so it can be a program name with args.
13872 set dummy $ac_prog; ac_word=$2
13873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13874 $as_echo_n "checking for $ac_word... " >&6; }
13875 if ${ac_cv_path_LZ4+:} false; then :
13876 $as_echo_n "(cached) " >&6
13877 else
13878 case $LZ4 in
13879 [\\/]* | ?:[\\/]*)
13880 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13884 for as_dir in $PATH
13886 IFS=$as_save_IFS
13887 test -z "$as_dir" && as_dir=.
13888 for ac_exec_ext in '' $ac_executable_extensions; do
13889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13890 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13892 break 2
13894 done
13895 done
13896 IFS=$as_save_IFS
13899 esac
13901 LZ4=$ac_cv_path_LZ4
13902 if test -n "$LZ4"; then
13903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13904 $as_echo "$LZ4" >&6; }
13905 else
13906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13907 $as_echo "no" >&6; }
13911 test -n "$LZ4" && break
13912 done
13914 else
13915 # Report the value of LZ4 in configure's output in all cases.
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13917 $as_echo_n "checking for LZ4... " >&6; }
13918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13919 $as_echo "$LZ4" >&6; }
13922 if test "$with_lz4" = yes; then
13923 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13924 if test "x$ac_cv_header_lz4_h" = xyes; then :
13926 else
13927 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13933 if test -z "$ZSTD"; then
13934 for ac_prog in zstd
13936 # Extract the first word of "$ac_prog", so it can be a program name with args.
13937 set dummy $ac_prog; ac_word=$2
13938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13939 $as_echo_n "checking for $ac_word... " >&6; }
13940 if ${ac_cv_path_ZSTD+:} false; then :
13941 $as_echo_n "(cached) " >&6
13942 else
13943 case $ZSTD in
13944 [\\/]* | ?:[\\/]*)
13945 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13949 for as_dir in $PATH
13951 IFS=$as_save_IFS
13952 test -z "$as_dir" && as_dir=.
13953 for ac_exec_ext in '' $ac_executable_extensions; do
13954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13955 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13957 break 2
13959 done
13960 done
13961 IFS=$as_save_IFS
13964 esac
13966 ZSTD=$ac_cv_path_ZSTD
13967 if test -n "$ZSTD"; then
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13969 $as_echo "$ZSTD" >&6; }
13970 else
13971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13972 $as_echo "no" >&6; }
13976 test -n "$ZSTD" && break
13977 done
13979 else
13980 # Report the value of ZSTD in configure's output in all cases.
13981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13982 $as_echo_n "checking for ZSTD... " >&6; }
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13984 $as_echo "$ZSTD" >&6; }
13987 if test "$with_zstd" = yes; then
13988 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13989 if test "x$ac_cv_header_zstd_h" = xyes; then :
13991 else
13992 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13998 if test "$with_gssapi" = yes ; then
13999 for ac_header in gssapi/gssapi.h
14000 do :
14001 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
14002 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
14003 cat >>confdefs.h <<_ACEOF
14004 #define HAVE_GSSAPI_GSSAPI_H 1
14005 _ACEOF
14007 else
14008 for ac_header in gssapi.h
14009 do :
14010 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
14011 if test "x$ac_cv_header_gssapi_h" = xyes; then :
14012 cat >>confdefs.h <<_ACEOF
14013 #define HAVE_GSSAPI_H 1
14014 _ACEOF
14016 else
14017 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
14020 done
14024 done
14028 if test "$with_ssl" = openssl ; then
14029 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
14030 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
14032 else
14033 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
14037 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
14038 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
14040 else
14041 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
14047 if test "$with_pam" = yes ; then
14048 for ac_header in security/pam_appl.h
14049 do :
14050 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
14051 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
14052 cat >>confdefs.h <<_ACEOF
14053 #define HAVE_SECURITY_PAM_APPL_H 1
14054 _ACEOF
14056 else
14057 for ac_header in pam/pam_appl.h
14058 do :
14059 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
14060 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
14061 cat >>confdefs.h <<_ACEOF
14062 #define HAVE_PAM_PAM_APPL_H 1
14063 _ACEOF
14065 else
14066 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
14069 done
14073 done
14077 if test "$with_bsd_auth" = yes ; then
14078 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
14079 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
14081 else
14082 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
14088 if test "$with_systemd" = yes ; then
14089 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
14090 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
14092 else
14093 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
14099 if test "$with_libxml" = yes ; then
14100 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
14101 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
14103 else
14104 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
14110 if test "$with_libxslt" = yes ; then
14111 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
14112 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
14114 else
14115 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
14121 if test "$with_ldap" = yes ; then
14122 if test "$PORTNAME" != "win32"; then
14123 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
14124 if test "x$ac_cv_header_ldap_h" = xyes; then :
14126 else
14127 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
14131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
14132 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14133 if ${pgac_cv_ldap_safe+:} false; then :
14134 $as_echo_n "(cached) " >&6
14135 else
14136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14137 /* end confdefs.h. */
14138 #include <ldap.h>
14139 #if !defined(LDAP_VENDOR_VERSION) || \
14140 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14141 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14142 choke me
14143 #endif
14145 main ()
14149 return 0;
14151 _ACEOF
14152 if ac_fn_c_try_compile "$LINENO"; then :
14153 pgac_cv_ldap_safe=yes
14154 else
14155 pgac_cv_ldap_safe=no
14157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14160 $as_echo "$pgac_cv_ldap_safe" >&6; }
14162 if test "$pgac_cv_ldap_safe" != yes; then
14163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14164 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14165 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14166 *** also uses LDAP will crash on exit." >&5
14167 $as_echo "$as_me: WARNING:
14168 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14169 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14170 *** also uses LDAP will crash on exit." >&2;}
14172 else
14173 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14174 #include <windows.h>
14177 if test "x$ac_cv_header_winldap_h" = xyes; then :
14179 else
14180 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14187 if test "$with_bonjour" = yes ; then
14188 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14189 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14191 else
14192 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14198 # for contrib/uuid-ossp
14199 if test "$with_uuid" = bsd ; then
14200 for ac_header in uuid.h
14201 do :
14202 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14203 if test "x$ac_cv_header_uuid_h" = xyes; then :
14204 cat >>confdefs.h <<_ACEOF
14205 #define HAVE_UUID_H 1
14206 _ACEOF
14207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14208 /* end confdefs.h. */
14209 #include <uuid.h>
14211 _ACEOF
14212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14213 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
14215 else
14216 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14218 rm -f conftest*
14220 else
14221 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14224 done
14226 elif test "$with_uuid" = e2fs ; then
14227 for ac_header in uuid/uuid.h
14228 do :
14229 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14230 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14231 cat >>confdefs.h <<_ACEOF
14232 #define HAVE_UUID_UUID_H 1
14233 _ACEOF
14234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14235 /* end confdefs.h. */
14236 #include <uuid/uuid.h>
14238 _ACEOF
14239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14240 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14242 else
14243 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14245 rm -f conftest*
14247 else
14248 for ac_header in uuid.h
14249 do :
14250 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14251 if test "x$ac_cv_header_uuid_h" = xyes; then :
14252 cat >>confdefs.h <<_ACEOF
14253 #define HAVE_UUID_H 1
14254 _ACEOF
14255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14256 /* end confdefs.h. */
14257 #include <uuid.h>
14259 _ACEOF
14260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14261 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14263 else
14264 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14266 rm -f conftest*
14268 else
14269 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14272 done
14276 done
14278 elif test "$with_uuid" = ossp ; then
14279 for ac_header in ossp/uuid.h
14280 do :
14281 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14282 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14283 cat >>confdefs.h <<_ACEOF
14284 #define HAVE_OSSP_UUID_H 1
14285 _ACEOF
14286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14287 /* end confdefs.h. */
14288 #include <ossp/uuid.h>
14290 _ACEOF
14291 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14292 $EGREP "uuid_export" >/dev/null 2>&1; then :
14294 else
14295 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14297 rm -f conftest*
14299 else
14300 for ac_header in uuid.h
14301 do :
14302 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14303 if test "x$ac_cv_header_uuid_h" = xyes; then :
14304 cat >>confdefs.h <<_ACEOF
14305 #define HAVE_UUID_H 1
14306 _ACEOF
14307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14308 /* end confdefs.h. */
14309 #include <uuid.h>
14311 _ACEOF
14312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14313 $EGREP "uuid_export" >/dev/null 2>&1; then :
14315 else
14316 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14318 rm -f conftest*
14320 else
14321 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14324 done
14328 done
14332 if test "$PORTNAME" = "win32" ; then
14333 for ac_header in crtdefs.h
14334 do :
14335 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14336 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14337 cat >>confdefs.h <<_ACEOF
14338 #define HAVE_CRTDEFS_H 1
14339 _ACEOF
14343 done
14348 ## Types, structures, compiler characteristics
14351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14352 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14353 if ${ac_cv_c_bigendian+:} false; then :
14354 $as_echo_n "(cached) " >&6
14355 else
14356 ac_cv_c_bigendian=unknown
14357 # See if we're dealing with a universal compiler.
14358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14359 /* end confdefs.h. */
14360 #ifndef __APPLE_CC__
14361 not a universal capable compiler
14362 #endif
14363 typedef int dummy;
14365 _ACEOF
14366 if ac_fn_c_try_compile "$LINENO"; then :
14368 # Check for potential -arch flags. It is not universal unless
14369 # there are at least two -arch flags with different values.
14370 ac_arch=
14371 ac_prev=
14372 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14373 if test -n "$ac_prev"; then
14374 case $ac_word in
14375 i?86 | x86_64 | ppc | ppc64)
14376 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14377 ac_arch=$ac_word
14378 else
14379 ac_cv_c_bigendian=universal
14380 break
14383 esac
14384 ac_prev=
14385 elif test "x$ac_word" = "x-arch"; then
14386 ac_prev=arch
14388 done
14390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14391 if test $ac_cv_c_bigendian = unknown; then
14392 # See if sys/param.h defines the BYTE_ORDER macro.
14393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14394 /* end confdefs.h. */
14395 #include <sys/types.h>
14396 #include <sys/param.h>
14399 main ()
14401 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14402 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14403 && LITTLE_ENDIAN)
14404 bogus endian macros
14405 #endif
14408 return 0;
14410 _ACEOF
14411 if ac_fn_c_try_compile "$LINENO"; then :
14412 # It does; now see whether it defined to BIG_ENDIAN or not.
14413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14414 /* end confdefs.h. */
14415 #include <sys/types.h>
14416 #include <sys/param.h>
14419 main ()
14421 #if BYTE_ORDER != BIG_ENDIAN
14422 not big endian
14423 #endif
14426 return 0;
14428 _ACEOF
14429 if ac_fn_c_try_compile "$LINENO"; then :
14430 ac_cv_c_bigendian=yes
14431 else
14432 ac_cv_c_bigendian=no
14434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14438 if test $ac_cv_c_bigendian = unknown; then
14439 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14441 /* end confdefs.h. */
14442 #include <limits.h>
14445 main ()
14447 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14448 bogus endian macros
14449 #endif
14452 return 0;
14454 _ACEOF
14455 if ac_fn_c_try_compile "$LINENO"; then :
14456 # It does; now see whether it defined to _BIG_ENDIAN or not.
14457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14458 /* end confdefs.h. */
14459 #include <limits.h>
14462 main ()
14464 #ifndef _BIG_ENDIAN
14465 not big endian
14466 #endif
14469 return 0;
14471 _ACEOF
14472 if ac_fn_c_try_compile "$LINENO"; then :
14473 ac_cv_c_bigendian=yes
14474 else
14475 ac_cv_c_bigendian=no
14477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14481 if test $ac_cv_c_bigendian = unknown; then
14482 # Compile a test program.
14483 if test "$cross_compiling" = yes; then :
14484 # Try to guess by grepping values from an object file.
14485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14486 /* end confdefs.h. */
14487 short int ascii_mm[] =
14488 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14489 short int ascii_ii[] =
14490 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14491 int use_ascii (int i) {
14492 return ascii_mm[i] + ascii_ii[i];
14494 short int ebcdic_ii[] =
14495 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14496 short int ebcdic_mm[] =
14497 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14498 int use_ebcdic (int i) {
14499 return ebcdic_mm[i] + ebcdic_ii[i];
14501 extern int foo;
14504 main ()
14506 return use_ascii (foo) == use_ebcdic (foo);
14508 return 0;
14510 _ACEOF
14511 if ac_fn_c_try_compile "$LINENO"; then :
14512 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14513 ac_cv_c_bigendian=yes
14515 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14516 if test "$ac_cv_c_bigendian" = unknown; then
14517 ac_cv_c_bigendian=no
14518 else
14519 # finding both strings is unlikely to happen, but who knows?
14520 ac_cv_c_bigendian=unknown
14524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14525 else
14526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14527 /* end confdefs.h. */
14528 $ac_includes_default
14530 main ()
14533 /* Are we little or big endian? From Harbison&Steele. */
14534 union
14536 long int l;
14537 char c[sizeof (long int)];
14538 } u;
14539 u.l = 1;
14540 return u.c[sizeof (long int) - 1] == 1;
14543 return 0;
14545 _ACEOF
14546 if ac_fn_c_try_run "$LINENO"; then :
14547 ac_cv_c_bigendian=no
14548 else
14549 ac_cv_c_bigendian=yes
14551 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14552 conftest.$ac_objext conftest.beam conftest.$ac_ext
14557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14558 $as_echo "$ac_cv_c_bigendian" >&6; }
14559 case $ac_cv_c_bigendian in #(
14560 yes)
14561 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14562 ;; #(
14564 ;; #(
14565 universal)
14567 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14569 ;; #(
14571 as_fn_error $? "unknown endianness
14572 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14573 esac
14575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14576 $as_echo_n "checking for inline... " >&6; }
14577 if ${ac_cv_c_inline+:} false; then :
14578 $as_echo_n "(cached) " >&6
14579 else
14580 ac_cv_c_inline=no
14581 for ac_kw in inline __inline__ __inline; do
14582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14583 /* end confdefs.h. */
14584 #ifndef __cplusplus
14585 typedef int foo_t;
14586 static $ac_kw foo_t static_foo () {return 0; }
14587 $ac_kw foo_t foo () {return 0; }
14588 #endif
14590 _ACEOF
14591 if ac_fn_c_try_compile "$LINENO"; then :
14592 ac_cv_c_inline=$ac_kw
14594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14595 test "$ac_cv_c_inline" != no && break
14596 done
14599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14600 $as_echo "$ac_cv_c_inline" >&6; }
14602 case $ac_cv_c_inline in
14603 inline | yes) ;;
14605 case $ac_cv_c_inline in
14606 no) ac_val=;;
14607 *) ac_val=$ac_cv_c_inline;;
14608 esac
14609 cat >>confdefs.h <<_ACEOF
14610 #ifndef __cplusplus
14611 #define inline $ac_val
14612 #endif
14613 _ACEOF
14615 esac
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14618 $as_echo_n "checking for printf format archetype... " >&6; }
14619 if ${pgac_cv_printf_archetype+:} false; then :
14620 $as_echo_n "(cached) " >&6
14621 else
14622 pgac_cv_printf_archetype=gnu_printf
14623 ac_save_c_werror_flag=$ac_c_werror_flag
14624 ac_c_werror_flag=yes
14625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14626 /* end confdefs.h. */
14627 extern void pgac_write(int ignore, const char *fmt,...)
14628 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14630 main ()
14632 pgac_write(0, "error %s: %m", "foo");
14634 return 0;
14636 _ACEOF
14637 if ac_fn_c_try_compile "$LINENO"; then :
14638 ac_archetype_ok=yes
14639 else
14640 ac_archetype_ok=no
14642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14643 ac_c_werror_flag=$ac_save_c_werror_flag
14645 if [ "$ac_archetype_ok" = no ]; then
14646 pgac_cv_printf_archetype=__syslog__
14647 ac_save_c_werror_flag=$ac_c_werror_flag
14648 ac_c_werror_flag=yes
14649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14650 /* end confdefs.h. */
14651 extern void pgac_write(int ignore, const char *fmt,...)
14652 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14654 main ()
14656 pgac_write(0, "error %s: %m", "foo");
14658 return 0;
14660 _ACEOF
14661 if ac_fn_c_try_compile "$LINENO"; then :
14662 ac_archetype_ok=yes
14663 else
14664 ac_archetype_ok=no
14666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14667 ac_c_werror_flag=$ac_save_c_werror_flag
14669 if [ "$ac_archetype_ok" = no ]; then
14670 pgac_cv_printf_archetype=printf
14674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14675 $as_echo "$pgac_cv_printf_archetype" >&6; }
14677 cat >>confdefs.h <<_ACEOF
14678 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14679 _ACEOF
14682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14683 $as_echo_n "checking for _Static_assert... " >&6; }
14684 if ${pgac_cv__static_assert+:} false; then :
14685 $as_echo_n "(cached) " >&6
14686 else
14687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14688 /* end confdefs.h. */
14691 main ()
14693 ({ _Static_assert(1, "foo"); })
14695 return 0;
14697 _ACEOF
14698 if ac_fn_c_try_link "$LINENO"; then :
14699 pgac_cv__static_assert=yes
14700 else
14701 pgac_cv__static_assert=no
14703 rm -f core conftest.err conftest.$ac_objext \
14704 conftest$ac_exeext conftest.$ac_ext
14706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14707 $as_echo "$pgac_cv__static_assert" >&6; }
14708 if test x"$pgac_cv__static_assert" = xyes ; then
14710 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14714 $as_echo_n "checking for typeof... " >&6; }
14715 if ${pgac_cv_c_typeof+:} false; then :
14716 $as_echo_n "(cached) " >&6
14717 else
14718 pgac_cv_c_typeof=no
14719 for pgac_kw in typeof __typeof__ decltype; do
14720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14721 /* end confdefs.h. */
14724 main ()
14726 int x = 0;
14727 $pgac_kw(x) y;
14728 y = x;
14729 return y;
14731 return 0;
14733 _ACEOF
14734 if ac_fn_c_try_compile "$LINENO"; then :
14735 pgac_cv_c_typeof=$pgac_kw
14737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14738 test "$pgac_cv_c_typeof" != no && break
14739 done
14741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14742 $as_echo "$pgac_cv_c_typeof" >&6; }
14743 if test "$pgac_cv_c_typeof" != no; then
14745 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14747 if test "$pgac_cv_c_typeof" != typeof; then
14749 cat >>confdefs.h <<_ACEOF
14750 #define typeof $pgac_cv_c_typeof
14751 _ACEOF
14755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14756 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14757 if ${pgac_cv__types_compatible+:} false; then :
14758 $as_echo_n "(cached) " >&6
14759 else
14760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14761 /* end confdefs.h. */
14764 main ()
14766 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14768 return 0;
14770 _ACEOF
14771 if ac_fn_c_try_compile "$LINENO"; then :
14772 pgac_cv__types_compatible=yes
14773 else
14774 pgac_cv__types_compatible=no
14776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14779 $as_echo "$pgac_cv__types_compatible" >&6; }
14780 if test x"$pgac_cv__types_compatible" = xyes ; then
14782 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14786 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14787 if ${pgac_cv__builtin_constant_p+:} false; then :
14788 $as_echo_n "(cached) " >&6
14789 else
14790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14791 /* end confdefs.h. */
14792 static int x;
14793 static int y[__builtin_constant_p(x) ? x : 1];
14794 static int z[__builtin_constant_p("string literal") ? 1 : x];
14797 _ACEOF
14798 if ac_fn_c_try_compile "$LINENO"; then :
14799 pgac_cv__builtin_constant_p=yes
14800 else
14801 pgac_cv__builtin_constant_p=no
14803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14806 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14807 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14809 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14813 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14814 if ${pgac_cv__builtin_unreachable+:} false; then :
14815 $as_echo_n "(cached) " >&6
14816 else
14817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14818 /* end confdefs.h. */
14821 main ()
14823 __builtin_unreachable();
14825 return 0;
14827 _ACEOF
14828 if ac_fn_c_try_link "$LINENO"; then :
14829 pgac_cv__builtin_unreachable=yes
14830 else
14831 pgac_cv__builtin_unreachable=no
14833 rm -f core conftest.err conftest.$ac_objext \
14834 conftest$ac_exeext conftest.$ac_ext
14836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14837 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14838 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14840 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14844 $as_echo_n "checking for computed goto support... " >&6; }
14845 if ${pgac_cv_computed_goto+:} false; then :
14846 $as_echo_n "(cached) " >&6
14847 else
14848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14849 /* end confdefs.h. */
14852 main ()
14854 void *labeladdrs[] = {&&my_label};
14855 goto *labeladdrs[0];
14856 my_label:
14857 return 1;
14860 return 0;
14862 _ACEOF
14863 if ac_fn_c_try_compile "$LINENO"; then :
14864 pgac_cv_computed_goto=yes
14865 else
14866 pgac_cv_computed_goto=no
14868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14871 $as_echo "$pgac_cv_computed_goto" >&6; }
14872 if test x"$pgac_cv_computed_goto" = xyes ; then
14874 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14877 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14878 #include <time.h>
14881 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14883 cat >>confdefs.h <<_ACEOF
14884 #define HAVE_STRUCT_TM_TM_ZONE 1
14885 _ACEOF
14891 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14892 #include <sys/ipc.h>
14893 #include <sys/sem.h>
14896 if test "x$ac_cv_type_union_semun" = xyes; then :
14898 cat >>confdefs.h <<_ACEOF
14899 #define HAVE_UNION_SEMUN 1
14900 _ACEOF
14905 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14907 if test "x$ac_cv_type_socklen_t" = xyes; then :
14909 cat >>confdefs.h <<_ACEOF
14910 #define HAVE_SOCKLEN_T 1
14911 _ACEOF
14916 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14917 #include <sys/socket.h>
14920 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14922 cat >>confdefs.h <<_ACEOF
14923 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14924 _ACEOF
14930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14931 $as_echo_n "checking for locale_t... " >&6; }
14932 if ${pgac_cv_type_locale_t+:} false; then :
14933 $as_echo_n "(cached) " >&6
14934 else
14935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14936 /* end confdefs.h. */
14937 #include <locale.h>
14938 locale_t x;
14940 main ()
14944 return 0;
14946 _ACEOF
14947 if ac_fn_c_try_compile "$LINENO"; then :
14948 pgac_cv_type_locale_t=yes
14949 else
14950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14951 /* end confdefs.h. */
14952 #include <xlocale.h>
14953 locale_t x;
14955 main ()
14959 return 0;
14961 _ACEOF
14962 if ac_fn_c_try_compile "$LINENO"; then :
14963 pgac_cv_type_locale_t='yes (in xlocale.h)'
14964 else
14965 pgac_cv_type_locale_t=no
14967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14972 $as_echo "$pgac_cv_type_locale_t" >&6; }
14973 if test "$pgac_cv_type_locale_t" != no; then
14975 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14978 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14980 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14984 # MSVC doesn't cope well with defining restrict to __restrict, the
14985 # spelling it understands, because it conflicts with
14986 # __declspec(restrict). Therefore we define pg_restrict to the
14987 # appropriate definition, which presumably won't conflict.
14989 # Allow platforms with buggy compilers to force restrict to not be
14990 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14991 # template.
14992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14993 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14994 if ${ac_cv_c_restrict+:} false; then :
14995 $as_echo_n "(cached) " >&6
14996 else
14997 ac_cv_c_restrict=no
14998 # The order here caters to the fact that C++ does not require restrict.
14999 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15001 /* end confdefs.h. */
15002 typedef int * int_ptr;
15003 int foo (int_ptr $ac_kw ip) {
15004 return ip[0];
15007 main ()
15009 int s[1];
15010 int * $ac_kw t = s;
15011 t[0] = 0;
15012 return foo(t)
15014 return 0;
15016 _ACEOF
15017 if ac_fn_c_try_compile "$LINENO"; then :
15018 ac_cv_c_restrict=$ac_kw
15020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15021 test "$ac_cv_c_restrict" != no && break
15022 done
15025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15026 $as_echo "$ac_cv_c_restrict" >&6; }
15028 case $ac_cv_c_restrict in
15029 restrict) ;;
15030 no) $as_echo "#define restrict /**/" >>confdefs.h
15032 *) cat >>confdefs.h <<_ACEOF
15033 #define restrict $ac_cv_c_restrict
15034 _ACEOF
15036 esac
15038 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15039 pg_restrict=""
15040 else
15041 pg_restrict="$ac_cv_c_restrict"
15044 cat >>confdefs.h <<_ACEOF
15045 #define pg_restrict $pg_restrict
15046 _ACEOF
15049 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
15050 #include <sys/param.h>
15051 #ifdef HAVE_SYS_UCRED_H
15052 #include <sys/ucred.h>
15053 #endif
15055 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
15057 cat >>confdefs.h <<_ACEOF
15058 #define HAVE_STRUCT_CMSGCRED 1
15059 _ACEOF
15065 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15066 #include <getopt.h>
15067 #endif
15069 if test "x$ac_cv_type_struct_option" = xyes; then :
15071 cat >>confdefs.h <<_ACEOF
15072 #define HAVE_STRUCT_OPTION 1
15073 _ACEOF
15079 if test "$with_zlib" = yes; then
15080 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
15081 # did not). While we could work around the lack of z_streamp, it
15082 # seems unwise to encourage people to use such old zlib versions...
15083 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
15085 if test "x$ac_cv_type_z_streamp" = xyes; then :
15087 else
15088 as_fn_error $? "zlib version is too old
15089 Use --without-zlib to disable zlib support." "$LINENO" 5
15094 case $host_cpu in
15095 x86_64)
15096 # On x86_64, check if we can compile a popcntq instruction
15097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15098 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15099 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15100 $as_echo_n "(cached) " >&6
15101 else
15102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15103 /* end confdefs.h. */
15106 main ()
15108 long long x = 1; long long r;
15109 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15111 return 0;
15113 _ACEOF
15114 if ac_fn_c_try_compile "$LINENO"; then :
15115 pgac_cv_have_x86_64_popcntq=yes
15116 else
15117 pgac_cv_have_x86_64_popcntq=no
15119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15122 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15123 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15125 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15129 ppc*|powerpc*)
15130 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
15131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15132 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15133 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15134 $as_echo_n "(cached) " >&6
15135 else
15136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15137 /* end confdefs.h. */
15138 static inline int
15139 addi(int ra, int si)
15141 int res = 0;
15142 if (__builtin_constant_p(si))
15143 __asm__ __volatile__(
15144 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15145 return res;
15147 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15149 main ()
15153 return 0;
15155 _ACEOF
15156 if ac_fn_c_try_compile "$LINENO"; then :
15157 pgac_cv_have_i_constraint__builtin_constant_p=yes
15158 else
15159 pgac_cv_have_i_constraint__builtin_constant_p=no
15161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15164 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15165 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15167 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15171 esac
15173 # Check largefile support. You might think this is a system service not a
15174 # compiler characteristic, but you'd be wrong. We must check this before
15175 # probing existence of related functions such as fseeko, since the largefile
15176 # defines can affect what is generated for that.
15177 if test "$PORTNAME" != "win32"; then
15178 # Check whether --enable-largefile was given.
15179 if test "${enable_largefile+set}" = set; then :
15180 enableval=$enable_largefile;
15183 if test "$enable_largefile" != no; then
15185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15186 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15187 if ${ac_cv_sys_largefile_CC+:} false; then :
15188 $as_echo_n "(cached) " >&6
15189 else
15190 ac_cv_sys_largefile_CC=no
15191 if test "$GCC" != yes; then
15192 ac_save_CC=$CC
15193 while :; do
15194 # IRIX 6.2 and later do not support large files by default,
15195 # so use the C compiler's -n32 option if that helps.
15196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15197 /* end confdefs.h. */
15198 #include <sys/types.h>
15199 /* Check that off_t can represent 2**63 - 1 correctly.
15200 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15201 since some C++ compilers masquerading as C compilers
15202 incorrectly reject 9223372036854775807. */
15203 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15204 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15205 && LARGE_OFF_T % 2147483647 == 1)
15206 ? 1 : -1];
15208 main ()
15212 return 0;
15214 _ACEOF
15215 if ac_fn_c_try_compile "$LINENO"; then :
15216 break
15218 rm -f core conftest.err conftest.$ac_objext
15219 CC="$CC -n32"
15220 if ac_fn_c_try_compile "$LINENO"; then :
15221 ac_cv_sys_largefile_CC=' -n32'; break
15223 rm -f core conftest.err conftest.$ac_objext
15224 break
15225 done
15226 CC=$ac_save_CC
15227 rm -f conftest.$ac_ext
15230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15231 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15232 if test "$ac_cv_sys_largefile_CC" != no; then
15233 CC=$CC$ac_cv_sys_largefile_CC
15236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15237 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15238 if ${ac_cv_sys_file_offset_bits+:} false; then :
15239 $as_echo_n "(cached) " >&6
15240 else
15241 while :; do
15242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15243 /* end confdefs.h. */
15244 #include <sys/types.h>
15245 /* Check that off_t can represent 2**63 - 1 correctly.
15246 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15247 since some C++ compilers masquerading as C compilers
15248 incorrectly reject 9223372036854775807. */
15249 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15250 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15251 && LARGE_OFF_T % 2147483647 == 1)
15252 ? 1 : -1];
15254 main ()
15258 return 0;
15260 _ACEOF
15261 if ac_fn_c_try_compile "$LINENO"; then :
15262 ac_cv_sys_file_offset_bits=no; break
15264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15266 /* end confdefs.h. */
15267 #define _FILE_OFFSET_BITS 64
15268 #include <sys/types.h>
15269 /* Check that off_t can represent 2**63 - 1 correctly.
15270 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15271 since some C++ compilers masquerading as C compilers
15272 incorrectly reject 9223372036854775807. */
15273 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15274 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15275 && LARGE_OFF_T % 2147483647 == 1)
15276 ? 1 : -1];
15278 main ()
15282 return 0;
15284 _ACEOF
15285 if ac_fn_c_try_compile "$LINENO"; then :
15286 ac_cv_sys_file_offset_bits=64; break
15288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15289 ac_cv_sys_file_offset_bits=unknown
15290 break
15291 done
15293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15294 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15295 case $ac_cv_sys_file_offset_bits in #(
15296 no | unknown) ;;
15298 cat >>confdefs.h <<_ACEOF
15299 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15300 _ACEOF
15302 esac
15303 rm -rf conftest*
15304 if test $ac_cv_sys_file_offset_bits = unknown; then
15305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15306 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15307 if ${ac_cv_sys_large_files+:} false; then :
15308 $as_echo_n "(cached) " >&6
15309 else
15310 while :; do
15311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15312 /* end confdefs.h. */
15313 #include <sys/types.h>
15314 /* Check that off_t can represent 2**63 - 1 correctly.
15315 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15316 since some C++ compilers masquerading as C compilers
15317 incorrectly reject 9223372036854775807. */
15318 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15319 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15320 && LARGE_OFF_T % 2147483647 == 1)
15321 ? 1 : -1];
15323 main ()
15327 return 0;
15329 _ACEOF
15330 if ac_fn_c_try_compile "$LINENO"; then :
15331 ac_cv_sys_large_files=no; break
15333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15335 /* end confdefs.h. */
15336 #define _LARGE_FILES 1
15337 #include <sys/types.h>
15338 /* Check that off_t can represent 2**63 - 1 correctly.
15339 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15340 since some C++ compilers masquerading as C compilers
15341 incorrectly reject 9223372036854775807. */
15342 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15343 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15344 && LARGE_OFF_T % 2147483647 == 1)
15345 ? 1 : -1];
15347 main ()
15351 return 0;
15353 _ACEOF
15354 if ac_fn_c_try_compile "$LINENO"; then :
15355 ac_cv_sys_large_files=1; break
15357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15358 ac_cv_sys_large_files=unknown
15359 break
15360 done
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15363 $as_echo "$ac_cv_sys_large_files" >&6; }
15364 case $ac_cv_sys_large_files in #(
15365 no | unknown) ;;
15367 cat >>confdefs.h <<_ACEOF
15368 #define _LARGE_FILES $ac_cv_sys_large_files
15369 _ACEOF
15371 esac
15372 rm -rf conftest*
15381 # The cast to long int works around a bug in the HP C Compiler
15382 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15383 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15384 # This bug is HP SR number 8606223364.
15385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15386 $as_echo_n "checking size of off_t... " >&6; }
15387 if ${ac_cv_sizeof_off_t+:} false; then :
15388 $as_echo_n "(cached) " >&6
15389 else
15390 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15392 else
15393 if test "$ac_cv_type_off_t" = yes; then
15394 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15395 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15396 as_fn_error 77 "cannot compute sizeof (off_t)
15397 See \`config.log' for more details" "$LINENO" 5; }
15398 else
15399 ac_cv_sizeof_off_t=0
15404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15405 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15409 cat >>confdefs.h <<_ACEOF
15410 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15411 _ACEOF
15415 # If we don't have largefile support, can't handle segsize >= 2GB.
15416 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15417 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15420 # The cast to long int works around a bug in the HP C Compiler
15421 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15422 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15423 # This bug is HP SR number 8606223364.
15424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15425 $as_echo_n "checking size of bool... " >&6; }
15426 if ${ac_cv_sizeof_bool+:} false; then :
15427 $as_echo_n "(cached) " >&6
15428 else
15429 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15430 #include <stdbool.h>
15431 #endif
15432 "; then :
15434 else
15435 if test "$ac_cv_type_bool" = yes; then
15436 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15437 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15438 as_fn_error 77 "cannot compute sizeof (bool)
15439 See \`config.log' for more details" "$LINENO" 5; }
15440 else
15441 ac_cv_sizeof_bool=0
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15447 $as_echo "$ac_cv_sizeof_bool" >&6; }
15451 cat >>confdefs.h <<_ACEOF
15452 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15453 _ACEOF
15457 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15459 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15465 ## Functions, global variables
15468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15469 $as_echo_n "checking for int timezone... " >&6; }
15470 if ${pgac_cv_var_int_timezone+:} false; then :
15471 $as_echo_n "(cached) " >&6
15472 else
15473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15474 /* end confdefs.h. */
15475 #include <time.h>
15476 int res;
15478 main ()
15480 #ifndef __CYGWIN__
15481 res = timezone / 60;
15482 #else
15483 res = _timezone / 60;
15484 #endif
15486 return 0;
15488 _ACEOF
15489 if ac_fn_c_try_link "$LINENO"; then :
15490 pgac_cv_var_int_timezone=yes
15491 else
15492 pgac_cv_var_int_timezone=no
15494 rm -f core conftest.err conftest.$ac_objext \
15495 conftest$ac_exeext conftest.$ac_ext
15497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15498 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15499 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15501 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15505 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15506 if ${pgac_cv_func_wcstombs_l+:} false; then :
15507 $as_echo_n "(cached) " >&6
15508 else
15509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15510 /* end confdefs.h. */
15511 #include <stdlib.h>
15512 #include <locale.h>
15514 main ()
15516 #ifndef wcstombs_l
15517 (void) wcstombs_l;
15518 #endif
15520 return 0;
15522 _ACEOF
15523 if ac_fn_c_try_compile "$LINENO"; then :
15524 pgac_cv_func_wcstombs_l='yes'
15525 else
15526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15527 /* end confdefs.h. */
15528 #include <stdlib.h>
15529 #include <locale.h>
15530 #include <xlocale.h>
15532 main ()
15534 #ifndef wcstombs_l
15535 (void) wcstombs_l;
15536 #endif
15538 return 0;
15540 _ACEOF
15541 if ac_fn_c_try_compile "$LINENO"; then :
15542 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15543 else
15544 pgac_cv_func_wcstombs_l='no'
15546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15551 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15552 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15554 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15558 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15559 # symbols that that library has no business exposing to the world. Pending
15560 # acquisition of a clue by those developers, ignore libedit (including its
15561 # possible alias of libreadline) while checking for everything else.
15562 LIBS_including_readline="$LIBS"
15563 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15565 for ac_func in backtrace_symbols copyfile getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s posix_fallocate ppoll pthread_is_threaded_np setproctitle setproctitle_fast strchrnul strsignal syncfs sync_file_range uselocale wcstombs_l
15566 do :
15567 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15568 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15569 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15570 cat >>confdefs.h <<_ACEOF
15571 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15572 _ACEOF
15575 done
15578 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15580 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15581 if ${pgac_cv__builtin_bswap16+:} false; then :
15582 $as_echo_n "(cached) " >&6
15583 else
15584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15585 /* end confdefs.h. */
15588 call__builtin_bswap16(int x)
15590 return __builtin_bswap16(x);
15593 main ()
15597 return 0;
15599 _ACEOF
15600 if ac_fn_c_try_link "$LINENO"; then :
15601 pgac_cv__builtin_bswap16=yes
15602 else
15603 pgac_cv__builtin_bswap16=no
15605 rm -f core conftest.err conftest.$ac_objext \
15606 conftest$ac_exeext conftest.$ac_ext
15608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15609 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15610 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15612 cat >>confdefs.h <<_ACEOF
15613 #define HAVE__BUILTIN_BSWAP16 1
15614 _ACEOF
15617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15618 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15619 if ${pgac_cv__builtin_bswap32+:} false; then :
15620 $as_echo_n "(cached) " >&6
15621 else
15622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15623 /* end confdefs.h. */
15626 call__builtin_bswap32(int x)
15628 return __builtin_bswap32(x);
15631 main ()
15635 return 0;
15637 _ACEOF
15638 if ac_fn_c_try_link "$LINENO"; then :
15639 pgac_cv__builtin_bswap32=yes
15640 else
15641 pgac_cv__builtin_bswap32=no
15643 rm -f core conftest.err conftest.$ac_objext \
15644 conftest$ac_exeext conftest.$ac_ext
15646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15647 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15648 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15650 cat >>confdefs.h <<_ACEOF
15651 #define HAVE__BUILTIN_BSWAP32 1
15652 _ACEOF
15655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15656 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15657 if ${pgac_cv__builtin_bswap64+:} false; then :
15658 $as_echo_n "(cached) " >&6
15659 else
15660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15661 /* end confdefs.h. */
15664 call__builtin_bswap64(long int x)
15666 return __builtin_bswap64(x);
15669 main ()
15673 return 0;
15675 _ACEOF
15676 if ac_fn_c_try_link "$LINENO"; then :
15677 pgac_cv__builtin_bswap64=yes
15678 else
15679 pgac_cv__builtin_bswap64=no
15681 rm -f core conftest.err conftest.$ac_objext \
15682 conftest$ac_exeext conftest.$ac_ext
15684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15685 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15686 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15688 cat >>confdefs.h <<_ACEOF
15689 #define HAVE__BUILTIN_BSWAP64 1
15690 _ACEOF
15693 # We assume that we needn't test all widths of these explicitly:
15694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15695 $as_echo_n "checking for __builtin_clz... " >&6; }
15696 if ${pgac_cv__builtin_clz+:} false; then :
15697 $as_echo_n "(cached) " >&6
15698 else
15699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15700 /* end confdefs.h. */
15703 call__builtin_clz(unsigned int x)
15705 return __builtin_clz(x);
15708 main ()
15712 return 0;
15714 _ACEOF
15715 if ac_fn_c_try_link "$LINENO"; then :
15716 pgac_cv__builtin_clz=yes
15717 else
15718 pgac_cv__builtin_clz=no
15720 rm -f core conftest.err conftest.$ac_objext \
15721 conftest$ac_exeext conftest.$ac_ext
15723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15724 $as_echo "$pgac_cv__builtin_clz" >&6; }
15725 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15727 cat >>confdefs.h <<_ACEOF
15728 #define HAVE__BUILTIN_CLZ 1
15729 _ACEOF
15732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15733 $as_echo_n "checking for __builtin_ctz... " >&6; }
15734 if ${pgac_cv__builtin_ctz+:} false; then :
15735 $as_echo_n "(cached) " >&6
15736 else
15737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15738 /* end confdefs.h. */
15741 call__builtin_ctz(unsigned int x)
15743 return __builtin_ctz(x);
15746 main ()
15750 return 0;
15752 _ACEOF
15753 if ac_fn_c_try_link "$LINENO"; then :
15754 pgac_cv__builtin_ctz=yes
15755 else
15756 pgac_cv__builtin_ctz=no
15758 rm -f core conftest.err conftest.$ac_objext \
15759 conftest$ac_exeext conftest.$ac_ext
15761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15762 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15763 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15765 cat >>confdefs.h <<_ACEOF
15766 #define HAVE__BUILTIN_CTZ 1
15767 _ACEOF
15770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15771 $as_echo_n "checking for __builtin_popcount... " >&6; }
15772 if ${pgac_cv__builtin_popcount+:} false; then :
15773 $as_echo_n "(cached) " >&6
15774 else
15775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15776 /* end confdefs.h. */
15779 call__builtin_popcount(unsigned int x)
15781 return __builtin_popcount(x);
15784 main ()
15788 return 0;
15790 _ACEOF
15791 if ac_fn_c_try_link "$LINENO"; then :
15792 pgac_cv__builtin_popcount=yes
15793 else
15794 pgac_cv__builtin_popcount=no
15796 rm -f core conftest.err conftest.$ac_objext \
15797 conftest$ac_exeext conftest.$ac_ext
15799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15800 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15801 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15803 cat >>confdefs.h <<_ACEOF
15804 #define HAVE__BUILTIN_POPCOUNT 1
15805 _ACEOF
15808 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15809 # so it needs a different test function.
15810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15811 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15812 if ${pgac_cv__builtin_frame_address+:} false; then :
15813 $as_echo_n "(cached) " >&6
15814 else
15815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15816 /* end confdefs.h. */
15818 void *
15819 call__builtin_frame_address(void)
15821 return __builtin_frame_address(0);
15824 main ()
15828 return 0;
15830 _ACEOF
15831 if ac_fn_c_try_link "$LINENO"; then :
15832 pgac_cv__builtin_frame_address=yes
15833 else
15834 pgac_cv__builtin_frame_address=no
15836 rm -f core conftest.err conftest.$ac_objext \
15837 conftest$ac_exeext conftest.$ac_ext
15839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15840 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15841 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15843 cat >>confdefs.h <<_ACEOF
15844 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15845 _ACEOF
15849 # We require 64-bit fseeko() to be available, but run this check anyway
15850 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15852 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15853 if ${ac_cv_sys_largefile_source+:} false; then :
15854 $as_echo_n "(cached) " >&6
15855 else
15856 while :; do
15857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15858 /* end confdefs.h. */
15859 #include <sys/types.h> /* for off_t */
15860 #include <stdio.h>
15862 main ()
15864 int (*fp) (FILE *, off_t, int) = fseeko;
15865 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15867 return 0;
15869 _ACEOF
15870 if ac_fn_c_try_link "$LINENO"; then :
15871 ac_cv_sys_largefile_source=no; break
15873 rm -f core conftest.err conftest.$ac_objext \
15874 conftest$ac_exeext conftest.$ac_ext
15875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15876 /* end confdefs.h. */
15877 #define _LARGEFILE_SOURCE 1
15878 #include <sys/types.h> /* for off_t */
15879 #include <stdio.h>
15881 main ()
15883 int (*fp) (FILE *, off_t, int) = fseeko;
15884 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15886 return 0;
15888 _ACEOF
15889 if ac_fn_c_try_link "$LINENO"; then :
15890 ac_cv_sys_largefile_source=1; break
15892 rm -f core conftest.err conftest.$ac_objext \
15893 conftest$ac_exeext conftest.$ac_ext
15894 ac_cv_sys_largefile_source=unknown
15895 break
15896 done
15898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15899 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15900 case $ac_cv_sys_largefile_source in #(
15901 no | unknown) ;;
15903 cat >>confdefs.h <<_ACEOF
15904 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15905 _ACEOF
15907 esac
15908 rm -rf conftest*
15910 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15911 # in glibc 2.1.3, but that breaks too many other things.
15912 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15913 if test $ac_cv_sys_largefile_source != unknown; then
15915 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15920 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15921 # by calling it, 2009-04-02
15922 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15923 # The Clang compiler raises a warning for an undeclared identifier that matches
15924 # a compiler builtin function. All extant Clang versions are affected, as of
15925 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15926 # C and Objective C languages, but Clang does report an error under C++ and
15927 # Objective C++.
15929 # Passing -fno-builtin to the compiler would suppress this problem. That
15930 # strategy would have the advantage of being insensitive to stray warnings, but
15931 # it would make tests less realistic.
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15933 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15934 if ${ac_cv_c_decl_report+:} false; then :
15935 $as_echo_n "(cached) " >&6
15936 else
15937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15938 /* end confdefs.h. */
15941 main ()
15943 (void) strchr;
15945 return 0;
15947 _ACEOF
15948 if ac_fn_c_try_compile "$LINENO"; then :
15949 if test -s conftest.err; then :
15950 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15951 # valid AC_CHECK_DECL input. No library function is consistently available
15952 # on freestanding implementations, so test against a dummy declaration.
15953 # Include always-available headers on the off chance that they somehow
15954 # elicit warnings.
15955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15956 /* end confdefs.h. */
15957 #include <float.h>
15958 #include <limits.h>
15959 #include <stdarg.h>
15960 #include <stddef.h>
15961 extern void ac_decl (int, char *);
15963 main ()
15965 #ifdef __cplusplus
15966 (void) ac_decl ((int) 0, (char *) 0);
15967 (void) ac_decl;
15968 #else
15969 (void) ac_decl;
15970 #endif
15973 return 0;
15975 _ACEOF
15976 if ac_fn_c_try_compile "$LINENO"; then :
15977 if test -s conftest.err; then :
15978 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15979 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15980 as_fn_error $? "cannot detect from compiler exit status or warnings
15981 See \`config.log' for more details" "$LINENO" 5; }
15982 else
15983 ac_cv_c_decl_report=warning
15985 else
15986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15987 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15988 as_fn_error $? "cannot compile a simple declaration test
15989 See \`config.log' for more details" "$LINENO" 5; }
15991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15992 else
15993 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15994 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15995 as_fn_error $? "compiler does not report undeclared identifiers
15996 See \`config.log' for more details" "$LINENO" 5; }
15998 else
15999 ac_cv_c_decl_report=error
16001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16004 $as_echo "$ac_cv_c_decl_report" >&6; }
16006 case $ac_cv_c_decl_report in
16007 warning) ac_c_decl_warn_flag=yes ;;
16008 *) ac_c_decl_warn_flag= ;;
16009 esac
16011 if test "$PORTNAME" != "solaris"; then :
16013 for ac_func in posix_fadvise
16014 do :
16015 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16016 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16017 cat >>confdefs.h <<_ACEOF
16018 #define HAVE_POSIX_FADVISE 1
16019 _ACEOF
16022 done
16024 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16026 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16027 ac_have_decl=1
16028 else
16029 ac_have_decl=0
16032 cat >>confdefs.h <<_ACEOF
16033 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16034 _ACEOF
16037 fi # fi
16039 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16041 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16042 ac_have_decl=1
16043 else
16044 ac_have_decl=0
16047 cat >>confdefs.h <<_ACEOF
16048 #define HAVE_DECL_FDATASYNC $ac_have_decl
16049 _ACEOF
16051 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16052 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16053 ac_have_decl=1
16054 else
16055 ac_have_decl=0
16058 cat >>confdefs.h <<_ACEOF
16059 #define HAVE_DECL_STRLCAT $ac_have_decl
16060 _ACEOF
16061 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16062 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16063 ac_have_decl=1
16064 else
16065 ac_have_decl=0
16068 cat >>confdefs.h <<_ACEOF
16069 #define HAVE_DECL_STRLCPY $ac_have_decl
16070 _ACEOF
16071 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16072 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16073 ac_have_decl=1
16074 else
16075 ac_have_decl=0
16078 cat >>confdefs.h <<_ACEOF
16079 #define HAVE_DECL_STRNLEN $ac_have_decl
16080 _ACEOF
16083 # We can't use AC_REPLACE_FUNCS to replace these functions, because it
16084 # won't handle deployment target restrictions on macOS
16085 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16087 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16088 ac_have_decl=1
16089 else
16090 ac_have_decl=0
16093 cat >>confdefs.h <<_ACEOF
16094 #define HAVE_DECL_PREADV $ac_have_decl
16095 _ACEOF
16096 if test $ac_have_decl = 1; then :
16098 else
16099 case " $LIBOBJS " in
16100 *" preadv.$ac_objext "* ) ;;
16101 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16103 esac
16107 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16109 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16110 ac_have_decl=1
16111 else
16112 ac_have_decl=0
16115 cat >>confdefs.h <<_ACEOF
16116 #define HAVE_DECL_PWRITEV $ac_have_decl
16117 _ACEOF
16118 if test $ac_have_decl = 1; then :
16120 else
16121 case " $LIBOBJS " in
16122 *" pwritev.$ac_objext "* ) ;;
16123 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16125 esac
16130 # This is probably only present on macOS, but may as well check always
16131 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16133 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16134 ac_have_decl=1
16135 else
16136 ac_have_decl=0
16139 cat >>confdefs.h <<_ACEOF
16140 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16141 _ACEOF
16144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
16145 $as_echo_n "checking for PS_STRINGS... " >&6; }
16146 if ${pgac_cv_var_PS_STRINGS+:} false; then :
16147 $as_echo_n "(cached) " >&6
16148 else
16149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16150 /* end confdefs.h. */
16151 #include <machine/vmparam.h>
16152 #include <sys/exec.h>
16155 main ()
16157 PS_STRINGS->ps_nargvstr = 1;
16158 PS_STRINGS->ps_argvstr = "foo";
16160 return 0;
16162 _ACEOF
16163 if ac_fn_c_try_link "$LINENO"; then :
16164 pgac_cv_var_PS_STRINGS=yes
16165 else
16166 pgac_cv_var_PS_STRINGS=no
16168 rm -f core conftest.err conftest.$ac_objext \
16169 conftest$ac_exeext conftest.$ac_ext
16171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16172 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16173 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16175 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16179 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16180 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16181 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16183 else
16184 case " $LIBOBJS " in
16185 *" explicit_bzero.$ac_objext "* ) ;;
16186 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16188 esac
16192 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16193 if test "x$ac_cv_func_getopt" = xyes; then :
16194 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16196 else
16197 case " $LIBOBJS " in
16198 *" getopt.$ac_objext "* ) ;;
16199 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16201 esac
16205 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16206 if test "x$ac_cv_func_getpeereid" = xyes; then :
16207 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16209 else
16210 case " $LIBOBJS " in
16211 *" getpeereid.$ac_objext "* ) ;;
16212 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16214 esac
16218 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16219 if test "x$ac_cv_func_inet_aton" = xyes; then :
16220 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16222 else
16223 case " $LIBOBJS " in
16224 *" inet_aton.$ac_objext "* ) ;;
16225 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16227 esac
16231 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16232 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16233 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16235 else
16236 case " $LIBOBJS " in
16237 *" mkdtemp.$ac_objext "* ) ;;
16238 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16240 esac
16244 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16245 if test "x$ac_cv_func_strlcat" = xyes; then :
16246 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16248 else
16249 case " $LIBOBJS " in
16250 *" strlcat.$ac_objext "* ) ;;
16251 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16253 esac
16257 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16258 if test "x$ac_cv_func_strlcpy" = xyes; then :
16259 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16261 else
16262 case " $LIBOBJS " in
16263 *" strlcpy.$ac_objext "* ) ;;
16264 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16266 esac
16270 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16271 if test "x$ac_cv_func_strnlen" = xyes; then :
16272 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16274 else
16275 case " $LIBOBJS " in
16276 *" strnlen.$ac_objext "* ) ;;
16277 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16279 esac
16285 if test "$enable_thread_safety" = yes; then
16286 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16287 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16288 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16290 else
16291 case " $LIBOBJS " in
16292 *" pthread_barrier_wait.$ac_objext "* ) ;;
16293 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16295 esac
16302 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16303 # Cygwin and (apparently, based on test results) Mingw both
16304 # have a broken strtof(), so substitute its implementation.
16305 # That's not a perfect fix, since it doesn't avoid double-rounding,
16306 # but we have no better options.
16307 case " $LIBOBJS " in
16308 *" strtof.$ac_objext "* ) ;;
16309 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16311 esac
16313 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16314 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16317 # Similarly, use system's getopt_long() only if system provides struct option.
16318 if test x"$ac_cv_type_struct_option" = xyes ; then
16319 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16320 if test "x$ac_cv_func_getopt_long" = xyes; then :
16321 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16323 else
16324 case " $LIBOBJS " in
16325 *" getopt_long.$ac_objext "* ) ;;
16326 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16328 esac
16333 else
16334 case " $LIBOBJS " in
16335 *" getopt_long.$ac_objext "* ) ;;
16336 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16338 esac
16342 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16343 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16344 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16345 case " $LIBOBJS " in
16346 *" getopt.$ac_objext "* ) ;;
16347 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16349 esac
16353 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16354 # so always use our version on Windows.
16355 if test "$PORTNAME" = "win32"; then
16356 case " $LIBOBJS " in
16357 *" getopt.$ac_objext "* ) ;;
16358 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16360 esac
16362 case " $LIBOBJS " in
16363 *" getopt_long.$ac_objext "* ) ;;
16364 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16366 esac
16370 # Win32 (really MinGW) support
16371 if test "$PORTNAME" = "win32"; then
16372 for ac_func in _configthreadlocale
16373 do :
16374 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16375 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16376 cat >>confdefs.h <<_ACEOF
16377 #define HAVE__CONFIGTHREADLOCALE 1
16378 _ACEOF
16381 done
16383 case " $LIBOBJS " in
16384 *" dirmod.$ac_objext "* ) ;;
16385 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16387 esac
16389 case " $LIBOBJS " in
16390 *" kill.$ac_objext "* ) ;;
16391 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16393 esac
16395 case " $LIBOBJS " in
16396 *" open.$ac_objext "* ) ;;
16397 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16399 esac
16401 case " $LIBOBJS " in
16402 *" system.$ac_objext "* ) ;;
16403 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16405 esac
16407 case " $LIBOBJS " in
16408 *" win32dlopen.$ac_objext "* ) ;;
16409 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16411 esac
16413 case " $LIBOBJS " in
16414 *" win32env.$ac_objext "* ) ;;
16415 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16417 esac
16419 case " $LIBOBJS " in
16420 *" win32error.$ac_objext "* ) ;;
16421 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16423 esac
16425 case " $LIBOBJS " in
16426 *" win32fdatasync.$ac_objext "* ) ;;
16427 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16429 esac
16431 case " $LIBOBJS " in
16432 *" win32getrusage.$ac_objext "* ) ;;
16433 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16435 esac
16437 case " $LIBOBJS " in
16438 *" win32link.$ac_objext "* ) ;;
16439 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16441 esac
16443 case " $LIBOBJS " in
16444 *" win32ntdll.$ac_objext "* ) ;;
16445 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16447 esac
16449 case " $LIBOBJS " in
16450 *" win32pread.$ac_objext "* ) ;;
16451 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16453 esac
16455 case " $LIBOBJS " in
16456 *" win32pwrite.$ac_objext "* ) ;;
16457 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16459 esac
16461 case " $LIBOBJS " in
16462 *" win32security.$ac_objext "* ) ;;
16463 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16465 esac
16467 case " $LIBOBJS " in
16468 *" win32setlocale.$ac_objext "* ) ;;
16469 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16471 esac
16473 case " $LIBOBJS " in
16474 *" win32stat.$ac_objext "* ) ;;
16475 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16477 esac
16480 # Cygwin needs only a bit of that
16481 if test "$PORTNAME" = "cygwin"; then
16482 case " $LIBOBJS " in
16483 *" dirmod.$ac_objext "* ) ;;
16484 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16486 esac
16490 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16491 if test "x$ac_cv_func_syslog" = xyes; then :
16492 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16493 if test "x$ac_cv_header_syslog_h" = xyes; then :
16495 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16504 $as_echo_n "checking for opterr... " >&6; }
16505 if ${pgac_cv_var_int_opterr+:} false; then :
16506 $as_echo_n "(cached) " >&6
16507 else
16508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16509 /* end confdefs.h. */
16510 #include <unistd.h>
16512 main ()
16514 extern int opterr; opterr = 1;
16516 return 0;
16518 _ACEOF
16519 if ac_fn_c_try_link "$LINENO"; then :
16520 pgac_cv_var_int_opterr=yes
16521 else
16522 pgac_cv_var_int_opterr=no
16524 rm -f core conftest.err conftest.$ac_objext \
16525 conftest$ac_exeext conftest.$ac_ext
16527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16528 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16529 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16531 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16536 $as_echo_n "checking for optreset... " >&6; }
16537 if ${pgac_cv_var_int_optreset+:} false; then :
16538 $as_echo_n "(cached) " >&6
16539 else
16540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16541 /* end confdefs.h. */
16542 #include <unistd.h>
16544 main ()
16546 extern int optreset; optreset = 1;
16548 return 0;
16550 _ACEOF
16551 if ac_fn_c_try_link "$LINENO"; then :
16552 pgac_cv_var_int_optreset=yes
16553 else
16554 pgac_cv_var_int_optreset=no
16556 rm -f core conftest.err conftest.$ac_objext \
16557 conftest$ac_exeext conftest.$ac_ext
16559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16560 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16561 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16563 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16567 if test "$with_icu" = yes; then
16568 ac_save_CPPFLAGS=$CPPFLAGS
16569 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16571 # Verify we have ICU's header files
16572 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16573 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16575 else
16576 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16581 CPPFLAGS=$ac_save_CPPFLAGS
16584 if test "$with_llvm" = yes; then
16586 # Check which functionality is present
16587 SAVE_CPPFLAGS="$CPPFLAGS"
16588 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16589 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16591 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16592 ac_have_decl=1
16593 else
16594 ac_have_decl=0
16597 cat >>confdefs.h <<_ACEOF
16598 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16599 _ACEOF
16601 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16603 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16604 ac_have_decl=1
16605 else
16606 ac_have_decl=0
16609 cat >>confdefs.h <<_ACEOF
16610 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16611 _ACEOF
16612 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16614 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16615 ac_have_decl=1
16616 else
16617 ac_have_decl=0
16620 cat >>confdefs.h <<_ACEOF
16621 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16622 _ACEOF
16624 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16626 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16627 ac_have_decl=1
16628 else
16629 ac_have_decl=0
16632 cat >>confdefs.h <<_ACEOF
16633 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16634 _ACEOF
16635 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16637 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16638 ac_have_decl=1
16639 else
16640 ac_have_decl=0
16643 cat >>confdefs.h <<_ACEOF
16644 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16645 _ACEOF
16647 CPPFLAGS="$SAVE_CPPFLAGS"
16651 # Lastly, restore full LIBS list and check for readline/libedit symbols
16652 LIBS="$LIBS_including_readline"
16654 if test "$with_readline" = yes; then
16655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16656 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16657 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16658 $as_echo_n "(cached) " >&6
16659 else
16660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16661 /* end confdefs.h. */
16662 #include <stdio.h>
16663 #if defined(HAVE_READLINE_READLINE_H)
16664 #include <readline/readline.h>
16665 #elif defined(HAVE_EDITLINE_READLINE_H)
16666 #include <editline/readline.h>
16667 #elif defined(HAVE_READLINE_H)
16668 #include <readline.h>
16669 #endif
16672 main ()
16674 rl_completion_suppress_quote = 1;
16676 return 0;
16678 _ACEOF
16679 if ac_fn_c_try_link "$LINENO"; then :
16680 pgac_cv_var_rl_completion_suppress_quote=yes
16681 else
16682 pgac_cv_var_rl_completion_suppress_quote=no
16684 rm -f core conftest.err conftest.$ac_objext \
16685 conftest$ac_exeext conftest.$ac_ext
16687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16688 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16689 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16691 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16695 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16696 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16697 $as_echo_n "(cached) " >&6
16698 else
16699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16700 /* end confdefs.h. */
16701 #include <stdio.h>
16702 #if defined(HAVE_READLINE_READLINE_H)
16703 #include <readline/readline.h>
16704 #elif defined(HAVE_EDITLINE_READLINE_H)
16705 #include <editline/readline.h>
16706 #elif defined(HAVE_READLINE_H)
16707 #include <readline.h>
16708 #endif
16711 main ()
16713 rl_filename_quote_characters = "x";
16715 return 0;
16717 _ACEOF
16718 if ac_fn_c_try_link "$LINENO"; then :
16719 pgac_cv_var_rl_filename_quote_characters=yes
16720 else
16721 pgac_cv_var_rl_filename_quote_characters=no
16723 rm -f core conftest.err conftest.$ac_objext \
16724 conftest$ac_exeext conftest.$ac_ext
16726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16727 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16728 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16730 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16734 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16735 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16736 $as_echo_n "(cached) " >&6
16737 else
16738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16739 /* end confdefs.h. */
16740 #include <stdio.h>
16741 #if defined(HAVE_READLINE_READLINE_H)
16742 #include <readline/readline.h>
16743 #elif defined(HAVE_EDITLINE_READLINE_H)
16744 #include <editline/readline.h>
16745 #elif defined(HAVE_READLINE_H)
16746 #include <readline.h>
16747 #endif
16750 main ()
16752 rl_filename_quoting_function = 0;
16754 return 0;
16756 _ACEOF
16757 if ac_fn_c_try_link "$LINENO"; then :
16758 pgac_cv_var_rl_filename_quoting_function=yes
16759 else
16760 pgac_cv_var_rl_filename_quoting_function=no
16762 rm -f core conftest.err conftest.$ac_objext \
16763 conftest$ac_exeext conftest.$ac_ext
16765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16766 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16767 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16769 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16773 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16774 do :
16775 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16776 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16777 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16778 cat >>confdefs.h <<_ACEOF
16779 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16780 _ACEOF
16783 done
16788 # This test makes sure that run tests work at all. Sometimes a shared
16789 # library is found by the linker, but the runtime linker can't find it.
16790 # This check should come after all modifications of compiler or linker
16791 # variables, and before any other run tests.
16792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16793 $as_echo_n "checking test program... " >&6; }
16794 if test "$cross_compiling" = yes; then :
16795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16796 $as_echo "cross-compiling" >&6; }
16797 else
16798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16799 /* end confdefs.h. */
16800 int main() { return 0; }
16801 _ACEOF
16802 if ac_fn_c_try_run "$LINENO"; then :
16803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16804 $as_echo "ok" >&6; }
16805 else
16806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16807 $as_echo "failed" >&6; }
16808 as_fn_error $? "
16809 Could not execute a simple test program. This may be a problem
16810 related to locating shared libraries. Check the file 'config.log'
16811 for the exact reason." "$LINENO" 5
16813 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16814 conftest.$ac_objext conftest.beam conftest.$ac_ext
16818 # --------------------
16819 # Run tests below here
16820 # --------------------
16823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16824 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16825 if ${pgac_cv_type_long_int_64+:} false; then :
16826 $as_echo_n "(cached) " >&6
16827 else
16828 if test "$cross_compiling" = yes; then :
16829 # If cross-compiling, check the size reported by the compiler and
16830 # trust that the arithmetic works.
16831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16832 /* end confdefs.h. */
16835 main ()
16837 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16838 test_array [0] = 0;
16839 return test_array [0];
16842 return 0;
16844 _ACEOF
16845 if ac_fn_c_try_compile "$LINENO"; then :
16846 pgac_cv_type_long_int_64=yes
16847 else
16848 pgac_cv_type_long_int_64=no
16850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16851 else
16852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16853 /* end confdefs.h. */
16854 typedef long int ac_int64;
16857 * These are globals to discourage the compiler from folding all the
16858 * arithmetic tests down to compile-time constants.
16860 ac_int64 a = 20000001;
16861 ac_int64 b = 40000005;
16863 int does_int64_work()
16865 ac_int64 c,d;
16867 if (sizeof(ac_int64) != 8)
16868 return 0; /* definitely not the right size */
16870 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16871 c = a * b;
16872 d = (c + b) / b;
16873 if (d != a+1)
16874 return 0;
16875 return 1;
16879 main() {
16880 return (! does_int64_work());
16882 _ACEOF
16883 if ac_fn_c_try_run "$LINENO"; then :
16884 pgac_cv_type_long_int_64=yes
16885 else
16886 pgac_cv_type_long_int_64=no
16888 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16889 conftest.$ac_objext conftest.beam conftest.$ac_ext
16893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16894 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16896 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16897 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16899 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16904 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16905 pg_int64_type="long int"
16906 else
16907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16908 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16909 if ${pgac_cv_type_long_long_int_64+:} false; then :
16910 $as_echo_n "(cached) " >&6
16911 else
16912 if test "$cross_compiling" = yes; then :
16913 # If cross-compiling, check the size reported by the compiler and
16914 # trust that the arithmetic works.
16915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16916 /* end confdefs.h. */
16919 main ()
16921 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16922 test_array [0] = 0;
16923 return test_array [0];
16926 return 0;
16928 _ACEOF
16929 if ac_fn_c_try_compile "$LINENO"; then :
16930 pgac_cv_type_long_long_int_64=yes
16931 else
16932 pgac_cv_type_long_long_int_64=no
16934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16935 else
16936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16937 /* end confdefs.h. */
16938 typedef long long int ac_int64;
16941 * These are globals to discourage the compiler from folding all the
16942 * arithmetic tests down to compile-time constants.
16944 ac_int64 a = 20000001;
16945 ac_int64 b = 40000005;
16947 int does_int64_work()
16949 ac_int64 c,d;
16951 if (sizeof(ac_int64) != 8)
16952 return 0; /* definitely not the right size */
16954 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16955 c = a * b;
16956 d = (c + b) / b;
16957 if (d != a+1)
16958 return 0;
16959 return 1;
16963 main() {
16964 return (! does_int64_work());
16966 _ACEOF
16967 if ac_fn_c_try_run "$LINENO"; then :
16968 pgac_cv_type_long_long_int_64=yes
16969 else
16970 pgac_cv_type_long_long_int_64=no
16972 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16973 conftest.$ac_objext conftest.beam conftest.$ac_ext
16977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16978 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16980 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16981 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16983 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16987 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16988 pg_int64_type="long long int"
16989 else
16990 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16995 cat >>confdefs.h <<_ACEOF
16996 #define PG_INT64_TYPE $pg_int64_type
16997 _ACEOF
17000 # Select the printf length modifier that goes with that, too.
17001 if test x"$pg_int64_type" = x"long long int" ; then
17002 INT64_MODIFIER='"ll"'
17003 else
17004 INT64_MODIFIER='"l"'
17008 cat >>confdefs.h <<_ACEOF
17009 #define INT64_MODIFIER $INT64_MODIFIER
17010 _ACEOF
17013 # has to be down here, rather than with the other builtins, because
17014 # the test uses PG_INT64_TYPE.
17015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17016 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17017 if ${pgac_cv__builtin_op_overflow+:} false; then :
17018 $as_echo_n "(cached) " >&6
17019 else
17020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17021 /* end confdefs.h. */
17023 PG_INT64_TYPE a = 1;
17024 PG_INT64_TYPE b = 1;
17025 PG_INT64_TYPE result;
17026 int oflo;
17029 main ()
17031 oflo = __builtin_mul_overflow(a, b, &result);
17033 return 0;
17035 _ACEOF
17036 if ac_fn_c_try_link "$LINENO"; then :
17037 pgac_cv__builtin_op_overflow=yes
17038 else
17039 pgac_cv__builtin_op_overflow=no
17041 rm -f core conftest.err conftest.$ac_objext \
17042 conftest$ac_exeext conftest.$ac_ext
17044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17045 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17046 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17048 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17052 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17053 # The cast to long int works around a bug in the HP C Compiler
17054 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17055 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17056 # This bug is HP SR number 8606223364.
17057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17058 $as_echo_n "checking size of void *... " >&6; }
17059 if ${ac_cv_sizeof_void_p+:} false; then :
17060 $as_echo_n "(cached) " >&6
17061 else
17062 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17064 else
17065 if test "$ac_cv_type_void_p" = yes; then
17066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17067 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17068 as_fn_error 77 "cannot compute sizeof (void *)
17069 See \`config.log' for more details" "$LINENO" 5; }
17070 else
17071 ac_cv_sizeof_void_p=0
17076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17077 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17081 cat >>confdefs.h <<_ACEOF
17082 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17083 _ACEOF
17086 # The cast to long int works around a bug in the HP C Compiler
17087 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17088 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17089 # This bug is HP SR number 8606223364.
17090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17091 $as_echo_n "checking size of size_t... " >&6; }
17092 if ${ac_cv_sizeof_size_t+:} false; then :
17093 $as_echo_n "(cached) " >&6
17094 else
17095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17097 else
17098 if test "$ac_cv_type_size_t" = yes; then
17099 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17100 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17101 as_fn_error 77 "cannot compute sizeof (size_t)
17102 See \`config.log' for more details" "$LINENO" 5; }
17103 else
17104 ac_cv_sizeof_size_t=0
17109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17110 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17114 cat >>confdefs.h <<_ACEOF
17115 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17116 _ACEOF
17119 # The cast to long int works around a bug in the HP C Compiler
17120 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17121 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17122 # This bug is HP SR number 8606223364.
17123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17124 $as_echo_n "checking size of long... " >&6; }
17125 if ${ac_cv_sizeof_long+:} false; then :
17126 $as_echo_n "(cached) " >&6
17127 else
17128 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17130 else
17131 if test "$ac_cv_type_long" = yes; then
17132 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17133 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17134 as_fn_error 77 "cannot compute sizeof (long)
17135 See \`config.log' for more details" "$LINENO" 5; }
17136 else
17137 ac_cv_sizeof_long=0
17142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17143 $as_echo "$ac_cv_sizeof_long" >&6; }
17147 cat >>confdefs.h <<_ACEOF
17148 #define SIZEOF_LONG $ac_cv_sizeof_long
17149 _ACEOF
17153 # Determine memory alignment requirements for the basic C data types.
17155 # The cast to long int works around a bug in the HP C Compiler,
17156 # see AC_CHECK_SIZEOF for more information.
17157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17158 $as_echo_n "checking alignment of short... " >&6; }
17159 if ${ac_cv_alignof_short+:} false; then :
17160 $as_echo_n "(cached) " >&6
17161 else
17162 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17163 #ifndef offsetof
17164 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17165 #endif
17166 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17168 else
17169 if test "$ac_cv_type_short" = yes; then
17170 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17171 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17172 as_fn_error 77 "cannot compute alignment of short
17173 See \`config.log' for more details" "$LINENO" 5; }
17174 else
17175 ac_cv_alignof_short=0
17180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17181 $as_echo "$ac_cv_alignof_short" >&6; }
17185 cat >>confdefs.h <<_ACEOF
17186 #define ALIGNOF_SHORT $ac_cv_alignof_short
17187 _ACEOF
17190 # The cast to long int works around a bug in the HP C Compiler,
17191 # see AC_CHECK_SIZEOF for more information.
17192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17193 $as_echo_n "checking alignment of int... " >&6; }
17194 if ${ac_cv_alignof_int+:} false; then :
17195 $as_echo_n "(cached) " >&6
17196 else
17197 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17198 #ifndef offsetof
17199 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17200 #endif
17201 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17203 else
17204 if test "$ac_cv_type_int" = yes; then
17205 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17206 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17207 as_fn_error 77 "cannot compute alignment of int
17208 See \`config.log' for more details" "$LINENO" 5; }
17209 else
17210 ac_cv_alignof_int=0
17215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17216 $as_echo "$ac_cv_alignof_int" >&6; }
17220 cat >>confdefs.h <<_ACEOF
17221 #define ALIGNOF_INT $ac_cv_alignof_int
17222 _ACEOF
17225 # The cast to long int works around a bug in the HP C Compiler,
17226 # see AC_CHECK_SIZEOF for more information.
17227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17228 $as_echo_n "checking alignment of long... " >&6; }
17229 if ${ac_cv_alignof_long+:} false; then :
17230 $as_echo_n "(cached) " >&6
17231 else
17232 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17233 #ifndef offsetof
17234 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17235 #endif
17236 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17238 else
17239 if test "$ac_cv_type_long" = yes; then
17240 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17241 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17242 as_fn_error 77 "cannot compute alignment of long
17243 See \`config.log' for more details" "$LINENO" 5; }
17244 else
17245 ac_cv_alignof_long=0
17250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17251 $as_echo "$ac_cv_alignof_long" >&6; }
17255 cat >>confdefs.h <<_ACEOF
17256 #define ALIGNOF_LONG $ac_cv_alignof_long
17257 _ACEOF
17260 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17261 # The cast to long int works around a bug in the HP C Compiler,
17262 # see AC_CHECK_SIZEOF for more information.
17263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17264 $as_echo_n "checking alignment of long long int... " >&6; }
17265 if ${ac_cv_alignof_long_long_int+:} false; then :
17266 $as_echo_n "(cached) " >&6
17267 else
17268 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17269 #ifndef offsetof
17270 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17271 #endif
17272 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17274 else
17275 if test "$ac_cv_type_long_long_int" = yes; then
17276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17277 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17278 as_fn_error 77 "cannot compute alignment of long long int
17279 See \`config.log' for more details" "$LINENO" 5; }
17280 else
17281 ac_cv_alignof_long_long_int=0
17286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17287 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17291 cat >>confdefs.h <<_ACEOF
17292 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17293 _ACEOF
17297 # The cast to long int works around a bug in the HP C Compiler,
17298 # see AC_CHECK_SIZEOF for more information.
17299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17300 $as_echo_n "checking alignment of double... " >&6; }
17301 if ${ac_cv_alignof_double+:} false; then :
17302 $as_echo_n "(cached) " >&6
17303 else
17304 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17305 #ifndef offsetof
17306 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17307 #endif
17308 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17310 else
17311 if test "$ac_cv_type_double" = yes; then
17312 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17313 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17314 as_fn_error 77 "cannot compute alignment of double
17315 See \`config.log' for more details" "$LINENO" 5; }
17316 else
17317 ac_cv_alignof_double=0
17322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17323 $as_echo "$ac_cv_alignof_double" >&6; }
17327 cat >>confdefs.h <<_ACEOF
17328 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17329 _ACEOF
17333 # Compute maximum alignment of any basic type.
17334 # We assume long's alignment is at least as strong as char, short, or int;
17335 # but we must check long long (if it is being used for int64) and double.
17336 # Note that we intentionally do not consider any types wider than 64 bits,
17337 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17338 # for disk and memory space.
17340 MAX_ALIGNOF=$ac_cv_alignof_long
17341 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17342 MAX_ALIGNOF=$ac_cv_alignof_double
17344 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17345 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17348 cat >>confdefs.h <<_ACEOF
17349 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17350 _ACEOF
17354 # Some platforms predefine the types int8, int16, etc. Only check
17355 # a (hopefully) representative subset.
17356 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17358 if test "x$ac_cv_type_int8" = xyes; then :
17360 cat >>confdefs.h <<_ACEOF
17361 #define HAVE_INT8 1
17362 _ACEOF
17366 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17368 if test "x$ac_cv_type_uint8" = xyes; then :
17370 cat >>confdefs.h <<_ACEOF
17371 #define HAVE_UINT8 1
17372 _ACEOF
17376 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17378 if test "x$ac_cv_type_int64" = xyes; then :
17380 cat >>confdefs.h <<_ACEOF
17381 #define HAVE_INT64 1
17382 _ACEOF
17386 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17388 if test "x$ac_cv_type_uint64" = xyes; then :
17390 cat >>confdefs.h <<_ACEOF
17391 #define HAVE_UINT64 1
17392 _ACEOF
17398 # Some compilers offer a 128-bit integer scalar type.
17399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17400 $as_echo_n "checking for __int128... " >&6; }
17401 if ${pgac_cv__128bit_int+:} false; then :
17402 $as_echo_n "(cached) " >&6
17403 else
17404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17405 /* end confdefs.h. */
17408 * We don't actually run this test, just link it to verify that any support
17409 * functions needed for __int128 are present.
17411 * These are globals to discourage the compiler from folding all the
17412 * arithmetic tests down to compile-time constants. We do not have
17413 * convenient support for 128bit literals at this point...
17415 __int128 a = 48828125;
17416 __int128 b = 97656250;
17419 main ()
17422 __int128 c,d;
17423 a = (a << 12) + 1; /* 200000000001 */
17424 b = (b << 12) + 5; /* 400000000005 */
17425 /* try the most relevant arithmetic ops */
17426 c = a * b;
17427 d = (c + b) / b;
17428 /* must use the results, else compiler may optimize arithmetic away */
17429 if (d != a+1)
17430 return 1;
17433 return 0;
17435 _ACEOF
17436 if ac_fn_c_try_link "$LINENO"; then :
17437 pgac_cv__128bit_int=yes
17438 else
17439 pgac_cv__128bit_int=no
17441 rm -f core conftest.err conftest.$ac_objext \
17442 conftest$ac_exeext conftest.$ac_ext
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17445 $as_echo "$pgac_cv__128bit_int" >&6; }
17446 if test x"$pgac_cv__128bit_int" = xyes ; then
17447 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17448 # If not cross-compiling, we can test for bugs and disable use of __int128
17449 # with buggy compilers. If cross-compiling, hope for the best.
17450 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17452 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17453 if ${pgac_cv__128bit_int_bug+:} false; then :
17454 $as_echo_n "(cached) " >&6
17455 else
17456 if test "$cross_compiling" = yes; then :
17457 pgac_cv__128bit_int_bug="assuming ok"
17458 else
17459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17460 /* end confdefs.h. */
17462 /* This must match the corresponding code in c.h: */
17463 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17464 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17465 #elif defined(_MSC_VER)
17466 #define pg_attribute_aligned(a) __declspec(align(a))
17467 #endif
17468 typedef __int128 int128a
17469 #if defined(pg_attribute_aligned)
17470 pg_attribute_aligned(8)
17471 #endif
17473 int128a holder;
17474 void pass_by_val(void *buffer, int128a par) { holder = par; }
17477 main ()
17480 long int i64 = 97656225L << 12;
17481 int128a q;
17482 pass_by_val(main, (int128a) i64);
17483 q = (int128a) i64;
17484 if (q != holder)
17485 return 1;
17488 return 0;
17490 _ACEOF
17491 if ac_fn_c_try_run "$LINENO"; then :
17492 pgac_cv__128bit_int_bug=ok
17493 else
17494 pgac_cv__128bit_int_bug=broken
17496 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17497 conftest.$ac_objext conftest.beam conftest.$ac_ext
17501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17502 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17503 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17505 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17507 # The cast to long int works around a bug in the HP C Compiler,
17508 # see AC_CHECK_SIZEOF for more information.
17509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17510 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17511 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17512 $as_echo_n "(cached) " >&6
17513 else
17514 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17515 #ifndef offsetof
17516 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17517 #endif
17518 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17520 else
17521 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17523 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17524 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17525 See \`config.log' for more details" "$LINENO" 5; }
17526 else
17527 ac_cv_alignof_PG_INT128_TYPE=0
17532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17533 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17537 cat >>confdefs.h <<_ACEOF
17538 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17539 _ACEOF
17545 # Check for various atomic operations now that we have checked how to declare
17546 # 64bit integers.
17547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17548 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17549 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17550 $as_echo_n "(cached) " >&6
17551 else
17552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17553 /* end confdefs.h. */
17556 main ()
17558 char lock = 0;
17559 __sync_lock_test_and_set(&lock, 1);
17560 __sync_lock_release(&lock);
17562 return 0;
17564 _ACEOF
17565 if ac_fn_c_try_link "$LINENO"; then :
17566 pgac_cv_gcc_sync_char_tas="yes"
17567 else
17568 pgac_cv_gcc_sync_char_tas="no"
17570 rm -f core conftest.err conftest.$ac_objext \
17571 conftest$ac_exeext conftest.$ac_ext
17573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17574 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17575 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17577 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17581 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17582 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17583 $as_echo_n "(cached) " >&6
17584 else
17585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17586 /* end confdefs.h. */
17589 main ()
17591 int lock = 0;
17592 __sync_lock_test_and_set(&lock, 1);
17593 __sync_lock_release(&lock);
17595 return 0;
17597 _ACEOF
17598 if ac_fn_c_try_link "$LINENO"; then :
17599 pgac_cv_gcc_sync_int32_tas="yes"
17600 else
17601 pgac_cv_gcc_sync_int32_tas="no"
17603 rm -f core conftest.err conftest.$ac_objext \
17604 conftest$ac_exeext conftest.$ac_ext
17606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17607 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17608 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17610 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17614 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17615 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17616 $as_echo_n "(cached) " >&6
17617 else
17618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17619 /* end confdefs.h. */
17622 main ()
17624 int val = 0;
17625 __sync_val_compare_and_swap(&val, 0, 37);
17627 return 0;
17629 _ACEOF
17630 if ac_fn_c_try_link "$LINENO"; then :
17631 pgac_cv_gcc_sync_int32_cas="yes"
17632 else
17633 pgac_cv_gcc_sync_int32_cas="no"
17635 rm -f core conftest.err conftest.$ac_objext \
17636 conftest$ac_exeext conftest.$ac_ext
17638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17639 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17640 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17642 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17646 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17647 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17648 $as_echo_n "(cached) " >&6
17649 else
17650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17651 /* end confdefs.h. */
17654 main ()
17656 PG_INT64_TYPE lock = 0;
17657 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17659 return 0;
17661 _ACEOF
17662 if ac_fn_c_try_link "$LINENO"; then :
17663 pgac_cv_gcc_sync_int64_cas="yes"
17664 else
17665 pgac_cv_gcc_sync_int64_cas="no"
17667 rm -f core conftest.err conftest.$ac_objext \
17668 conftest$ac_exeext conftest.$ac_ext
17670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17671 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17672 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17674 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17678 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17679 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17680 $as_echo_n "(cached) " >&6
17681 else
17682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17683 /* end confdefs.h. */
17686 main ()
17688 int val = 0;
17689 int expect = 0;
17690 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17692 return 0;
17694 _ACEOF
17695 if ac_fn_c_try_link "$LINENO"; then :
17696 pgac_cv_gcc_atomic_int32_cas="yes"
17697 else
17698 pgac_cv_gcc_atomic_int32_cas="no"
17700 rm -f core conftest.err conftest.$ac_objext \
17701 conftest$ac_exeext conftest.$ac_ext
17703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17704 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17705 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17707 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17711 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17712 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17713 $as_echo_n "(cached) " >&6
17714 else
17715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17716 /* end confdefs.h. */
17719 main ()
17721 PG_INT64_TYPE val = 0;
17722 PG_INT64_TYPE expect = 0;
17723 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17725 return 0;
17727 _ACEOF
17728 if ac_fn_c_try_link "$LINENO"; then :
17729 pgac_cv_gcc_atomic_int64_cas="yes"
17730 else
17731 pgac_cv_gcc_atomic_int64_cas="no"
17733 rm -f core conftest.err conftest.$ac_objext \
17734 conftest$ac_exeext conftest.$ac_ext
17736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17737 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17738 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17740 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17745 # Check for x86 cpuid instruction
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17747 $as_echo_n "checking for __get_cpuid... " >&6; }
17748 if ${pgac_cv__get_cpuid+:} false; then :
17749 $as_echo_n "(cached) " >&6
17750 else
17751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17752 /* end confdefs.h. */
17753 #include <cpuid.h>
17755 main ()
17757 unsigned int exx[4] = {0, 0, 0, 0};
17758 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17761 return 0;
17763 _ACEOF
17764 if ac_fn_c_try_link "$LINENO"; then :
17765 pgac_cv__get_cpuid="yes"
17766 else
17767 pgac_cv__get_cpuid="no"
17769 rm -f core conftest.err conftest.$ac_objext \
17770 conftest$ac_exeext conftest.$ac_ext
17772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17773 $as_echo "$pgac_cv__get_cpuid" >&6; }
17774 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17776 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17781 $as_echo_n "checking for __cpuid... " >&6; }
17782 if ${pgac_cv__cpuid+:} false; then :
17783 $as_echo_n "(cached) " >&6
17784 else
17785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17786 /* end confdefs.h. */
17787 #include <intrin.h>
17789 main ()
17791 unsigned int exx[4] = {0, 0, 0, 0};
17792 __get_cpuid(exx[0], 1);
17795 return 0;
17797 _ACEOF
17798 if ac_fn_c_try_link "$LINENO"; then :
17799 pgac_cv__cpuid="yes"
17800 else
17801 pgac_cv__cpuid="no"
17803 rm -f core conftest.err conftest.$ac_objext \
17804 conftest$ac_exeext conftest.$ac_ext
17806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17807 $as_echo "$pgac_cv__cpuid" >&6; }
17808 if test x"$pgac_cv__cpuid" = x"yes"; then
17810 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17814 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17816 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17817 # with the default compiler flags. If not, check if adding the -msse4.2
17818 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17820 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17821 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17822 $as_echo_n "(cached) " >&6
17823 else
17824 pgac_save_CFLAGS=$CFLAGS
17825 CFLAGS="$pgac_save_CFLAGS "
17826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17827 /* end confdefs.h. */
17828 #include <nmmintrin.h>
17830 main ()
17832 unsigned int crc = 0;
17833 crc = _mm_crc32_u8(crc, 0);
17834 crc = _mm_crc32_u32(crc, 0);
17835 /* return computed value, to prevent the above being optimized away */
17836 return crc == 0;
17838 return 0;
17840 _ACEOF
17841 if ac_fn_c_try_link "$LINENO"; then :
17842 pgac_cv_sse42_crc32_intrinsics_=yes
17843 else
17844 pgac_cv_sse42_crc32_intrinsics_=no
17846 rm -f core conftest.err conftest.$ac_objext \
17847 conftest$ac_exeext conftest.$ac_ext
17848 CFLAGS="$pgac_save_CFLAGS"
17850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17851 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17852 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17853 CFLAGS_SSE42=""
17854 pgac_sse42_crc32_intrinsics=yes
17857 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17859 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17860 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17861 $as_echo_n "(cached) " >&6
17862 else
17863 pgac_save_CFLAGS=$CFLAGS
17864 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17866 /* end confdefs.h. */
17867 #include <nmmintrin.h>
17869 main ()
17871 unsigned int crc = 0;
17872 crc = _mm_crc32_u8(crc, 0);
17873 crc = _mm_crc32_u32(crc, 0);
17874 /* return computed value, to prevent the above being optimized away */
17875 return crc == 0;
17877 return 0;
17879 _ACEOF
17880 if ac_fn_c_try_link "$LINENO"; then :
17881 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17882 else
17883 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17885 rm -f core conftest.err conftest.$ac_objext \
17886 conftest$ac_exeext conftest.$ac_ext
17887 CFLAGS="$pgac_save_CFLAGS"
17889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17890 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17891 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17892 CFLAGS_SSE42="-msse4.2"
17893 pgac_sse42_crc32_intrinsics=yes
17899 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17900 # define __SSE4_2__ in that case.
17901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17902 /* end confdefs.h. */
17905 main ()
17908 #ifndef __SSE4_2__
17909 #error __SSE4_2__ not defined
17910 #endif
17913 return 0;
17915 _ACEOF
17916 if ac_fn_c_try_compile "$LINENO"; then :
17917 SSE4_2_TARGETED=1
17919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17921 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17923 # First check if __crc32c* intrinsics can be used with the default compiler
17924 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17925 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17927 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17928 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17929 $as_echo_n "(cached) " >&6
17930 else
17931 pgac_save_CFLAGS=$CFLAGS
17932 CFLAGS="$pgac_save_CFLAGS "
17933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17934 /* end confdefs.h. */
17935 #include <arm_acle.h>
17937 main ()
17939 unsigned int crc = 0;
17940 crc = __crc32cb(crc, 0);
17941 crc = __crc32ch(crc, 0);
17942 crc = __crc32cw(crc, 0);
17943 crc = __crc32cd(crc, 0);
17944 /* return computed value, to prevent the above being optimized away */
17945 return crc == 0;
17947 return 0;
17949 _ACEOF
17950 if ac_fn_c_try_link "$LINENO"; then :
17951 pgac_cv_armv8_crc32c_intrinsics_=yes
17952 else
17953 pgac_cv_armv8_crc32c_intrinsics_=no
17955 rm -f core conftest.err conftest.$ac_objext \
17956 conftest$ac_exeext conftest.$ac_ext
17957 CFLAGS="$pgac_save_CFLAGS"
17959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17960 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17961 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17962 CFLAGS_ARMV8_CRC32C=""
17963 pgac_armv8_crc32c_intrinsics=yes
17966 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17968 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17969 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17970 $as_echo_n "(cached) " >&6
17971 else
17972 pgac_save_CFLAGS=$CFLAGS
17973 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17975 /* end confdefs.h. */
17976 #include <arm_acle.h>
17978 main ()
17980 unsigned int crc = 0;
17981 crc = __crc32cb(crc, 0);
17982 crc = __crc32ch(crc, 0);
17983 crc = __crc32cw(crc, 0);
17984 crc = __crc32cd(crc, 0);
17985 /* return computed value, to prevent the above being optimized away */
17986 return crc == 0;
17988 return 0;
17990 _ACEOF
17991 if ac_fn_c_try_link "$LINENO"; then :
17992 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17993 else
17994 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17996 rm -f core conftest.err conftest.$ac_objext \
17997 conftest$ac_exeext conftest.$ac_ext
17998 CFLAGS="$pgac_save_CFLAGS"
18000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18001 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18002 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18003 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18004 pgac_armv8_crc32c_intrinsics=yes
18010 # Select CRC-32C implementation.
18012 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18013 # use the special CRC instructions for calculating CRC-32C. If we're not
18014 # targeting such a processor, but we can nevertheless produce code that uses
18015 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18016 # implementations and select which one to use at runtime, depending on whether
18017 # SSE 4.2 is supported by the processor we're running on.
18019 # Similarly, if we are targeting an ARM processor that has the CRC
18020 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18021 # we're not targeting such a processor, but can nevertheless produce code that
18022 # uses the CRC instructions, compile both, and select at runtime.
18024 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18025 # in the template or configure command line.
18026 if test x"$USE_SLICING_BY_8_CRC32C" = x"" && test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_ARMV8_CRC32C" = x"" && test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x""; then
18027 # Use Intel SSE 4.2 if available.
18028 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18029 USE_SSE42_CRC32C=1
18030 else
18031 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18032 # the runtime check.
18033 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
18034 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18035 else
18036 # Use ARM CRC Extension if available.
18037 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18038 USE_ARMV8_CRC32C=1
18039 else
18040 # ARM CRC Extension, with runtime check?
18041 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18042 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18043 else
18044 # fall back to slicing-by-8 algorithm, which doesn't require any
18045 # special CPU support.
18046 USE_SLICING_BY_8_CRC32C=1
18053 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18055 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18056 if test x"$USE_SSE42_CRC32C" = x"1"; then
18058 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18060 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18062 $as_echo "SSE 4.2" >&6; }
18063 else
18064 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18066 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18068 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18070 $as_echo "SSE 4.2 with runtime check" >&6; }
18071 else
18072 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18074 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18076 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18078 $as_echo "ARMv8 CRC instructions" >&6; }
18079 else
18080 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18082 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18084 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18086 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18087 else
18089 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18091 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18093 $as_echo "slicing-by-8" >&6; }
18101 # Select semaphore implementation type.
18102 if test "$PORTNAME" != "win32"; then
18103 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18104 # Need sem_open for this
18105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18106 $as_echo_n "checking for library containing sem_open... " >&6; }
18107 if ${ac_cv_search_sem_open+:} false; then :
18108 $as_echo_n "(cached) " >&6
18109 else
18110 ac_func_search_save_LIBS=$LIBS
18111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18112 /* end confdefs.h. */
18114 /* Override any GCC internal prototype to avoid an error.
18115 Use char because int might match the return type of a GCC
18116 builtin and then its argument prototype would still apply. */
18117 #ifdef __cplusplus
18118 extern "C"
18119 #endif
18120 char sem_open ();
18122 main ()
18124 return sem_open ();
18126 return 0;
18128 _ACEOF
18129 for ac_lib in '' rt pthread; do
18130 if test -z "$ac_lib"; then
18131 ac_res="none required"
18132 else
18133 ac_res=-l$ac_lib
18134 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18136 if ac_fn_c_try_link "$LINENO"; then :
18137 ac_cv_search_sem_open=$ac_res
18139 rm -f core conftest.err conftest.$ac_objext \
18140 conftest$ac_exeext
18141 if ${ac_cv_search_sem_open+:} false; then :
18142 break
18144 done
18145 if ${ac_cv_search_sem_open+:} false; then :
18147 else
18148 ac_cv_search_sem_open=no
18150 rm conftest.$ac_ext
18151 LIBS=$ac_func_search_save_LIBS
18153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18154 $as_echo "$ac_cv_search_sem_open" >&6; }
18155 ac_res=$ac_cv_search_sem_open
18156 if test "$ac_res" != no; then :
18157 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18158 USE_NAMED_POSIX_SEMAPHORES=1
18162 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18163 # Need sem_init for this
18164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18165 $as_echo_n "checking for library containing sem_init... " >&6; }
18166 if ${ac_cv_search_sem_init+:} false; then :
18167 $as_echo_n "(cached) " >&6
18168 else
18169 ac_func_search_save_LIBS=$LIBS
18170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18171 /* end confdefs.h. */
18173 /* Override any GCC internal prototype to avoid an error.
18174 Use char because int might match the return type of a GCC
18175 builtin and then its argument prototype would still apply. */
18176 #ifdef __cplusplus
18177 extern "C"
18178 #endif
18179 char sem_init ();
18181 main ()
18183 return sem_init ();
18185 return 0;
18187 _ACEOF
18188 for ac_lib in '' rt pthread; do
18189 if test -z "$ac_lib"; then
18190 ac_res="none required"
18191 else
18192 ac_res=-l$ac_lib
18193 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18195 if ac_fn_c_try_link "$LINENO"; then :
18196 ac_cv_search_sem_init=$ac_res
18198 rm -f core conftest.err conftest.$ac_objext \
18199 conftest$ac_exeext
18200 if ${ac_cv_search_sem_init+:} false; then :
18201 break
18203 done
18204 if ${ac_cv_search_sem_init+:} false; then :
18206 else
18207 ac_cv_search_sem_init=no
18209 rm conftest.$ac_ext
18210 LIBS=$ac_func_search_save_LIBS
18212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18213 $as_echo "$ac_cv_search_sem_init" >&6; }
18214 ac_res=$ac_cv_search_sem_init
18215 if test "$ac_res" != no; then :
18216 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18217 USE_UNNAMED_POSIX_SEMAPHORES=1
18221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18222 $as_echo_n "checking which semaphore API to use... " >&6; }
18223 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18225 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18227 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18228 sematype="named POSIX"
18229 else
18230 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18232 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18234 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18235 sematype="unnamed POSIX"
18236 else
18238 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18240 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18241 sematype="System V"
18244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18245 $as_echo "$sematype" >&6; }
18246 else
18248 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18250 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18254 # Select shared-memory implementation type.
18255 if test "$PORTNAME" != "win32"; then
18257 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18259 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18260 else
18262 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18264 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18267 # Select random number source. If a TLS library is used then it will be the
18268 # first choice, else the native platform sources (Windows API or /dev/urandom)
18269 # will be used.
18270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18271 $as_echo_n "checking which random number source to use... " >&6; }
18272 if test x"$with_ssl" = x"openssl" ; then
18273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18274 $as_echo "OpenSSL" >&6; }
18275 elif test x"$PORTNAME" = x"win32" ; then
18276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18277 $as_echo "Windows native" >&6; }
18278 elif test x"$cross_compiling" = x"yes"; then
18279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18280 $as_echo "assuming /dev/urandom" >&6; }
18281 else
18282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18283 $as_echo "/dev/urandom" >&6; }
18284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18285 $as_echo_n "checking for /dev/urandom... " >&6; }
18286 if ${ac_cv_file__dev_urandom+:} false; then :
18287 $as_echo_n "(cached) " >&6
18288 else
18289 test "$cross_compiling" = yes &&
18290 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18291 if test -r "/dev/urandom"; then
18292 ac_cv_file__dev_urandom=yes
18293 else
18294 ac_cv_file__dev_urandom=no
18297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18298 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18299 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18304 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18305 as_fn_error $? "
18306 no source of strong random numbers was found
18307 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18311 # If not set in template file, set bytes to use libc memset()
18312 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18313 MEMSET_LOOP_LIMIT=1024
18316 cat >>confdefs.h <<_ACEOF
18317 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18318 _ACEOF
18322 if test "$enable_nls" = yes ; then
18324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18325 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18326 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18327 $as_echo_n "(cached) " >&6
18328 else
18329 ac_func_search_save_LIBS=$LIBS
18330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18331 /* end confdefs.h. */
18333 /* Override any GCC internal prototype to avoid an error.
18334 Use char because int might match the return type of a GCC
18335 builtin and then its argument prototype would still apply. */
18336 #ifdef __cplusplus
18337 extern "C"
18338 #endif
18339 char bind_textdomain_codeset ();
18341 main ()
18343 return bind_textdomain_codeset ();
18345 return 0;
18347 _ACEOF
18348 for ac_lib in '' intl; do
18349 if test -z "$ac_lib"; then
18350 ac_res="none required"
18351 else
18352 ac_res=-l$ac_lib
18353 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18355 if ac_fn_c_try_link "$LINENO"; then :
18356 ac_cv_search_bind_textdomain_codeset=$ac_res
18358 rm -f core conftest.err conftest.$ac_objext \
18359 conftest$ac_exeext
18360 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18361 break
18363 done
18364 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18366 else
18367 ac_cv_search_bind_textdomain_codeset=no
18369 rm conftest.$ac_ext
18370 LIBS=$ac_func_search_save_LIBS
18372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18373 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18374 ac_res=$ac_cv_search_bind_textdomain_codeset
18375 if test "$ac_res" != no; then :
18376 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18378 else
18379 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18382 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18383 if test "x$ac_cv_header_libintl_h" = xyes; then :
18385 else
18386 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18390 if test -z "$MSGFMT"; then
18391 for ac_prog in msgfmt
18393 # Extract the first word of "$ac_prog", so it can be a program name with args.
18394 set dummy $ac_prog; ac_word=$2
18395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18396 $as_echo_n "checking for $ac_word... " >&6; }
18397 if ${ac_cv_path_MSGFMT+:} false; then :
18398 $as_echo_n "(cached) " >&6
18399 else
18400 case $MSGFMT in
18401 [\\/]* | ?:[\\/]*)
18402 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18406 for as_dir in $PATH
18408 IFS=$as_save_IFS
18409 test -z "$as_dir" && as_dir=.
18410 for ac_exec_ext in '' $ac_executable_extensions; do
18411 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18412 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18413 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18414 break 2
18416 done
18417 done
18418 IFS=$as_save_IFS
18421 esac
18423 MSGFMT=$ac_cv_path_MSGFMT
18424 if test -n "$MSGFMT"; then
18425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18426 $as_echo "$MSGFMT" >&6; }
18427 else
18428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18429 $as_echo "no" >&6; }
18433 test -n "$MSGFMT" && break
18434 done
18436 else
18437 # Report the value of MSGFMT in configure's output in all cases.
18438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18439 $as_echo_n "checking for MSGFMT... " >&6; }
18440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18441 $as_echo "$MSGFMT" >&6; }
18444 if test -z "$MSGFMT"; then
18445 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18448 $as_echo_n "checking for msgfmt flags... " >&6; }
18449 if ${pgac_cv_msgfmt_flags+:} false; then :
18450 $as_echo_n "(cached) " >&6
18451 else
18452 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18453 pgac_cv_msgfmt_flags=-c
18456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18457 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18458 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18460 if test -z "$MSGMERGE"; then
18461 for ac_prog in msgmerge
18463 # Extract the first word of "$ac_prog", so it can be a program name with args.
18464 set dummy $ac_prog; ac_word=$2
18465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18466 $as_echo_n "checking for $ac_word... " >&6; }
18467 if ${ac_cv_path_MSGMERGE+:} false; then :
18468 $as_echo_n "(cached) " >&6
18469 else
18470 case $MSGMERGE in
18471 [\\/]* | ?:[\\/]*)
18472 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18476 for as_dir in $PATH
18478 IFS=$as_save_IFS
18479 test -z "$as_dir" && as_dir=.
18480 for ac_exec_ext in '' $ac_executable_extensions; do
18481 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18482 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18483 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18484 break 2
18486 done
18487 done
18488 IFS=$as_save_IFS
18491 esac
18493 MSGMERGE=$ac_cv_path_MSGMERGE
18494 if test -n "$MSGMERGE"; then
18495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18496 $as_echo "$MSGMERGE" >&6; }
18497 else
18498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18499 $as_echo "no" >&6; }
18503 test -n "$MSGMERGE" && break
18504 done
18506 else
18507 # Report the value of MSGMERGE in configure's output in all cases.
18508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18509 $as_echo_n "checking for MSGMERGE... " >&6; }
18510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18511 $as_echo "$MSGMERGE" >&6; }
18514 if test -z "$XGETTEXT"; then
18515 for ac_prog in xgettext
18517 # Extract the first word of "$ac_prog", so it can be a program name with args.
18518 set dummy $ac_prog; ac_word=$2
18519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18520 $as_echo_n "checking for $ac_word... " >&6; }
18521 if ${ac_cv_path_XGETTEXT+:} false; then :
18522 $as_echo_n "(cached) " >&6
18523 else
18524 case $XGETTEXT in
18525 [\\/]* | ?:[\\/]*)
18526 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18530 for as_dir in $PATH
18532 IFS=$as_save_IFS
18533 test -z "$as_dir" && as_dir=.
18534 for ac_exec_ext in '' $ac_executable_extensions; do
18535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18536 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18538 break 2
18540 done
18541 done
18542 IFS=$as_save_IFS
18545 esac
18547 XGETTEXT=$ac_cv_path_XGETTEXT
18548 if test -n "$XGETTEXT"; then
18549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18550 $as_echo "$XGETTEXT" >&6; }
18551 else
18552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18553 $as_echo "no" >&6; }
18557 test -n "$XGETTEXT" && break
18558 done
18560 else
18561 # Report the value of XGETTEXT in configure's output in all cases.
18562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18563 $as_echo_n "checking for XGETTEXT... " >&6; }
18564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18565 $as_echo "$XGETTEXT" >&6; }
18571 # Check for Tcl configuration script tclConfig.sh
18572 if test "$with_tcl" = yes; then
18573 if test -z "$TCLSH"; then
18574 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18576 # Extract the first word of "$ac_prog", so it can be a program name with args.
18577 set dummy $ac_prog; ac_word=$2
18578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18579 $as_echo_n "checking for $ac_word... " >&6; }
18580 if ${ac_cv_path_TCLSH+:} false; then :
18581 $as_echo_n "(cached) " >&6
18582 else
18583 case $TCLSH in
18584 [\\/]* | ?:[\\/]*)
18585 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18589 for as_dir in $PATH
18591 IFS=$as_save_IFS
18592 test -z "$as_dir" && as_dir=.
18593 for ac_exec_ext in '' $ac_executable_extensions; do
18594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18595 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18597 break 2
18599 done
18600 done
18601 IFS=$as_save_IFS
18604 esac
18606 TCLSH=$ac_cv_path_TCLSH
18607 if test -n "$TCLSH"; then
18608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18609 $as_echo "$TCLSH" >&6; }
18610 else
18611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18612 $as_echo "no" >&6; }
18616 test -n "$TCLSH" && break
18617 done
18619 else
18620 # Report the value of TCLSH in configure's output in all cases.
18621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18622 $as_echo_n "checking for TCLSH... " >&6; }
18623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18624 $as_echo "$TCLSH" >&6; }
18627 if test x"$TCLSH" = x""; then
18628 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18632 $as_echo_n "checking for tclConfig.sh... " >&6; }
18633 # Let user override test
18634 if test -z "$TCL_CONFIG_SH"; then
18635 pgac_test_dirs="$with_tclconfig"
18637 set X $pgac_test_dirs; shift
18638 if test $# -eq 0; then
18639 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18640 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18641 # On newer macOS, $auto_path frequently doesn't include the place
18642 # where tclConfig.sh actually lives. Append that to the end, so as not
18643 # to break cases where a non-default Tcl installation is being used.
18644 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18645 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18647 set X $pgac_test_dirs; shift
18650 for pgac_dir do
18651 if test -r "$pgac_dir/tclConfig.sh"; then
18652 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18653 break
18655 done
18658 if test -z "$TCL_CONFIG_SH"; then
18659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18660 $as_echo "no" >&6; }
18661 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18662 else
18663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18664 $as_echo "$TCL_CONFIG_SH" >&6; }
18669 . "$TCL_CONFIG_SH"
18670 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18671 eval TCL_LIBS=\"$TCL_LIBS\"
18672 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18673 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18675 if test "$TCL_SHARED_BUILD" != 1; then
18676 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18677 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18679 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18680 ac_save_CPPFLAGS=$CPPFLAGS
18681 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18682 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18683 if test "x$ac_cv_header_tcl_h" = xyes; then :
18685 else
18686 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18690 CPPFLAGS=$ac_save_CPPFLAGS
18693 # check for <perl.h>
18694 if test "$with_perl" = yes; then
18695 ac_save_CPPFLAGS=$CPPFLAGS
18696 CPPFLAGS="$CPPFLAGS $perl_includespec"
18697 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18699 if test "x$ac_cv_header_perl_h" = xyes; then :
18701 else
18702 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18706 # While we're at it, check that we can link to libperl.
18707 # On most platforms, if perl.h is there then libperl.so will be too, but at
18708 # this writing Debian packages them separately. There is no known reason to
18709 # waste cycles on separate probes for the Tcl or Python libraries, though.
18710 # On some Red Hat platforms, the link attempt can fail if we don't use
18711 # CFLAGS_SL while building the test program.
18712 ac_save_CFLAGS=$CFLAGS
18713 CFLAGS="$CFLAGS $CFLAGS_SL"
18714 pgac_save_LIBS=$LIBS
18715 LIBS="$perl_embed_ldflags"
18716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18717 $as_echo_n "checking for libperl... " >&6; }
18718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18719 /* end confdefs.h. */
18721 #include <EXTERN.h>
18722 #include <perl.h>
18725 main ()
18727 perl_alloc();
18729 return 0;
18731 _ACEOF
18732 if ac_fn_c_try_link "$LINENO"; then :
18733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18734 $as_echo "yes" >&6; }
18735 else
18736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18737 $as_echo "no" >&6; }
18738 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18740 rm -f core conftest.err conftest.$ac_objext \
18741 conftest$ac_exeext conftest.$ac_ext
18742 LIBS=$pgac_save_LIBS
18743 CFLAGS=$ac_save_CFLAGS
18744 CPPFLAGS=$ac_save_CPPFLAGS
18747 # check for <Python.h>
18748 if test "$with_python" = yes; then
18749 ac_save_CPPFLAGS=$CPPFLAGS
18750 CPPFLAGS="$python_includespec $CPPFLAGS"
18751 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18752 if test "x$ac_cv_header_Python_h" = xyes; then :
18754 else
18755 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18759 CPPFLAGS=$ac_save_CPPFLAGS
18763 # Check for documentation-building tools
18765 if test -z "$XMLLINT"; then
18766 for ac_prog in xmllint
18768 # Extract the first word of "$ac_prog", so it can be a program name with args.
18769 set dummy $ac_prog; ac_word=$2
18770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18771 $as_echo_n "checking for $ac_word... " >&6; }
18772 if ${ac_cv_path_XMLLINT+:} false; then :
18773 $as_echo_n "(cached) " >&6
18774 else
18775 case $XMLLINT in
18776 [\\/]* | ?:[\\/]*)
18777 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18781 for as_dir in $PATH
18783 IFS=$as_save_IFS
18784 test -z "$as_dir" && as_dir=.
18785 for ac_exec_ext in '' $ac_executable_extensions; do
18786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18787 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18789 break 2
18791 done
18792 done
18793 IFS=$as_save_IFS
18796 esac
18798 XMLLINT=$ac_cv_path_XMLLINT
18799 if test -n "$XMLLINT"; then
18800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18801 $as_echo "$XMLLINT" >&6; }
18802 else
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18804 $as_echo "no" >&6; }
18808 test -n "$XMLLINT" && break
18809 done
18811 else
18812 # Report the value of XMLLINT in configure's output in all cases.
18813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18814 $as_echo_n "checking for XMLLINT... " >&6; }
18815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18816 $as_echo "$XMLLINT" >&6; }
18819 if test -z "$XSLTPROC"; then
18820 for ac_prog in xsltproc
18822 # Extract the first word of "$ac_prog", so it can be a program name with args.
18823 set dummy $ac_prog; ac_word=$2
18824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18825 $as_echo_n "checking for $ac_word... " >&6; }
18826 if ${ac_cv_path_XSLTPROC+:} false; then :
18827 $as_echo_n "(cached) " >&6
18828 else
18829 case $XSLTPROC in
18830 [\\/]* | ?:[\\/]*)
18831 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18835 for as_dir in $PATH
18837 IFS=$as_save_IFS
18838 test -z "$as_dir" && as_dir=.
18839 for ac_exec_ext in '' $ac_executable_extensions; do
18840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18841 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18843 break 2
18845 done
18846 done
18847 IFS=$as_save_IFS
18850 esac
18852 XSLTPROC=$ac_cv_path_XSLTPROC
18853 if test -n "$XSLTPROC"; then
18854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18855 $as_echo "$XSLTPROC" >&6; }
18856 else
18857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18858 $as_echo "no" >&6; }
18862 test -n "$XSLTPROC" && break
18863 done
18865 else
18866 # Report the value of XSLTPROC in configure's output in all cases.
18867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18868 $as_echo_n "checking for XSLTPROC... " >&6; }
18869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18870 $as_echo "$XSLTPROC" >&6; }
18873 if test -z "$FOP"; then
18874 for ac_prog in fop
18876 # Extract the first word of "$ac_prog", so it can be a program name with args.
18877 set dummy $ac_prog; ac_word=$2
18878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18879 $as_echo_n "checking for $ac_word... " >&6; }
18880 if ${ac_cv_path_FOP+:} false; then :
18881 $as_echo_n "(cached) " >&6
18882 else
18883 case $FOP in
18884 [\\/]* | ?:[\\/]*)
18885 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18889 for as_dir in $PATH
18891 IFS=$as_save_IFS
18892 test -z "$as_dir" && as_dir=.
18893 for ac_exec_ext in '' $ac_executable_extensions; do
18894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18895 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18897 break 2
18899 done
18900 done
18901 IFS=$as_save_IFS
18904 esac
18906 FOP=$ac_cv_path_FOP
18907 if test -n "$FOP"; then
18908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18909 $as_echo "$FOP" >&6; }
18910 else
18911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18912 $as_echo "no" >&6; }
18916 test -n "$FOP" && break
18917 done
18919 else
18920 # Report the value of FOP in configure's output in all cases.
18921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18922 $as_echo_n "checking for FOP... " >&6; }
18923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18924 $as_echo "$FOP" >&6; }
18927 if test -z "$DBTOEPUB"; then
18928 for ac_prog in dbtoepub
18930 # Extract the first word of "$ac_prog", so it can be a program name with args.
18931 set dummy $ac_prog; ac_word=$2
18932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18933 $as_echo_n "checking for $ac_word... " >&6; }
18934 if ${ac_cv_path_DBTOEPUB+:} false; then :
18935 $as_echo_n "(cached) " >&6
18936 else
18937 case $DBTOEPUB in
18938 [\\/]* | ?:[\\/]*)
18939 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18943 for as_dir in $PATH
18945 IFS=$as_save_IFS
18946 test -z "$as_dir" && as_dir=.
18947 for ac_exec_ext in '' $ac_executable_extensions; do
18948 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18949 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18951 break 2
18953 done
18954 done
18955 IFS=$as_save_IFS
18958 esac
18960 DBTOEPUB=$ac_cv_path_DBTOEPUB
18961 if test -n "$DBTOEPUB"; then
18962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18963 $as_echo "$DBTOEPUB" >&6; }
18964 else
18965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18966 $as_echo "no" >&6; }
18970 test -n "$DBTOEPUB" && break
18971 done
18973 else
18974 # Report the value of DBTOEPUB in configure's output in all cases.
18975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18976 $as_echo_n "checking for DBTOEPUB... " >&6; }
18977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18978 $as_echo "$DBTOEPUB" >&6; }
18983 # Check for test tools
18985 if test "$enable_tap_tests" = yes; then
18986 # Make sure we know where prove is.
18987 if test -z "$PROVE"; then
18988 for ac_prog in prove
18990 # Extract the first word of "$ac_prog", so it can be a program name with args.
18991 set dummy $ac_prog; ac_word=$2
18992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18993 $as_echo_n "checking for $ac_word... " >&6; }
18994 if ${ac_cv_path_PROVE+:} false; then :
18995 $as_echo_n "(cached) " >&6
18996 else
18997 case $PROVE in
18998 [\\/]* | ?:[\\/]*)
18999 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19003 for as_dir in $PATH
19005 IFS=$as_save_IFS
19006 test -z "$as_dir" && as_dir=.
19007 for ac_exec_ext in '' $ac_executable_extensions; do
19008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19009 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19011 break 2
19013 done
19014 done
19015 IFS=$as_save_IFS
19018 esac
19020 PROVE=$ac_cv_path_PROVE
19021 if test -n "$PROVE"; then
19022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19023 $as_echo "$PROVE" >&6; }
19024 else
19025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19026 $as_echo "no" >&6; }
19030 test -n "$PROVE" && break
19031 done
19033 else
19034 # Report the value of PROVE in configure's output in all cases.
19035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19036 $as_echo_n "checking for PROVE... " >&6; }
19037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19038 $as_echo "$PROVE" >&6; }
19041 if test -z "$PROVE"; then
19042 as_fn_error $? "prove not found" "$LINENO" 5
19044 # Check for necessary Perl modules. You might think we should use
19045 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19046 # installation than perl, eg on MSys, so we have to check using prove.
19047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19048 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19049 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
19050 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19051 if test $? -eq 0; then
19052 # log the module version details, but don't show them interactively
19053 echo "$modulestderr" >&5
19054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19055 $as_echo "yes" >&6; }
19056 else
19057 # on failure, though, show the results to the user
19058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19059 $as_echo "$modulestderr" >&6; }
19060 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19064 # If compiler will take -Wl,--as-needed (or various platform-specific
19065 # spellings thereof) then add that to LDFLAGS. This is much easier than
19066 # trying to filter LIBS to the minimum for each executable.
19067 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19068 # libreadline; therefore we postpone testing it until we know what library
19069 # dependencies readline has. The test code will try to link with $LIBS.
19070 if test "$with_readline" = yes; then
19071 link_test_func=readline
19072 else
19073 link_test_func=exit
19076 if test "$PORTNAME" = "darwin"; then
19077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19078 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19079 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19080 $as_echo_n "(cached) " >&6
19081 else
19082 pgac_save_LDFLAGS=$LDFLAGS
19083 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19084 if test "$cross_compiling" = yes; then :
19085 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19086 else
19087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19088 /* end confdefs.h. */
19089 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19091 main ()
19095 return 0;
19097 _ACEOF
19098 if ac_fn_c_try_run "$LINENO"; then :
19099 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19100 else
19101 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19104 conftest.$ac_objext conftest.beam conftest.$ac_ext
19107 LDFLAGS="$pgac_save_LDFLAGS"
19109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19110 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19111 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19112 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19115 elif test "$PORTNAME" = "openbsd"; then
19116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19117 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19118 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19119 $as_echo_n "(cached) " >&6
19120 else
19121 pgac_save_LDFLAGS=$LDFLAGS
19122 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19123 if test "$cross_compiling" = yes; then :
19124 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19125 else
19126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19127 /* end confdefs.h. */
19128 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19130 main ()
19134 return 0;
19136 _ACEOF
19137 if ac_fn_c_try_run "$LINENO"; then :
19138 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19139 else
19140 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19143 conftest.$ac_objext conftest.beam conftest.$ac_ext
19146 LDFLAGS="$pgac_save_LDFLAGS"
19148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19149 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19150 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19151 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19154 else
19155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19156 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19157 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19158 $as_echo_n "(cached) " >&6
19159 else
19160 pgac_save_LDFLAGS=$LDFLAGS
19161 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19162 if test "$cross_compiling" = yes; then :
19163 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19164 else
19165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19166 /* end confdefs.h. */
19167 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19169 main ()
19173 return 0;
19175 _ACEOF
19176 if ac_fn_c_try_run "$LINENO"; then :
19177 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19178 else
19179 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19181 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19182 conftest.$ac_objext conftest.beam conftest.$ac_ext
19185 LDFLAGS="$pgac_save_LDFLAGS"
19187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19188 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19189 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19190 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19195 # Create compiler version string
19196 if test x"$GCC" = x"yes" ; then
19197 cc_string=`${CC} --version | sed q`
19198 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19199 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19200 cc_string=`${CC} -V 2>&1 | sed q`
19201 else
19202 cc_string=$CC
19206 cat >>confdefs.h <<_ACEOF
19207 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19208 _ACEOF
19211 # Supply a numeric version string for use by 3rd party add-ons
19212 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19213 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19214 $AWK '{printf "%d%04d", $1, $2}'`"
19216 cat >>confdefs.h <<_ACEOF
19217 #define PG_VERSION_NUM $PG_VERSION_NUM
19218 _ACEOF
19222 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19223 # literally, so that it's possible to override it at build time using
19224 # a command like "make ... PG_SYSROOT=path". This has to be done after
19225 # we've finished all configure checks that depend on CPPFLAGS.
19226 # The same for LDFLAGS, too.
19227 if test x"$PG_SYSROOT" != x; then
19228 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19229 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19234 # Begin output steps
19236 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19237 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19238 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19239 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19240 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19241 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19243 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19244 # Currently only used when LLVM is used
19245 if test "$with_llvm" = yes ; then
19246 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19247 $as_echo "$as_me: using CXX=$CXX" >&6;}
19248 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19249 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19250 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19251 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19252 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19253 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19254 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19255 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19258 # prepare build tree if outside source tree
19259 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19260 # Note 2: /bin/pwd might be better than shell's built-in at getting
19261 # a symlink-free name.
19262 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19263 vpath_build=no
19264 else
19265 vpath_build=yes
19266 if test "$no_create" != yes; then
19267 $as_echo_n "preparing build tree... " >&6
19268 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19269 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19270 || as_fn_error $? "failed" "$LINENO" 5
19271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19272 $as_echo "done" >&6; }
19278 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19281 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}"
19284 if test "$PORTNAME" = "win32"; then
19285 ac_config_commands="$ac_config_commands check_win32_symlinks"
19289 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19292 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19295 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19298 cat >confcache <<\_ACEOF
19299 # This file is a shell script that caches the results of configure
19300 # tests run on this system so they can be shared between configure
19301 # scripts and configure runs, see configure's option --config-cache.
19302 # It is not useful on other systems. If it contains results you don't
19303 # want to keep, you may remove or edit it.
19305 # config.status only pays attention to the cache file if you give it
19306 # the --recheck option to rerun configure.
19308 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19309 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19310 # following values.
19312 _ACEOF
19314 # The following way of writing the cache mishandles newlines in values,
19315 # but we know of no workaround that is simple, portable, and efficient.
19316 # So, we kill variables containing newlines.
19317 # Ultrix sh set writes to stderr and can't be redirected directly,
19318 # and sets the high bit in the cache file unless we assign to the vars.
19320 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19321 eval ac_val=\$$ac_var
19322 case $ac_val in #(
19323 *${as_nl}*)
19324 case $ac_var in #(
19325 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19326 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19327 esac
19328 case $ac_var in #(
19329 _ | IFS | as_nl) ;; #(
19330 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19331 *) { eval $ac_var=; unset $ac_var;} ;;
19332 esac ;;
19333 esac
19334 done
19336 (set) 2>&1 |
19337 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19338 *${as_nl}ac_space=\ *)
19339 # `set' does not quote correctly, so add quotes: double-quote
19340 # substitution turns \\\\ into \\, and sed turns \\ into \.
19341 sed -n \
19342 "s/'/'\\\\''/g;
19343 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19344 ;; #(
19346 # `set' quotes correctly as required by POSIX, so do not add quotes.
19347 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19349 esac |
19350 sort
19352 sed '
19353 /^ac_cv_env_/b end
19354 t clear
19355 :clear
19356 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19357 t end
19358 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19359 :end' >>confcache
19360 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19361 if test -w "$cache_file"; then
19362 if test "x$cache_file" != "x/dev/null"; then
19363 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19364 $as_echo "$as_me: updating cache $cache_file" >&6;}
19365 if test ! -f "$cache_file" || test -h "$cache_file"; then
19366 cat confcache >"$cache_file"
19367 else
19368 case $cache_file in #(
19369 */* | ?:*)
19370 mv -f confcache "$cache_file"$$ &&
19371 mv -f "$cache_file"$$ "$cache_file" ;; #(
19373 mv -f confcache "$cache_file" ;;
19374 esac
19377 else
19378 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19379 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19382 rm -f confcache
19384 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19385 # Let make expand exec_prefix.
19386 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19388 DEFS=-DHAVE_CONFIG_H
19390 ac_libobjs=
19391 ac_ltlibobjs=
19393 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19394 # 1. Remove the extension, and $U if already installed.
19395 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19396 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19397 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19398 # will be set to the directory where LIBOBJS objects are built.
19399 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19400 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19401 done
19402 LIBOBJS=$ac_libobjs
19404 LTLIBOBJS=$ac_ltlibobjs
19409 : "${CONFIG_STATUS=./config.status}"
19410 ac_write_fail=0
19411 ac_clean_files_save=$ac_clean_files
19412 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19413 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19414 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19415 as_write_fail=0
19416 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19417 #! $SHELL
19418 # Generated by $as_me.
19419 # Run this file to recreate the current configuration.
19420 # Compiler output produced by configure, useful for debugging
19421 # configure, is in config.log if it exists.
19423 debug=false
19424 ac_cs_recheck=false
19425 ac_cs_silent=false
19427 SHELL=\${CONFIG_SHELL-$SHELL}
19428 export SHELL
19429 _ASEOF
19430 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19431 ## -------------------- ##
19432 ## M4sh Initialization. ##
19433 ## -------------------- ##
19435 # Be more Bourne compatible
19436 DUALCASE=1; export DUALCASE # for MKS sh
19437 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19438 emulate sh
19439 NULLCMD=:
19440 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19441 # is contrary to our usage. Disable this feature.
19442 alias -g '${1+"$@"}'='"$@"'
19443 setopt NO_GLOB_SUBST
19444 else
19445 case `(set -o) 2>/dev/null` in #(
19446 *posix*) :
19447 set -o posix ;; #(
19448 *) :
19450 esac
19454 as_nl='
19456 export as_nl
19457 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19458 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19459 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19460 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19461 # Prefer a ksh shell builtin over an external printf program on Solaris,
19462 # but without wasting forks for bash or zsh.
19463 if test -z "$BASH_VERSION$ZSH_VERSION" \
19464 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19465 as_echo='print -r --'
19466 as_echo_n='print -rn --'
19467 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19468 as_echo='printf %s\n'
19469 as_echo_n='printf %s'
19470 else
19471 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19472 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19473 as_echo_n='/usr/ucb/echo -n'
19474 else
19475 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19476 as_echo_n_body='eval
19477 arg=$1;
19478 case $arg in #(
19479 *"$as_nl"*)
19480 expr "X$arg" : "X\\(.*\\)$as_nl";
19481 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19482 esac;
19483 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19485 export as_echo_n_body
19486 as_echo_n='sh -c $as_echo_n_body as_echo'
19488 export as_echo_body
19489 as_echo='sh -c $as_echo_body as_echo'
19492 # The user is always right.
19493 if test "${PATH_SEPARATOR+set}" != set; then
19494 PATH_SEPARATOR=:
19495 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19496 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19497 PATH_SEPARATOR=';'
19502 # IFS
19503 # We need space, tab and new line, in precisely that order. Quoting is
19504 # there to prevent editors from complaining about space-tab.
19505 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19506 # splitting by setting IFS to empty value.)
19507 IFS=" "" $as_nl"
19509 # Find who we are. Look in the path if we contain no directory separator.
19510 as_myself=
19511 case $0 in #((
19512 *[\\/]* ) as_myself=$0 ;;
19513 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19514 for as_dir in $PATH
19516 IFS=$as_save_IFS
19517 test -z "$as_dir" && as_dir=.
19518 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19519 done
19520 IFS=$as_save_IFS
19523 esac
19524 # We did not find ourselves, most probably we were run as `sh COMMAND'
19525 # in which case we are not to be found in the path.
19526 if test "x$as_myself" = x; then
19527 as_myself=$0
19529 if test ! -f "$as_myself"; then
19530 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19531 exit 1
19534 # Unset variables that we do not need and which cause bugs (e.g. in
19535 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19536 # suppresses any "Segmentation fault" message there. '((' could
19537 # trigger a bug in pdksh 5.2.14.
19538 for as_var in BASH_ENV ENV MAIL MAILPATH
19539 do eval test x\${$as_var+set} = xset \
19540 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19541 done
19542 PS1='$ '
19543 PS2='> '
19544 PS4='+ '
19546 # NLS nuisances.
19547 LC_ALL=C
19548 export LC_ALL
19549 LANGUAGE=C
19550 export LANGUAGE
19552 # CDPATH.
19553 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19556 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19557 # ----------------------------------------
19558 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19559 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19560 # script with STATUS, using 1 if that was 0.
19561 as_fn_error ()
19563 as_status=$1; test $as_status -eq 0 && as_status=1
19564 if test "$4"; then
19565 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19566 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19568 $as_echo "$as_me: error: $2" >&2
19569 as_fn_exit $as_status
19570 } # as_fn_error
19573 # as_fn_set_status STATUS
19574 # -----------------------
19575 # Set $? to STATUS, without forking.
19576 as_fn_set_status ()
19578 return $1
19579 } # as_fn_set_status
19581 # as_fn_exit STATUS
19582 # -----------------
19583 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19584 as_fn_exit ()
19586 set +e
19587 as_fn_set_status $1
19588 exit $1
19589 } # as_fn_exit
19591 # as_fn_unset VAR
19592 # ---------------
19593 # Portably unset VAR.
19594 as_fn_unset ()
19596 { eval $1=; unset $1;}
19598 as_unset=as_fn_unset
19599 # as_fn_append VAR VALUE
19600 # ----------------------
19601 # Append the text in VALUE to the end of the definition contained in VAR. Take
19602 # advantage of any shell optimizations that allow amortized linear growth over
19603 # repeated appends, instead of the typical quadratic growth present in naive
19604 # implementations.
19605 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19606 eval 'as_fn_append ()
19608 eval $1+=\$2
19610 else
19611 as_fn_append ()
19613 eval $1=\$$1\$2
19615 fi # as_fn_append
19617 # as_fn_arith ARG...
19618 # ------------------
19619 # Perform arithmetic evaluation on the ARGs, and store the result in the
19620 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19621 # must be portable across $(()) and expr.
19622 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19623 eval 'as_fn_arith ()
19625 as_val=$(( $* ))
19627 else
19628 as_fn_arith ()
19630 as_val=`expr "$@" || test $? -eq 1`
19632 fi # as_fn_arith
19635 if expr a : '\(a\)' >/dev/null 2>&1 &&
19636 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19637 as_expr=expr
19638 else
19639 as_expr=false
19642 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19643 as_basename=basename
19644 else
19645 as_basename=false
19648 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19649 as_dirname=dirname
19650 else
19651 as_dirname=false
19654 as_me=`$as_basename -- "$0" ||
19655 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19656 X"$0" : 'X\(//\)$' \| \
19657 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19658 $as_echo X/"$0" |
19659 sed '/^.*\/\([^/][^/]*\)\/*$/{
19660 s//\1/
19663 /^X\/\(\/\/\)$/{
19664 s//\1/
19667 /^X\/\(\/\).*/{
19668 s//\1/
19671 s/.*/./; q'`
19673 # Avoid depending upon Character Ranges.
19674 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19675 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19676 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19677 as_cr_digits='0123456789'
19678 as_cr_alnum=$as_cr_Letters$as_cr_digits
19680 ECHO_C= ECHO_N= ECHO_T=
19681 case `echo -n x` in #(((((
19682 -n*)
19683 case `echo 'xy\c'` in
19684 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19685 xy) ECHO_C='\c';;
19686 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19687 ECHO_T=' ';;
19688 esac;;
19690 ECHO_N='-n';;
19691 esac
19693 rm -f conf$$ conf$$.exe conf$$.file
19694 if test -d conf$$.dir; then
19695 rm -f conf$$.dir/conf$$.file
19696 else
19697 rm -f conf$$.dir
19698 mkdir conf$$.dir 2>/dev/null
19700 if (echo >conf$$.file) 2>/dev/null; then
19701 if ln -s conf$$.file conf$$ 2>/dev/null; then
19702 as_ln_s='ln -s'
19703 # ... but there are two gotchas:
19704 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19705 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19706 # In both cases, we have to default to `cp -pR'.
19707 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19708 as_ln_s='cp -pR'
19709 elif ln conf$$.file conf$$ 2>/dev/null; then
19710 as_ln_s=ln
19711 else
19712 as_ln_s='cp -pR'
19714 else
19715 as_ln_s='cp -pR'
19717 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19718 rmdir conf$$.dir 2>/dev/null
19721 # as_fn_mkdir_p
19722 # -------------
19723 # Create "$as_dir" as a directory, including parents if necessary.
19724 as_fn_mkdir_p ()
19727 case $as_dir in #(
19728 -*) as_dir=./$as_dir;;
19729 esac
19730 test -d "$as_dir" || eval $as_mkdir_p || {
19731 as_dirs=
19732 while :; do
19733 case $as_dir in #(
19734 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19735 *) as_qdir=$as_dir;;
19736 esac
19737 as_dirs="'$as_qdir' $as_dirs"
19738 as_dir=`$as_dirname -- "$as_dir" ||
19739 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19740 X"$as_dir" : 'X\(//\)[^/]' \| \
19741 X"$as_dir" : 'X\(//\)$' \| \
19742 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19743 $as_echo X"$as_dir" |
19744 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19745 s//\1/
19748 /^X\(\/\/\)[^/].*/{
19749 s//\1/
19752 /^X\(\/\/\)$/{
19753 s//\1/
19756 /^X\(\/\).*/{
19757 s//\1/
19760 s/.*/./; q'`
19761 test -d "$as_dir" && break
19762 done
19763 test -z "$as_dirs" || eval "mkdir $as_dirs"
19764 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19767 } # as_fn_mkdir_p
19768 if mkdir -p . 2>/dev/null; then
19769 as_mkdir_p='mkdir -p "$as_dir"'
19770 else
19771 test -d ./-p && rmdir ./-p
19772 as_mkdir_p=false
19776 # as_fn_executable_p FILE
19777 # -----------------------
19778 # Test if FILE is an executable regular file.
19779 as_fn_executable_p ()
19781 test -f "$1" && test -x "$1"
19782 } # as_fn_executable_p
19783 as_test_x='test -x'
19784 as_executable_p=as_fn_executable_p
19786 # Sed expression to map a string onto a valid CPP name.
19787 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19789 # Sed expression to map a string onto a valid variable name.
19790 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19793 exec 6>&1
19794 ## ----------------------------------- ##
19795 ## Main body of $CONFIG_STATUS script. ##
19796 ## ----------------------------------- ##
19797 _ASEOF
19798 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19800 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19801 # Save the log message, to keep $0 and so on meaningful, and to
19802 # report actual input values of CONFIG_FILES etc. instead of their
19803 # values after options handling.
19804 ac_log="
19805 This file was extended by PostgreSQL $as_me 16devel, which was
19806 generated by GNU Autoconf 2.69. Invocation command line was
19808 CONFIG_FILES = $CONFIG_FILES
19809 CONFIG_HEADERS = $CONFIG_HEADERS
19810 CONFIG_LINKS = $CONFIG_LINKS
19811 CONFIG_COMMANDS = $CONFIG_COMMANDS
19812 $ $0 $@
19814 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19817 _ACEOF
19819 case $ac_config_files in *"
19820 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19821 esac
19823 case $ac_config_headers in *"
19824 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19825 esac
19828 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19829 # Files that config.status was made for.
19830 config_files="$ac_config_files"
19831 config_headers="$ac_config_headers"
19832 config_links="$ac_config_links"
19833 config_commands="$ac_config_commands"
19835 _ACEOF
19837 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19838 ac_cs_usage="\
19839 \`$as_me' instantiates files and other configuration actions
19840 from templates according to the current configuration. Unless the files
19841 and actions are specified as TAGs, all are instantiated by default.
19843 Usage: $0 [OPTION]... [TAG]...
19845 -h, --help print this help, then exit
19846 -V, --version print version number and configuration settings, then exit
19847 --config print configuration, then exit
19848 -q, --quiet, --silent
19849 do not print progress messages
19850 -d, --debug don't remove temporary files
19851 --recheck update $as_me by reconfiguring in the same conditions
19852 --file=FILE[:TEMPLATE]
19853 instantiate the configuration file FILE
19854 --header=FILE[:TEMPLATE]
19855 instantiate the configuration header FILE
19857 Configuration files:
19858 $config_files
19860 Configuration headers:
19861 $config_headers
19863 Configuration links:
19864 $config_links
19866 Configuration commands:
19867 $config_commands
19869 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19870 PostgreSQL home page: <https://www.postgresql.org/>."
19872 _ACEOF
19873 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19874 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19875 ac_cs_version="\\
19876 PostgreSQL config.status 16devel
19877 configured by $0, generated by GNU Autoconf 2.69,
19878 with options \\"\$ac_cs_config\\"
19880 Copyright (C) 2012 Free Software Foundation, Inc.
19881 This config.status script is free software; the Free Software Foundation
19882 gives unlimited permission to copy, distribute and modify it."
19884 ac_pwd='$ac_pwd'
19885 srcdir='$srcdir'
19886 INSTALL='$INSTALL'
19887 MKDIR_P='$MKDIR_P'
19888 AWK='$AWK'
19889 test -n "\$AWK" || AWK=awk
19890 _ACEOF
19892 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19893 # The default lists apply if the user does not specify any file.
19894 ac_need_defaults=:
19895 while test $# != 0
19897 case $1 in
19898 --*=?*)
19899 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19900 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19901 ac_shift=:
19903 --*=)
19904 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19905 ac_optarg=
19906 ac_shift=:
19909 ac_option=$1
19910 ac_optarg=$2
19911 ac_shift=shift
19913 esac
19915 case $ac_option in
19916 # Handling of the options.
19917 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19918 ac_cs_recheck=: ;;
19919 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19920 $as_echo "$ac_cs_version"; exit ;;
19921 --config | --confi | --conf | --con | --co | --c )
19922 $as_echo "$ac_cs_config"; exit ;;
19923 --debug | --debu | --deb | --de | --d | -d )
19924 debug=: ;;
19925 --file | --fil | --fi | --f )
19926 $ac_shift
19927 case $ac_optarg in
19928 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19929 '') as_fn_error $? "missing file argument" ;;
19930 esac
19931 as_fn_append CONFIG_FILES " '$ac_optarg'"
19932 ac_need_defaults=false;;
19933 --header | --heade | --head | --hea )
19934 $ac_shift
19935 case $ac_optarg in
19936 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19937 esac
19938 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19939 ac_need_defaults=false;;
19940 --he | --h)
19941 # Conflict between --help and --header
19942 as_fn_error $? "ambiguous option: \`$1'
19943 Try \`$0 --help' for more information.";;
19944 --help | --hel | -h )
19945 $as_echo "$ac_cs_usage"; exit ;;
19946 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19947 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19948 ac_cs_silent=: ;;
19950 # This is an error.
19951 -*) as_fn_error $? "unrecognized option: \`$1'
19952 Try \`$0 --help' for more information." ;;
19954 *) as_fn_append ac_config_targets " $1"
19955 ac_need_defaults=false ;;
19957 esac
19958 shift
19959 done
19961 ac_configure_extra_args=
19963 if $ac_cs_silent; then
19964 exec 6>/dev/null
19965 ac_configure_extra_args="$ac_configure_extra_args --silent"
19968 _ACEOF
19969 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19970 if \$ac_cs_recheck; then
19971 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19972 shift
19973 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19974 CONFIG_SHELL='$SHELL'
19975 export CONFIG_SHELL
19976 exec "\$@"
19979 _ACEOF
19980 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19981 exec 5>>config.log
19983 echo
19984 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19985 ## Running $as_me. ##
19986 _ASBOX
19987 $as_echo "$ac_log"
19988 } >&5
19990 _ACEOF
19991 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19992 _ACEOF
19994 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19996 # Handling of arguments.
19997 for ac_config_target in $ac_config_targets
19999 case $ac_config_target in
20000 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20001 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20002 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20003 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20004 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20005 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20006 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20007 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20008 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20009 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20010 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20012 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20013 esac
20014 done
20017 # If the user did not use the arguments to specify the items to instantiate,
20018 # then the envvar interface is used. Set only those that are not.
20019 # We use the long form for the default assignment because of an extremely
20020 # bizarre bug on SunOS 4.1.3.
20021 if $ac_need_defaults; then
20022 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20023 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20024 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20025 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20028 # Have a temporary directory for convenience. Make it in the build tree
20029 # simply because there is no reason against having it here, and in addition,
20030 # creating and moving files from /tmp can sometimes cause problems.
20031 # Hook for its removal unless debugging.
20032 # Note that there is a small window in which the directory will not be cleaned:
20033 # after its creation but before its name has been assigned to `$tmp'.
20034 $debug ||
20036 tmp= ac_tmp=
20037 trap 'exit_status=$?
20038 : "${ac_tmp:=$tmp}"
20039 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20041 trap 'as_fn_exit 1' 1 2 13 15
20043 # Create a (secure) tmp directory for tmp files.
20046 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20047 test -d "$tmp"
20048 } ||
20050 tmp=./conf$$-$RANDOM
20051 (umask 077 && mkdir "$tmp")
20052 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20053 ac_tmp=$tmp
20055 # Set up the scripts for CONFIG_FILES section.
20056 # No need to generate them if there are no CONFIG_FILES.
20057 # This happens for instance with `./config.status config.h'.
20058 if test -n "$CONFIG_FILES"; then
20061 ac_cr=`echo X | tr X '\015'`
20062 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20063 # But we know of no other shell where ac_cr would be empty at this
20064 # point, so we can use a bashism as a fallback.
20065 if test "x$ac_cr" = x; then
20066 eval ac_cr=\$\'\\r\'
20068 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20069 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20070 ac_cs_awk_cr='\\r'
20071 else
20072 ac_cs_awk_cr=$ac_cr
20075 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20076 _ACEOF
20080 echo "cat >conf$$subs.awk <<_ACEOF" &&
20081 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20082 echo "_ACEOF"
20083 } >conf$$subs.sh ||
20084 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20085 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20086 ac_delim='%!_!# '
20087 for ac_last_try in false false false false false :; do
20088 . ./conf$$subs.sh ||
20089 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20091 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20092 if test $ac_delim_n = $ac_delim_num; then
20093 break
20094 elif $ac_last_try; then
20095 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20096 else
20097 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20099 done
20100 rm -f conf$$subs.sh
20102 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20103 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20104 _ACEOF
20105 sed -n '
20107 s/^/S["/; s/!.*/"]=/
20110 s/^[^!]*!//
20111 :repl
20112 t repl
20113 s/'"$ac_delim"'$//
20114 t delim
20117 s/\(.\{148\}\)..*/\1/
20118 t more1
20119 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20122 b repl
20123 :more1
20124 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20127 s/.\{148\}//
20128 t nl
20129 :delim
20131 s/\(.\{148\}\)..*/\1/
20132 t more2
20133 s/["\\]/\\&/g; s/^/"/; s/$/"/
20136 :more2
20137 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20140 s/.\{148\}//
20141 t delim
20142 ' <conf$$subs.awk | sed '
20143 /^[^""]/{
20145 s/\n//
20147 ' >>$CONFIG_STATUS || ac_write_fail=1
20148 rm -f conf$$subs.awk
20149 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20150 _ACAWK
20151 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20152 for (key in S) S_is_set[key] = 1
20153 FS = "\a"
20157 line = $ 0
20158 nfields = split(line, field, "@")
20159 substed = 0
20160 len = length(field[1])
20161 for (i = 2; i < nfields; i++) {
20162 key = field[i]
20163 keylen = length(key)
20164 if (S_is_set[key]) {
20165 value = S[key]
20166 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20167 len += length(value) + length(field[++i])
20168 substed = 1
20169 } else
20170 len += 1 + keylen
20173 print line
20176 _ACAWK
20177 _ACEOF
20178 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20179 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20180 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20181 else
20183 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20184 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20185 _ACEOF
20187 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20188 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20189 # trailing colons and then remove the whole line if VPATH becomes empty
20190 # (actually we leave an empty line to preserve line numbers).
20191 if test "x$srcdir" = x.; then
20192 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20194 s///
20195 s/^/:/
20196 s/[ ]*$/:/
20197 s/:\$(srcdir):/:/g
20198 s/:\${srcdir}:/:/g
20199 s/:@srcdir@:/:/g
20200 s/^:*//
20201 s/:*$//
20203 s/\(=[ ]*\).*/\1/
20205 s/\n//
20206 s/^[^=]*=[ ]*$//
20210 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20211 fi # test -n "$CONFIG_FILES"
20213 # Set up the scripts for CONFIG_HEADERS section.
20214 # No need to generate them if there are no CONFIG_HEADERS.
20215 # This happens for instance with `./config.status Makefile'.
20216 if test -n "$CONFIG_HEADERS"; then
20217 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20218 BEGIN {
20219 _ACEOF
20221 # Transform confdefs.h into an awk script `defines.awk', embedded as
20222 # here-document in config.status, that substitutes the proper values into
20223 # config.h.in to produce config.h.
20225 # Create a delimiter string that does not exist in confdefs.h, to ease
20226 # handling of long lines.
20227 ac_delim='%!_!# '
20228 for ac_last_try in false false :; do
20229 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20230 if test -z "$ac_tt"; then
20231 break
20232 elif $ac_last_try; then
20233 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20234 else
20235 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20237 done
20239 # For the awk script, D is an array of macro values keyed by name,
20240 # likewise P contains macro parameters if any. Preserve backslash
20241 # newline sequences.
20243 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20244 sed -n '
20245 s/.\{148\}/&'"$ac_delim"'/g
20246 t rset
20247 :rset
20248 s/^[ ]*#[ ]*define[ ][ ]*/ /
20249 t def
20251 :def
20252 s/\\$//
20253 t bsnl
20254 s/["\\]/\\&/g
20255 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20256 D["\1"]=" \3"/p
20257 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20259 :bsnl
20260 s/["\\]/\\&/g
20261 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20262 D["\1"]=" \3\\\\\\n"\\/p
20263 t cont
20264 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20265 t cont
20267 :cont
20269 s/.\{148\}/&'"$ac_delim"'/g
20270 t clear
20271 :clear
20272 s/\\$//
20273 t bsnlc
20274 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20276 :bsnlc
20277 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20278 b cont
20279 ' <confdefs.h | sed '
20280 s/'"$ac_delim"'/"\\\
20281 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20283 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20284 for (key in D) D_is_set[key] = 1
20285 FS = "\a"
20287 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20288 line = \$ 0
20289 split(line, arg, " ")
20290 if (arg[1] == "#") {
20291 defundef = arg[2]
20292 mac1 = arg[3]
20293 } else {
20294 defundef = substr(arg[1], 2)
20295 mac1 = arg[2]
20297 split(mac1, mac2, "(") #)
20298 macro = mac2[1]
20299 prefix = substr(line, 1, index(line, defundef) - 1)
20300 if (D_is_set[macro]) {
20301 # Preserve the white space surrounding the "#".
20302 print prefix "define", macro P[macro] D[macro]
20303 next
20304 } else {
20305 # Replace #undef with comments. This is necessary, for example,
20306 # in the case of _POSIX_SOURCE, which is predefined and required
20307 # on some systems where configure will not decide to define it.
20308 if (defundef == "undef") {
20309 print "/*", prefix defundef, macro, "*/"
20310 next
20314 { print }
20315 _ACAWK
20316 _ACEOF
20317 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20318 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20319 fi # test -n "$CONFIG_HEADERS"
20322 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20323 shift
20324 for ac_tag
20326 case $ac_tag in
20327 :[FHLC]) ac_mode=$ac_tag; continue;;
20328 esac
20329 case $ac_mode$ac_tag in
20330 :[FHL]*:*);;
20331 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20332 :[FH]-) ac_tag=-:-;;
20333 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20334 esac
20335 ac_save_IFS=$IFS
20336 IFS=:
20337 set x $ac_tag
20338 IFS=$ac_save_IFS
20339 shift
20340 ac_file=$1
20341 shift
20343 case $ac_mode in
20344 :L) ac_source=$1;;
20345 :[FH])
20346 ac_file_inputs=
20347 for ac_f
20349 case $ac_f in
20350 -) ac_f="$ac_tmp/stdin";;
20351 *) # Look for the file first in the build tree, then in the source tree
20352 # (if the path is not absolute). The absolute path cannot be DOS-style,
20353 # because $ac_f cannot contain `:'.
20354 test -f "$ac_f" ||
20355 case $ac_f in
20356 [\\/$]*) false;;
20357 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20358 esac ||
20359 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20360 esac
20361 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20362 as_fn_append ac_file_inputs " '$ac_f'"
20363 done
20365 # Let's still pretend it is `configure' which instantiates (i.e., don't
20366 # use $as_me), people would be surprised to read:
20367 # /* config.h. Generated by config.status. */
20368 configure_input='Generated from '`
20369 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20370 `' by configure.'
20371 if test x"$ac_file" != x-; then
20372 configure_input="$ac_file. $configure_input"
20373 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20374 $as_echo "$as_me: creating $ac_file" >&6;}
20376 # Neutralize special characters interpreted by sed in replacement strings.
20377 case $configure_input in #(
20378 *\&* | *\|* | *\\* )
20379 ac_sed_conf_input=`$as_echo "$configure_input" |
20380 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20381 *) ac_sed_conf_input=$configure_input;;
20382 esac
20384 case $ac_tag in
20385 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20386 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20387 esac
20389 esac
20391 ac_dir=`$as_dirname -- "$ac_file" ||
20392 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20393 X"$ac_file" : 'X\(//\)[^/]' \| \
20394 X"$ac_file" : 'X\(//\)$' \| \
20395 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20396 $as_echo X"$ac_file" |
20397 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20398 s//\1/
20401 /^X\(\/\/\)[^/].*/{
20402 s//\1/
20405 /^X\(\/\/\)$/{
20406 s//\1/
20409 /^X\(\/\).*/{
20410 s//\1/
20413 s/.*/./; q'`
20414 as_dir="$ac_dir"; as_fn_mkdir_p
20415 ac_builddir=.
20417 case "$ac_dir" in
20418 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20420 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20421 # A ".." for each directory in $ac_dir_suffix.
20422 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20423 case $ac_top_builddir_sub in
20424 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20425 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20426 esac ;;
20427 esac
20428 ac_abs_top_builddir=$ac_pwd
20429 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20430 # for backward compatibility:
20431 ac_top_builddir=$ac_top_build_prefix
20433 case $srcdir in
20434 .) # We are building in place.
20435 ac_srcdir=.
20436 ac_top_srcdir=$ac_top_builddir_sub
20437 ac_abs_top_srcdir=$ac_pwd ;;
20438 [\\/]* | ?:[\\/]* ) # Absolute name.
20439 ac_srcdir=$srcdir$ac_dir_suffix;
20440 ac_top_srcdir=$srcdir
20441 ac_abs_top_srcdir=$srcdir ;;
20442 *) # Relative name.
20443 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20444 ac_top_srcdir=$ac_top_build_prefix$srcdir
20445 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20446 esac
20447 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20450 case $ac_mode in
20453 # CONFIG_FILE
20456 case $INSTALL in
20457 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20458 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20459 esac
20460 ac_MKDIR_P=$MKDIR_P
20461 case $MKDIR_P in
20462 [\\/$]* | ?:[\\/]* ) ;;
20463 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20464 esac
20465 _ACEOF
20467 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20468 # If the template does not know about datarootdir, expand it.
20469 # FIXME: This hack should be removed a few years after 2.60.
20470 ac_datarootdir_hack=; ac_datarootdir_seen=
20471 ac_sed_dataroot='
20472 /datarootdir/ {
20476 /@datadir@/p
20477 /@docdir@/p
20478 /@infodir@/p
20479 /@localedir@/p
20480 /@mandir@/p'
20481 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20482 *datarootdir*) ac_datarootdir_seen=yes;;
20483 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20484 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20485 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20486 _ACEOF
20487 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20488 ac_datarootdir_hack='
20489 s&@datadir@&$datadir&g
20490 s&@docdir@&$docdir&g
20491 s&@infodir@&$infodir&g
20492 s&@localedir@&$localedir&g
20493 s&@mandir@&$mandir&g
20494 s&\\\${datarootdir}&$datarootdir&g' ;;
20495 esac
20496 _ACEOF
20498 # Neutralize VPATH when `$srcdir' = `.'.
20499 # Shell code in configure.ac might set extrasub.
20500 # FIXME: do we really want to maintain this feature?
20501 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20502 ac_sed_extra="$ac_vpsub
20503 $extrasub
20504 _ACEOF
20505 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20507 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20508 s|@configure_input@|$ac_sed_conf_input|;t t
20509 s&@top_builddir@&$ac_top_builddir_sub&;t t
20510 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20511 s&@srcdir@&$ac_srcdir&;t t
20512 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20513 s&@top_srcdir@&$ac_top_srcdir&;t t
20514 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20515 s&@builddir@&$ac_builddir&;t t
20516 s&@abs_builddir@&$ac_abs_builddir&;t t
20517 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20518 s&@INSTALL@&$ac_INSTALL&;t t
20519 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20520 $ac_datarootdir_hack
20522 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20523 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20525 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20526 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20527 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20528 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20530 which seems to be undefined. Please make sure it is defined" >&5
20531 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20532 which seems to be undefined. Please make sure it is defined" >&2;}
20534 rm -f "$ac_tmp/stdin"
20535 case $ac_file in
20536 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20537 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20538 esac \
20539 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20543 # CONFIG_HEADER
20545 if test x"$ac_file" != x-; then
20547 $as_echo "/* $configure_input */" \
20548 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20549 } >"$ac_tmp/config.h" \
20550 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20551 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20552 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20553 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20554 else
20555 rm -f "$ac_file"
20556 mv "$ac_tmp/config.h" "$ac_file" \
20557 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20559 else
20560 $as_echo "/* $configure_input */" \
20561 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20562 || as_fn_error $? "could not create -" "$LINENO" 5
20567 # CONFIG_LINK
20570 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20572 else
20573 # Prefer the file from the source tree if names are identical.
20574 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20575 ac_source=$srcdir/$ac_source
20578 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20579 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20581 if test ! -r "$ac_source"; then
20582 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20584 rm -f "$ac_file"
20586 # Try a relative symlink, then a hard link, then a copy.
20587 case $ac_source in
20588 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20589 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20590 esac
20591 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20592 ln "$ac_source" "$ac_file" 2>/dev/null ||
20593 cp -p "$ac_source" "$ac_file" ||
20594 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20597 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20598 $as_echo "$as_me: executing $ac_file commands" >&6;}
20600 esac
20603 case $ac_file$ac_mode in
20604 "check_win32_symlinks":C)
20605 # Links sometimes fail undetected on Mingw -
20606 # so here we detect it and warn the user
20607 for FILE in $CONFIG_LINKS
20609 # test -e works for symlinks in the MinGW console
20610 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20611 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20612 done
20614 "src/include/pg_config.h":H)
20615 # Update timestamp for pg_config.h (see Makefile.global)
20616 echo >src/include/stamp-h
20618 "src/include/pg_config_ext.h":H)
20619 # Update timestamp for pg_config_ext.h (see Makefile.global)
20620 echo >src/include/stamp-ext-h
20622 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20624 esac
20625 done # for ac_tag
20628 as_fn_exit 0
20629 _ACEOF
20630 ac_clean_files=$ac_clean_files_save
20632 test $ac_write_fail = 0 ||
20633 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20636 # configure is writing to config.log, and then calls config.status.
20637 # config.status does its own redirection, appending to config.log.
20638 # Unfortunately, on DOS this fails, as config.log is still kept open
20639 # by configure, so config.status won't be able to write to it; its
20640 # output is simply discarded. So we exec the FD to /dev/null,
20641 # effectively closing config.log, so it can be properly (re)opened and
20642 # appended to by config.status. When coming back to configure, we
20643 # need to make the FD available again.
20644 if test "$no_create" != yes; then
20645 ac_cs_success=:
20646 ac_config_status_args=
20647 test "$silent" = yes &&
20648 ac_config_status_args="$ac_config_status_args --quiet"
20649 exec 5>/dev/null
20650 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20651 exec 5>>config.log
20652 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20653 # would make configure fail if this is the last instruction.
20654 $ac_cs_success || as_fn_exit 1
20656 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20658 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20662 # Ensure that any meson build directories would reconfigure and see that
20663 # there's a conflicting in-tree build and can error out.
20664 if test "$vpath_build"="no"; then
20665 touch meson.build