Fix CLUSTER tuplesorts on abbreviated expressions.
[pgsql.git] / configure
bloba4b654ad94e08006033e931b0625892a0e10c7ed
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 15devel.
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='15devel'
586 PACKAGE_STRING='PostgreSQL 15devel'
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_SHLIB_LD_LIBS
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_ARMV8_CRC32C
650 CFLAGS_SSE42
651 have_win32_dbghelp
652 LIBOBJS
653 ZSTD
655 UUID_LIBS
656 LDAP_LIBS_BE
657 LDAP_LIBS_FE
658 with_ssl
659 PTHREAD_CFLAGS
660 PTHREAD_LIBS
661 PTHREAD_CC
662 ax_pthread_config
663 EGREP
664 GREP
667 python_additional_libs
668 python_libspec
669 python_libdir
670 python_includespec
671 python_version
672 python_majorversion
673 PYTHON
674 perl_embed_ldflags
675 perl_embed_ccflags
676 perl_includespec
677 perl_useshrplib
678 perl_privlibexp
679 perl_archlibexp
680 PERL
681 FLEXFLAGS
682 FLEX
683 BISONFLAGS
684 BISON
685 MKDIR_P
686 LN_S
688 install_bin
689 INSTALL_DATA
690 INSTALL_SCRIPT
691 INSTALL_PROGRAM
692 WINDRES
693 DLLWRAP
694 DLLTOOL
696 STRIP_SHARED_LIB
697 STRIP_STATIC_LIB
698 STRIP
699 RANLIB
700 with_gnu_ld
702 LDFLAGS_SL
703 LDFLAGS_EX
704 ZSTD_LIBS
705 ZSTD_CFLAGS
706 with_zstd
707 LZ4_LIBS
708 LZ4_CFLAGS
709 with_lz4
710 with_zlib
711 with_system_tzdata
712 with_libxslt
713 XML2_LIBS
714 XML2_CFLAGS
715 XML2_CONFIG
716 with_libxml
717 with_uuid
718 with_readline
719 with_systemd
720 with_selinux
721 with_ldap
722 with_krb_srvnam
723 krb_srvtab
724 with_gssapi
725 with_python
726 with_perl
727 with_tcl
728 ICU_LIBS
729 ICU_CFLAGS
730 with_icu
731 enable_thread_safety
732 INCLUDES
733 autodepend
734 PKG_CONFIG_LIBDIR
735 PKG_CONFIG_PATH
736 PKG_CONFIG
737 DLSUFFIX
741 CFLAGS_SL
742 BITCODE_CXXFLAGS
743 BITCODE_CFLAGS
744 CFLAGS_VECTORIZE
745 CFLAGS_UNROLL_LOOPS
746 PERMIT_DECLARATION_AFTER_STATEMENT
747 LLVM_BINPATH
748 LLVM_CXXFLAGS
749 LLVM_CFLAGS
750 LLVM_CPPFLAGS
751 LLVM_LIBS
752 CLANG
753 LLVM_CONFIG
755 with_llvm
756 SUN_STUDIO_CC
757 ac_ct_CXX
758 CXXFLAGS
760 OBJEXT
761 EXEEXT
762 ac_ct_CC
763 CPPFLAGS
764 LDFLAGS
765 CFLAGS
767 enable_tap_tests
768 enable_dtrace
769 DTRACEFLAGS
770 DTRACE
771 enable_coverage
772 GENHTML
773 LCOV
774 GCOV
775 enable_debug
776 enable_rpath
777 default_port
778 WANTED_LANGUAGES
779 enable_nls
780 PORTNAME
781 host_os
782 host_vendor
783 host_cpu
784 host
785 build_os
786 build_vendor
787 build_cpu
788 build
789 PG_MAJORVERSION
790 target_alias
791 host_alias
792 build_alias
793 LIBS
794 ECHO_T
795 ECHO_N
796 ECHO_C
797 DEFS
798 mandir
799 localedir
800 libdir
801 psdir
802 pdfdir
803 dvidir
804 htmldir
805 infodir
806 docdir
807 oldincludedir
808 includedir
809 localstatedir
810 sharedstatedir
811 sysconfdir
812 datadir
813 datarootdir
814 libexecdir
815 sbindir
816 bindir
817 program_transform_name
818 prefix
819 exec_prefix
820 PACKAGE_URL
821 PACKAGE_BUGREPORT
822 PACKAGE_STRING
823 PACKAGE_VERSION
824 PACKAGE_TARNAME
825 PACKAGE_NAME
826 PATH_SEPARATOR
827 SHELL'
828 ac_subst_files=''
829 ac_user_opts='
830 enable_option_checking
831 with_extra_version
832 with_template
833 with_includes
834 with_libraries
835 with_libs
836 enable_integer_datetimes
837 enable_nls
838 with_pgport
839 enable_rpath
840 enable_spinlocks
841 enable_atomics
842 enable_debug
843 enable_profiling
844 enable_coverage
845 enable_dtrace
846 enable_tap_tests
847 with_blocksize
848 with_segsize
849 with_wal_blocksize
850 with_CC
851 with_llvm
852 enable_depend
853 enable_cassert
854 enable_thread_safety
855 with_icu
856 with_tcl
857 with_tclconfig
858 with_perl
859 with_python
860 with_gssapi
861 with_krb_srvnam
862 with_pam
863 with_bsd_auth
864 with_ldap
865 with_bonjour
866 with_selinux
867 with_systemd
868 with_readline
869 with_libedit_preferred
870 with_uuid
871 with_ossp_uuid
872 with_libxml
873 with_libxslt
874 with_system_tzdata
875 with_zlib
876 with_lz4
877 with_zstd
878 with_gnu_ld
879 with_ssl
880 with_openssl
881 enable_largefile
883 ac_precious_vars='build_alias
884 host_alias
885 target_alias
887 CFLAGS
888 LDFLAGS
889 LIBS
890 CPPFLAGS
892 CXXFLAGS
894 LLVM_CONFIG
895 CLANG
897 PKG_CONFIG
898 PKG_CONFIG_PATH
899 PKG_CONFIG_LIBDIR
900 ICU_CFLAGS
901 ICU_LIBS
902 XML2_CONFIG
903 XML2_CFLAGS
904 XML2_LIBS
905 LZ4_CFLAGS
906 LZ4_LIBS
907 ZSTD_CFLAGS
908 ZSTD_LIBS
909 LDFLAGS_EX
910 LDFLAGS_SL
911 PERL
912 PYTHON
913 MSGFMT
914 TCLSH'
917 # Initialize some variables set by options.
918 ac_init_help=
919 ac_init_version=false
920 ac_unrecognized_opts=
921 ac_unrecognized_sep=
922 # The variables have the same names as the options, with
923 # dashes changed to underlines.
924 cache_file=/dev/null
925 exec_prefix=NONE
926 no_create=
927 no_recursion=
928 prefix=NONE
929 program_prefix=NONE
930 program_suffix=NONE
931 program_transform_name=s,x,x,
932 silent=
933 site=
934 srcdir=
935 verbose=
936 x_includes=NONE
937 x_libraries=NONE
939 # Installation directory options.
940 # These are left unexpanded so users can "make install exec_prefix=/foo"
941 # and all the variables that are supposed to be based on exec_prefix
942 # by default will actually change.
943 # Use braces instead of parens because sh, perl, etc. also accept them.
944 # (The list follows the same order as the GNU Coding Standards.)
945 bindir='${exec_prefix}/bin'
946 sbindir='${exec_prefix}/sbin'
947 libexecdir='${exec_prefix}/libexec'
948 datarootdir='${prefix}/share'
949 datadir='${datarootdir}'
950 sysconfdir='${prefix}/etc'
951 sharedstatedir='${prefix}/com'
952 localstatedir='${prefix}/var'
953 includedir='${prefix}/include'
954 oldincludedir='/usr/include'
955 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
956 infodir='${datarootdir}/info'
957 htmldir='${docdir}'
958 dvidir='${docdir}'
959 pdfdir='${docdir}'
960 psdir='${docdir}'
961 libdir='${exec_prefix}/lib'
962 localedir='${datarootdir}/locale'
963 mandir='${datarootdir}/man'
965 ac_prev=
966 ac_dashdash=
967 for ac_option
969 # If the previous option needs an argument, assign it.
970 if test -n "$ac_prev"; then
971 eval $ac_prev=\$ac_option
972 ac_prev=
973 continue
976 case $ac_option in
977 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
978 *=) ac_optarg= ;;
979 *) ac_optarg=yes ;;
980 esac
982 # Accept the important Cygnus configure options, so we can diagnose typos.
984 case $ac_dashdash$ac_option in
986 ac_dashdash=yes ;;
988 -bindir | --bindir | --bindi | --bind | --bin | --bi)
989 ac_prev=bindir ;;
990 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
991 bindir=$ac_optarg ;;
993 -build | --build | --buil | --bui | --bu)
994 ac_prev=build_alias ;;
995 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
996 build_alias=$ac_optarg ;;
998 -cache-file | --cache-file | --cache-fil | --cache-fi \
999 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1000 ac_prev=cache_file ;;
1001 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1002 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1003 cache_file=$ac_optarg ;;
1005 --config-cache | -C)
1006 cache_file=config.cache ;;
1008 -datadir | --datadir | --datadi | --datad)
1009 ac_prev=datadir ;;
1010 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1011 datadir=$ac_optarg ;;
1013 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1014 | --dataroo | --dataro | --datar)
1015 ac_prev=datarootdir ;;
1016 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1017 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1018 datarootdir=$ac_optarg ;;
1020 -disable-* | --disable-*)
1021 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1022 # Reject names that are not valid shell variable names.
1023 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1024 as_fn_error $? "invalid feature name: $ac_useropt"
1025 ac_useropt_orig=$ac_useropt
1026 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1027 case $ac_user_opts in
1029 "enable_$ac_useropt"
1030 "*) ;;
1031 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1032 ac_unrecognized_sep=', ';;
1033 esac
1034 eval enable_$ac_useropt=no ;;
1036 -docdir | --docdir | --docdi | --doc | --do)
1037 ac_prev=docdir ;;
1038 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1039 docdir=$ac_optarg ;;
1041 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1042 ac_prev=dvidir ;;
1043 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1044 dvidir=$ac_optarg ;;
1046 -enable-* | --enable-*)
1047 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1048 # Reject names that are not valid shell variable names.
1049 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1050 as_fn_error $? "invalid feature name: $ac_useropt"
1051 ac_useropt_orig=$ac_useropt
1052 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1053 case $ac_user_opts in
1055 "enable_$ac_useropt"
1056 "*) ;;
1057 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1058 ac_unrecognized_sep=', ';;
1059 esac
1060 eval enable_$ac_useropt=\$ac_optarg ;;
1062 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1063 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1064 | --exec | --exe | --ex)
1065 ac_prev=exec_prefix ;;
1066 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1067 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1068 | --exec=* | --exe=* | --ex=*)
1069 exec_prefix=$ac_optarg ;;
1071 -gas | --gas | --ga | --g)
1072 # Obsolete; use --with-gas.
1073 with_gas=yes ;;
1075 -help | --help | --hel | --he | -h)
1076 ac_init_help=long ;;
1077 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1078 ac_init_help=recursive ;;
1079 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1080 ac_init_help=short ;;
1082 -host | --host | --hos | --ho)
1083 ac_prev=host_alias ;;
1084 -host=* | --host=* | --hos=* | --ho=*)
1085 host_alias=$ac_optarg ;;
1087 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1088 ac_prev=htmldir ;;
1089 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1090 | --ht=*)
1091 htmldir=$ac_optarg ;;
1093 -includedir | --includedir | --includedi | --included | --include \
1094 | --includ | --inclu | --incl | --inc)
1095 ac_prev=includedir ;;
1096 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1097 | --includ=* | --inclu=* | --incl=* | --inc=*)
1098 includedir=$ac_optarg ;;
1100 -infodir | --infodir | --infodi | --infod | --info | --inf)
1101 ac_prev=infodir ;;
1102 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1103 infodir=$ac_optarg ;;
1105 -libdir | --libdir | --libdi | --libd)
1106 ac_prev=libdir ;;
1107 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1108 libdir=$ac_optarg ;;
1110 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1111 | --libexe | --libex | --libe)
1112 ac_prev=libexecdir ;;
1113 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1114 | --libexe=* | --libex=* | --libe=*)
1115 libexecdir=$ac_optarg ;;
1117 -localedir | --localedir | --localedi | --localed | --locale)
1118 ac_prev=localedir ;;
1119 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1120 localedir=$ac_optarg ;;
1122 -localstatedir | --localstatedir | --localstatedi | --localstated \
1123 | --localstate | --localstat | --localsta | --localst | --locals)
1124 ac_prev=localstatedir ;;
1125 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1126 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1127 localstatedir=$ac_optarg ;;
1129 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1130 ac_prev=mandir ;;
1131 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1132 mandir=$ac_optarg ;;
1134 -nfp | --nfp | --nf)
1135 # Obsolete; use --without-fp.
1136 with_fp=no ;;
1138 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1139 | --no-cr | --no-c | -n)
1140 no_create=yes ;;
1142 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1143 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1144 no_recursion=yes ;;
1146 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1147 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1148 | --oldin | --oldi | --old | --ol | --o)
1149 ac_prev=oldincludedir ;;
1150 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1151 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1152 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1153 oldincludedir=$ac_optarg ;;
1155 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1156 ac_prev=prefix ;;
1157 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1158 prefix=$ac_optarg ;;
1160 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1161 | --program-pre | --program-pr | --program-p)
1162 ac_prev=program_prefix ;;
1163 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1164 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1165 program_prefix=$ac_optarg ;;
1167 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1168 | --program-suf | --program-su | --program-s)
1169 ac_prev=program_suffix ;;
1170 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1171 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1172 program_suffix=$ac_optarg ;;
1174 -program-transform-name | --program-transform-name \
1175 | --program-transform-nam | --program-transform-na \
1176 | --program-transform-n | --program-transform- \
1177 | --program-transform | --program-transfor \
1178 | --program-transfo | --program-transf \
1179 | --program-trans | --program-tran \
1180 | --progr-tra | --program-tr | --program-t)
1181 ac_prev=program_transform_name ;;
1182 -program-transform-name=* | --program-transform-name=* \
1183 | --program-transform-nam=* | --program-transform-na=* \
1184 | --program-transform-n=* | --program-transform-=* \
1185 | --program-transform=* | --program-transfor=* \
1186 | --program-transfo=* | --program-transf=* \
1187 | --program-trans=* | --program-tran=* \
1188 | --progr-tra=* | --program-tr=* | --program-t=*)
1189 program_transform_name=$ac_optarg ;;
1191 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1192 ac_prev=pdfdir ;;
1193 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1194 pdfdir=$ac_optarg ;;
1196 -psdir | --psdir | --psdi | --psd | --ps)
1197 ac_prev=psdir ;;
1198 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1199 psdir=$ac_optarg ;;
1201 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1202 | -silent | --silent | --silen | --sile | --sil)
1203 silent=yes ;;
1205 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1206 ac_prev=sbindir ;;
1207 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1208 | --sbi=* | --sb=*)
1209 sbindir=$ac_optarg ;;
1211 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1212 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1213 | --sharedst | --shareds | --shared | --share | --shar \
1214 | --sha | --sh)
1215 ac_prev=sharedstatedir ;;
1216 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1217 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1218 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1219 | --sha=* | --sh=*)
1220 sharedstatedir=$ac_optarg ;;
1222 -site | --site | --sit)
1223 ac_prev=site ;;
1224 -site=* | --site=* | --sit=*)
1225 site=$ac_optarg ;;
1227 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1228 ac_prev=srcdir ;;
1229 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1230 srcdir=$ac_optarg ;;
1232 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1233 | --syscon | --sysco | --sysc | --sys | --sy)
1234 ac_prev=sysconfdir ;;
1235 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1236 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1237 sysconfdir=$ac_optarg ;;
1239 -target | --target | --targe | --targ | --tar | --ta | --t)
1240 ac_prev=target_alias ;;
1241 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1242 target_alias=$ac_optarg ;;
1244 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1245 verbose=yes ;;
1247 -version | --version | --versio | --versi | --vers | -V)
1248 ac_init_version=: ;;
1250 -with-* | --with-*)
1251 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1252 # Reject names that are not valid shell variable names.
1253 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1254 as_fn_error $? "invalid package name: $ac_useropt"
1255 ac_useropt_orig=$ac_useropt
1256 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1257 case $ac_user_opts in
1259 "with_$ac_useropt"
1260 "*) ;;
1261 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1262 ac_unrecognized_sep=', ';;
1263 esac
1264 eval with_$ac_useropt=\$ac_optarg ;;
1266 -without-* | --without-*)
1267 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1268 # Reject names that are not valid shell variable names.
1269 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1270 as_fn_error $? "invalid package name: $ac_useropt"
1271 ac_useropt_orig=$ac_useropt
1272 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1273 case $ac_user_opts in
1275 "with_$ac_useropt"
1276 "*) ;;
1277 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1278 ac_unrecognized_sep=', ';;
1279 esac
1280 eval with_$ac_useropt=no ;;
1282 --x)
1283 # Obsolete; use --with-x.
1284 with_x=yes ;;
1286 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1287 | --x-incl | --x-inc | --x-in | --x-i)
1288 ac_prev=x_includes ;;
1289 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1290 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1291 x_includes=$ac_optarg ;;
1293 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1294 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1295 ac_prev=x_libraries ;;
1296 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1297 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1298 x_libraries=$ac_optarg ;;
1300 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1301 Try \`$0 --help' for more information"
1304 *=*)
1305 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1306 # Reject names that are not valid shell variable names.
1307 case $ac_envvar in #(
1308 '' | [0-9]* | *[!_$as_cr_alnum]* )
1309 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1310 esac
1311 eval $ac_envvar=\$ac_optarg
1312 export $ac_envvar ;;
1315 # FIXME: should be removed in autoconf 3.0.
1316 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1317 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1318 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1319 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1322 esac
1323 done
1325 if test -n "$ac_prev"; then
1326 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1327 as_fn_error $? "missing argument to $ac_option"
1330 if test -n "$ac_unrecognized_opts"; then
1331 case $enable_option_checking in
1332 no) ;;
1333 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1334 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1335 esac
1338 # Check all directory arguments for consistency.
1339 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1340 datadir sysconfdir sharedstatedir localstatedir includedir \
1341 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1342 libdir localedir mandir
1344 eval ac_val=\$$ac_var
1345 # Remove trailing slashes.
1346 case $ac_val in
1347 */ )
1348 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1349 eval $ac_var=\$ac_val;;
1350 esac
1351 # Be sure to have absolute directory names.
1352 case $ac_val in
1353 [\\/$]* | ?:[\\/]* ) continue;;
1354 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1355 esac
1356 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1357 done
1359 # There might be people who depend on the old broken behavior: `$host'
1360 # used to hold the argument of --host etc.
1361 # FIXME: To remove some day.
1362 build=$build_alias
1363 host=$host_alias
1364 target=$target_alias
1366 # FIXME: To remove some day.
1367 if test "x$host_alias" != x; then
1368 if test "x$build_alias" = x; then
1369 cross_compiling=maybe
1370 elif test "x$build_alias" != "x$host_alias"; then
1371 cross_compiling=yes
1375 ac_tool_prefix=
1376 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1378 test "$silent" = yes && exec 6>/dev/null
1381 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1382 ac_ls_di=`ls -di .` &&
1383 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1384 as_fn_error $? "working directory cannot be determined"
1385 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1386 as_fn_error $? "pwd does not report name of working directory"
1389 # Find the source files, if location was not specified.
1390 if test -z "$srcdir"; then
1391 ac_srcdir_defaulted=yes
1392 # Try the directory containing this script, then the parent directory.
1393 ac_confdir=`$as_dirname -- "$as_myself" ||
1394 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1395 X"$as_myself" : 'X\(//\)[^/]' \| \
1396 X"$as_myself" : 'X\(//\)$' \| \
1397 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1398 $as_echo X"$as_myself" |
1399 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1400 s//\1/
1403 /^X\(\/\/\)[^/].*/{
1404 s//\1/
1407 /^X\(\/\/\)$/{
1408 s//\1/
1411 /^X\(\/\).*/{
1412 s//\1/
1415 s/.*/./; q'`
1416 srcdir=$ac_confdir
1417 if test ! -r "$srcdir/$ac_unique_file"; then
1418 srcdir=..
1420 else
1421 ac_srcdir_defaulted=no
1423 if test ! -r "$srcdir/$ac_unique_file"; then
1424 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1425 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1427 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1428 ac_abs_confdir=`(
1429 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1430 pwd)`
1431 # When building in place, set srcdir=.
1432 if test "$ac_abs_confdir" = "$ac_pwd"; then
1433 srcdir=.
1435 # Remove unnecessary trailing slashes from srcdir.
1436 # Double slashes in file names in object file debugging info
1437 # mess up M-x gdb in Emacs.
1438 case $srcdir in
1439 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1440 esac
1441 for ac_var in $ac_precious_vars; do
1442 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1443 eval ac_env_${ac_var}_value=\$${ac_var}
1444 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1445 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1446 done
1449 # Report the --help message.
1451 if test "$ac_init_help" = "long"; then
1452 # Omit some internal or obsolete options to make the list less imposing.
1453 # This message is too long to be a string in the A/UX 3.1 sh.
1454 cat <<_ACEOF
1455 \`configure' configures PostgreSQL 15devel to adapt to many kinds of systems.
1457 Usage: $0 [OPTION]... [VAR=VALUE]...
1459 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1460 VAR=VALUE. See below for descriptions of some of the useful variables.
1462 Defaults for the options are specified in brackets.
1464 Configuration:
1465 -h, --help display this help and exit
1466 --help=short display options specific to this package
1467 --help=recursive display the short help of all the included packages
1468 -V, --version display version information and exit
1469 -q, --quiet, --silent do not print \`checking ...' messages
1470 --cache-file=FILE cache test results in FILE [disabled]
1471 -C, --config-cache alias for \`--cache-file=config.cache'
1472 -n, --no-create do not create output files
1473 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1475 Installation directories:
1476 --prefix=PREFIX install architecture-independent files in PREFIX
1477 [$ac_default_prefix]
1478 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1479 [PREFIX]
1481 By default, \`make install' will install all the files in
1482 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1483 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1484 for instance \`--prefix=\$HOME'.
1486 For better control, use the options below.
1488 Fine tuning of the installation directories:
1489 --bindir=DIR user executables [EPREFIX/bin]
1490 --sbindir=DIR system admin executables [EPREFIX/sbin]
1491 --libexecdir=DIR program executables [EPREFIX/libexec]
1492 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1493 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1494 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1495 --libdir=DIR object code libraries [EPREFIX/lib]
1496 --includedir=DIR C header files [PREFIX/include]
1497 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1498 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1499 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1500 --infodir=DIR info documentation [DATAROOTDIR/info]
1501 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1502 --mandir=DIR man documentation [DATAROOTDIR/man]
1503 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1504 --htmldir=DIR html documentation [DOCDIR]
1505 --dvidir=DIR dvi documentation [DOCDIR]
1506 --pdfdir=DIR pdf documentation [DOCDIR]
1507 --psdir=DIR ps documentation [DOCDIR]
1508 _ACEOF
1510 cat <<\_ACEOF
1512 System types:
1513 --build=BUILD configure for building on BUILD [guessed]
1514 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1515 _ACEOF
1518 if test -n "$ac_init_help"; then
1519 case $ac_init_help in
1520 short | recursive ) echo "Configuration of PostgreSQL 15devel:";;
1521 esac
1522 cat <<\_ACEOF
1524 Optional Features:
1525 --disable-option-checking ignore unrecognized --enable/--with options
1526 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1527 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1528 --disable-integer-datetimes
1529 obsolete option, no longer supported
1530 --enable-nls[=LANGUAGES]
1531 enable Native Language Support
1532 --disable-rpath do not embed shared library search path in
1533 executables
1534 --disable-spinlocks do not use spinlocks
1535 --disable-atomics do not use atomic operations
1536 --enable-debug build with debugging symbols (-g)
1537 --enable-profiling build with profiling enabled
1538 --enable-coverage build with coverage testing instrumentation
1539 --enable-dtrace build with DTrace support
1540 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1541 --enable-depend turn on automatic dependency tracking
1542 --enable-cassert enable assertion checks (for debugging)
1543 --disable-thread-safety disable thread-safety in client libraries
1544 --disable-largefile omit support for large files
1546 Optional Packages:
1547 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1548 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1549 --with-extra-version=STRING
1550 append STRING to version
1551 --with-template=NAME override operating system template
1552 --with-includes=DIRS look for additional header files in DIRS
1553 --with-libraries=DIRS look for additional libraries in DIRS
1554 --with-libs=DIRS alternative spelling of --with-libraries
1555 --with-pgport=PORTNUM set default port number [5432]
1556 --with-blocksize=BLOCKSIZE
1557 set table block size in kB [8]
1558 --with-segsize=SEGSIZE set table segment size in GB [1]
1559 --with-wal-blocksize=BLOCKSIZE
1560 set WAL block size in kB [8]
1561 --with-CC=CMD set compiler (deprecated)
1562 --with-llvm build with LLVM based JIT support
1563 --with-icu build with ICU support
1564 --with-tcl build Tcl modules (PL/Tcl)
1565 --with-tclconfig=DIR tclConfig.sh is in DIR
1566 --with-perl build Perl modules (PL/Perl)
1567 --with-python build Python modules (PL/Python)
1568 --with-gssapi build with GSSAPI support
1569 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1570 [postgres]
1571 --with-pam build with PAM support
1572 --with-bsd-auth build with BSD Authentication support
1573 --with-ldap build with LDAP support
1574 --with-bonjour build with Bonjour support
1575 --with-selinux build with SELinux support
1576 --with-systemd build with systemd support
1577 --without-readline do not use GNU Readline nor BSD Libedit for editing
1578 --with-libedit-preferred
1579 prefer BSD Libedit over GNU Readline
1580 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1581 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1582 --with-libxml build with XML support
1583 --with-libxslt use XSLT support when building contrib/xml2
1584 --with-system-tzdata=DIR
1585 use system time zone data in DIR
1586 --without-zlib do not use Zlib
1587 --with-lz4 build with LZ4 support
1588 --with-zstd build with ZSTD support
1589 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1590 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1591 --with-openssl obsolete spelling of --with-ssl=openssl
1593 Some influential environment variables:
1594 CC C compiler command
1595 CFLAGS C compiler flags
1596 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1597 nonstandard directory <lib dir>
1598 LIBS libraries to pass to the linker, e.g. -l<library>
1599 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1600 you have headers in a nonstandard directory <include dir>
1601 CXX C++ compiler command
1602 CXXFLAGS C++ compiler flags
1603 LLVM_CONFIG path to llvm-config command
1604 CLANG path to clang compiler to generate bitcode
1605 CPP C preprocessor
1606 PKG_CONFIG path to pkg-config utility
1607 PKG_CONFIG_PATH
1608 directories to add to pkg-config's search path
1609 PKG_CONFIG_LIBDIR
1610 path overriding pkg-config's built-in search path
1611 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1612 ICU_LIBS linker flags for ICU, overriding pkg-config
1613 XML2_CONFIG path to xml2-config utility
1614 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1615 XML2_LIBS linker flags for XML2, overriding pkg-config
1616 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1617 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1618 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1619 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1620 LDFLAGS_EX extra linker flags for linking executables only
1621 LDFLAGS_SL extra linker flags for linking shared libraries only
1622 PERL Perl program
1623 PYTHON Python program
1624 MSGFMT msgfmt program for NLS
1625 TCLSH Tcl interpreter program (tclsh)
1627 Use these variables to override the choices made by `configure' or to help
1628 it to find libraries and programs with nonstandard names/locations.
1630 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1631 PostgreSQL home page: <https://www.postgresql.org/>.
1632 _ACEOF
1633 ac_status=$?
1636 if test "$ac_init_help" = "recursive"; then
1637 # If there are subdirs, report their specific --help.
1638 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1639 test -d "$ac_dir" ||
1640 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1641 continue
1642 ac_builddir=.
1644 case "$ac_dir" in
1645 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1647 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1648 # A ".." for each directory in $ac_dir_suffix.
1649 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1650 case $ac_top_builddir_sub in
1651 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1652 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1653 esac ;;
1654 esac
1655 ac_abs_top_builddir=$ac_pwd
1656 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1657 # for backward compatibility:
1658 ac_top_builddir=$ac_top_build_prefix
1660 case $srcdir in
1661 .) # We are building in place.
1662 ac_srcdir=.
1663 ac_top_srcdir=$ac_top_builddir_sub
1664 ac_abs_top_srcdir=$ac_pwd ;;
1665 [\\/]* | ?:[\\/]* ) # Absolute name.
1666 ac_srcdir=$srcdir$ac_dir_suffix;
1667 ac_top_srcdir=$srcdir
1668 ac_abs_top_srcdir=$srcdir ;;
1669 *) # Relative name.
1670 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1671 ac_top_srcdir=$ac_top_build_prefix$srcdir
1672 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1673 esac
1674 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1676 cd "$ac_dir" || { ac_status=$?; continue; }
1677 # Check for guested configure.
1678 if test -f "$ac_srcdir/configure.gnu"; then
1679 echo &&
1680 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1681 elif test -f "$ac_srcdir/configure"; then
1682 echo &&
1683 $SHELL "$ac_srcdir/configure" --help=recursive
1684 else
1685 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1686 fi || ac_status=$?
1687 cd "$ac_pwd" || { ac_status=$?; break; }
1688 done
1691 test -n "$ac_init_help" && exit $ac_status
1692 if $ac_init_version; then
1693 cat <<\_ACEOF
1694 PostgreSQL configure 15devel
1695 generated by GNU Autoconf 2.69
1697 Copyright (C) 2012 Free Software Foundation, Inc.
1698 This configure script is free software; the Free Software Foundation
1699 gives unlimited permission to copy, distribute and modify it.
1701 Copyright (c) 1996-2022, PostgreSQL Global Development Group
1702 _ACEOF
1703 exit
1706 ## ------------------------ ##
1707 ## Autoconf initialization. ##
1708 ## ------------------------ ##
1710 # ac_fn_c_try_compile LINENO
1711 # --------------------------
1712 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1713 ac_fn_c_try_compile ()
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1716 rm -f conftest.$ac_objext
1717 if { { ac_try="$ac_compile"
1718 case "(($ac_try" in
1719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1720 *) ac_try_echo=$ac_try;;
1721 esac
1722 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1723 $as_echo "$ac_try_echo"; } >&5
1724 (eval "$ac_compile") 2>conftest.err
1725 ac_status=$?
1726 if test -s conftest.err; then
1727 grep -v '^ *+' conftest.err >conftest.er1
1728 cat conftest.er1 >&5
1729 mv -f conftest.er1 conftest.err
1731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1732 test $ac_status = 0; } && {
1733 test -z "$ac_c_werror_flag" ||
1734 test ! -s conftest.err
1735 } && test -s conftest.$ac_objext; then :
1736 ac_retval=0
1737 else
1738 $as_echo "$as_me: failed program was:" >&5
1739 sed 's/^/| /' conftest.$ac_ext >&5
1741 ac_retval=1
1743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1744 as_fn_set_status $ac_retval
1746 } # ac_fn_c_try_compile
1748 # ac_fn_cxx_try_compile LINENO
1749 # ----------------------------
1750 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1751 ac_fn_cxx_try_compile ()
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 rm -f conftest.$ac_objext
1755 if { { ac_try="$ac_compile"
1756 case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759 esac
1760 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761 $as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_compile") 2>conftest.err
1763 ac_status=$?
1764 if test -s conftest.err; then
1765 grep -v '^ *+' conftest.err >conftest.er1
1766 cat conftest.er1 >&5
1767 mv -f conftest.er1 conftest.err
1769 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1770 test $ac_status = 0; } && {
1771 test -z "$ac_cxx_werror_flag" ||
1772 test ! -s conftest.err
1773 } && test -s conftest.$ac_objext; then :
1774 ac_retval=0
1775 else
1776 $as_echo "$as_me: failed program was:" >&5
1777 sed 's/^/| /' conftest.$ac_ext >&5
1779 ac_retval=1
1781 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1782 as_fn_set_status $ac_retval
1784 } # ac_fn_cxx_try_compile
1786 # ac_fn_c_try_link LINENO
1787 # -----------------------
1788 # Try to link conftest.$ac_ext, and return whether this succeeded.
1789 ac_fn_c_try_link ()
1791 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1792 rm -f conftest.$ac_objext conftest$ac_exeext
1793 if { { ac_try="$ac_link"
1794 case "(($ac_try" in
1795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1796 *) ac_try_echo=$ac_try;;
1797 esac
1798 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1799 $as_echo "$ac_try_echo"; } >&5
1800 (eval "$ac_link") 2>conftest.err
1801 ac_status=$?
1802 if test -s conftest.err; then
1803 grep -v '^ *+' conftest.err >conftest.er1
1804 cat conftest.er1 >&5
1805 mv -f conftest.er1 conftest.err
1807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1808 test $ac_status = 0; } && {
1809 test -z "$ac_c_werror_flag" ||
1810 test ! -s conftest.err
1811 } && test -s conftest$ac_exeext && {
1812 test "$cross_compiling" = yes ||
1813 test -x conftest$ac_exeext
1814 }; then :
1815 ac_retval=0
1816 else
1817 $as_echo "$as_me: failed program was:" >&5
1818 sed 's/^/| /' conftest.$ac_ext >&5
1820 ac_retval=1
1822 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1823 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1824 # interfere with the next link command; also delete a directory that is
1825 # left behind by Apple's compiler. We do this before executing the actions.
1826 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1827 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1828 as_fn_set_status $ac_retval
1830 } # ac_fn_c_try_link
1832 # ac_fn_c_try_cpp LINENO
1833 # ----------------------
1834 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1835 ac_fn_c_try_cpp ()
1837 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1838 if { { ac_try="$ac_cpp conftest.$ac_ext"
1839 case "(($ac_try" in
1840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1841 *) ac_try_echo=$ac_try;;
1842 esac
1843 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1844 $as_echo "$ac_try_echo"; } >&5
1845 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1846 ac_status=$?
1847 if test -s conftest.err; then
1848 grep -v '^ *+' conftest.err >conftest.er1
1849 cat conftest.er1 >&5
1850 mv -f conftest.er1 conftest.err
1852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853 test $ac_status = 0; } > conftest.i && {
1854 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1855 test ! -s conftest.err
1856 }; then :
1857 ac_retval=0
1858 else
1859 $as_echo "$as_me: failed program was:" >&5
1860 sed 's/^/| /' conftest.$ac_ext >&5
1862 ac_retval=1
1864 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1865 as_fn_set_status $ac_retval
1867 } # ac_fn_c_try_cpp
1869 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1870 # -------------------------------------------------------
1871 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1872 # the include files in INCLUDES and setting the cache variable VAR
1873 # accordingly.
1874 ac_fn_c_check_header_mongrel ()
1876 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1877 if eval \${$3+:} false; then :
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1879 $as_echo_n "checking for $2... " >&6; }
1880 if eval \${$3+:} false; then :
1881 $as_echo_n "(cached) " >&6
1883 eval ac_res=\$$3
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1885 $as_echo "$ac_res" >&6; }
1886 else
1887 # Is the header compilable?
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1889 $as_echo_n "checking $2 usability... " >&6; }
1890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891 /* end confdefs.h. */
1893 #include <$2>
1894 _ACEOF
1895 if ac_fn_c_try_compile "$LINENO"; then :
1896 ac_header_compiler=yes
1897 else
1898 ac_header_compiler=no
1900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1902 $as_echo "$ac_header_compiler" >&6; }
1904 # Is the header present?
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1906 $as_echo_n "checking $2 presence... " >&6; }
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908 /* end confdefs.h. */
1909 #include <$2>
1910 _ACEOF
1911 if ac_fn_c_try_cpp "$LINENO"; then :
1912 ac_header_preproc=yes
1913 else
1914 ac_header_preproc=no
1916 rm -f conftest.err conftest.i conftest.$ac_ext
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1918 $as_echo "$ac_header_preproc" >&6; }
1920 # So? What about this header?
1921 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1922 yes:no: )
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1924 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1926 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1928 no:yes:* )
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1930 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1932 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1934 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1936 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1938 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1939 ( $as_echo "## ---------------------------------------------- ##
1940 ## Report this to pgsql-bugs@lists.postgresql.org ##
1941 ## ---------------------------------------------- ##"
1942 ) | sed "s/^/$as_me: WARNING: /" >&2
1944 esac
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1946 $as_echo_n "checking for $2... " >&6; }
1947 if eval \${$3+:} false; then :
1948 $as_echo_n "(cached) " >&6
1949 else
1950 eval "$3=\$ac_header_compiler"
1952 eval ac_res=\$$3
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1954 $as_echo "$ac_res" >&6; }
1956 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1958 } # ac_fn_c_check_header_mongrel
1960 # ac_fn_c_try_run LINENO
1961 # ----------------------
1962 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1963 # that executables *can* be run.
1964 ac_fn_c_try_run ()
1966 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1967 if { { ac_try="$ac_link"
1968 case "(($ac_try" in
1969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1970 *) ac_try_echo=$ac_try;;
1971 esac
1972 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1973 $as_echo "$ac_try_echo"; } >&5
1974 (eval "$ac_link") 2>&5
1975 ac_status=$?
1976 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1977 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1978 { { case "(($ac_try" in
1979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1980 *) ac_try_echo=$ac_try;;
1981 esac
1982 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1983 $as_echo "$ac_try_echo"; } >&5
1984 (eval "$ac_try") 2>&5
1985 ac_status=$?
1986 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1987 test $ac_status = 0; }; }; then :
1988 ac_retval=0
1989 else
1990 $as_echo "$as_me: program exited with status $ac_status" >&5
1991 $as_echo "$as_me: failed program was:" >&5
1992 sed 's/^/| /' conftest.$ac_ext >&5
1994 ac_retval=$ac_status
1996 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1998 as_fn_set_status $ac_retval
2000 } # ac_fn_c_try_run
2002 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2003 # -------------------------------------------------------
2004 # Tests whether HEADER exists and can be compiled using the include files in
2005 # INCLUDES, setting the cache variable VAR accordingly.
2006 ac_fn_c_check_header_compile ()
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2010 $as_echo_n "checking for $2... " >&6; }
2011 if eval \${$3+:} false; then :
2012 $as_echo_n "(cached) " >&6
2013 else
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015 /* end confdefs.h. */
2017 #include <$2>
2018 _ACEOF
2019 if ac_fn_c_try_compile "$LINENO"; then :
2020 eval "$3=yes"
2021 else
2022 eval "$3=no"
2024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2026 eval ac_res=\$$3
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2028 $as_echo "$ac_res" >&6; }
2029 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2031 } # ac_fn_c_check_header_compile
2033 # ac_fn_c_check_func LINENO FUNC VAR
2034 # ----------------------------------
2035 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2036 ac_fn_c_check_func ()
2038 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2040 $as_echo_n "checking for $2... " >&6; }
2041 if eval \${$3+:} false; then :
2042 $as_echo_n "(cached) " >&6
2043 else
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045 /* end confdefs.h. */
2046 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2047 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2048 #define $2 innocuous_$2
2050 /* System header to define __stub macros and hopefully few prototypes,
2051 which can conflict with char $2 (); below.
2052 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2053 <limits.h> exists even on freestanding compilers. */
2055 #ifdef __STDC__
2056 # include <limits.h>
2057 #else
2058 # include <assert.h>
2059 #endif
2061 #undef $2
2063 /* Override any GCC internal prototype to avoid an error.
2064 Use char because int might match the return type of a GCC
2065 builtin and then its argument prototype would still apply. */
2066 #ifdef __cplusplus
2067 extern "C"
2068 #endif
2069 char $2 ();
2070 /* The GNU C library defines this for functions which it implements
2071 to always fail with ENOSYS. Some functions are actually named
2072 something starting with __ and the normal name is an alias. */
2073 #if defined __stub_$2 || defined __stub___$2
2074 choke me
2075 #endif
2078 main ()
2080 return $2 ();
2082 return 0;
2084 _ACEOF
2085 if ac_fn_c_try_link "$LINENO"; then :
2086 eval "$3=yes"
2087 else
2088 eval "$3=no"
2090 rm -f core conftest.err conftest.$ac_objext \
2091 conftest$ac_exeext conftest.$ac_ext
2093 eval ac_res=\$$3
2094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2095 $as_echo "$ac_res" >&6; }
2096 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2098 } # ac_fn_c_check_func
2100 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2101 # -------------------------------------------
2102 # Tests whether TYPE exists after having included INCLUDES, setting cache
2103 # variable VAR accordingly.
2104 ac_fn_c_check_type ()
2106 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2108 $as_echo_n "checking for $2... " >&6; }
2109 if eval \${$3+:} false; then :
2110 $as_echo_n "(cached) " >&6
2111 else
2112 eval "$3=no"
2113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114 /* end confdefs.h. */
2117 main ()
2119 if (sizeof ($2))
2120 return 0;
2122 return 0;
2124 _ACEOF
2125 if ac_fn_c_try_compile "$LINENO"; then :
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127 /* end confdefs.h. */
2130 main ()
2132 if (sizeof (($2)))
2133 return 0;
2135 return 0;
2137 _ACEOF
2138 if ac_fn_c_try_compile "$LINENO"; then :
2140 else
2141 eval "$3=yes"
2143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147 eval ac_res=\$$3
2148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2149 $as_echo "$ac_res" >&6; }
2150 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2152 } # ac_fn_c_check_type
2154 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2155 # ----------------------------------------------------
2156 # Tries to find if the field MEMBER exists in type AGGR, after including
2157 # INCLUDES, setting cache variable VAR accordingly.
2158 ac_fn_c_check_member ()
2160 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2162 $as_echo_n "checking for $2.$3... " >&6; }
2163 if eval \${$4+:} false; then :
2164 $as_echo_n "(cached) " >&6
2165 else
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167 /* end confdefs.h. */
2170 main ()
2172 static $2 ac_aggr;
2173 if (ac_aggr.$3)
2174 return 0;
2176 return 0;
2178 _ACEOF
2179 if ac_fn_c_try_compile "$LINENO"; then :
2180 eval "$4=yes"
2181 else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183 /* end confdefs.h. */
2186 main ()
2188 static $2 ac_aggr;
2189 if (sizeof ac_aggr.$3)
2190 return 0;
2192 return 0;
2194 _ACEOF
2195 if ac_fn_c_try_compile "$LINENO"; then :
2196 eval "$4=yes"
2197 else
2198 eval "$4=no"
2200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2204 eval ac_res=\$$4
2205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2206 $as_echo "$ac_res" >&6; }
2207 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2209 } # ac_fn_c_check_member
2211 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2212 # --------------------------------------------
2213 # Tries to find the compile-time value of EXPR in a program that includes
2214 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2215 # computed
2216 ac_fn_c_compute_int ()
2218 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2219 if test "$cross_compiling" = yes; then
2220 # Depending upon the size, compute the lo and hi bounds.
2221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2222 /* end confdefs.h. */
2225 main ()
2227 static int test_array [1 - 2 * !(($2) >= 0)];
2228 test_array [0] = 0;
2229 return test_array [0];
2232 return 0;
2234 _ACEOF
2235 if ac_fn_c_try_compile "$LINENO"; then :
2236 ac_lo=0 ac_mid=0
2237 while :; do
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239 /* end confdefs.h. */
2242 main ()
2244 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2245 test_array [0] = 0;
2246 return test_array [0];
2249 return 0;
2251 _ACEOF
2252 if ac_fn_c_try_compile "$LINENO"; then :
2253 ac_hi=$ac_mid; break
2254 else
2255 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2256 if test $ac_lo -le $ac_mid; then
2257 ac_lo= ac_hi=
2258 break
2260 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2263 done
2264 else
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266 /* end confdefs.h. */
2269 main ()
2271 static int test_array [1 - 2 * !(($2) < 0)];
2272 test_array [0] = 0;
2273 return test_array [0];
2276 return 0;
2278 _ACEOF
2279 if ac_fn_c_try_compile "$LINENO"; then :
2280 ac_hi=-1 ac_mid=-1
2281 while :; do
2282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283 /* end confdefs.h. */
2286 main ()
2288 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2289 test_array [0] = 0;
2290 return test_array [0];
2293 return 0;
2295 _ACEOF
2296 if ac_fn_c_try_compile "$LINENO"; then :
2297 ac_lo=$ac_mid; break
2298 else
2299 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2300 if test $ac_mid -le $ac_hi; then
2301 ac_lo= ac_hi=
2302 break
2304 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2307 done
2308 else
2309 ac_lo= ac_hi=
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314 # Binary search between lo and hi bounds.
2315 while test "x$ac_lo" != "x$ac_hi"; do
2316 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318 /* end confdefs.h. */
2321 main ()
2323 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2324 test_array [0] = 0;
2325 return test_array [0];
2328 return 0;
2330 _ACEOF
2331 if ac_fn_c_try_compile "$LINENO"; then :
2332 ac_hi=$ac_mid
2333 else
2334 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337 done
2338 case $ac_lo in #((
2339 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2340 '') ac_retval=1 ;;
2341 esac
2342 else
2343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344 /* end confdefs.h. */
2346 static long int longval () { return $2; }
2347 static unsigned long int ulongval () { return $2; }
2348 #include <stdio.h>
2349 #include <stdlib.h>
2351 main ()
2354 FILE *f = fopen ("conftest.val", "w");
2355 if (! f)
2356 return 1;
2357 if (($2) < 0)
2359 long int i = longval ();
2360 if (i != ($2))
2361 return 1;
2362 fprintf (f, "%ld", i);
2364 else
2366 unsigned long int i = ulongval ();
2367 if (i != ($2))
2368 return 1;
2369 fprintf (f, "%lu", i);
2371 /* Do not output a trailing newline, as this causes \r\n confusion
2372 on some platforms. */
2373 return ferror (f) || fclose (f) != 0;
2376 return 0;
2378 _ACEOF
2379 if ac_fn_c_try_run "$LINENO"; then :
2380 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2381 else
2382 ac_retval=1
2384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2385 conftest.$ac_objext conftest.beam conftest.$ac_ext
2386 rm -f conftest.val
2389 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2390 as_fn_set_status $ac_retval
2392 } # ac_fn_c_compute_int
2394 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2395 # ---------------------------------------------
2396 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2397 # accordingly.
2398 ac_fn_c_check_decl ()
2400 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2401 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2402 as_decl_name=`echo $2|sed 's/ *(.*//'`
2403 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2405 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2406 if eval \${$3+:} false; then :
2407 $as_echo_n "(cached) " >&6
2408 else
2409 ac_save_werror_flag=$ac_c_werror_flag
2410 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2412 /* end confdefs.h. */
2415 main ()
2417 #ifndef $as_decl_name
2418 #ifdef __cplusplus
2419 (void) $as_decl_use;
2420 #else
2421 (void) $as_decl_name;
2422 #endif
2423 #endif
2426 return 0;
2428 _ACEOF
2429 if ac_fn_c_try_compile "$LINENO"; then :
2430 eval "$3=yes"
2431 else
2432 eval "$3=no"
2434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2435 ac_c_werror_flag=$ac_save_werror_flag
2437 eval ac_res=\$$3
2438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2439 $as_echo "$ac_res" >&6; }
2440 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2442 } # ac_fn_c_check_decl
2443 cat >config.log <<_ACEOF
2444 This file contains any messages produced by compilers while
2445 running configure, to aid debugging if configure makes a mistake.
2447 It was created by PostgreSQL $as_me 15devel, which was
2448 generated by GNU Autoconf 2.69. Invocation command line was
2450 $ $0 $@
2452 _ACEOF
2453 exec 5>>config.log
2455 cat <<_ASUNAME
2456 ## --------- ##
2457 ## Platform. ##
2458 ## --------- ##
2460 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2461 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2462 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2463 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2464 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2466 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2467 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2469 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2470 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2471 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2472 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2473 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2474 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2475 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2477 _ASUNAME
2479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2480 for as_dir in $PATH
2482 IFS=$as_save_IFS
2483 test -z "$as_dir" && as_dir=.
2484 $as_echo "PATH: $as_dir"
2485 done
2486 IFS=$as_save_IFS
2488 } >&5
2490 cat >&5 <<_ACEOF
2493 ## ----------- ##
2494 ## Core tests. ##
2495 ## ----------- ##
2497 _ACEOF
2500 # Keep a trace of the command line.
2501 # Strip out --no-create and --no-recursion so they do not pile up.
2502 # Strip out --silent because we don't want to record it for future runs.
2503 # Also quote any args containing shell meta-characters.
2504 # Make two passes to allow for proper duplicate-argument suppression.
2505 ac_configure_args=
2506 ac_configure_args0=
2507 ac_configure_args1=
2508 ac_must_keep_next=false
2509 for ac_pass in 1 2
2511 for ac_arg
2513 case $ac_arg in
2514 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2515 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2516 | -silent | --silent | --silen | --sile | --sil)
2517 continue ;;
2518 *\'*)
2519 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2520 esac
2521 case $ac_pass in
2522 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2524 as_fn_append ac_configure_args1 " '$ac_arg'"
2525 if test $ac_must_keep_next = true; then
2526 ac_must_keep_next=false # Got value, back to normal.
2527 else
2528 case $ac_arg in
2529 *=* | --config-cache | -C | -disable-* | --disable-* \
2530 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2531 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2532 | -with-* | --with-* | -without-* | --without-* | --x)
2533 case "$ac_configure_args0 " in
2534 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2535 esac
2537 -* ) ac_must_keep_next=true ;;
2538 esac
2540 as_fn_append ac_configure_args " '$ac_arg'"
2542 esac
2543 done
2544 done
2545 { ac_configure_args0=; unset ac_configure_args0;}
2546 { ac_configure_args1=; unset ac_configure_args1;}
2548 # When interrupted or exit'd, cleanup temporary files, and complete
2549 # config.log. We remove comments because anyway the quotes in there
2550 # would cause problems or look ugly.
2551 # WARNING: Use '\'' to represent an apostrophe within the trap.
2552 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2553 trap 'exit_status=$?
2554 # Save into config.log some information that might help in debugging.
2556 echo
2558 $as_echo "## ---------------- ##
2559 ## Cache variables. ##
2560 ## ---------------- ##"
2561 echo
2562 # The following way of writing the cache mishandles newlines in values,
2564 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2565 eval ac_val=\$$ac_var
2566 case $ac_val in #(
2567 *${as_nl}*)
2568 case $ac_var in #(
2569 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2570 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2571 esac
2572 case $ac_var in #(
2573 _ | IFS | as_nl) ;; #(
2574 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2575 *) { eval $ac_var=; unset $ac_var;} ;;
2576 esac ;;
2577 esac
2578 done
2579 (set) 2>&1 |
2580 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2581 *${as_nl}ac_space=\ *)
2582 sed -n \
2583 "s/'\''/'\''\\\\'\'''\''/g;
2584 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2585 ;; #(
2587 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2589 esac |
2590 sort
2592 echo
2594 $as_echo "## ----------------- ##
2595 ## Output variables. ##
2596 ## ----------------- ##"
2597 echo
2598 for ac_var in $ac_subst_vars
2600 eval ac_val=\$$ac_var
2601 case $ac_val in
2602 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2603 esac
2604 $as_echo "$ac_var='\''$ac_val'\''"
2605 done | sort
2606 echo
2608 if test -n "$ac_subst_files"; then
2609 $as_echo "## ------------------- ##
2610 ## File substitutions. ##
2611 ## ------------------- ##"
2612 echo
2613 for ac_var in $ac_subst_files
2615 eval ac_val=\$$ac_var
2616 case $ac_val in
2617 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2618 esac
2619 $as_echo "$ac_var='\''$ac_val'\''"
2620 done | sort
2621 echo
2624 if test -s confdefs.h; then
2625 $as_echo "## ----------- ##
2626 ## confdefs.h. ##
2627 ## ----------- ##"
2628 echo
2629 cat confdefs.h
2630 echo
2632 test "$ac_signal" != 0 &&
2633 $as_echo "$as_me: caught signal $ac_signal"
2634 $as_echo "$as_me: exit $exit_status"
2635 } >&5
2636 rm -f core *.core core.conftest.* &&
2637 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2638 exit $exit_status
2640 for ac_signal in 1 2 13 15; do
2641 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2642 done
2643 ac_signal=0
2645 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2646 rm -f -r conftest* confdefs.h
2648 $as_echo "/* confdefs.h */" > confdefs.h
2650 # Predefined preprocessor variables.
2652 cat >>confdefs.h <<_ACEOF
2653 #define PACKAGE_NAME "$PACKAGE_NAME"
2654 _ACEOF
2656 cat >>confdefs.h <<_ACEOF
2657 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2658 _ACEOF
2660 cat >>confdefs.h <<_ACEOF
2661 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2662 _ACEOF
2664 cat >>confdefs.h <<_ACEOF
2665 #define PACKAGE_STRING "$PACKAGE_STRING"
2666 _ACEOF
2668 cat >>confdefs.h <<_ACEOF
2669 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2670 _ACEOF
2672 cat >>confdefs.h <<_ACEOF
2673 #define PACKAGE_URL "$PACKAGE_URL"
2674 _ACEOF
2677 # Let the site file select an alternate cache file if it wants to.
2678 # Prefer an explicitly selected file to automatically selected ones.
2679 ac_site_file1=NONE
2680 ac_site_file2=NONE
2681 if test -n "$CONFIG_SITE"; then
2682 # We do not want a PATH search for config.site.
2683 case $CONFIG_SITE in #((
2684 -*) ac_site_file1=./$CONFIG_SITE;;
2685 */*) ac_site_file1=$CONFIG_SITE;;
2686 *) ac_site_file1=./$CONFIG_SITE;;
2687 esac
2688 elif test "x$prefix" != xNONE; then
2689 ac_site_file1=$prefix/share/config.site
2690 ac_site_file2=$prefix/etc/config.site
2691 else
2692 ac_site_file1=$ac_default_prefix/share/config.site
2693 ac_site_file2=$ac_default_prefix/etc/config.site
2695 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2697 test "x$ac_site_file" = xNONE && continue
2698 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2700 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2701 sed 's/^/| /' "$ac_site_file" >&5
2702 . "$ac_site_file" \
2703 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2704 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2705 as_fn_error $? "failed to load site script $ac_site_file
2706 See \`config.log' for more details" "$LINENO" 5; }
2708 done
2710 if test -r "$cache_file"; then
2711 # Some versions of bash will fail to source /dev/null (special files
2712 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2713 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2715 $as_echo "$as_me: loading cache $cache_file" >&6;}
2716 case $cache_file in
2717 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2718 *) . "./$cache_file";;
2719 esac
2721 else
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2723 $as_echo "$as_me: creating cache $cache_file" >&6;}
2724 >$cache_file
2727 # Check that the precious variables saved in the cache have kept the same
2728 # value.
2729 ac_cache_corrupted=false
2730 for ac_var in $ac_precious_vars; do
2731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2732 eval ac_new_set=\$ac_env_${ac_var}_set
2733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2734 eval ac_new_val=\$ac_env_${ac_var}_value
2735 case $ac_old_set,$ac_new_set in
2736 set,)
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2738 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2739 ac_cache_corrupted=: ;;
2740 ,set)
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2742 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2743 ac_cache_corrupted=: ;;
2744 ,);;
2746 if test "x$ac_old_val" != "x$ac_new_val"; then
2747 # differences in whitespace do not lead to failure.
2748 ac_old_val_w=`echo x $ac_old_val`
2749 ac_new_val_w=`echo x $ac_new_val`
2750 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2752 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2753 ac_cache_corrupted=:
2754 else
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2756 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2757 eval $ac_var=\$ac_old_val
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2760 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2762 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2763 fi;;
2764 esac
2765 # Pass precious variables to config.status.
2766 if test "$ac_new_set" = set; then
2767 case $ac_new_val in
2768 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2769 *) ac_arg=$ac_var=$ac_new_val ;;
2770 esac
2771 case " $ac_configure_args " in
2772 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2773 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2774 esac
2776 done
2777 if $ac_cache_corrupted; then
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2779 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2781 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2782 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2784 ## -------------------- ##
2785 ## Main body of script. ##
2786 ## -------------------- ##
2788 ac_ext=c
2789 ac_cpp='$CPP $CPPFLAGS'
2790 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2791 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2792 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2799 ac_aux_dir=
2800 for ac_dir in config "$srcdir"/config; do
2801 if test -f "$ac_dir/install-sh"; then
2802 ac_aux_dir=$ac_dir
2803 ac_install_sh="$ac_aux_dir/install-sh -c"
2804 break
2805 elif test -f "$ac_dir/install.sh"; then
2806 ac_aux_dir=$ac_dir
2807 ac_install_sh="$ac_aux_dir/install.sh -c"
2808 break
2809 elif test -f "$ac_dir/shtool"; then
2810 ac_aux_dir=$ac_dir
2811 ac_install_sh="$ac_aux_dir/shtool install -c"
2812 break
2814 done
2815 if test -z "$ac_aux_dir"; then
2816 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2819 # These three variables are undocumented and unsupported,
2820 # and are intended to be withdrawn in a future Autoconf release.
2821 # They can cause serious problems if a builder's source tree is in a directory
2822 # whose full name contains unusual characters.
2823 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2824 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2825 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2830 cat >>confdefs.h <<_ACEOF
2831 #define CONFIGURE_ARGS "$ac_configure_args"
2832 _ACEOF
2835 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2836 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2837 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2840 cat >>confdefs.h <<_ACEOF
2841 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2842 _ACEOF
2845 cat >>confdefs.h <<_ACEOF
2846 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2847 _ACEOF
2850 cat >>confdefs.h <<_ACEOF
2851 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2852 _ACEOF
2858 # Check whether --with-extra-version was given.
2859 if test "${with_extra_version+set}" = set; then :
2860 withval=$with_extra_version;
2861 case $withval in
2862 yes)
2863 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2866 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2869 PG_VERSION="$PACKAGE_VERSION$withval"
2871 esac
2873 else
2874 PG_VERSION="$PACKAGE_VERSION"
2879 cat >>confdefs.h <<_ACEOF
2880 #define PG_VERSION "$PG_VERSION"
2881 _ACEOF
2884 # Make sure we can run config.sub.
2885 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2886 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2889 $as_echo_n "checking build system type... " >&6; }
2890 if ${ac_cv_build+:} false; then :
2891 $as_echo_n "(cached) " >&6
2892 else
2893 ac_build_alias=$build_alias
2894 test "x$ac_build_alias" = x &&
2895 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2896 test "x$ac_build_alias" = x &&
2897 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2898 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2899 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2903 $as_echo "$ac_cv_build" >&6; }
2904 case $ac_cv_build in
2905 *-*-*) ;;
2906 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2907 esac
2908 build=$ac_cv_build
2909 ac_save_IFS=$IFS; IFS='-'
2910 set x $ac_cv_build
2911 shift
2912 build_cpu=$1
2913 build_vendor=$2
2914 shift; shift
2915 # Remember, the first character of IFS is used to create $*,
2916 # except with old shells:
2917 build_os=$*
2918 IFS=$ac_save_IFS
2919 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2923 $as_echo_n "checking host system type... " >&6; }
2924 if ${ac_cv_host+:} false; then :
2925 $as_echo_n "(cached) " >&6
2926 else
2927 if test "x$host_alias" = x; then
2928 ac_cv_host=$ac_cv_build
2929 else
2930 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2931 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2936 $as_echo "$ac_cv_host" >&6; }
2937 case $ac_cv_host in
2938 *-*-*) ;;
2939 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2940 esac
2941 host=$ac_cv_host
2942 ac_save_IFS=$IFS; IFS='-'
2943 set x $ac_cv_host
2944 shift
2945 host_cpu=$1
2946 host_vendor=$2
2947 shift; shift
2948 # Remember, the first character of IFS is used to create $*,
2949 # except with old shells:
2950 host_os=$*
2951 IFS=$ac_save_IFS
2952 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2956 template=
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2958 $as_echo_n "checking which template to use... " >&6; }
2963 # Check whether --with-template was given.
2964 if test "${with_template+set}" = set; then :
2965 withval=$with_template;
2966 case $withval in
2967 yes)
2968 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2971 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2975 case $withval in
2976 list) echo; ls "$srcdir/src/template"; exit;;
2977 *) if test -f "$srcdir/src/template/$with_template" ; then
2978 template=$withval
2979 else
2980 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2981 fi;;
2982 esac
2985 esac
2987 else
2989 # --with-template not given
2991 case $host_os in
2992 aix*) template=aix ;;
2993 cygwin*|msys*) template=cygwin ;;
2994 darwin*) template=darwin ;;
2995 dragonfly*) template=netbsd ;;
2996 freebsd*) template=freebsd ;;
2997 hpux*) template=hpux ;;
2998 linux*|gnu*|k*bsd*-gnu)
2999 template=linux ;;
3000 mingw*) template=win32 ;;
3001 netbsd*) template=netbsd ;;
3002 openbsd*) template=openbsd ;;
3003 solaris*) template=solaris ;;
3004 esac
3006 if test x"$template" = x"" ; then
3007 as_fn_error $? "
3008 *******************************************************************
3009 PostgreSQL has apparently not been ported to your platform yet.
3010 To try a manual configuration, look into the src/template directory
3011 for a similar platform and use the '--with-template=' option.
3013 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3014 rectifying this. Include the above 'checking host system type...'
3015 line.
3016 *******************************************************************
3017 " "$LINENO" 5
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3026 $as_echo "$template" >&6; }
3028 PORTNAME=$template
3031 # Initialize default assumption that we do not need separate assembly code
3032 # for TAS (test-and-set). This can be overridden by the template file
3033 # when it's executed.
3034 need_tas=no
3035 tas_file=dummy.s
3037 # Default, works for most platforms, override in template file if needed
3038 DLSUFFIX=".so"
3043 ## Command line options
3047 # Add non-standard directories to the include path
3052 # Check whether --with-includes was given.
3053 if test "${with_includes+set}" = set; then :
3054 withval=$with_includes;
3055 case $withval in
3056 yes)
3057 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3060 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3065 esac
3073 # Add non-standard directories to the library search path
3078 # Check whether --with-libraries was given.
3079 if test "${with_libraries+set}" = set; then :
3080 withval=$with_libraries;
3081 case $withval in
3082 yes)
3083 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3086 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3089 LIBRARY_DIRS=$withval
3091 esac
3100 # Check whether --with-libs was given.
3101 if test "${with_libs+set}" = set; then :
3102 withval=$with_libs;
3103 case $withval in
3104 yes)
3105 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3108 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3111 LIBRARY_DIRS=$withval
3113 esac
3121 # 64-bit integer date/time storage is now the only option, but to avoid
3122 # unnecessary breakage of build scripts, continue to accept an explicit
3123 # "--enable-integer-datetimes" switch.
3127 # Check whether --enable-integer-datetimes was given.
3128 if test "${enable_integer_datetimes+set}" = set; then :
3129 enableval=$enable_integer_datetimes;
3130 case $enableval in
3131 yes)
3135 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3138 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3140 esac
3142 else
3143 enable_integer_datetimes=yes
3151 # NLS
3153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3154 $as_echo_n "checking whether NLS is wanted... " >&6; }
3157 # Check whether --enable-nls was given.
3158 if test "${enable_nls+set}" = set; then :
3159 enableval=$enable_nls;
3160 case $enableval in
3161 yes)
3168 enable_nls=yes
3169 WANTED_LANGUAGES=$enableval
3171 esac
3173 else
3174 enable_nls=no
3179 if test "$enable_nls" = yes; then
3181 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3186 $as_echo "$enable_nls" >&6; }
3191 # Default port number (--with-pgport), default 5432
3193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3194 $as_echo_n "checking for default port number... " >&6; }
3198 # Check whether --with-pgport was given.
3199 if test "${with_pgport+set}" = set; then :
3200 withval=$with_pgport;
3201 case $withval in
3202 yes)
3203 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3206 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3209 default_port=$withval
3211 esac
3213 else
3214 default_port=5432
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3219 $as_echo "$default_port" >&6; }
3220 # Need both of these because some places want an integer and some a string
3222 cat >>confdefs.h <<_ACEOF
3223 #define DEF_PGPORT ${default_port}
3224 _ACEOF
3227 cat >>confdefs.h <<_ACEOF
3228 #define DEF_PGPORT_STR "${default_port}"
3229 _ACEOF
3233 # It's worth validating port; you can get very confusing errors otherwise
3234 if test x"$default_port" = x""; then
3235 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3236 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3237 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3238 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3239 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3240 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3241 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3245 # '-rpath'-like feature can be disabled
3249 # Check whether --enable-rpath was given.
3250 if test "${enable_rpath+set}" = set; then :
3251 enableval=$enable_rpath;
3252 case $enableval in
3253 yes)
3260 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3262 esac
3264 else
3265 enable_rpath=yes
3273 # Spinlocks
3277 # Check whether --enable-spinlocks was given.
3278 if test "${enable_spinlocks+set}" = set; then :
3279 enableval=$enable_spinlocks;
3280 case $enableval in
3281 yes)
3288 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3290 esac
3292 else
3293 enable_spinlocks=yes
3300 # Atomic operations
3304 # Check whether --enable-atomics was given.
3305 if test "${enable_atomics+set}" = set; then :
3306 enableval=$enable_atomics;
3307 case $enableval in
3308 yes)
3315 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3317 esac
3319 else
3320 enable_atomics=yes
3327 # --enable-debug adds -g to compiler flags
3331 # Check whether --enable-debug was given.
3332 if test "${enable_debug+set}" = set; then :
3333 enableval=$enable_debug;
3334 case $enableval in
3335 yes)
3342 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3344 esac
3346 else
3347 enable_debug=no
3355 # --enable-profiling enables gcc profiling
3359 # Check whether --enable-profiling was given.
3360 if test "${enable_profiling+set}" = set; then :
3361 enableval=$enable_profiling;
3362 case $enableval in
3363 yes)
3370 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3372 esac
3374 else
3375 enable_profiling=no
3382 # --enable-coverage enables generation of code coverage metrics with gcov
3386 # Check whether --enable-coverage was given.
3387 if test "${enable_coverage+set}" = set; then :
3388 enableval=$enable_coverage;
3389 case $enableval in
3390 yes)
3391 if test -z "$GCOV"; then
3392 for ac_prog in gcov
3394 # Extract the first word of "$ac_prog", so it can be a program name with args.
3395 set dummy $ac_prog; ac_word=$2
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3397 $as_echo_n "checking for $ac_word... " >&6; }
3398 if ${ac_cv_path_GCOV+:} false; then :
3399 $as_echo_n "(cached) " >&6
3400 else
3401 case $GCOV in
3402 [\\/]* | ?:[\\/]*)
3403 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3407 for as_dir in $PATH
3409 IFS=$as_save_IFS
3410 test -z "$as_dir" && as_dir=.
3411 for ac_exec_ext in '' $ac_executable_extensions; do
3412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3413 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3415 break 2
3417 done
3418 done
3419 IFS=$as_save_IFS
3422 esac
3424 GCOV=$ac_cv_path_GCOV
3425 if test -n "$GCOV"; then
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3427 $as_echo "$GCOV" >&6; }
3428 else
3429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3430 $as_echo "no" >&6; }
3434 test -n "$GCOV" && break
3435 done
3437 else
3438 # Report the value of GCOV in configure's output in all cases.
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3440 $as_echo_n "checking for GCOV... " >&6; }
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3442 $as_echo "$GCOV" >&6; }
3445 if test -z "$GCOV"; then
3446 as_fn_error $? "gcov not found" "$LINENO" 5
3448 if test -z "$LCOV"; then
3449 for ac_prog in lcov
3451 # Extract the first word of "$ac_prog", so it can be a program name with args.
3452 set dummy $ac_prog; ac_word=$2
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3454 $as_echo_n "checking for $ac_word... " >&6; }
3455 if ${ac_cv_path_LCOV+:} false; then :
3456 $as_echo_n "(cached) " >&6
3457 else
3458 case $LCOV in
3459 [\\/]* | ?:[\\/]*)
3460 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3464 for as_dir in $PATH
3466 IFS=$as_save_IFS
3467 test -z "$as_dir" && as_dir=.
3468 for ac_exec_ext in '' $ac_executable_extensions; do
3469 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3470 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3471 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3472 break 2
3474 done
3475 done
3476 IFS=$as_save_IFS
3479 esac
3481 LCOV=$ac_cv_path_LCOV
3482 if test -n "$LCOV"; then
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3484 $as_echo "$LCOV" >&6; }
3485 else
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3487 $as_echo "no" >&6; }
3491 test -n "$LCOV" && break
3492 done
3494 else
3495 # Report the value of LCOV in configure's output in all cases.
3496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3497 $as_echo_n "checking for LCOV... " >&6; }
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3499 $as_echo "$LCOV" >&6; }
3502 if test -z "$LCOV"; then
3503 as_fn_error $? "lcov not found" "$LINENO" 5
3505 if test -z "$GENHTML"; then
3506 for ac_prog in genhtml
3508 # Extract the first word of "$ac_prog", so it can be a program name with args.
3509 set dummy $ac_prog; ac_word=$2
3510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3511 $as_echo_n "checking for $ac_word... " >&6; }
3512 if ${ac_cv_path_GENHTML+:} false; then :
3513 $as_echo_n "(cached) " >&6
3514 else
3515 case $GENHTML in
3516 [\\/]* | ?:[\\/]*)
3517 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3521 for as_dir in $PATH
3523 IFS=$as_save_IFS
3524 test -z "$as_dir" && as_dir=.
3525 for ac_exec_ext in '' $ac_executable_extensions; do
3526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3527 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3529 break 2
3531 done
3532 done
3533 IFS=$as_save_IFS
3536 esac
3538 GENHTML=$ac_cv_path_GENHTML
3539 if test -n "$GENHTML"; then
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3541 $as_echo "$GENHTML" >&6; }
3542 else
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3544 $as_echo "no" >&6; }
3548 test -n "$GENHTML" && break
3549 done
3551 else
3552 # Report the value of GENHTML in configure's output in all cases.
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3554 $as_echo_n "checking for GENHTML... " >&6; }
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3556 $as_echo "$GENHTML" >&6; }
3559 if test -z "$GENHTML"; then
3560 as_fn_error $? "genhtml not found" "$LINENO" 5
3567 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3569 esac
3571 else
3572 enable_coverage=no
3580 # DTrace
3584 # Check whether --enable-dtrace was given.
3585 if test "${enable_dtrace+set}" = set; then :
3586 enableval=$enable_dtrace;
3587 case $enableval in
3588 yes)
3589 if test -z "$DTRACE"; then
3590 for ac_prog in dtrace
3592 # Extract the first word of "$ac_prog", so it can be a program name with args.
3593 set dummy $ac_prog; ac_word=$2
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595 $as_echo_n "checking for $ac_word... " >&6; }
3596 if ${ac_cv_path_DTRACE+:} false; then :
3597 $as_echo_n "(cached) " >&6
3598 else
3599 case $DTRACE in
3600 [\\/]* | ?:[\\/]*)
3601 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3605 for as_dir in $PATH
3607 IFS=$as_save_IFS
3608 test -z "$as_dir" && as_dir=.
3609 for ac_exec_ext in '' $ac_executable_extensions; do
3610 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3611 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3612 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3613 break 2
3615 done
3616 done
3617 IFS=$as_save_IFS
3620 esac
3622 DTRACE=$ac_cv_path_DTRACE
3623 if test -n "$DTRACE"; then
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3625 $as_echo "$DTRACE" >&6; }
3626 else
3627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3628 $as_echo "no" >&6; }
3632 test -n "$DTRACE" && break
3633 done
3635 else
3636 # Report the value of DTRACE in configure's output in all cases.
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3638 $as_echo_n "checking for DTRACE... " >&6; }
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3640 $as_echo "$DTRACE" >&6; }
3643 if test -z "$DTRACE"; then
3644 as_fn_error $? "dtrace not found" "$LINENO" 5
3652 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3654 esac
3656 else
3657 enable_dtrace=no
3665 # TAP tests
3669 # Check whether --enable-tap-tests was given.
3670 if test "${enable_tap_tests+set}" = set; then :
3671 enableval=$enable_tap_tests;
3672 case $enableval in
3673 yes)
3680 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3682 esac
3684 else
3685 enable_tap_tests=no
3693 # Block size
3695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3696 $as_echo_n "checking for block size... " >&6; }
3700 # Check whether --with-blocksize was given.
3701 if test "${with_blocksize+set}" = set; then :
3702 withval=$with_blocksize;
3703 case $withval in
3704 yes)
3705 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3708 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3711 blocksize=$withval
3713 esac
3715 else
3716 blocksize=8
3720 case ${blocksize} in
3721 1) BLCKSZ=1024;;
3722 2) BLCKSZ=2048;;
3723 4) BLCKSZ=4096;;
3724 8) BLCKSZ=8192;;
3725 16) BLCKSZ=16384;;
3726 32) BLCKSZ=32768;;
3727 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3728 esac
3729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3730 $as_echo "${blocksize}kB" >&6; }
3733 cat >>confdefs.h <<_ACEOF
3734 #define BLCKSZ ${BLCKSZ}
3735 _ACEOF
3739 # Relation segment size
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3742 $as_echo_n "checking for segment size... " >&6; }
3746 # Check whether --with-segsize was given.
3747 if test "${with_segsize+set}" = set; then :
3748 withval=$with_segsize;
3749 case $withval in
3750 yes)
3751 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3754 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3757 segsize=$withval
3759 esac
3761 else
3762 segsize=1
3766 # this expression is set up to avoid unnecessary integer overflow
3767 # blocksize is already guaranteed to be a factor of 1024
3768 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3769 test $? -eq 0 || exit 1
3770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3771 $as_echo "${segsize}GB" >&6; }
3774 cat >>confdefs.h <<_ACEOF
3775 #define RELSEG_SIZE ${RELSEG_SIZE}
3776 _ACEOF
3780 # WAL block size
3782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3783 $as_echo_n "checking for WAL block size... " >&6; }
3787 # Check whether --with-wal-blocksize was given.
3788 if test "${with_wal_blocksize+set}" = set; then :
3789 withval=$with_wal_blocksize;
3790 case $withval in
3791 yes)
3792 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3795 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3798 wal_blocksize=$withval
3800 esac
3802 else
3803 wal_blocksize=8
3807 case ${wal_blocksize} in
3808 1) XLOG_BLCKSZ=1024;;
3809 2) XLOG_BLCKSZ=2048;;
3810 4) XLOG_BLCKSZ=4096;;
3811 8) XLOG_BLCKSZ=8192;;
3812 16) XLOG_BLCKSZ=16384;;
3813 32) XLOG_BLCKSZ=32768;;
3814 64) XLOG_BLCKSZ=65536;;
3815 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3816 esac
3817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3818 $as_echo "${wal_blocksize}kB" >&6; }
3821 cat >>confdefs.h <<_ACEOF
3822 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3823 _ACEOF
3827 # C compiler
3830 # For historical reasons you can also use --with-CC to specify the C compiler
3831 # to use, although the standard way to do this is to set the CC environment
3832 # variable.
3836 # Check whether --with-CC was given.
3837 if test "${with_CC+set}" = set; then :
3838 withval=$with_CC;
3839 case $withval in
3840 yes)
3841 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3844 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3847 CC=$with_CC
3849 esac
3855 case $template in
3856 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3857 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3858 esac
3860 ac_ext=c
3861 ac_cpp='$CPP $CPPFLAGS'
3862 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3863 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3865 if test -n "$ac_tool_prefix"; then
3866 for ac_prog in $pgac_cc_list
3868 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3869 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871 $as_echo_n "checking for $ac_word... " >&6; }
3872 if ${ac_cv_prog_CC+:} false; then :
3873 $as_echo_n "(cached) " >&6
3874 else
3875 if test -n "$CC"; then
3876 ac_cv_prog_CC="$CC" # Let the user override the test.
3877 else
3878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3879 for as_dir in $PATH
3881 IFS=$as_save_IFS
3882 test -z "$as_dir" && as_dir=.
3883 for ac_exec_ext in '' $ac_executable_extensions; do
3884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3885 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3887 break 2
3889 done
3890 done
3891 IFS=$as_save_IFS
3895 CC=$ac_cv_prog_CC
3896 if test -n "$CC"; then
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3898 $as_echo "$CC" >&6; }
3899 else
3900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901 $as_echo "no" >&6; }
3905 test -n "$CC" && break
3906 done
3908 if test -z "$CC"; then
3909 ac_ct_CC=$CC
3910 for ac_prog in $pgac_cc_list
3912 # Extract the first word of "$ac_prog", so it can be a program name with args.
3913 set dummy $ac_prog; ac_word=$2
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3915 $as_echo_n "checking for $ac_word... " >&6; }
3916 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3917 $as_echo_n "(cached) " >&6
3918 else
3919 if test -n "$ac_ct_CC"; then
3920 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3921 else
3922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3923 for as_dir in $PATH
3925 IFS=$as_save_IFS
3926 test -z "$as_dir" && as_dir=.
3927 for ac_exec_ext in '' $ac_executable_extensions; do
3928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3929 ac_cv_prog_ac_ct_CC="$ac_prog"
3930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3931 break 2
3933 done
3934 done
3935 IFS=$as_save_IFS
3939 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3940 if test -n "$ac_ct_CC"; then
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3942 $as_echo "$ac_ct_CC" >&6; }
3943 else
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3945 $as_echo "no" >&6; }
3949 test -n "$ac_ct_CC" && break
3950 done
3952 if test "x$ac_ct_CC" = x; then
3953 CC=""
3954 else
3955 case $cross_compiling:$ac_tool_warned in
3956 yes:)
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3958 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3959 ac_tool_warned=yes ;;
3960 esac
3961 CC=$ac_ct_CC
3966 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3967 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3968 as_fn_error $? "no acceptable C compiler found in \$PATH
3969 See \`config.log' for more details" "$LINENO" 5; }
3971 # Provide some information about the compiler.
3972 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3973 set X $ac_compile
3974 ac_compiler=$2
3975 for ac_option in --version -v -V -qversion; do
3976 { { ac_try="$ac_compiler $ac_option >&5"
3977 case "(($ac_try" in
3978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3979 *) ac_try_echo=$ac_try;;
3980 esac
3981 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3982 $as_echo "$ac_try_echo"; } >&5
3983 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3984 ac_status=$?
3985 if test -s conftest.err; then
3986 sed '10a\
3987 ... rest of stderr output deleted ...
3988 10q' conftest.err >conftest.er1
3989 cat conftest.er1 >&5
3991 rm -f conftest.er1 conftest.err
3992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3993 test $ac_status = 0; }
3994 done
3996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997 /* end confdefs.h. */
4000 main ()
4004 return 0;
4006 _ACEOF
4007 ac_clean_files_save=$ac_clean_files
4008 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4009 # Try to create an executable without -o first, disregard a.out.
4010 # It will help us diagnose broken compilers, and finding out an intuition
4011 # of exeext.
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4013 $as_echo_n "checking whether the C compiler works... " >&6; }
4014 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4016 # The possible output files:
4017 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4019 ac_rmfiles=
4020 for ac_file in $ac_files
4022 case $ac_file in
4023 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4024 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4025 esac
4026 done
4027 rm -f $ac_rmfiles
4029 if { { ac_try="$ac_link_default"
4030 case "(($ac_try" in
4031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4032 *) ac_try_echo=$ac_try;;
4033 esac
4034 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4035 $as_echo "$ac_try_echo"; } >&5
4036 (eval "$ac_link_default") 2>&5
4037 ac_status=$?
4038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4039 test $ac_status = 0; }; then :
4040 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4041 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4042 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4043 # so that the user can short-circuit this test for compilers unknown to
4044 # Autoconf.
4045 for ac_file in $ac_files ''
4047 test -f "$ac_file" || continue
4048 case $ac_file in
4049 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4051 [ab].out )
4052 # We found the default executable, but exeext='' is most
4053 # certainly right.
4054 break;;
4055 *.* )
4056 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4057 then :; else
4058 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4060 # We set ac_cv_exeext here because the later test for it is not
4061 # safe: cross compilers may not add the suffix if given an `-o'
4062 # argument, so we may need to know it at that point already.
4063 # Even if this section looks crufty: it has the advantage of
4064 # actually working.
4065 break;;
4067 break;;
4068 esac
4069 done
4070 test "$ac_cv_exeext" = no && ac_cv_exeext=
4072 else
4073 ac_file=''
4075 if test -z "$ac_file"; then :
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4077 $as_echo "no" >&6; }
4078 $as_echo "$as_me: failed program was:" >&5
4079 sed 's/^/| /' conftest.$ac_ext >&5
4081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4082 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4083 as_fn_error 77 "C compiler cannot create executables
4084 See \`config.log' for more details" "$LINENO" 5; }
4085 else
4086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4087 $as_echo "yes" >&6; }
4089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4090 $as_echo_n "checking for C compiler default output file name... " >&6; }
4091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4092 $as_echo "$ac_file" >&6; }
4093 ac_exeext=$ac_cv_exeext
4095 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4096 ac_clean_files=$ac_clean_files_save
4097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4098 $as_echo_n "checking for suffix of executables... " >&6; }
4099 if { { ac_try="$ac_link"
4100 case "(($ac_try" in
4101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4102 *) ac_try_echo=$ac_try;;
4103 esac
4104 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4105 $as_echo "$ac_try_echo"; } >&5
4106 (eval "$ac_link") 2>&5
4107 ac_status=$?
4108 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4109 test $ac_status = 0; }; then :
4110 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4111 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4112 # work properly (i.e., refer to `conftest.exe'), while it won't with
4113 # `rm'.
4114 for ac_file in conftest.exe conftest conftest.*; do
4115 test -f "$ac_file" || continue
4116 case $ac_file in
4117 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4118 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4119 break;;
4120 * ) break;;
4121 esac
4122 done
4123 else
4124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4125 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4126 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4127 See \`config.log' for more details" "$LINENO" 5; }
4129 rm -f conftest conftest$ac_cv_exeext
4130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4131 $as_echo "$ac_cv_exeext" >&6; }
4133 rm -f conftest.$ac_ext
4134 EXEEXT=$ac_cv_exeext
4135 ac_exeext=$EXEEXT
4136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4137 /* end confdefs.h. */
4138 #include <stdio.h>
4140 main ()
4142 FILE *f = fopen ("conftest.out", "w");
4143 return ferror (f) || fclose (f) != 0;
4146 return 0;
4148 _ACEOF
4149 ac_clean_files="$ac_clean_files conftest.out"
4150 # Check that the compiler produces executables we can run. If not, either
4151 # the compiler is broken, or we cross compile.
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4153 $as_echo_n "checking whether we are cross compiling... " >&6; }
4154 if test "$cross_compiling" != yes; then
4155 { { ac_try="$ac_link"
4156 case "(($ac_try" in
4157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4158 *) ac_try_echo=$ac_try;;
4159 esac
4160 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4161 $as_echo "$ac_try_echo"; } >&5
4162 (eval "$ac_link") 2>&5
4163 ac_status=$?
4164 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4165 test $ac_status = 0; }
4166 if { ac_try='./conftest$ac_cv_exeext'
4167 { { case "(($ac_try" in
4168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4169 *) ac_try_echo=$ac_try;;
4170 esac
4171 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4172 $as_echo "$ac_try_echo"; } >&5
4173 (eval "$ac_try") 2>&5
4174 ac_status=$?
4175 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4176 test $ac_status = 0; }; }; then
4177 cross_compiling=no
4178 else
4179 if test "$cross_compiling" = maybe; then
4180 cross_compiling=yes
4181 else
4182 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4183 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4184 as_fn_error $? "cannot run C compiled programs.
4185 If you meant to cross compile, use \`--host'.
4186 See \`config.log' for more details" "$LINENO" 5; }
4190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4191 $as_echo "$cross_compiling" >&6; }
4193 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4194 ac_clean_files=$ac_clean_files_save
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4196 $as_echo_n "checking for suffix of object files... " >&6; }
4197 if ${ac_cv_objext+:} false; then :
4198 $as_echo_n "(cached) " >&6
4199 else
4200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4201 /* end confdefs.h. */
4204 main ()
4208 return 0;
4210 _ACEOF
4211 rm -f conftest.o conftest.obj
4212 if { { ac_try="$ac_compile"
4213 case "(($ac_try" in
4214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4215 *) ac_try_echo=$ac_try;;
4216 esac
4217 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4218 $as_echo "$ac_try_echo"; } >&5
4219 (eval "$ac_compile") 2>&5
4220 ac_status=$?
4221 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4222 test $ac_status = 0; }; then :
4223 for ac_file in conftest.o conftest.obj conftest.*; do
4224 test -f "$ac_file" || continue;
4225 case $ac_file in
4226 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4227 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4228 break;;
4229 esac
4230 done
4231 else
4232 $as_echo "$as_me: failed program was:" >&5
4233 sed 's/^/| /' conftest.$ac_ext >&5
4235 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4236 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4237 as_fn_error $? "cannot compute suffix of object files: cannot compile
4238 See \`config.log' for more details" "$LINENO" 5; }
4240 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4243 $as_echo "$ac_cv_objext" >&6; }
4244 OBJEXT=$ac_cv_objext
4245 ac_objext=$OBJEXT
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4247 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4248 if ${ac_cv_c_compiler_gnu+:} false; then :
4249 $as_echo_n "(cached) " >&6
4250 else
4251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4252 /* end confdefs.h. */
4255 main ()
4257 #ifndef __GNUC__
4258 choke me
4259 #endif
4262 return 0;
4264 _ACEOF
4265 if ac_fn_c_try_compile "$LINENO"; then :
4266 ac_compiler_gnu=yes
4267 else
4268 ac_compiler_gnu=no
4270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4271 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4275 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4276 if test $ac_compiler_gnu = yes; then
4277 GCC=yes
4278 else
4279 GCC=
4281 ac_test_CFLAGS=${CFLAGS+set}
4282 ac_save_CFLAGS=$CFLAGS
4283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4284 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4285 if ${ac_cv_prog_cc_g+:} false; then :
4286 $as_echo_n "(cached) " >&6
4287 else
4288 ac_save_c_werror_flag=$ac_c_werror_flag
4289 ac_c_werror_flag=yes
4290 ac_cv_prog_cc_g=no
4291 CFLAGS="-g"
4292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4293 /* end confdefs.h. */
4296 main ()
4300 return 0;
4302 _ACEOF
4303 if ac_fn_c_try_compile "$LINENO"; then :
4304 ac_cv_prog_cc_g=yes
4305 else
4306 CFLAGS=""
4307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4308 /* end confdefs.h. */
4311 main ()
4315 return 0;
4317 _ACEOF
4318 if ac_fn_c_try_compile "$LINENO"; then :
4320 else
4321 ac_c_werror_flag=$ac_save_c_werror_flag
4322 CFLAGS="-g"
4323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4324 /* end confdefs.h. */
4327 main ()
4331 return 0;
4333 _ACEOF
4334 if ac_fn_c_try_compile "$LINENO"; then :
4335 ac_cv_prog_cc_g=yes
4337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4342 ac_c_werror_flag=$ac_save_c_werror_flag
4344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4345 $as_echo "$ac_cv_prog_cc_g" >&6; }
4346 if test "$ac_test_CFLAGS" = set; then
4347 CFLAGS=$ac_save_CFLAGS
4348 elif test $ac_cv_prog_cc_g = yes; then
4349 if test "$GCC" = yes; then
4350 CFLAGS="-g -O2"
4351 else
4352 CFLAGS="-g"
4354 else
4355 if test "$GCC" = yes; then
4356 CFLAGS="-O2"
4357 else
4358 CFLAGS=
4361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4362 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4363 if ${ac_cv_prog_cc_c89+:} false; then :
4364 $as_echo_n "(cached) " >&6
4365 else
4366 ac_cv_prog_cc_c89=no
4367 ac_save_CC=$CC
4368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4369 /* end confdefs.h. */
4370 #include <stdarg.h>
4371 #include <stdio.h>
4372 struct stat;
4373 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4374 struct buf { int x; };
4375 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4376 static char *e (p, i)
4377 char **p;
4378 int i;
4380 return p[i];
4382 static char *f (char * (*g) (char **, int), char **p, ...)
4384 char *s;
4385 va_list v;
4386 va_start (v,p);
4387 s = g (p, va_arg (v,int));
4388 va_end (v);
4389 return s;
4392 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4393 function prototypes and stuff, but not '\xHH' hex character constants.
4394 These don't provoke an error unfortunately, instead are silently treated
4395 as 'x'. The following induces an error, until -std is added to get
4396 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4397 array size at least. It's necessary to write '\x00'==0 to get something
4398 that's true only with -std. */
4399 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4401 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4402 inside strings and character constants. */
4403 #define FOO(x) 'x'
4404 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4406 int test (int i, double x);
4407 struct s1 {int (*f) (int a);};
4408 struct s2 {int (*f) (double a);};
4409 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4410 int argc;
4411 char **argv;
4413 main ()
4415 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4417 return 0;
4419 _ACEOF
4420 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4421 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4423 CC="$ac_save_CC $ac_arg"
4424 if ac_fn_c_try_compile "$LINENO"; then :
4425 ac_cv_prog_cc_c89=$ac_arg
4427 rm -f core conftest.err conftest.$ac_objext
4428 test "x$ac_cv_prog_cc_c89" != "xno" && break
4429 done
4430 rm -f conftest.$ac_ext
4431 CC=$ac_save_CC
4434 # AC_CACHE_VAL
4435 case "x$ac_cv_prog_cc_c89" in
4437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4438 $as_echo "none needed" >&6; } ;;
4439 xno)
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4441 $as_echo "unsupported" >&6; } ;;
4443 CC="$CC $ac_cv_prog_cc_c89"
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4445 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4446 esac
4447 if test "x$ac_cv_prog_cc_c89" != xno; then :
4451 ac_ext=c
4452 ac_cpp='$CPP $CPPFLAGS'
4453 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4454 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4455 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4458 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4459 if ${ac_cv_prog_cc_c99+:} false; then :
4460 $as_echo_n "(cached) " >&6
4461 else
4462 ac_cv_prog_cc_c99=no
4463 ac_save_CC=$CC
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465 /* end confdefs.h. */
4466 #include <stdarg.h>
4467 #include <stdbool.h>
4468 #include <stdlib.h>
4469 #include <wchar.h>
4470 #include <stdio.h>
4472 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4473 #define debug(...) fprintf (stderr, __VA_ARGS__)
4474 #define showlist(...) puts (#__VA_ARGS__)
4475 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4476 static void
4477 test_varargs_macros (void)
4479 int x = 1234;
4480 int y = 5678;
4481 debug ("Flag");
4482 debug ("X = %d\n", x);
4483 showlist (The first, second, and third items.);
4484 report (x>y, "x is %d but y is %d", x, y);
4487 // Check long long types.
4488 #define BIG64 18446744073709551615ull
4489 #define BIG32 4294967295ul
4490 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4491 #if !BIG_OK
4492 your preprocessor is broken;
4493 #endif
4494 #if BIG_OK
4495 #else
4496 your preprocessor is broken;
4497 #endif
4498 static long long int bignum = -9223372036854775807LL;
4499 static unsigned long long int ubignum = BIG64;
4501 struct incomplete_array
4503 int datasize;
4504 double data[];
4507 struct named_init {
4508 int number;
4509 const wchar_t *name;
4510 double average;
4513 typedef const char *ccp;
4515 static inline int
4516 test_restrict (ccp restrict text)
4518 // See if C++-style comments work.
4519 // Iterate through items via the restricted pointer.
4520 // Also check for declarations in for loops.
4521 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4522 continue;
4523 return 0;
4526 // Check varargs and va_copy.
4527 static void
4528 test_varargs (const char *format, ...)
4530 va_list args;
4531 va_start (args, format);
4532 va_list args_copy;
4533 va_copy (args_copy, args);
4535 const char *str;
4536 int number;
4537 float fnumber;
4539 while (*format)
4541 switch (*format++)
4543 case 's': // string
4544 str = va_arg (args_copy, const char *);
4545 break;
4546 case 'd': // int
4547 number = va_arg (args_copy, int);
4548 break;
4549 case 'f': // float
4550 fnumber = va_arg (args_copy, double);
4551 break;
4552 default:
4553 break;
4556 va_end (args_copy);
4557 va_end (args);
4561 main ()
4564 // Check bool.
4565 _Bool success = false;
4567 // Check restrict.
4568 if (test_restrict ("String literal") == 0)
4569 success = true;
4570 char *restrict newvar = "Another string";
4572 // Check varargs.
4573 test_varargs ("s, d' f .", "string", 65, 34.234);
4574 test_varargs_macros ();
4576 // Check flexible array members.
4577 struct incomplete_array *ia =
4578 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4579 ia->datasize = 10;
4580 for (int i = 0; i < ia->datasize; ++i)
4581 ia->data[i] = i * 1.234;
4583 // Check named initializers.
4584 struct named_init ni = {
4585 .number = 34,
4586 .name = L"Test wide string",
4587 .average = 543.34343,
4590 ni.number = 58;
4592 int dynamic_array[ni.number];
4593 dynamic_array[ni.number - 1] = 543;
4595 // work around unused variable warnings
4596 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4597 || dynamic_array[ni.number - 1] != 543);
4600 return 0;
4602 _ACEOF
4603 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4605 CC="$ac_save_CC $ac_arg"
4606 if ac_fn_c_try_compile "$LINENO"; then :
4607 ac_cv_prog_cc_c99=$ac_arg
4609 rm -f core conftest.err conftest.$ac_objext
4610 test "x$ac_cv_prog_cc_c99" != "xno" && break
4611 done
4612 rm -f conftest.$ac_ext
4613 CC=$ac_save_CC
4616 # AC_CACHE_VAL
4617 case "x$ac_cv_prog_cc_c99" in
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4620 $as_echo "none needed" >&6; } ;;
4621 xno)
4622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4623 $as_echo "unsupported" >&6; } ;;
4625 CC="$CC $ac_cv_prog_cc_c99"
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4627 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4628 esac
4629 if test "x$ac_cv_prog_cc_c99" != xno; then :
4635 # Error out if the compiler does not support C99, as the codebase
4636 # relies on that.
4637 if test "$ac_cv_prog_cc_c99" = no; then
4638 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4641 ac_ext=cpp
4642 ac_cpp='$CXXCPP $CPPFLAGS'
4643 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4644 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4645 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4646 if test -z "$CXX"; then
4647 if test -n "$CCC"; then
4648 CXX=$CCC
4649 else
4650 if test -n "$ac_tool_prefix"; then
4651 for ac_prog in $pgac_cxx_list
4653 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4654 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656 $as_echo_n "checking for $ac_word... " >&6; }
4657 if ${ac_cv_prog_CXX+:} false; then :
4658 $as_echo_n "(cached) " >&6
4659 else
4660 if test -n "$CXX"; then
4661 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4662 else
4663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664 for as_dir in $PATH
4666 IFS=$as_save_IFS
4667 test -z "$as_dir" && as_dir=.
4668 for ac_exec_ext in '' $ac_executable_extensions; do
4669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4670 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672 break 2
4674 done
4675 done
4676 IFS=$as_save_IFS
4680 CXX=$ac_cv_prog_CXX
4681 if test -n "$CXX"; then
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4683 $as_echo "$CXX" >&6; }
4684 else
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686 $as_echo "no" >&6; }
4690 test -n "$CXX" && break
4691 done
4693 if test -z "$CXX"; then
4694 ac_ct_CXX=$CXX
4695 for ac_prog in $pgac_cxx_list
4697 # Extract the first word of "$ac_prog", so it can be a program name with args.
4698 set dummy $ac_prog; ac_word=$2
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4700 $as_echo_n "checking for $ac_word... " >&6; }
4701 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4702 $as_echo_n "(cached) " >&6
4703 else
4704 if test -n "$ac_ct_CXX"; then
4705 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4706 else
4707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708 for as_dir in $PATH
4710 IFS=$as_save_IFS
4711 test -z "$as_dir" && as_dir=.
4712 for ac_exec_ext in '' $ac_executable_extensions; do
4713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4714 ac_cv_prog_ac_ct_CXX="$ac_prog"
4715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716 break 2
4718 done
4719 done
4720 IFS=$as_save_IFS
4724 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4725 if test -n "$ac_ct_CXX"; then
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4727 $as_echo "$ac_ct_CXX" >&6; }
4728 else
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730 $as_echo "no" >&6; }
4734 test -n "$ac_ct_CXX" && break
4735 done
4737 if test "x$ac_ct_CXX" = x; then
4738 CXX="g++"
4739 else
4740 case $cross_compiling:$ac_tool_warned in
4741 yes:)
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4743 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4744 ac_tool_warned=yes ;;
4745 esac
4746 CXX=$ac_ct_CXX
4752 # Provide some information about the compiler.
4753 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4754 set X $ac_compile
4755 ac_compiler=$2
4756 for ac_option in --version -v -V -qversion; do
4757 { { ac_try="$ac_compiler $ac_option >&5"
4758 case "(($ac_try" in
4759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4760 *) ac_try_echo=$ac_try;;
4761 esac
4762 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4763 $as_echo "$ac_try_echo"; } >&5
4764 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4765 ac_status=$?
4766 if test -s conftest.err; then
4767 sed '10a\
4768 ... rest of stderr output deleted ...
4769 10q' conftest.err >conftest.er1
4770 cat conftest.er1 >&5
4772 rm -f conftest.er1 conftest.err
4773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4774 test $ac_status = 0; }
4775 done
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4778 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4779 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4780 $as_echo_n "(cached) " >&6
4781 else
4782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4783 /* end confdefs.h. */
4786 main ()
4788 #ifndef __GNUC__
4789 choke me
4790 #endif
4793 return 0;
4795 _ACEOF
4796 if ac_fn_cxx_try_compile "$LINENO"; then :
4797 ac_compiler_gnu=yes
4798 else
4799 ac_compiler_gnu=no
4801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4802 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4806 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4807 if test $ac_compiler_gnu = yes; then
4808 GXX=yes
4809 else
4810 GXX=
4812 ac_test_CXXFLAGS=${CXXFLAGS+set}
4813 ac_save_CXXFLAGS=$CXXFLAGS
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4815 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4816 if ${ac_cv_prog_cxx_g+:} false; then :
4817 $as_echo_n "(cached) " >&6
4818 else
4819 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4820 ac_cxx_werror_flag=yes
4821 ac_cv_prog_cxx_g=no
4822 CXXFLAGS="-g"
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824 /* end confdefs.h. */
4827 main ()
4831 return 0;
4833 _ACEOF
4834 if ac_fn_cxx_try_compile "$LINENO"; then :
4835 ac_cv_prog_cxx_g=yes
4836 else
4837 CXXFLAGS=""
4838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4839 /* end confdefs.h. */
4842 main ()
4846 return 0;
4848 _ACEOF
4849 if ac_fn_cxx_try_compile "$LINENO"; then :
4851 else
4852 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4853 CXXFLAGS="-g"
4854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4855 /* end confdefs.h. */
4858 main ()
4862 return 0;
4864 _ACEOF
4865 if ac_fn_cxx_try_compile "$LINENO"; then :
4866 ac_cv_prog_cxx_g=yes
4868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4873 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4876 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4877 if test "$ac_test_CXXFLAGS" = set; then
4878 CXXFLAGS=$ac_save_CXXFLAGS
4879 elif test $ac_cv_prog_cxx_g = yes; then
4880 if test "$GXX" = yes; then
4881 CXXFLAGS="-g -O2"
4882 else
4883 CXXFLAGS="-g"
4885 else
4886 if test "$GXX" = yes; then
4887 CXXFLAGS="-O2"
4888 else
4889 CXXFLAGS=
4892 ac_ext=c
4893 ac_cpp='$CPP $CPPFLAGS'
4894 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4895 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4896 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4899 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4900 # but has idiosyncrasies of its own. We assume icc will define
4901 # __INTEL_COMPILER regardless of CFLAGS.
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h. */
4907 main ()
4909 #ifndef __INTEL_COMPILER
4910 choke me
4911 #endif
4913 return 0;
4915 _ACEOF
4916 if ac_fn_c_try_compile "$LINENO"; then :
4917 ICC=yes
4918 else
4919 ICC=no
4921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 # Check if it's Sun Studio compiler. We assume that
4924 # __SUNPRO_C will be defined for Sun Studio compilers
4925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4926 /* end confdefs.h. */
4929 main ()
4931 #ifndef __SUNPRO_C
4932 choke me
4933 #endif
4935 return 0;
4937 _ACEOF
4938 if ac_fn_c_try_compile "$LINENO"; then :
4939 SUN_STUDIO_CC=yes
4940 else
4941 SUN_STUDIO_CC=no
4943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4949 # LLVM
4951 # Checked early because subsequent tests depend on it.
4955 # Check whether --with-llvm was given.
4956 if test "${with_llvm+set}" = set; then :
4957 withval=$with_llvm;
4958 case $withval in
4959 yes)
4961 $as_echo "#define USE_LLVM 1" >>confdefs.h
4968 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4970 esac
4972 else
4973 with_llvm=no
4979 for ac_prog in gawk mawk nawk awk
4981 # Extract the first word of "$ac_prog", so it can be a program name with args.
4982 set dummy $ac_prog; ac_word=$2
4983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4984 $as_echo_n "checking for $ac_word... " >&6; }
4985 if ${ac_cv_prog_AWK+:} false; then :
4986 $as_echo_n "(cached) " >&6
4987 else
4988 if test -n "$AWK"; then
4989 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4990 else
4991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4992 for as_dir in $PATH
4994 IFS=$as_save_IFS
4995 test -z "$as_dir" && as_dir=.
4996 for ac_exec_ext in '' $ac_executable_extensions; do
4997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4998 ac_cv_prog_AWK="$ac_prog"
4999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5000 break 2
5002 done
5003 done
5004 IFS=$as_save_IFS
5008 AWK=$ac_cv_prog_AWK
5009 if test -n "$AWK"; then
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5011 $as_echo "$AWK" >&6; }
5012 else
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014 $as_echo "no" >&6; }
5018 test -n "$AWK" && break
5019 done
5021 if test "$with_llvm" = yes; then :
5027 if test -z "$LLVM_CONFIG"; then
5028 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
5030 # Extract the first word of "$ac_prog", so it can be a program name with args.
5031 set dummy $ac_prog; ac_word=$2
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5033 $as_echo_n "checking for $ac_word... " >&6; }
5034 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5035 $as_echo_n "(cached) " >&6
5036 else
5037 case $LLVM_CONFIG in
5038 [\\/]* | ?:[\\/]*)
5039 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5043 for as_dir in $PATH
5045 IFS=$as_save_IFS
5046 test -z "$as_dir" && as_dir=.
5047 for ac_exec_ext in '' $ac_executable_extensions; do
5048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5049 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5051 break 2
5053 done
5054 done
5055 IFS=$as_save_IFS
5058 esac
5060 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5061 if test -n "$LLVM_CONFIG"; then
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5063 $as_echo "$LLVM_CONFIG" >&6; }
5064 else
5065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5066 $as_echo "no" >&6; }
5070 test -n "$LLVM_CONFIG" && break
5071 done
5073 else
5074 # Report the value of LLVM_CONFIG in configure's output in all cases.
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5076 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5078 $as_echo "$LLVM_CONFIG" >&6; }
5082 # no point continuing if llvm wasn't found
5083 if test -z "$LLVM_CONFIG"; then
5084 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5086 # check if detected $LLVM_CONFIG is executable
5087 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5088 if test "x$pgac_llvm_version" = "xno"; then
5089 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5091 # and whether the version is supported
5092 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5093 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5096 # need clang to create some bitcode files
5098 if test -z "$CLANG"; then
5099 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5101 # Extract the first word of "$ac_prog", so it can be a program name with args.
5102 set dummy $ac_prog; ac_word=$2
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5104 $as_echo_n "checking for $ac_word... " >&6; }
5105 if ${ac_cv_path_CLANG+:} false; then :
5106 $as_echo_n "(cached) " >&6
5107 else
5108 case $CLANG in
5109 [\\/]* | ?:[\\/]*)
5110 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114 for as_dir in $PATH
5116 IFS=$as_save_IFS
5117 test -z "$as_dir" && as_dir=.
5118 for ac_exec_ext in '' $ac_executable_extensions; do
5119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5120 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5122 break 2
5124 done
5125 done
5126 IFS=$as_save_IFS
5129 esac
5131 CLANG=$ac_cv_path_CLANG
5132 if test -n "$CLANG"; then
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5134 $as_echo "$CLANG" >&6; }
5135 else
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5137 $as_echo "no" >&6; }
5141 test -n "$CLANG" && break
5142 done
5144 else
5145 # Report the value of CLANG in configure's output in all cases.
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5147 $as_echo_n "checking for CLANG... " >&6; }
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5149 $as_echo "$CLANG" >&6; }
5152 if test -z "$CLANG"; then
5153 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5155 # make sure clang is executable
5156 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5157 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5159 # Could check clang version, but it doesn't seem that
5160 # important. Systems with a new enough LLVM version are usually
5161 # going to have a decent clang version too. It's also not entirely
5162 # clear what the minimum version is.
5164 # Collect compiler flags necessary to build the LLVM dependent
5165 # shared library.
5166 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5167 case $pgac_option in
5168 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5169 esac
5170 done
5172 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5173 case $pgac_option in
5174 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5175 esac
5176 done
5178 # ABI influencing options, standard influencing options
5179 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5180 case $pgac_option in
5181 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5182 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5183 esac
5184 done
5186 # Look for components we're interested in, collect necessary
5187 # libs. As some components are optional, we can't just list all of
5188 # them as it'd raise an error.
5189 pgac_components='';
5190 for pgac_component in `$LLVM_CONFIG --components`; do
5191 case $pgac_component in
5192 engine) pgac_components="$pgac_components $pgac_component";;
5193 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5194 orcjit) pgac_components="$pgac_components $pgac_component";;
5195 passes) pgac_components="$pgac_components $pgac_component";;
5196 native) pgac_components="$pgac_components $pgac_component";;
5197 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5198 esac
5199 done;
5201 # And then get the libraries that need to be linked in for the
5202 # selected components. They're large libraries, we only want to
5203 # link them into the LLVM using shared library.
5204 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5205 case $pgac_option in
5206 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5207 esac
5208 done
5210 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5220 fi # fi
5223 unset CFLAGS
5224 unset CXXFLAGS
5227 # Read the template
5229 . "$srcdir/src/template/$template" || exit
5231 # C[XX]FLAGS are selected so:
5232 # If the user specifies something in the environment, that is used.
5233 # else: If the template file set something, that is used.
5234 # else: If coverage was enabled, don't set anything.
5235 # else: If the compiler is GCC, then we use -O2.
5236 # else: If the compiler is something else, then we use -O, unless debugging.
5238 if test "$ac_env_CFLAGS_set" = set; then
5239 CFLAGS=$ac_env_CFLAGS_value
5240 elif test "${CFLAGS+set}" = set; then
5241 : # (keep what template set)
5242 elif test "$enable_coverage" = yes; then
5243 : # no optimization by default
5244 elif test "$GCC" = yes; then
5245 CFLAGS="-O2"
5246 else
5247 # if the user selected debug mode, don't use -O
5248 if test "$enable_debug" != yes; then
5249 CFLAGS="-O"
5253 if test "$ac_env_CXXFLAGS_set" = set; then
5254 CXXFLAGS=$ac_env_CXXFLAGS_value
5255 elif test "${CXXFLAGS+set}" = set; then
5256 : # (keep what template set)
5257 elif test "$enable_coverage" = yes; then
5258 : # no optimization by default
5259 elif test "$GCC" = yes; then
5260 CXXFLAGS="-O2"
5261 else
5262 # if the user selected debug mode, don't use -O
5263 if test "$enable_debug" != yes; then
5264 CXXFLAGS="-O"
5268 # When generating bitcode (for inlining) we always want to use -O2
5269 # even when --enable-debug is specified. The bitcode is not going to
5270 # be used for line-by-line debugging, and JIT inlining doesn't work
5271 # without at least -O1 (otherwise clang will emit 'noinline'
5272 # attributes everywhere), which is bad for testing. Still allow the
5273 # environment to override if done explicitly.
5274 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5275 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5276 else
5277 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5279 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5280 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5281 else
5282 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5285 # C[XX]FLAGS we determined above will be added back at the end
5286 user_CFLAGS=$CFLAGS
5287 CFLAGS=""
5288 user_CXXFLAGS=$CXXFLAGS
5289 CXXFLAGS=""
5290 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5291 BITCODE_CFLAGS=""
5292 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5293 BITCODE_CXXFLAGS=""
5295 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5296 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5297 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5299 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5300 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5303 # Some versions of GCC support some additional useful warning flags.
5304 # Check whether they are supported, and add them to CFLAGS if so.
5305 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5306 # but has its own. Also check other compiler-specific flags here.
5308 if test "$GCC" = yes -a "$ICC" = no; then
5309 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5310 CXXFLAGS="-Wall -Wpointer-arith"
5311 # These work in some but not all gcc versions
5312 save_CFLAGS=$CFLAGS
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5315 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5316 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5317 $as_echo_n "(cached) " >&6
5318 else
5319 pgac_save_CFLAGS=$CFLAGS
5320 pgac_save_CC=$CC
5321 CC=${CC}
5322 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5323 ac_save_c_werror_flag=$ac_c_werror_flag
5324 ac_c_werror_flag=yes
5325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5326 /* end confdefs.h. */
5329 main ()
5333 return 0;
5335 _ACEOF
5336 if ac_fn_c_try_compile "$LINENO"; then :
5337 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5338 else
5339 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5342 ac_c_werror_flag=$ac_save_c_werror_flag
5343 CFLAGS="$pgac_save_CFLAGS"
5344 CC="$pgac_save_CC"
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5347 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5348 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5349 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5353 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5354 # disable it, so AC_SUBST the negative form.
5355 PERMIT_DECLARATION_AFTER_STATEMENT=
5356 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5357 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5360 # Really don't want VLAs to be used in our dialect of C
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5363 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5364 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5365 $as_echo_n "(cached) " >&6
5366 else
5367 pgac_save_CFLAGS=$CFLAGS
5368 pgac_save_CC=$CC
5369 CC=${CC}
5370 CFLAGS="${CFLAGS} -Werror=vla"
5371 ac_save_c_werror_flag=$ac_c_werror_flag
5372 ac_c_werror_flag=yes
5373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5374 /* end confdefs.h. */
5377 main ()
5381 return 0;
5383 _ACEOF
5384 if ac_fn_c_try_compile "$LINENO"; then :
5385 pgac_cv_prog_CC_cflags__Werror_vla=yes
5386 else
5387 pgac_cv_prog_CC_cflags__Werror_vla=no
5389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5390 ac_c_werror_flag=$ac_save_c_werror_flag
5391 CFLAGS="$pgac_save_CFLAGS"
5392 CC="$pgac_save_CC"
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5395 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5396 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5397 CFLAGS="${CFLAGS} -Werror=vla"
5401 # On macOS, complain about usage of symbols newer than the deployment target
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5404 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5405 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5406 $as_echo_n "(cached) " >&6
5407 else
5408 pgac_save_CFLAGS=$CFLAGS
5409 pgac_save_CC=$CC
5410 CC=${CC}
5411 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5412 ac_save_c_werror_flag=$ac_c_werror_flag
5413 ac_c_werror_flag=yes
5414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5415 /* end confdefs.h. */
5418 main ()
5422 return 0;
5424 _ACEOF
5425 if ac_fn_c_try_compile "$LINENO"; then :
5426 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5427 else
5428 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5431 ac_c_werror_flag=$ac_save_c_werror_flag
5432 CFLAGS="$pgac_save_CFLAGS"
5433 CC="$pgac_save_CC"
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5436 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5437 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5438 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5443 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5444 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5445 $as_echo_n "(cached) " >&6
5446 else
5447 pgac_save_CXXFLAGS=$CXXFLAGS
5448 pgac_save_CXX=$CXX
5449 CXX=${CXX}
5450 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5451 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5452 ac_cxx_werror_flag=yes
5453 ac_ext=cpp
5454 ac_cpp='$CXXCPP $CPPFLAGS'
5455 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5456 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5457 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5460 /* end confdefs.h. */
5463 main ()
5467 return 0;
5469 _ACEOF
5470 if ac_fn_cxx_try_compile "$LINENO"; then :
5471 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5472 else
5473 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476 ac_ext=c
5477 ac_cpp='$CPP $CPPFLAGS'
5478 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5479 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5480 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5482 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5483 CXXFLAGS="$pgac_save_CXXFLAGS"
5484 CXX="$pgac_save_CXX"
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5487 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5488 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5489 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5493 # -Wvla is not applicable for C++
5495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5496 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5497 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5498 $as_echo_n "(cached) " >&6
5499 else
5500 pgac_save_CFLAGS=$CFLAGS
5501 pgac_save_CC=$CC
5502 CC=${CC}
5503 CFLAGS="${CFLAGS} -Wendif-labels"
5504 ac_save_c_werror_flag=$ac_c_werror_flag
5505 ac_c_werror_flag=yes
5506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5507 /* end confdefs.h. */
5510 main ()
5514 return 0;
5516 _ACEOF
5517 if ac_fn_c_try_compile "$LINENO"; then :
5518 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5519 else
5520 pgac_cv_prog_CC_cflags__Wendif_labels=no
5522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5523 ac_c_werror_flag=$ac_save_c_werror_flag
5524 CFLAGS="$pgac_save_CFLAGS"
5525 CC="$pgac_save_CC"
5527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5528 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5529 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5530 CFLAGS="${CFLAGS} -Wendif-labels"
5534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5535 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5536 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5537 $as_echo_n "(cached) " >&6
5538 else
5539 pgac_save_CXXFLAGS=$CXXFLAGS
5540 pgac_save_CXX=$CXX
5541 CXX=${CXX}
5542 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5543 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5544 ac_cxx_werror_flag=yes
5545 ac_ext=cpp
5546 ac_cpp='$CXXCPP $CPPFLAGS'
5547 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5548 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5549 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5552 /* end confdefs.h. */
5555 main ()
5559 return 0;
5561 _ACEOF
5562 if ac_fn_cxx_try_compile "$LINENO"; then :
5563 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5564 else
5565 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5568 ac_ext=c
5569 ac_cpp='$CPP $CPPFLAGS'
5570 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5571 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5572 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5574 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5575 CXXFLAGS="$pgac_save_CXXFLAGS"
5576 CXX="$pgac_save_CXX"
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5579 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5580 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5581 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5587 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5588 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5589 $as_echo_n "(cached) " >&6
5590 else
5591 pgac_save_CFLAGS=$CFLAGS
5592 pgac_save_CC=$CC
5593 CC=${CC}
5594 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5595 ac_save_c_werror_flag=$ac_c_werror_flag
5596 ac_c_werror_flag=yes
5597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5598 /* end confdefs.h. */
5601 main ()
5605 return 0;
5607 _ACEOF
5608 if ac_fn_c_try_compile "$LINENO"; then :
5609 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5610 else
5611 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5614 ac_c_werror_flag=$ac_save_c_werror_flag
5615 CFLAGS="$pgac_save_CFLAGS"
5616 CC="$pgac_save_CC"
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5619 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5620 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5621 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5626 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5627 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5628 $as_echo_n "(cached) " >&6
5629 else
5630 pgac_save_CXXFLAGS=$CXXFLAGS
5631 pgac_save_CXX=$CXX
5632 CXX=${CXX}
5633 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5634 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5635 ac_cxx_werror_flag=yes
5636 ac_ext=cpp
5637 ac_cpp='$CXXCPP $CPPFLAGS'
5638 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5639 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5640 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5643 /* end confdefs.h. */
5646 main ()
5650 return 0;
5652 _ACEOF
5653 if ac_fn_cxx_try_compile "$LINENO"; then :
5654 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5655 else
5656 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5659 ac_ext=c
5660 ac_cpp='$CPP $CPPFLAGS'
5661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5665 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5666 CXXFLAGS="$pgac_save_CXXFLAGS"
5667 CXX="$pgac_save_CXX"
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5670 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5671 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5672 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5678 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5679 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5680 $as_echo_n "(cached) " >&6
5681 else
5682 pgac_save_CFLAGS=$CFLAGS
5683 pgac_save_CC=$CC
5684 CC=${CC}
5685 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5686 ac_save_c_werror_flag=$ac_c_werror_flag
5687 ac_c_werror_flag=yes
5688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5689 /* end confdefs.h. */
5692 main ()
5696 return 0;
5698 _ACEOF
5699 if ac_fn_c_try_compile "$LINENO"; then :
5700 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5701 else
5702 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5705 ac_c_werror_flag=$ac_save_c_werror_flag
5706 CFLAGS="$pgac_save_CFLAGS"
5707 CC="$pgac_save_CC"
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5710 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5711 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5712 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5717 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5718 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5719 $as_echo_n "(cached) " >&6
5720 else
5721 pgac_save_CXXFLAGS=$CXXFLAGS
5722 pgac_save_CXX=$CXX
5723 CXX=${CXX}
5724 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5725 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5726 ac_cxx_werror_flag=yes
5727 ac_ext=cpp
5728 ac_cpp='$CXXCPP $CPPFLAGS'
5729 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5730 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5731 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5734 /* end confdefs.h. */
5737 main ()
5741 return 0;
5743 _ACEOF
5744 if ac_fn_cxx_try_compile "$LINENO"; then :
5745 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5746 else
5747 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5750 ac_ext=c
5751 ac_cpp='$CPP $CPPFLAGS'
5752 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5753 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5754 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5756 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5757 CXXFLAGS="$pgac_save_CXXFLAGS"
5758 CXX="$pgac_save_CXX"
5760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5761 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5762 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5763 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5769 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5770 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5771 $as_echo_n "(cached) " >&6
5772 else
5773 pgac_save_CFLAGS=$CFLAGS
5774 pgac_save_CC=$CC
5775 CC=${CC}
5776 CFLAGS="${CFLAGS} -Wcast-function-type"
5777 ac_save_c_werror_flag=$ac_c_werror_flag
5778 ac_c_werror_flag=yes
5779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5780 /* end confdefs.h. */
5783 main ()
5787 return 0;
5789 _ACEOF
5790 if ac_fn_c_try_compile "$LINENO"; then :
5791 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5792 else
5793 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5796 ac_c_werror_flag=$ac_save_c_werror_flag
5797 CFLAGS="$pgac_save_CFLAGS"
5798 CC="$pgac_save_CC"
5800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5801 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5802 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5803 CFLAGS="${CFLAGS} -Wcast-function-type"
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5808 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5809 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5810 $as_echo_n "(cached) " >&6
5811 else
5812 pgac_save_CXXFLAGS=$CXXFLAGS
5813 pgac_save_CXX=$CXX
5814 CXX=${CXX}
5815 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5816 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5817 ac_cxx_werror_flag=yes
5818 ac_ext=cpp
5819 ac_cpp='$CXXCPP $CPPFLAGS'
5820 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5821 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5822 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5825 /* end confdefs.h. */
5828 main ()
5832 return 0;
5834 _ACEOF
5835 if ac_fn_cxx_try_compile "$LINENO"; then :
5836 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5837 else
5838 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5841 ac_ext=c
5842 ac_cpp='$CPP $CPPFLAGS'
5843 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5844 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5845 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5847 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5848 CXXFLAGS="$pgac_save_CXXFLAGS"
5849 CXX="$pgac_save_CXX"
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5852 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5853 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5854 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5858 # This was included in -Wall/-Wformat in older GCC versions
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5861 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5862 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5863 $as_echo_n "(cached) " >&6
5864 else
5865 pgac_save_CFLAGS=$CFLAGS
5866 pgac_save_CC=$CC
5867 CC=${CC}
5868 CFLAGS="${CFLAGS} -Wformat-security"
5869 ac_save_c_werror_flag=$ac_c_werror_flag
5870 ac_c_werror_flag=yes
5871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5872 /* end confdefs.h. */
5875 main ()
5879 return 0;
5881 _ACEOF
5882 if ac_fn_c_try_compile "$LINENO"; then :
5883 pgac_cv_prog_CC_cflags__Wformat_security=yes
5884 else
5885 pgac_cv_prog_CC_cflags__Wformat_security=no
5887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5888 ac_c_werror_flag=$ac_save_c_werror_flag
5889 CFLAGS="$pgac_save_CFLAGS"
5890 CC="$pgac_save_CC"
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5893 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5894 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5895 CFLAGS="${CFLAGS} -Wformat-security"
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5900 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5901 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5902 $as_echo_n "(cached) " >&6
5903 else
5904 pgac_save_CXXFLAGS=$CXXFLAGS
5905 pgac_save_CXX=$CXX
5906 CXX=${CXX}
5907 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5908 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5909 ac_cxx_werror_flag=yes
5910 ac_ext=cpp
5911 ac_cpp='$CXXCPP $CPPFLAGS'
5912 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5913 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5914 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5917 /* end confdefs.h. */
5920 main ()
5924 return 0;
5926 _ACEOF
5927 if ac_fn_cxx_try_compile "$LINENO"; then :
5928 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5929 else
5930 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5933 ac_ext=c
5934 ac_cpp='$CPP $CPPFLAGS'
5935 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5936 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5937 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5939 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5940 CXXFLAGS="$pgac_save_CXXFLAGS"
5941 CXX="$pgac_save_CXX"
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5944 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5945 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5946 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5950 # Disable strict-aliasing rules; needed for gcc 3.3+
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5953 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5954 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5955 $as_echo_n "(cached) " >&6
5956 else
5957 pgac_save_CFLAGS=$CFLAGS
5958 pgac_save_CC=$CC
5959 CC=${CC}
5960 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5961 ac_save_c_werror_flag=$ac_c_werror_flag
5962 ac_c_werror_flag=yes
5963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5964 /* end confdefs.h. */
5967 main ()
5971 return 0;
5973 _ACEOF
5974 if ac_fn_c_try_compile "$LINENO"; then :
5975 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5976 else
5977 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5980 ac_c_werror_flag=$ac_save_c_werror_flag
5981 CFLAGS="$pgac_save_CFLAGS"
5982 CC="$pgac_save_CC"
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5985 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5986 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5987 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5992 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5993 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5994 $as_echo_n "(cached) " >&6
5995 else
5996 pgac_save_CXXFLAGS=$CXXFLAGS
5997 pgac_save_CXX=$CXX
5998 CXX=${CXX}
5999 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6000 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6001 ac_cxx_werror_flag=yes
6002 ac_ext=cpp
6003 ac_cpp='$CXXCPP $CPPFLAGS'
6004 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6005 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6006 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6009 /* end confdefs.h. */
6012 main ()
6016 return 0;
6018 _ACEOF
6019 if ac_fn_cxx_try_compile "$LINENO"; then :
6020 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6021 else
6022 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6025 ac_ext=c
6026 ac_cpp='$CPP $CPPFLAGS'
6027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6031 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6032 CXXFLAGS="$pgac_save_CXXFLAGS"
6033 CXX="$pgac_save_CXX"
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6036 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6037 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6038 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6042 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6045 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6046 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6047 $as_echo_n "(cached) " >&6
6048 else
6049 pgac_save_CFLAGS=$CFLAGS
6050 pgac_save_CC=$CC
6051 CC=${CC}
6052 CFLAGS="${CFLAGS} -fwrapv"
6053 ac_save_c_werror_flag=$ac_c_werror_flag
6054 ac_c_werror_flag=yes
6055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6056 /* end confdefs.h. */
6059 main ()
6063 return 0;
6065 _ACEOF
6066 if ac_fn_c_try_compile "$LINENO"; then :
6067 pgac_cv_prog_CC_cflags__fwrapv=yes
6068 else
6069 pgac_cv_prog_CC_cflags__fwrapv=no
6071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6072 ac_c_werror_flag=$ac_save_c_werror_flag
6073 CFLAGS="$pgac_save_CFLAGS"
6074 CC="$pgac_save_CC"
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6077 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6078 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6079 CFLAGS="${CFLAGS} -fwrapv"
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6084 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6085 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6086 $as_echo_n "(cached) " >&6
6087 else
6088 pgac_save_CXXFLAGS=$CXXFLAGS
6089 pgac_save_CXX=$CXX
6090 CXX=${CXX}
6091 CXXFLAGS="${CXXFLAGS} -fwrapv"
6092 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6093 ac_cxx_werror_flag=yes
6094 ac_ext=cpp
6095 ac_cpp='$CXXCPP $CPPFLAGS'
6096 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6097 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6098 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6101 /* end confdefs.h. */
6104 main ()
6108 return 0;
6110 _ACEOF
6111 if ac_fn_cxx_try_compile "$LINENO"; then :
6112 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6113 else
6114 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6117 ac_ext=c
6118 ac_cpp='$CPP $CPPFLAGS'
6119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6123 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6124 CXXFLAGS="$pgac_save_CXXFLAGS"
6125 CXX="$pgac_save_CXX"
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6128 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6129 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6130 CXXFLAGS="${CXXFLAGS} -fwrapv"
6134 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6137 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6138 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6139 $as_echo_n "(cached) " >&6
6140 else
6141 pgac_save_CFLAGS=$CFLAGS
6142 pgac_save_CC=$CC
6143 CC=${CC}
6144 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6145 ac_save_c_werror_flag=$ac_c_werror_flag
6146 ac_c_werror_flag=yes
6147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6148 /* end confdefs.h. */
6151 main ()
6155 return 0;
6157 _ACEOF
6158 if ac_fn_c_try_compile "$LINENO"; then :
6159 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6160 else
6161 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6164 ac_c_werror_flag=$ac_save_c_werror_flag
6165 CFLAGS="$pgac_save_CFLAGS"
6166 CC="$pgac_save_CC"
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6169 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6170 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6171 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6176 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6177 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6178 $as_echo_n "(cached) " >&6
6179 else
6180 pgac_save_CXXFLAGS=$CXXFLAGS
6181 pgac_save_CXX=$CXX
6182 CXX=${CXX}
6183 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6184 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6185 ac_cxx_werror_flag=yes
6186 ac_ext=cpp
6187 ac_cpp='$CXXCPP $CPPFLAGS'
6188 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6189 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6190 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6193 /* end confdefs.h. */
6196 main ()
6200 return 0;
6202 _ACEOF
6203 if ac_fn_cxx_try_compile "$LINENO"; then :
6204 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6205 else
6206 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6209 ac_ext=c
6210 ac_cpp='$CPP $CPPFLAGS'
6211 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6212 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6213 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6215 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6216 CXXFLAGS="$pgac_save_CXXFLAGS"
6217 CXX="$pgac_save_CXX"
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6220 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6221 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6222 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6226 # Optimization flags for specific files that benefit from loop unrolling
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6228 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6229 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6230 $as_echo_n "(cached) " >&6
6231 else
6232 pgac_save_CFLAGS=$CFLAGS
6233 pgac_save_CC=$CC
6234 CC=${CC}
6235 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6236 ac_save_c_werror_flag=$ac_c_werror_flag
6237 ac_c_werror_flag=yes
6238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6239 /* end confdefs.h. */
6242 main ()
6246 return 0;
6248 _ACEOF
6249 if ac_fn_c_try_compile "$LINENO"; then :
6250 pgac_cv_prog_CC_cflags__funroll_loops=yes
6251 else
6252 pgac_cv_prog_CC_cflags__funroll_loops=no
6254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6255 ac_c_werror_flag=$ac_save_c_werror_flag
6256 CFLAGS="$pgac_save_CFLAGS"
6257 CC="$pgac_save_CC"
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6260 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6261 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6262 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6266 # Optimization flags for specific files that benefit from vectorization
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6268 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6269 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6270 $as_echo_n "(cached) " >&6
6271 else
6272 pgac_save_CFLAGS=$CFLAGS
6273 pgac_save_CC=$CC
6274 CC=${CC}
6275 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6276 ac_save_c_werror_flag=$ac_c_werror_flag
6277 ac_c_werror_flag=yes
6278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6279 /* end confdefs.h. */
6282 main ()
6286 return 0;
6288 _ACEOF
6289 if ac_fn_c_try_compile "$LINENO"; then :
6290 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6291 else
6292 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6295 ac_c_werror_flag=$ac_save_c_werror_flag
6296 CFLAGS="$pgac_save_CFLAGS"
6297 CC="$pgac_save_CC"
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6300 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6301 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6302 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6307 # The following tests want to suppress various unhelpful warnings by adding
6308 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6309 # switches, so we have to test for the positive form and if that works,
6310 # add the negative form. Note that tests of this form typically need to
6311 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6313 # Suppress clang's unhelpful unused-command-line-argument warnings.
6314 NOT_THE_CFLAGS=""
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6316 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6317 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6318 $as_echo_n "(cached) " >&6
6319 else
6320 pgac_save_CFLAGS=$CFLAGS
6321 pgac_save_CC=$CC
6322 CC=${CC}
6323 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6324 ac_save_c_werror_flag=$ac_c_werror_flag
6325 ac_c_werror_flag=yes
6326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6327 /* end confdefs.h. */
6330 main ()
6334 return 0;
6336 _ACEOF
6337 if ac_fn_c_try_compile "$LINENO"; then :
6338 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6339 else
6340 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6343 ac_c_werror_flag=$ac_save_c_werror_flag
6344 CFLAGS="$pgac_save_CFLAGS"
6345 CC="$pgac_save_CC"
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6348 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6349 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6350 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6354 if test -n "$NOT_THE_CFLAGS"; then
6355 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6357 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6358 # of warnings when building plperl because of usages in the Perl headers.
6359 NOT_THE_CFLAGS=""
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6361 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6362 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6363 $as_echo_n "(cached) " >&6
6364 else
6365 pgac_save_CFLAGS=$CFLAGS
6366 pgac_save_CC=$CC
6367 CC=${CC}
6368 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6369 ac_save_c_werror_flag=$ac_c_werror_flag
6370 ac_c_werror_flag=yes
6371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6372 /* end confdefs.h. */
6375 main ()
6379 return 0;
6381 _ACEOF
6382 if ac_fn_c_try_compile "$LINENO"; then :
6383 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6384 else
6385 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6388 ac_c_werror_flag=$ac_save_c_werror_flag
6389 CFLAGS="$pgac_save_CFLAGS"
6390 CC="$pgac_save_CC"
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6393 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6394 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6395 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6399 if test -n "$NOT_THE_CFLAGS"; then
6400 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6402 # Similarly disable useless truncation warnings from gcc 8+
6403 NOT_THE_CFLAGS=""
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6405 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6406 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6407 $as_echo_n "(cached) " >&6
6408 else
6409 pgac_save_CFLAGS=$CFLAGS
6410 pgac_save_CC=$CC
6411 CC=${CC}
6412 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6413 ac_save_c_werror_flag=$ac_c_werror_flag
6414 ac_c_werror_flag=yes
6415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6416 /* end confdefs.h. */
6419 main ()
6423 return 0;
6425 _ACEOF
6426 if ac_fn_c_try_compile "$LINENO"; then :
6427 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6428 else
6429 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6432 ac_c_werror_flag=$ac_save_c_werror_flag
6433 CFLAGS="$pgac_save_CFLAGS"
6434 CC="$pgac_save_CC"
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6437 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6438 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6439 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6443 if test -n "$NOT_THE_CFLAGS"; then
6444 CFLAGS="$CFLAGS -Wno-format-truncation"
6446 NOT_THE_CFLAGS=""
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6448 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6449 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6450 $as_echo_n "(cached) " >&6
6451 else
6452 pgac_save_CFLAGS=$CFLAGS
6453 pgac_save_CC=$CC
6454 CC=${CC}
6455 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6456 ac_save_c_werror_flag=$ac_c_werror_flag
6457 ac_c_werror_flag=yes
6458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6459 /* end confdefs.h. */
6462 main ()
6466 return 0;
6468 _ACEOF
6469 if ac_fn_c_try_compile "$LINENO"; then :
6470 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6471 else
6472 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6475 ac_c_werror_flag=$ac_save_c_werror_flag
6476 CFLAGS="$pgac_save_CFLAGS"
6477 CC="$pgac_save_CC"
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6480 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6481 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6482 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6486 if test -n "$NOT_THE_CFLAGS"; then
6487 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6489 elif test "$ICC" = yes; then
6490 # Intel's compiler has a bug/misoptimization in checking for
6491 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6494 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6495 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6496 $as_echo_n "(cached) " >&6
6497 else
6498 pgac_save_CFLAGS=$CFLAGS
6499 pgac_save_CC=$CC
6500 CC=${CC}
6501 CFLAGS="${CFLAGS} -mp1"
6502 ac_save_c_werror_flag=$ac_c_werror_flag
6503 ac_c_werror_flag=yes
6504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6505 /* end confdefs.h. */
6508 main ()
6512 return 0;
6514 _ACEOF
6515 if ac_fn_c_try_compile "$LINENO"; then :
6516 pgac_cv_prog_CC_cflags__mp1=yes
6517 else
6518 pgac_cv_prog_CC_cflags__mp1=no
6520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6521 ac_c_werror_flag=$ac_save_c_werror_flag
6522 CFLAGS="$pgac_save_CFLAGS"
6523 CC="$pgac_save_CC"
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6526 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6527 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6528 CFLAGS="${CFLAGS} -mp1"
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6533 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6534 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6535 $as_echo_n "(cached) " >&6
6536 else
6537 pgac_save_CXXFLAGS=$CXXFLAGS
6538 pgac_save_CXX=$CXX
6539 CXX=${CXX}
6540 CXXFLAGS="${CXXFLAGS} -mp1"
6541 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6542 ac_cxx_werror_flag=yes
6543 ac_ext=cpp
6544 ac_cpp='$CXXCPP $CPPFLAGS'
6545 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6546 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6547 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6550 /* end confdefs.h. */
6553 main ()
6557 return 0;
6559 _ACEOF
6560 if ac_fn_cxx_try_compile "$LINENO"; then :
6561 pgac_cv_prog_CXX_cxxflags__mp1=yes
6562 else
6563 pgac_cv_prog_CXX_cxxflags__mp1=no
6565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6566 ac_ext=c
6567 ac_cpp='$CPP $CPPFLAGS'
6568 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6569 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6570 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6572 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6573 CXXFLAGS="$pgac_save_CXXFLAGS"
6574 CXX="$pgac_save_CXX"
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6577 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6578 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6579 CXXFLAGS="${CXXFLAGS} -mp1"
6583 # Make sure strict aliasing is off (though this is said to be the default)
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6586 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6587 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6588 $as_echo_n "(cached) " >&6
6589 else
6590 pgac_save_CFLAGS=$CFLAGS
6591 pgac_save_CC=$CC
6592 CC=${CC}
6593 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6594 ac_save_c_werror_flag=$ac_c_werror_flag
6595 ac_c_werror_flag=yes
6596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6597 /* end confdefs.h. */
6600 main ()
6604 return 0;
6606 _ACEOF
6607 if ac_fn_c_try_compile "$LINENO"; then :
6608 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6609 else
6610 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6613 ac_c_werror_flag=$ac_save_c_werror_flag
6614 CFLAGS="$pgac_save_CFLAGS"
6615 CC="$pgac_save_CC"
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6618 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6619 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6620 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6625 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6626 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6627 $as_echo_n "(cached) " >&6
6628 else
6629 pgac_save_CXXFLAGS=$CXXFLAGS
6630 pgac_save_CXX=$CXX
6631 CXX=${CXX}
6632 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6633 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6634 ac_cxx_werror_flag=yes
6635 ac_ext=cpp
6636 ac_cpp='$CXXCPP $CPPFLAGS'
6637 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6638 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6639 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6642 /* end confdefs.h. */
6645 main ()
6649 return 0;
6651 _ACEOF
6652 if ac_fn_cxx_try_compile "$LINENO"; then :
6653 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6654 else
6655 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6658 ac_ext=c
6659 ac_cpp='$CPP $CPPFLAGS'
6660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6664 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6665 CXXFLAGS="$pgac_save_CXXFLAGS"
6666 CXX="$pgac_save_CXX"
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6669 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6670 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6671 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6675 elif test "$PORTNAME" = "aix"; then
6676 # AIX's xlc has to have strict aliasing turned off too
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6679 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6680 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6681 $as_echo_n "(cached) " >&6
6682 else
6683 pgac_save_CFLAGS=$CFLAGS
6684 pgac_save_CC=$CC
6685 CC=${CC}
6686 CFLAGS="${CFLAGS} -qnoansialias"
6687 ac_save_c_werror_flag=$ac_c_werror_flag
6688 ac_c_werror_flag=yes
6689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6690 /* end confdefs.h. */
6693 main ()
6697 return 0;
6699 _ACEOF
6700 if ac_fn_c_try_compile "$LINENO"; then :
6701 pgac_cv_prog_CC_cflags__qnoansialias=yes
6702 else
6703 pgac_cv_prog_CC_cflags__qnoansialias=no
6705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6706 ac_c_werror_flag=$ac_save_c_werror_flag
6707 CFLAGS="$pgac_save_CFLAGS"
6708 CC="$pgac_save_CC"
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6711 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6712 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6713 CFLAGS="${CFLAGS} -qnoansialias"
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6718 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6719 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6720 $as_echo_n "(cached) " >&6
6721 else
6722 pgac_save_CXXFLAGS=$CXXFLAGS
6723 pgac_save_CXX=$CXX
6724 CXX=${CXX}
6725 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6726 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6727 ac_cxx_werror_flag=yes
6728 ac_ext=cpp
6729 ac_cpp='$CXXCPP $CPPFLAGS'
6730 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6731 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6732 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6735 /* end confdefs.h. */
6738 main ()
6742 return 0;
6744 _ACEOF
6745 if ac_fn_cxx_try_compile "$LINENO"; then :
6746 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6747 else
6748 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6751 ac_ext=c
6752 ac_cpp='$CPP $CPPFLAGS'
6753 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6754 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6755 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6757 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6758 CXXFLAGS="$pgac_save_CXXFLAGS"
6759 CXX="$pgac_save_CXX"
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6762 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6763 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6764 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6770 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6771 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6772 $as_echo_n "(cached) " >&6
6773 else
6774 pgac_save_CFLAGS=$CFLAGS
6775 pgac_save_CC=$CC
6776 CC=${CC}
6777 CFLAGS="${CFLAGS} -qlonglong"
6778 ac_save_c_werror_flag=$ac_c_werror_flag
6779 ac_c_werror_flag=yes
6780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6781 /* end confdefs.h. */
6784 main ()
6788 return 0;
6790 _ACEOF
6791 if ac_fn_c_try_compile "$LINENO"; then :
6792 pgac_cv_prog_CC_cflags__qlonglong=yes
6793 else
6794 pgac_cv_prog_CC_cflags__qlonglong=no
6796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6797 ac_c_werror_flag=$ac_save_c_werror_flag
6798 CFLAGS="$pgac_save_CFLAGS"
6799 CC="$pgac_save_CC"
6801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6802 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6803 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6804 CFLAGS="${CFLAGS} -qlonglong"
6808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6809 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6810 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6811 $as_echo_n "(cached) " >&6
6812 else
6813 pgac_save_CXXFLAGS=$CXXFLAGS
6814 pgac_save_CXX=$CXX
6815 CXX=${CXX}
6816 CXXFLAGS="${CXXFLAGS} -qlonglong"
6817 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6818 ac_cxx_werror_flag=yes
6819 ac_ext=cpp
6820 ac_cpp='$CXXCPP $CPPFLAGS'
6821 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6822 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6823 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6826 /* end confdefs.h. */
6829 main ()
6833 return 0;
6835 _ACEOF
6836 if ac_fn_cxx_try_compile "$LINENO"; then :
6837 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6838 else
6839 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6842 ac_ext=c
6843 ac_cpp='$CPP $CPPFLAGS'
6844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6848 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6849 CXXFLAGS="$pgac_save_CXXFLAGS"
6850 CXX="$pgac_save_CXX"
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6853 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6854 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6855 CXXFLAGS="${CXXFLAGS} -qlonglong"
6859 elif test "$PORTNAME" = "hpux"; then
6860 # On some versions of HP-UX, libm functions do not set errno by default.
6861 # Fix that by using +Olibmerrno if the compiler recognizes it.
6863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6864 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6865 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6866 $as_echo_n "(cached) " >&6
6867 else
6868 pgac_save_CFLAGS=$CFLAGS
6869 pgac_save_CC=$CC
6870 CC=${CC}
6871 CFLAGS="${CFLAGS} +Olibmerrno"
6872 ac_save_c_werror_flag=$ac_c_werror_flag
6873 ac_c_werror_flag=yes
6874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6875 /* end confdefs.h. */
6878 main ()
6882 return 0;
6884 _ACEOF
6885 if ac_fn_c_try_compile "$LINENO"; then :
6886 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6887 else
6888 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6891 ac_c_werror_flag=$ac_save_c_werror_flag
6892 CFLAGS="$pgac_save_CFLAGS"
6893 CC="$pgac_save_CC"
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6896 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6897 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6898 CFLAGS="${CFLAGS} +Olibmerrno"
6902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6903 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6904 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6905 $as_echo_n "(cached) " >&6
6906 else
6907 pgac_save_CXXFLAGS=$CXXFLAGS
6908 pgac_save_CXX=$CXX
6909 CXX=${CXX}
6910 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6911 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6912 ac_cxx_werror_flag=yes
6913 ac_ext=cpp
6914 ac_cpp='$CXXCPP $CPPFLAGS'
6915 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6916 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6917 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6920 /* end confdefs.h. */
6923 main ()
6927 return 0;
6929 _ACEOF
6930 if ac_fn_cxx_try_compile "$LINENO"; then :
6931 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6932 else
6933 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6936 ac_ext=c
6937 ac_cpp='$CPP $CPPFLAGS'
6938 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6939 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6940 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6942 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6943 CXXFLAGS="$pgac_save_CXXFLAGS"
6944 CXX="$pgac_save_CXX"
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6947 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6948 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6949 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6958 # Determine flags used to emit bitcode for JIT inlining.
6959 # 1. We must duplicate any behaviour-changing compiler flags used above,
6960 # to keep compatibility with the compiler used for normal Postgres code.
6961 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
6962 # warning in the main build is enough.
6963 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
6964 if test "$with_llvm" = yes ; then
6965 CLANGXX="$CLANG -xc++"
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6968 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6969 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6970 $as_echo_n "(cached) " >&6
6971 else
6972 pgac_save_CFLAGS=$CFLAGS
6973 pgac_save_CC=$CC
6974 CC=${CLANG}
6975 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6976 ac_save_c_werror_flag=$ac_c_werror_flag
6977 ac_c_werror_flag=yes
6978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6979 /* end confdefs.h. */
6982 main ()
6986 return 0;
6988 _ACEOF
6989 if ac_fn_c_try_compile "$LINENO"; then :
6990 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6991 else
6992 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6995 ac_c_werror_flag=$ac_save_c_werror_flag
6996 CFLAGS="$pgac_save_CFLAGS"
6997 CC="$pgac_save_CC"
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7000 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7001 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7002 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7006 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7007 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7008 $as_echo_n "(cached) " >&6
7009 else
7010 pgac_save_CXXFLAGS=$CXXFLAGS
7011 pgac_save_CXX=$CXX
7012 CXX=${CLANGXX}
7013 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7014 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7015 ac_cxx_werror_flag=yes
7016 ac_ext=cpp
7017 ac_cpp='$CXXCPP $CPPFLAGS'
7018 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7019 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7020 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7023 /* end confdefs.h. */
7026 main ()
7030 return 0;
7032 _ACEOF
7033 if ac_fn_cxx_try_compile "$LINENO"; then :
7034 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7035 else
7036 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7039 ac_ext=c
7040 ac_cpp='$CPP $CPPFLAGS'
7041 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7042 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7043 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7045 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7046 CXXFLAGS="$pgac_save_CXXFLAGS"
7047 CXX="$pgac_save_CXX"
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7050 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7051 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7052 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7056 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7057 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7058 $as_echo_n "(cached) " >&6
7059 else
7060 pgac_save_CFLAGS=$CFLAGS
7061 pgac_save_CC=$CC
7062 CC=${CLANG}
7063 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7064 ac_save_c_werror_flag=$ac_c_werror_flag
7065 ac_c_werror_flag=yes
7066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7067 /* end confdefs.h. */
7070 main ()
7074 return 0;
7076 _ACEOF
7077 if ac_fn_c_try_compile "$LINENO"; then :
7078 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7079 else
7080 pgac_cv_prog_CLANG_cflags__fwrapv=no
7082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7083 ac_c_werror_flag=$ac_save_c_werror_flag
7084 CFLAGS="$pgac_save_CFLAGS"
7085 CC="$pgac_save_CC"
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7088 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7089 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7090 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7094 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7095 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7096 $as_echo_n "(cached) " >&6
7097 else
7098 pgac_save_CXXFLAGS=$CXXFLAGS
7099 pgac_save_CXX=$CXX
7100 CXX=${CLANGXX}
7101 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7102 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7103 ac_cxx_werror_flag=yes
7104 ac_ext=cpp
7105 ac_cpp='$CXXCPP $CPPFLAGS'
7106 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7107 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7108 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7111 /* end confdefs.h. */
7114 main ()
7118 return 0;
7120 _ACEOF
7121 if ac_fn_cxx_try_compile "$LINENO"; then :
7122 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7123 else
7124 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7127 ac_ext=c
7128 ac_cpp='$CPP $CPPFLAGS'
7129 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7130 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7131 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7133 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7134 CXXFLAGS="$pgac_save_CXXFLAGS"
7135 CXX="$pgac_save_CXX"
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7138 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7139 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7140 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7144 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7145 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7146 $as_echo_n "(cached) " >&6
7147 else
7148 pgac_save_CFLAGS=$CFLAGS
7149 pgac_save_CC=$CC
7150 CC=${CLANG}
7151 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7152 ac_save_c_werror_flag=$ac_c_werror_flag
7153 ac_c_werror_flag=yes
7154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7155 /* end confdefs.h. */
7158 main ()
7162 return 0;
7164 _ACEOF
7165 if ac_fn_c_try_compile "$LINENO"; then :
7166 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7167 else
7168 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7171 ac_c_werror_flag=$ac_save_c_werror_flag
7172 CFLAGS="$pgac_save_CFLAGS"
7173 CC="$pgac_save_CC"
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7176 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7177 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7178 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7182 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7183 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7184 $as_echo_n "(cached) " >&6
7185 else
7186 pgac_save_CXXFLAGS=$CXXFLAGS
7187 pgac_save_CXX=$CXX
7188 CXX=${CLANGXX}
7189 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7190 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7191 ac_cxx_werror_flag=yes
7192 ac_ext=cpp
7193 ac_cpp='$CXXCPP $CPPFLAGS'
7194 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7195 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7196 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7199 /* end confdefs.h. */
7202 main ()
7206 return 0;
7208 _ACEOF
7209 if ac_fn_cxx_try_compile "$LINENO"; then :
7210 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7211 else
7212 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7215 ac_ext=c
7216 ac_cpp='$CPP $CPPFLAGS'
7217 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7218 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7219 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7221 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7222 CXXFLAGS="$pgac_save_CXXFLAGS"
7223 CXX="$pgac_save_CXX"
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7226 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7227 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7228 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7232 NOT_THE_CFLAGS=""
7233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7234 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7235 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7236 $as_echo_n "(cached) " >&6
7237 else
7238 pgac_save_CFLAGS=$CFLAGS
7239 pgac_save_CC=$CC
7240 CC=${CLANG}
7241 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7242 ac_save_c_werror_flag=$ac_c_werror_flag
7243 ac_c_werror_flag=yes
7244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245 /* end confdefs.h. */
7248 main ()
7252 return 0;
7254 _ACEOF
7255 if ac_fn_c_try_compile "$LINENO"; then :
7256 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7257 else
7258 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7261 ac_c_werror_flag=$ac_save_c_werror_flag
7262 CFLAGS="$pgac_save_CFLAGS"
7263 CC="$pgac_save_CC"
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7266 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7267 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7268 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7271 if test -n "$NOT_THE_CFLAGS"; then
7272 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7274 NOT_THE_CFLAGS=""
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7276 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7277 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7278 $as_echo_n "(cached) " >&6
7279 else
7280 pgac_save_CFLAGS=$CFLAGS
7281 pgac_save_CC=$CC
7282 CC=${CLANG}
7283 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7284 ac_save_c_werror_flag=$ac_c_werror_flag
7285 ac_c_werror_flag=yes
7286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7287 /* end confdefs.h. */
7290 main ()
7294 return 0;
7296 _ACEOF
7297 if ac_fn_c_try_compile "$LINENO"; then :
7298 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7299 else
7300 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7303 ac_c_werror_flag=$ac_save_c_werror_flag
7304 CFLAGS="$pgac_save_CFLAGS"
7305 CC="$pgac_save_CC"
7307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7308 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7309 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7310 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7313 if test -n "$NOT_THE_CFLAGS"; then
7314 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7316 NOT_THE_CFLAGS=""
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7318 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7319 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7320 $as_echo_n "(cached) " >&6
7321 else
7322 pgac_save_CFLAGS=$CFLAGS
7323 pgac_save_CC=$CC
7324 CC=${CLANG}
7325 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7326 ac_save_c_werror_flag=$ac_c_werror_flag
7327 ac_c_werror_flag=yes
7328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7329 /* end confdefs.h. */
7332 main ()
7336 return 0;
7338 _ACEOF
7339 if ac_fn_c_try_compile "$LINENO"; then :
7340 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7341 else
7342 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7345 ac_c_werror_flag=$ac_save_c_werror_flag
7346 CFLAGS="$pgac_save_CFLAGS"
7347 CC="$pgac_save_CC"
7349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7350 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7351 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7352 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7355 if test -n "$NOT_THE_CFLAGS"; then
7356 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7358 NOT_THE_CFLAGS=""
7359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7360 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7361 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7362 $as_echo_n "(cached) " >&6
7363 else
7364 pgac_save_CFLAGS=$CFLAGS
7365 pgac_save_CC=$CC
7366 CC=${CLANG}
7367 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7368 ac_save_c_werror_flag=$ac_c_werror_flag
7369 ac_c_werror_flag=yes
7370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7371 /* end confdefs.h. */
7374 main ()
7378 return 0;
7380 _ACEOF
7381 if ac_fn_c_try_compile "$LINENO"; then :
7382 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7383 else
7384 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7387 ac_c_werror_flag=$ac_save_c_werror_flag
7388 CFLAGS="$pgac_save_CFLAGS"
7389 CC="$pgac_save_CC"
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7392 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7393 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7394 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7397 if test -n "$NOT_THE_CFLAGS"; then
7398 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7402 # supply -g if --enable-debug
7403 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7404 CFLAGS="$CFLAGS -g"
7407 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7408 CXXFLAGS="$CXXFLAGS -g"
7411 # enable code coverage if --enable-coverage
7412 if test "$enable_coverage" = yes; then
7413 if test "$GCC" = yes; then
7414 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7415 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7416 else
7417 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7421 # enable profiling if --enable-profiling
7422 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7423 if test "$GCC" = yes; then
7425 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7427 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7428 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7429 else
7430 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7434 # On Solaris, we need this #define to get POSIX-conforming versions
7435 # of many interfaces (sigwait, getpwuid_r, ...).
7436 if test "$PORTNAME" = "solaris"; then
7437 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7440 # We already have this in Makefile.win32, but configure needs it too
7441 if test "$PORTNAME" = "win32"; then
7442 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7445 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7446 # user-specified flags (if any) at the end. This lets users override
7447 # the automatic additions.
7448 CFLAGS="$CFLAGS $user_CFLAGS"
7449 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7450 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7451 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7456 # The template file must set up CFLAGS_SL; we don't support user override
7459 # Check if the compiler still works with the final flag settings
7460 # (note, we're not checking that for CXX, which is optional)
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7462 $as_echo_n "checking whether the C compiler still works... " >&6; }
7463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7464 /* end confdefs.h. */
7467 main ()
7469 return 0;
7471 return 0;
7473 _ACEOF
7474 if ac_fn_c_try_link "$LINENO"; then :
7475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7476 $as_echo "yes" >&6; }
7477 else
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7479 $as_echo "no" >&6; }
7480 as_fn_error $? "cannot proceed" "$LINENO" 5
7482 rm -f core conftest.err conftest.$ac_objext \
7483 conftest$ac_exeext conftest.$ac_ext
7485 # Defend against gcc -ffast-math
7486 if test "$GCC" = yes; then
7487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7488 /* end confdefs.h. */
7491 main ()
7493 #ifdef __FAST_MATH__
7494 choke me
7495 #endif
7497 return 0;
7499 _ACEOF
7500 if ac_fn_c_try_compile "$LINENO"; then :
7502 else
7503 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7508 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7509 # versions of clang do not understand -fexcess-precision=standard, the use of
7510 # x87 floating point operations leads to problems like isinf possibly returning
7511 # false for a value that is infinite when converted from the 80bit register to
7512 # the 8byte memory representation.
7514 # Only perform the test if the compiler doesn't understand
7515 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7516 # automatically.
7517 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7519 /* end confdefs.h. */
7522 main ()
7525 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7526 choke me
7527 #endif
7530 return 0;
7532 _ACEOF
7533 if ac_fn_c_try_compile "$LINENO"; then :
7535 else
7536 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7541 ac_ext=c
7542 ac_cpp='$CPP $CPPFLAGS'
7543 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7544 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7545 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7547 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7548 # On Suns, sometimes $CPP names a directory.
7549 if test -n "$CPP" && test -d "$CPP"; then
7550 CPP=
7552 if test -z "$CPP"; then
7553 if ${ac_cv_prog_CPP+:} false; then :
7554 $as_echo_n "(cached) " >&6
7555 else
7556 # Double quotes because CPP needs to be expanded
7557 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7559 ac_preproc_ok=false
7560 for ac_c_preproc_warn_flag in '' yes
7562 # Use a header file that comes with gcc, so configuring glibc
7563 # with a fresh cross-compiler works.
7564 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7565 # <limits.h> exists even on freestanding compilers.
7566 # On the NeXT, cc -E runs the code through the compiler's parser,
7567 # not just through cpp. "Syntax error" is here to catch this case.
7568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7569 /* end confdefs.h. */
7570 #ifdef __STDC__
7571 # include <limits.h>
7572 #else
7573 # include <assert.h>
7574 #endif
7575 Syntax error
7576 _ACEOF
7577 if ac_fn_c_try_cpp "$LINENO"; then :
7579 else
7580 # Broken: fails on valid input.
7581 continue
7583 rm -f conftest.err conftest.i conftest.$ac_ext
7585 # OK, works on sane cases. Now check whether nonexistent headers
7586 # can be detected and how.
7587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7588 /* end confdefs.h. */
7589 #include <ac_nonexistent.h>
7590 _ACEOF
7591 if ac_fn_c_try_cpp "$LINENO"; then :
7592 # Broken: success on invalid input.
7593 continue
7594 else
7595 # Passes both tests.
7596 ac_preproc_ok=:
7597 break
7599 rm -f conftest.err conftest.i conftest.$ac_ext
7601 done
7602 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7603 rm -f conftest.i conftest.err conftest.$ac_ext
7604 if $ac_preproc_ok; then :
7605 break
7608 done
7609 ac_cv_prog_CPP=$CPP
7612 CPP=$ac_cv_prog_CPP
7613 else
7614 ac_cv_prog_CPP=$CPP
7616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7617 $as_echo "$CPP" >&6; }
7618 ac_preproc_ok=false
7619 for ac_c_preproc_warn_flag in '' yes
7621 # Use a header file that comes with gcc, so configuring glibc
7622 # with a fresh cross-compiler works.
7623 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7624 # <limits.h> exists even on freestanding compilers.
7625 # On the NeXT, cc -E runs the code through the compiler's parser,
7626 # not just through cpp. "Syntax error" is here to catch this case.
7627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7628 /* end confdefs.h. */
7629 #ifdef __STDC__
7630 # include <limits.h>
7631 #else
7632 # include <assert.h>
7633 #endif
7634 Syntax error
7635 _ACEOF
7636 if ac_fn_c_try_cpp "$LINENO"; then :
7638 else
7639 # Broken: fails on valid input.
7640 continue
7642 rm -f conftest.err conftest.i conftest.$ac_ext
7644 # OK, works on sane cases. Now check whether nonexistent headers
7645 # can be detected and how.
7646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7647 /* end confdefs.h. */
7648 #include <ac_nonexistent.h>
7649 _ACEOF
7650 if ac_fn_c_try_cpp "$LINENO"; then :
7651 # Broken: success on invalid input.
7652 continue
7653 else
7654 # Passes both tests.
7655 ac_preproc_ok=:
7656 break
7658 rm -f conftest.err conftest.i conftest.$ac_ext
7660 done
7661 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7662 rm -f conftest.i conftest.err conftest.$ac_ext
7663 if $ac_preproc_ok; then :
7665 else
7666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7667 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7668 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7669 See \`config.log' for more details" "$LINENO" 5; }
7672 ac_ext=c
7673 ac_cpp='$CPP $CPPFLAGS'
7674 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7675 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7676 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7682 # Set up TAS assembly code if needed; the template file has now had its
7683 # chance to request this.
7685 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7688 if test "$need_tas" = yes ; then
7689 TAS=tas.o
7690 else
7691 TAS=""
7696 cat >>confdefs.h <<_ACEOF
7697 #define DLSUFFIX "$DLSUFFIX"
7698 _ACEOF
7702 # Set up pkg_config in case we need it below
7711 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7712 if test -n "$ac_tool_prefix"; then
7713 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7714 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7716 $as_echo_n "checking for $ac_word... " >&6; }
7717 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7718 $as_echo_n "(cached) " >&6
7719 else
7720 case $PKG_CONFIG in
7721 [\\/]* | ?:[\\/]*)
7722 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7726 for as_dir in $PATH
7728 IFS=$as_save_IFS
7729 test -z "$as_dir" && as_dir=.
7730 for ac_exec_ext in '' $ac_executable_extensions; do
7731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7732 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7734 break 2
7736 done
7737 done
7738 IFS=$as_save_IFS
7741 esac
7743 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7744 if test -n "$PKG_CONFIG"; then
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7746 $as_echo "$PKG_CONFIG" >&6; }
7747 else
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749 $as_echo "no" >&6; }
7754 if test -z "$ac_cv_path_PKG_CONFIG"; then
7755 ac_pt_PKG_CONFIG=$PKG_CONFIG
7756 # Extract the first word of "pkg-config", so it can be a program name with args.
7757 set dummy pkg-config; ac_word=$2
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7759 $as_echo_n "checking for $ac_word... " >&6; }
7760 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7761 $as_echo_n "(cached) " >&6
7762 else
7763 case $ac_pt_PKG_CONFIG in
7764 [\\/]* | ?:[\\/]*)
7765 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7769 for as_dir in $PATH
7771 IFS=$as_save_IFS
7772 test -z "$as_dir" && as_dir=.
7773 for ac_exec_ext in '' $ac_executable_extensions; do
7774 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7775 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7777 break 2
7779 done
7780 done
7781 IFS=$as_save_IFS
7784 esac
7786 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7787 if test -n "$ac_pt_PKG_CONFIG"; then
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7789 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7790 else
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7792 $as_echo "no" >&6; }
7795 if test "x$ac_pt_PKG_CONFIG" = x; then
7796 PKG_CONFIG=""
7797 else
7798 case $cross_compiling:$ac_tool_warned in
7799 yes:)
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7801 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7802 ac_tool_warned=yes ;;
7803 esac
7804 PKG_CONFIG=$ac_pt_PKG_CONFIG
7806 else
7807 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7811 if test -n "$PKG_CONFIG"; then
7812 _pkg_min_version=0.9.0
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7814 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7815 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7817 $as_echo "yes" >&6; }
7818 else
7819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7820 $as_echo "no" >&6; }
7821 PKG_CONFIG=""
7826 # Automatic dependency tracking
7830 # Check whether --enable-depend was given.
7831 if test "${enable_depend+set}" = set; then :
7832 enableval=$enable_depend;
7833 case $enableval in
7834 yes)
7835 autodepend=yes
7841 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7843 esac
7845 else
7846 enable_depend=no
7855 # Enable assert checks
7859 # Check whether --enable-cassert was given.
7860 if test "${enable_cassert+set}" = set; then :
7861 enableval=$enable_cassert;
7862 case $enableval in
7863 yes)
7865 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7872 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7874 esac
7876 else
7877 enable_cassert=no
7885 # Include directories
7887 ac_save_IFS=$IFS
7888 IFS="${IFS}${PATH_SEPARATOR}"
7889 # SRCH_INC comes from the template file
7890 for dir in $with_includes $SRCH_INC; do
7891 if test -d "$dir"; then
7892 INCLUDES="$INCLUDES -I$dir"
7893 else
7894 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7895 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7897 done
7898 IFS=$ac_save_IFS
7903 # Library directories
7905 ac_save_IFS=$IFS
7906 IFS="${IFS}${PATH_SEPARATOR}"
7907 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7908 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7909 if test -d "$dir"; then
7910 LIBDIRS="$LIBDIRS -L$dir"
7911 else
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7913 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7915 done
7916 IFS=$ac_save_IFS
7919 # Enable thread-safe client libraries
7921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7922 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7925 # Check whether --enable-thread-safety was given.
7926 if test "${enable_thread_safety+set}" = set; then :
7927 enableval=$enable_thread_safety;
7928 case $enableval in
7929 yes)
7936 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7938 esac
7940 else
7941 enable_thread_safety=yes
7946 if test "$enable_thread_safety" = yes; then
7948 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7952 $as_echo "$enable_thread_safety" >&6; }
7956 # ICU
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7959 $as_echo_n "checking whether to build with ICU support... " >&6; }
7963 # Check whether --with-icu was given.
7964 if test "${with_icu+set}" = set; then :
7965 withval=$with_icu;
7966 case $withval in
7967 yes)
7969 $as_echo "#define USE_ICU 1" >>confdefs.h
7976 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7978 esac
7980 else
7981 with_icu=no
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7987 $as_echo "$with_icu" >&6; }
7990 if test "$with_icu" = yes; then
7992 pkg_failed=no
7993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7994 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7996 if test -n "$ICU_CFLAGS"; then
7997 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7998 elif test -n "$PKG_CONFIG"; then
7999 if test -n "$PKG_CONFIG" && \
8000 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8001 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8002 ac_status=$?
8003 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8004 test $ac_status = 0; }; then
8005 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8006 test "x$?" != "x0" && pkg_failed=yes
8007 else
8008 pkg_failed=yes
8010 else
8011 pkg_failed=untried
8013 if test -n "$ICU_LIBS"; then
8014 pkg_cv_ICU_LIBS="$ICU_LIBS"
8015 elif test -n "$PKG_CONFIG"; then
8016 if test -n "$PKG_CONFIG" && \
8017 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8018 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8019 ac_status=$?
8020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8021 test $ac_status = 0; }; then
8022 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8023 test "x$?" != "x0" && pkg_failed=yes
8024 else
8025 pkg_failed=yes
8027 else
8028 pkg_failed=untried
8033 if test $pkg_failed = yes; then
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8035 $as_echo "no" >&6; }
8037 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8038 _pkg_short_errors_supported=yes
8039 else
8040 _pkg_short_errors_supported=no
8042 if test $_pkg_short_errors_supported = yes; then
8043 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8044 else
8045 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8047 # Put the nasty error message in config.log where it belongs
8048 echo "$ICU_PKG_ERRORS" >&5
8050 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8052 $ICU_PKG_ERRORS
8054 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8055 installed software in a non-standard prefix.
8057 Alternatively, you may set the environment variables ICU_CFLAGS
8058 and ICU_LIBS to avoid the need to call pkg-config.
8059 See the pkg-config man page for more details." "$LINENO" 5
8060 elif test $pkg_failed = untried; then
8061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8062 $as_echo "no" >&6; }
8063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8064 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8065 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8066 is in your PATH or set the PKG_CONFIG environment variable to the full
8067 path to pkg-config.
8069 Alternatively, you may set the environment variables ICU_CFLAGS
8070 and ICU_LIBS to avoid the need to call pkg-config.
8071 See the pkg-config man page for more details.
8073 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8074 See \`config.log' for more details" "$LINENO" 5; }
8075 else
8076 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8077 ICU_LIBS=$pkg_cv_ICU_LIBS
8078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8079 $as_echo "yes" >&6; }
8085 # Optionally build Tcl modules (PL/Tcl)
8087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8088 $as_echo_n "checking whether to build with Tcl... " >&6; }
8092 # Check whether --with-tcl was given.
8093 if test "${with_tcl+set}" = set; then :
8094 withval=$with_tcl;
8095 case $withval in
8096 yes)
8103 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8105 esac
8107 else
8108 with_tcl=no
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8114 $as_echo "$with_tcl" >&6; }
8117 # We see if the path to the Tcl/Tk configuration scripts is specified.
8118 # This will override the use of tclsh to find the paths to search.
8123 # Check whether --with-tclconfig was given.
8124 if test "${with_tclconfig+set}" = set; then :
8125 withval=$with_tclconfig;
8126 case $withval in
8127 yes)
8128 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8131 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8136 esac
8143 # Optionally build Perl modules (PL/Perl)
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8146 $as_echo_n "checking whether to build Perl modules... " >&6; }
8150 # Check whether --with-perl was given.
8151 if test "${with_perl+set}" = set; then :
8152 withval=$with_perl;
8153 case $withval in
8154 yes)
8161 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8163 esac
8165 else
8166 with_perl=no
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8172 $as_echo "$with_perl" >&6; }
8176 # Optionally build Python modules (PL/Python)
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8179 $as_echo_n "checking whether to build Python modules... " >&6; }
8183 # Check whether --with-python was given.
8184 if test "${with_python+set}" = set; then :
8185 withval=$with_python;
8186 case $withval in
8187 yes)
8194 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8196 esac
8198 else
8199 with_python=no
8204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8205 $as_echo "$with_python" >&6; }
8209 # GSSAPI
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8212 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8216 # Check whether --with-gssapi was given.
8217 if test "${with_gssapi+set}" = set; then :
8218 withval=$with_gssapi;
8219 case $withval in
8220 yes)
8223 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8225 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8232 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8234 esac
8236 else
8237 with_gssapi=no
8242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8243 $as_echo "$with_gssapi" >&6; }
8251 # Kerberos configuration parameters
8256 # Check whether --with-krb-srvnam was given.
8257 if test "${with_krb_srvnam+set}" = set; then :
8258 withval=$with_krb_srvnam;
8259 case $withval in
8260 yes)
8261 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8264 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8269 esac
8271 else
8272 with_krb_srvnam="postgres"
8278 cat >>confdefs.h <<_ACEOF
8279 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8280 _ACEOF
8285 # PAM
8287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8288 $as_echo_n "checking whether to build with PAM support... " >&6; }
8292 # Check whether --with-pam was given.
8293 if test "${with_pam+set}" = set; then :
8294 withval=$with_pam;
8295 case $withval in
8296 yes)
8298 $as_echo "#define USE_PAM 1" >>confdefs.h
8305 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8307 esac
8309 else
8310 with_pam=no
8315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8316 $as_echo "$with_pam" >&6; }
8320 # BSD AUTH
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8323 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8327 # Check whether --with-bsd-auth was given.
8328 if test "${with_bsd_auth+set}" = set; then :
8329 withval=$with_bsd_auth;
8330 case $withval in
8331 yes)
8333 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8340 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8342 esac
8344 else
8345 with_bsd_auth=no
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8351 $as_echo "$with_bsd_auth" >&6; }
8355 # LDAP
8357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8358 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8362 # Check whether --with-ldap was given.
8363 if test "${with_ldap+set}" = set; then :
8364 withval=$with_ldap;
8365 case $withval in
8366 yes)
8368 $as_echo "#define USE_LDAP 1" >>confdefs.h
8375 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8377 esac
8379 else
8380 with_ldap=no
8385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8386 $as_echo "$with_ldap" >&6; }
8391 # Bonjour
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8394 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8398 # Check whether --with-bonjour was given.
8399 if test "${with_bonjour+set}" = set; then :
8400 withval=$with_bonjour;
8401 case $withval in
8402 yes)
8404 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8411 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8413 esac
8415 else
8416 with_bonjour=no
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8422 $as_echo "$with_bonjour" >&6; }
8426 # SELinux
8428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8429 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8433 # Check whether --with-selinux was given.
8434 if test "${with_selinux+set}" = set; then :
8435 withval=$with_selinux;
8436 case $withval in
8437 yes)
8444 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8446 esac
8448 else
8449 with_selinux=no
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8456 $as_echo "$with_selinux" >&6; }
8459 # Systemd
8461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8462 $as_echo_n "checking whether to build with systemd support... " >&6; }
8466 # Check whether --with-systemd was given.
8467 if test "${with_systemd+set}" = set; then :
8468 withval=$with_systemd;
8469 case $withval in
8470 yes)
8472 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8479 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8481 esac
8483 else
8484 with_systemd=no
8490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8491 $as_echo "$with_systemd" >&6; }
8494 # Readline
8499 # Check whether --with-readline was given.
8500 if test "${with_readline+set}" = set; then :
8501 withval=$with_readline;
8502 case $withval in
8503 yes)
8510 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8512 esac
8514 else
8515 with_readline=yes
8520 # readline on MinGW has problems with backslashes in psql and other bugs.
8521 # This is particularly a problem with non-US code pages.
8522 # Therefore disable its use until we understand the cause. 2004-07-20
8523 if test "$PORTNAME" = "win32"; then
8524 if test "$with_readline" = yes; then
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8526 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8527 with_readline=no
8534 # Prefer libedit
8539 # Check whether --with-libedit-preferred was given.
8540 if test "${with_libedit_preferred+set}" = set; then :
8541 withval=$with_libedit_preferred;
8542 case $withval in
8543 yes)
8550 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8552 esac
8554 else
8555 with_libedit_preferred=no
8563 # UUID library
8565 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8566 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8567 # UUID library. More than one of these might be present on a given platform,
8568 # so we make the user say which one she wants.
8573 # Check whether --with-uuid was given.
8574 if test "${with_uuid+set}" = set; then :
8575 withval=$with_uuid;
8576 case $withval in
8577 yes)
8578 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8581 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8586 esac
8591 if test x"$with_uuid" = x"" ; then
8592 with_uuid=no
8597 # Check whether --with-ossp-uuid was given.
8598 if test "${with_ossp_uuid+set}" = set; then :
8599 withval=$with_ossp_uuid;
8600 case $withval in
8601 yes)
8608 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8610 esac
8612 else
8613 with_ossp_uuid=no
8618 if test "$with_ossp_uuid" = yes ; then
8619 with_uuid=ossp
8622 if test "$with_uuid" != no ; then
8623 if test "$with_uuid" = bsd ; then
8625 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8627 elif test "$with_uuid" = e2fs ; then
8629 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8631 elif test "$with_uuid" = ossp ; then
8633 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8635 else
8636 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8643 # XML
8645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8646 $as_echo_n "checking whether to build with XML support... " >&6; }
8650 # Check whether --with-libxml was given.
8651 if test "${with_libxml+set}" = set; then :
8652 withval=$with_libxml;
8653 case $withval in
8654 yes)
8656 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8663 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8665 esac
8667 else
8668 with_libxml=no
8673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8674 $as_echo "$with_libxml" >&6; }
8677 if test "$with_libxml" = yes ; then
8678 # Check pkg-config, then xml2-config. But for backwards compatibility,
8679 # setting XML2_CONFIG overrides pkg-config.
8680 have_libxml2_pkg_config=no
8681 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8683 pkg_failed=no
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8685 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8687 if test -n "$XML2_CFLAGS"; then
8688 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8689 elif test -n "$PKG_CONFIG"; then
8690 if test -n "$PKG_CONFIG" && \
8691 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8692 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8693 ac_status=$?
8694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8695 test $ac_status = 0; }; then
8696 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8697 test "x$?" != "x0" && pkg_failed=yes
8698 else
8699 pkg_failed=yes
8701 else
8702 pkg_failed=untried
8704 if test -n "$XML2_LIBS"; then
8705 pkg_cv_XML2_LIBS="$XML2_LIBS"
8706 elif test -n "$PKG_CONFIG"; then
8707 if test -n "$PKG_CONFIG" && \
8708 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8709 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8710 ac_status=$?
8711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8712 test $ac_status = 0; }; then
8713 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8714 test "x$?" != "x0" && pkg_failed=yes
8715 else
8716 pkg_failed=yes
8718 else
8719 pkg_failed=untried
8724 if test $pkg_failed = yes; then
8725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726 $as_echo "no" >&6; }
8728 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8729 _pkg_short_errors_supported=yes
8730 else
8731 _pkg_short_errors_supported=no
8733 if test $_pkg_short_errors_supported = yes; then
8734 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8735 else
8736 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8738 # Put the nasty error message in config.log where it belongs
8739 echo "$XML2_PKG_ERRORS" >&5
8741 # do nothing
8742 elif test $pkg_failed = untried; then
8743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8744 $as_echo "no" >&6; }
8745 # do nothing
8746 else
8747 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8748 XML2_LIBS=$pkg_cv_XML2_LIBS
8749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8750 $as_echo "yes" >&6; }
8751 have_libxml2_pkg_config=yes
8754 if test "$have_libxml2_pkg_config" = no ; then
8755 if test -z "$XML2_CONFIG"; then
8756 for ac_prog in xml2-config
8758 # Extract the first word of "$ac_prog", so it can be a program name with args.
8759 set dummy $ac_prog; ac_word=$2
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8761 $as_echo_n "checking for $ac_word... " >&6; }
8762 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8763 $as_echo_n "(cached) " >&6
8764 else
8765 case $XML2_CONFIG in
8766 [\\/]* | ?:[\\/]*)
8767 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8771 for as_dir in $PATH
8773 IFS=$as_save_IFS
8774 test -z "$as_dir" && as_dir=.
8775 for ac_exec_ext in '' $ac_executable_extensions; do
8776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8777 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8779 break 2
8781 done
8782 done
8783 IFS=$as_save_IFS
8786 esac
8788 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8789 if test -n "$XML2_CONFIG"; then
8790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8791 $as_echo "$XML2_CONFIG" >&6; }
8792 else
8793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794 $as_echo "no" >&6; }
8798 test -n "$XML2_CONFIG" && break
8799 done
8801 else
8802 # Report the value of XML2_CONFIG in configure's output in all cases.
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8804 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8806 $as_echo "$XML2_CONFIG" >&6; }
8809 if test -n "$XML2_CONFIG"; then
8810 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8811 XML2_LIBS=`$XML2_CONFIG --libs`
8814 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8815 for pgac_option in $XML2_CFLAGS; do
8816 case $pgac_option in
8817 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8818 esac
8819 done
8820 for pgac_option in $XML2_LIBS; do
8821 case $pgac_option in
8822 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8823 esac
8824 done
8829 # XSLT
8834 # Check whether --with-libxslt was given.
8835 if test "${with_libxslt+set}" = set; then :
8836 withval=$with_libxslt;
8837 case $withval in
8838 yes)
8840 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8847 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8849 esac
8851 else
8852 with_libxslt=no
8862 # tzdata
8867 # Check whether --with-system-tzdata was given.
8868 if test "${with_system_tzdata+set}" = set; then :
8869 withval=$with_system_tzdata;
8870 case $withval in
8871 yes)
8872 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8875 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8880 esac
8888 # Zlib
8893 # Check whether --with-zlib was given.
8894 if test "${with_zlib+set}" = set; then :
8895 withval=$with_zlib;
8896 case $withval in
8897 yes)
8904 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8906 esac
8908 else
8909 with_zlib=yes
8917 # LZ4
8919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
8920 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
8924 # Check whether --with-lz4 was given.
8925 if test "${with_lz4+set}" = set; then :
8926 withval=$with_lz4;
8927 case $withval in
8928 yes)
8930 $as_echo "#define USE_LZ4 1" >>confdefs.h
8937 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
8939 esac
8941 else
8942 with_lz4=no
8947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
8948 $as_echo "$with_lz4" >&6; }
8951 if test "$with_lz4" = yes; then
8953 pkg_failed=no
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
8955 $as_echo_n "checking for liblz4... " >&6; }
8957 if test -n "$LZ4_CFLAGS"; then
8958 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
8959 elif test -n "$PKG_CONFIG"; then
8960 if test -n "$PKG_CONFIG" && \
8961 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8962 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8963 ac_status=$?
8964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8965 test $ac_status = 0; }; then
8966 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
8967 test "x$?" != "x0" && pkg_failed=yes
8968 else
8969 pkg_failed=yes
8971 else
8972 pkg_failed=untried
8974 if test -n "$LZ4_LIBS"; then
8975 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
8976 elif test -n "$PKG_CONFIG"; then
8977 if test -n "$PKG_CONFIG" && \
8978 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8979 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8980 ac_status=$?
8981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8982 test $ac_status = 0; }; then
8983 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
8984 test "x$?" != "x0" && pkg_failed=yes
8985 else
8986 pkg_failed=yes
8988 else
8989 pkg_failed=untried
8994 if test $pkg_failed = yes; then
8995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8996 $as_echo "no" >&6; }
8998 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8999 _pkg_short_errors_supported=yes
9000 else
9001 _pkg_short_errors_supported=no
9003 if test $_pkg_short_errors_supported = yes; then
9004 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9005 else
9006 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9008 # Put the nasty error message in config.log where it belongs
9009 echo "$LZ4_PKG_ERRORS" >&5
9011 as_fn_error $? "Package requirements (liblz4) were not met:
9013 $LZ4_PKG_ERRORS
9015 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9016 installed software in a non-standard prefix.
9018 Alternatively, you may set the environment variables LZ4_CFLAGS
9019 and LZ4_LIBS to avoid the need to call pkg-config.
9020 See the pkg-config man page for more details." "$LINENO" 5
9021 elif test $pkg_failed = untried; then
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9023 $as_echo "no" >&6; }
9024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9025 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9026 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9027 is in your PATH or set the PKG_CONFIG environment variable to the full
9028 path to pkg-config.
9030 Alternatively, you may set the environment variables LZ4_CFLAGS
9031 and LZ4_LIBS to avoid the need to call pkg-config.
9032 See the pkg-config man page for more details.
9034 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9035 See \`config.log' for more details" "$LINENO" 5; }
9036 else
9037 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9038 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9040 $as_echo "yes" >&6; }
9043 # We only care about -I, -D, and -L switches;
9044 # note that -llz4 will be added by AC_CHECK_LIB below.
9045 for pgac_option in $LZ4_CFLAGS; do
9046 case $pgac_option in
9047 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9048 esac
9049 done
9050 for pgac_option in $LZ4_LIBS; do
9051 case $pgac_option in
9052 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9053 esac
9054 done
9058 # ZSTD
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9061 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9065 # Check whether --with-zstd was given.
9066 if test "${with_zstd+set}" = set; then :
9067 withval=$with_zstd;
9068 case $withval in
9069 yes)
9071 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9078 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9080 esac
9082 else
9083 with_zstd=no
9088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9089 $as_echo "$with_zstd" >&6; }
9092 if test "$with_zstd" = yes; then
9094 pkg_failed=no
9095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9096 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9098 if test -n "$ZSTD_CFLAGS"; then
9099 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9100 elif test -n "$PKG_CONFIG"; then
9101 if test -n "$PKG_CONFIG" && \
9102 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9103 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9104 ac_status=$?
9105 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9106 test $ac_status = 0; }; then
9107 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9108 test "x$?" != "x0" && pkg_failed=yes
9109 else
9110 pkg_failed=yes
9112 else
9113 pkg_failed=untried
9115 if test -n "$ZSTD_LIBS"; then
9116 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9117 elif test -n "$PKG_CONFIG"; then
9118 if test -n "$PKG_CONFIG" && \
9119 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9120 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9121 ac_status=$?
9122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9123 test $ac_status = 0; }; then
9124 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9125 test "x$?" != "x0" && pkg_failed=yes
9126 else
9127 pkg_failed=yes
9129 else
9130 pkg_failed=untried
9135 if test $pkg_failed = yes; then
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9137 $as_echo "no" >&6; }
9139 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9140 _pkg_short_errors_supported=yes
9141 else
9142 _pkg_short_errors_supported=no
9144 if test $_pkg_short_errors_supported = yes; then
9145 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9146 else
9147 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9149 # Put the nasty error message in config.log where it belongs
9150 echo "$ZSTD_PKG_ERRORS" >&5
9152 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9154 $ZSTD_PKG_ERRORS
9156 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9157 installed software in a non-standard prefix.
9159 Alternatively, you may set the environment variables ZSTD_CFLAGS
9160 and ZSTD_LIBS to avoid the need to call pkg-config.
9161 See the pkg-config man page for more details." "$LINENO" 5
9162 elif test $pkg_failed = untried; then
9163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9164 $as_echo "no" >&6; }
9165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9166 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9167 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9168 is in your PATH or set the PKG_CONFIG environment variable to the full
9169 path to pkg-config.
9171 Alternatively, you may set the environment variables ZSTD_CFLAGS
9172 and ZSTD_LIBS to avoid the need to call pkg-config.
9173 See the pkg-config man page for more details.
9175 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9176 See \`config.log' for more details" "$LINENO" 5; }
9177 else
9178 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9179 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9181 $as_echo "yes" >&6; }
9184 # We only care about -I, -D, and -L switches;
9185 # note that -lzstd will be added by AC_CHECK_LIB below.
9186 for pgac_option in $ZSTD_CFLAGS; do
9187 case $pgac_option in
9188 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9189 esac
9190 done
9191 for pgac_option in $ZSTD_LIBS; do
9192 case $pgac_option in
9193 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9194 esac
9195 done
9198 # Assignments
9201 CPPFLAGS="$CPPFLAGS $INCLUDES"
9202 LDFLAGS="$LDFLAGS $LIBDIRS"
9208 # Check whether --with-gnu-ld was given.
9209 if test "${with_gnu_ld+set}" = set; then :
9210 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9211 else
9212 with_gnu_ld=no
9215 ac_prog=ld
9216 if test "$GCC" = yes; then
9217 # Check if gcc -print-prog-name=ld gives a path.
9218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9219 $as_echo_n "checking for ld used by GCC... " >&6; }
9220 case $host in
9221 *-*-mingw*)
9222 # gcc leaves a trailing carriage return which upsets mingw
9223 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9225 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9226 esac
9227 case "$ac_prog" in
9228 # Accept absolute paths.
9229 [\\/]* | [A-Za-z]:[\\/]*)
9230 re_direlt='/[^/][^/]*/\.\./'
9231 # Canonicalize the path of ld
9232 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9233 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9234 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9235 done
9236 test -z "$LD" && LD="$ac_prog"
9239 # If it fails, then pretend we aren't using GCC.
9240 ac_prog=ld
9243 # If it is relative, then search for the first ld in PATH.
9244 with_gnu_ld=unknown
9246 esac
9247 elif test "$with_gnu_ld" = yes; then
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9249 $as_echo_n "checking for GNU ld... " >&6; }
9250 else
9251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9252 $as_echo_n "checking for non-GNU ld... " >&6; }
9254 if ${ac_cv_path_LD+:} false; then :
9255 $as_echo_n "(cached) " >&6
9256 else
9257 if test -z "$LD"; then
9258 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9259 for ac_dir in $PATH; do
9260 test -z "$ac_dir" && ac_dir=.
9261 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9262 ac_cv_path_LD="$ac_dir/$ac_prog"
9263 # Check to see if the program is GNU ld. I'd rather use --version,
9264 # but apparently some GNU ld's only accept -v.
9265 # Break only if it was the GNU/non-GNU ld that we prefer.
9266 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9267 test "$with_gnu_ld" != no && break
9268 else
9269 test "$with_gnu_ld" != yes && break
9272 done
9273 IFS="$ac_save_ifs"
9274 else
9275 ac_cv_path_LD="$LD" # Let the user override the test with a path.
9279 LD="$ac_cv_path_LD"
9280 if test -n "$LD"; then
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9282 $as_echo "$LD" >&6; }
9283 else
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9285 $as_echo "no" >&6; }
9287 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9289 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9290 if ${ac_cv_prog_gnu_ld+:} false; then :
9291 $as_echo_n "(cached) " >&6
9292 else
9293 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9294 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9295 ac_cv_prog_gnu_ld=yes
9296 else
9297 ac_cv_prog_gnu_ld=no
9300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
9301 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
9302 with_gnu_ld=$ac_cv_prog_gnu_ld
9307 if test -n "$ac_tool_prefix"; then
9308 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9309 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9311 $as_echo_n "checking for $ac_word... " >&6; }
9312 if ${ac_cv_prog_RANLIB+:} false; then :
9313 $as_echo_n "(cached) " >&6
9314 else
9315 if test -n "$RANLIB"; then
9316 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9317 else
9318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9319 for as_dir in $PATH
9321 IFS=$as_save_IFS
9322 test -z "$as_dir" && as_dir=.
9323 for ac_exec_ext in '' $ac_executable_extensions; do
9324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9325 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9327 break 2
9329 done
9330 done
9331 IFS=$as_save_IFS
9335 RANLIB=$ac_cv_prog_RANLIB
9336 if test -n "$RANLIB"; then
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9338 $as_echo "$RANLIB" >&6; }
9339 else
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9341 $as_echo "no" >&6; }
9346 if test -z "$ac_cv_prog_RANLIB"; then
9347 ac_ct_RANLIB=$RANLIB
9348 # Extract the first word of "ranlib", so it can be a program name with args.
9349 set dummy ranlib; ac_word=$2
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9351 $as_echo_n "checking for $ac_word... " >&6; }
9352 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
9353 $as_echo_n "(cached) " >&6
9354 else
9355 if test -n "$ac_ct_RANLIB"; then
9356 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9357 else
9358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9359 for as_dir in $PATH
9361 IFS=$as_save_IFS
9362 test -z "$as_dir" && as_dir=.
9363 for ac_exec_ext in '' $ac_executable_extensions; do
9364 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9365 ac_cv_prog_ac_ct_RANLIB="ranlib"
9366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9367 break 2
9369 done
9370 done
9371 IFS=$as_save_IFS
9375 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9376 if test -n "$ac_ct_RANLIB"; then
9377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9378 $as_echo "$ac_ct_RANLIB" >&6; }
9379 else
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9381 $as_echo "no" >&6; }
9384 if test "x$ac_ct_RANLIB" = x; then
9385 RANLIB=":"
9386 else
9387 case $cross_compiling:$ac_tool_warned in
9388 yes:)
9389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9390 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9391 ac_tool_warned=yes ;;
9392 esac
9393 RANLIB=$ac_ct_RANLIB
9395 else
9396 RANLIB="$ac_cv_prog_RANLIB"
9400 if test -n "$ac_tool_prefix"; then
9401 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9402 set dummy ${ac_tool_prefix}strip; ac_word=$2
9403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9404 $as_echo_n "checking for $ac_word... " >&6; }
9405 if ${ac_cv_prog_STRIP+:} false; then :
9406 $as_echo_n "(cached) " >&6
9407 else
9408 if test -n "$STRIP"; then
9409 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9410 else
9411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9412 for as_dir in $PATH
9414 IFS=$as_save_IFS
9415 test -z "$as_dir" && as_dir=.
9416 for ac_exec_ext in '' $ac_executable_extensions; do
9417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9418 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9420 break 2
9422 done
9423 done
9424 IFS=$as_save_IFS
9428 STRIP=$ac_cv_prog_STRIP
9429 if test -n "$STRIP"; then
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9431 $as_echo "$STRIP" >&6; }
9432 else
9433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434 $as_echo "no" >&6; }
9439 if test -z "$ac_cv_prog_STRIP"; then
9440 ac_ct_STRIP=$STRIP
9441 # Extract the first word of "strip", so it can be a program name with args.
9442 set dummy strip; ac_word=$2
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9444 $as_echo_n "checking for $ac_word... " >&6; }
9445 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9446 $as_echo_n "(cached) " >&6
9447 else
9448 if test -n "$ac_ct_STRIP"; then
9449 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9450 else
9451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9452 for as_dir in $PATH
9454 IFS=$as_save_IFS
9455 test -z "$as_dir" && as_dir=.
9456 for ac_exec_ext in '' $ac_executable_extensions; do
9457 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9458 ac_cv_prog_ac_ct_STRIP="strip"
9459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9460 break 2
9462 done
9463 done
9464 IFS=$as_save_IFS
9468 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9469 if test -n "$ac_ct_STRIP"; then
9470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9471 $as_echo "$ac_ct_STRIP" >&6; }
9472 else
9473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9474 $as_echo "no" >&6; }
9477 if test "x$ac_ct_STRIP" = x; then
9478 STRIP=":"
9479 else
9480 case $cross_compiling:$ac_tool_warned in
9481 yes:)
9482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9483 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9484 ac_tool_warned=yes ;;
9485 esac
9486 STRIP=$ac_ct_STRIP
9488 else
9489 STRIP="$ac_cv_prog_STRIP"
9493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9494 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9495 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9496 STRIP_STATIC_LIB="$STRIP -x"
9497 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9499 $as_echo "yes" >&6; }
9500 else
9501 case $host_os in
9502 darwin*)
9503 STRIP="$STRIP -x"
9504 STRIP_STATIC_LIB=$STRIP
9505 STRIP_SHARED_LIB=$STRIP
9506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9507 $as_echo "yes" >&6; }
9510 STRIP_STATIC_LIB=:
9511 STRIP_SHARED_LIB=:
9512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9513 $as_echo "no" >&6; }
9515 esac
9520 if test -n "$ac_tool_prefix"; then
9521 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9522 set dummy ${ac_tool_prefix}ar; ac_word=$2
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9524 $as_echo_n "checking for $ac_word... " >&6; }
9525 if ${ac_cv_prog_AR+:} false; then :
9526 $as_echo_n "(cached) " >&6
9527 else
9528 if test -n "$AR"; then
9529 ac_cv_prog_AR="$AR" # Let the user override the test.
9530 else
9531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9532 for as_dir in $PATH
9534 IFS=$as_save_IFS
9535 test -z "$as_dir" && as_dir=.
9536 for ac_exec_ext in '' $ac_executable_extensions; do
9537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9538 ac_cv_prog_AR="${ac_tool_prefix}ar"
9539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9540 break 2
9542 done
9543 done
9544 IFS=$as_save_IFS
9548 AR=$ac_cv_prog_AR
9549 if test -n "$AR"; then
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9551 $as_echo "$AR" >&6; }
9552 else
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9554 $as_echo "no" >&6; }
9559 if test -z "$ac_cv_prog_AR"; then
9560 ac_ct_AR=$AR
9561 # Extract the first word of "ar", so it can be a program name with args.
9562 set dummy ar; ac_word=$2
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9564 $as_echo_n "checking for $ac_word... " >&6; }
9565 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9566 $as_echo_n "(cached) " >&6
9567 else
9568 if test -n "$ac_ct_AR"; then
9569 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9570 else
9571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9572 for as_dir in $PATH
9574 IFS=$as_save_IFS
9575 test -z "$as_dir" && as_dir=.
9576 for ac_exec_ext in '' $ac_executable_extensions; do
9577 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9578 ac_cv_prog_ac_ct_AR="ar"
9579 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9580 break 2
9582 done
9583 done
9584 IFS=$as_save_IFS
9588 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9589 if test -n "$ac_ct_AR"; then
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9591 $as_echo "$ac_ct_AR" >&6; }
9592 else
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594 $as_echo "no" >&6; }
9597 if test "x$ac_ct_AR" = x; then
9598 AR="ar"
9599 else
9600 case $cross_compiling:$ac_tool_warned in
9601 yes:)
9602 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9603 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9604 ac_tool_warned=yes ;;
9605 esac
9606 AR=$ac_ct_AR
9608 else
9609 AR="$ac_cv_prog_AR"
9612 if test "$PORTNAME" = "win32"; then
9613 if test -n "$ac_tool_prefix"; then
9614 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9615 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9617 $as_echo_n "checking for $ac_word... " >&6; }
9618 if ${ac_cv_prog_DLLTOOL+:} false; then :
9619 $as_echo_n "(cached) " >&6
9620 else
9621 if test -n "$DLLTOOL"; then
9622 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9623 else
9624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9625 for as_dir in $PATH
9627 IFS=$as_save_IFS
9628 test -z "$as_dir" && as_dir=.
9629 for ac_exec_ext in '' $ac_executable_extensions; do
9630 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9631 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9632 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9633 break 2
9635 done
9636 done
9637 IFS=$as_save_IFS
9641 DLLTOOL=$ac_cv_prog_DLLTOOL
9642 if test -n "$DLLTOOL"; then
9643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9644 $as_echo "$DLLTOOL" >&6; }
9645 else
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9647 $as_echo "no" >&6; }
9652 if test -z "$ac_cv_prog_DLLTOOL"; then
9653 ac_ct_DLLTOOL=$DLLTOOL
9654 # Extract the first word of "dlltool", so it can be a program name with args.
9655 set dummy dlltool; ac_word=$2
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9657 $as_echo_n "checking for $ac_word... " >&6; }
9658 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9659 $as_echo_n "(cached) " >&6
9660 else
9661 if test -n "$ac_ct_DLLTOOL"; then
9662 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9663 else
9664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9665 for as_dir in $PATH
9667 IFS=$as_save_IFS
9668 test -z "$as_dir" && as_dir=.
9669 for ac_exec_ext in '' $ac_executable_extensions; do
9670 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9671 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9672 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9673 break 2
9675 done
9676 done
9677 IFS=$as_save_IFS
9681 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9682 if test -n "$ac_ct_DLLTOOL"; then
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9684 $as_echo "$ac_ct_DLLTOOL" >&6; }
9685 else
9686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9687 $as_echo "no" >&6; }
9690 if test "x$ac_ct_DLLTOOL" = x; then
9691 DLLTOOL="dlltool"
9692 else
9693 case $cross_compiling:$ac_tool_warned in
9694 yes:)
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9696 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9697 ac_tool_warned=yes ;;
9698 esac
9699 DLLTOOL=$ac_ct_DLLTOOL
9701 else
9702 DLLTOOL="$ac_cv_prog_DLLTOOL"
9705 if test -n "$ac_tool_prefix"; then
9706 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9707 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9709 $as_echo_n "checking for $ac_word... " >&6; }
9710 if ${ac_cv_prog_DLLWRAP+:} false; then :
9711 $as_echo_n "(cached) " >&6
9712 else
9713 if test -n "$DLLWRAP"; then
9714 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9715 else
9716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9717 for as_dir in $PATH
9719 IFS=$as_save_IFS
9720 test -z "$as_dir" && as_dir=.
9721 for ac_exec_ext in '' $ac_executable_extensions; do
9722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9723 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9725 break 2
9727 done
9728 done
9729 IFS=$as_save_IFS
9733 DLLWRAP=$ac_cv_prog_DLLWRAP
9734 if test -n "$DLLWRAP"; then
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9736 $as_echo "$DLLWRAP" >&6; }
9737 else
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9739 $as_echo "no" >&6; }
9744 if test -z "$ac_cv_prog_DLLWRAP"; then
9745 ac_ct_DLLWRAP=$DLLWRAP
9746 # Extract the first word of "dllwrap", so it can be a program name with args.
9747 set dummy dllwrap; ac_word=$2
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9749 $as_echo_n "checking for $ac_word... " >&6; }
9750 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9751 $as_echo_n "(cached) " >&6
9752 else
9753 if test -n "$ac_ct_DLLWRAP"; then
9754 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9755 else
9756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9757 for as_dir in $PATH
9759 IFS=$as_save_IFS
9760 test -z "$as_dir" && as_dir=.
9761 for ac_exec_ext in '' $ac_executable_extensions; do
9762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9763 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9765 break 2
9767 done
9768 done
9769 IFS=$as_save_IFS
9773 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9774 if test -n "$ac_ct_DLLWRAP"; then
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9776 $as_echo "$ac_ct_DLLWRAP" >&6; }
9777 else
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9779 $as_echo "no" >&6; }
9782 if test "x$ac_ct_DLLWRAP" = x; then
9783 DLLWRAP="dllwrap"
9784 else
9785 case $cross_compiling:$ac_tool_warned in
9786 yes:)
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9788 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9789 ac_tool_warned=yes ;;
9790 esac
9791 DLLWRAP=$ac_ct_DLLWRAP
9793 else
9794 DLLWRAP="$ac_cv_prog_DLLWRAP"
9797 if test -n "$ac_tool_prefix"; then
9798 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9799 set dummy ${ac_tool_prefix}windres; ac_word=$2
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9801 $as_echo_n "checking for $ac_word... " >&6; }
9802 if ${ac_cv_prog_WINDRES+:} false; then :
9803 $as_echo_n "(cached) " >&6
9804 else
9805 if test -n "$WINDRES"; then
9806 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9807 else
9808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9809 for as_dir in $PATH
9811 IFS=$as_save_IFS
9812 test -z "$as_dir" && as_dir=.
9813 for ac_exec_ext in '' $ac_executable_extensions; do
9814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9815 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9817 break 2
9819 done
9820 done
9821 IFS=$as_save_IFS
9825 WINDRES=$ac_cv_prog_WINDRES
9826 if test -n "$WINDRES"; then
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9828 $as_echo "$WINDRES" >&6; }
9829 else
9830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9831 $as_echo "no" >&6; }
9836 if test -z "$ac_cv_prog_WINDRES"; then
9837 ac_ct_WINDRES=$WINDRES
9838 # Extract the first word of "windres", so it can be a program name with args.
9839 set dummy windres; ac_word=$2
9840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9841 $as_echo_n "checking for $ac_word... " >&6; }
9842 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9843 $as_echo_n "(cached) " >&6
9844 else
9845 if test -n "$ac_ct_WINDRES"; then
9846 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9847 else
9848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9849 for as_dir in $PATH
9851 IFS=$as_save_IFS
9852 test -z "$as_dir" && as_dir=.
9853 for ac_exec_ext in '' $ac_executable_extensions; do
9854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9855 ac_cv_prog_ac_ct_WINDRES="windres"
9856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9857 break 2
9859 done
9860 done
9861 IFS=$as_save_IFS
9865 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9866 if test -n "$ac_ct_WINDRES"; then
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9868 $as_echo "$ac_ct_WINDRES" >&6; }
9869 else
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871 $as_echo "no" >&6; }
9874 if test "x$ac_ct_WINDRES" = x; then
9875 WINDRES="windres"
9876 else
9877 case $cross_compiling:$ac_tool_warned in
9878 yes:)
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9880 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9881 ac_tool_warned=yes ;;
9882 esac
9883 WINDRES=$ac_ct_WINDRES
9885 else
9886 WINDRES="$ac_cv_prog_WINDRES"
9891 # Find a good install program. We prefer a C program (faster),
9892 # so one script is as good as another. But avoid the broken or
9893 # incompatible versions:
9894 # SysV /etc/install, /usr/sbin/install
9895 # SunOS /usr/etc/install
9896 # IRIX /sbin/install
9897 # AIX /bin/install
9898 # AmigaOS /C/install, which installs bootblocks on floppy discs
9899 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9900 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9901 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9902 # OS/2's system install, which has a completely different semantic
9903 # ./install, which can be erroneously created by make from ./install.sh.
9904 # Reject install programs that cannot install multiple files.
9905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9906 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9907 if test -z "$INSTALL"; then
9908 if ${ac_cv_path_install+:} false; then :
9909 $as_echo_n "(cached) " >&6
9910 else
9911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9912 for as_dir in $PATH
9914 IFS=$as_save_IFS
9915 test -z "$as_dir" && as_dir=.
9916 # Account for people who put trailing slashes in PATH elements.
9917 case $as_dir/ in #((
9918 ./ | .// | /[cC]/* | \
9919 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9920 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9921 /usr/ucb/* ) ;;
9923 # OSF1 and SCO ODT 3.0 have their own names for install.
9924 # Don't use installbsd from OSF since it installs stuff as root
9925 # by default.
9926 for ac_prog in ginstall scoinst install; do
9927 for ac_exec_ext in '' $ac_executable_extensions; do
9928 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9929 if test $ac_prog = install &&
9930 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9931 # AIX install. It has an incompatible calling convention.
9933 elif test $ac_prog = install &&
9934 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9935 # program-specific install script used by HP pwplus--don't use.
9937 else
9938 rm -rf conftest.one conftest.two conftest.dir
9939 echo one > conftest.one
9940 echo two > conftest.two
9941 mkdir conftest.dir
9942 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9943 test -s conftest.one && test -s conftest.two &&
9944 test -s conftest.dir/conftest.one &&
9945 test -s conftest.dir/conftest.two
9946 then
9947 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9948 break 3
9952 done
9953 done
9955 esac
9957 done
9958 IFS=$as_save_IFS
9960 rm -rf conftest.one conftest.two conftest.dir
9963 if test "${ac_cv_path_install+set}" = set; then
9964 INSTALL=$ac_cv_path_install
9965 else
9966 # As a last resort, use the slow shell script. Don't cache a
9967 # value for INSTALL within a source directory, because that will
9968 # break other packages using the cache if that directory is
9969 # removed, or if the value is a relative name.
9970 INSTALL=$ac_install_sh
9973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9974 $as_echo "$INSTALL" >&6; }
9976 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9977 # It thinks the first close brace ends the variable substitution.
9978 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9980 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9982 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9984 # When Autoconf chooses install-sh as install program it tries to generate
9985 # a relative path to it in each makefile where it substitutes it. This clashes
9986 # with our Makefile.global concept. This workaround helps.
9987 case $INSTALL in
9988 *install-sh*) install_bin='';;
9989 *) install_bin=$INSTALL;;
9990 esac
9993 if test -z "$TAR"; then
9994 for ac_prog in tar
9996 # Extract the first word of "$ac_prog", so it can be a program name with args.
9997 set dummy $ac_prog; ac_word=$2
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9999 $as_echo_n "checking for $ac_word... " >&6; }
10000 if ${ac_cv_path_TAR+:} false; then :
10001 $as_echo_n "(cached) " >&6
10002 else
10003 case $TAR in
10004 [\\/]* | ?:[\\/]*)
10005 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10009 for as_dir in $PATH
10011 IFS=$as_save_IFS
10012 test -z "$as_dir" && as_dir=.
10013 for ac_exec_ext in '' $ac_executable_extensions; do
10014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10015 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10017 break 2
10019 done
10020 done
10021 IFS=$as_save_IFS
10024 esac
10026 TAR=$ac_cv_path_TAR
10027 if test -n "$TAR"; then
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10029 $as_echo "$TAR" >&6; }
10030 else
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10032 $as_echo "no" >&6; }
10036 test -n "$TAR" && break
10037 done
10039 else
10040 # Report the value of TAR in configure's output in all cases.
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10042 $as_echo_n "checking for TAR... " >&6; }
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10044 $as_echo "$TAR" >&6; }
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10048 $as_echo_n "checking whether ln -s works... " >&6; }
10049 LN_S=$as_ln_s
10050 if test "$LN_S" = "ln -s"; then
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10052 $as_echo "yes" >&6; }
10053 else
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10055 $as_echo "no, using $LN_S" >&6; }
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
10059 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
10060 if test -z "$MKDIR_P"; then
10061 if ${ac_cv_path_mkdir+:} false; then :
10062 $as_echo_n "(cached) " >&6
10063 else
10064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10065 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
10067 IFS=$as_save_IFS
10068 test -z "$as_dir" && as_dir=.
10069 for ac_prog in mkdir gmkdir; do
10070 for ac_exec_ext in '' $ac_executable_extensions; do
10071 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
10072 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
10073 'mkdir (GNU coreutils) '* | \
10074 'mkdir (coreutils) '* | \
10075 'mkdir (fileutils) '4.1*)
10076 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
10077 break 3;;
10078 esac
10079 done
10080 done
10081 done
10082 IFS=$as_save_IFS
10086 test -d ./--version && rmdir ./--version
10087 if test "${ac_cv_path_mkdir+set}" = set; then
10088 MKDIR_P="$ac_cv_path_mkdir -p"
10089 else
10090 # As a last resort, use the slow shell script. Don't cache a
10091 # value for MKDIR_P within a source directory, because that will
10092 # break other packages using the cache if that directory is
10093 # removed, or if the value is a relative name.
10094 MKDIR_P="$ac_install_sh -d"
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
10098 $as_echo "$MKDIR_P" >&6; }
10100 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
10101 # a relative path to it in each makefile where it substitutes it. This clashes
10102 # with our Makefile.global concept. This workaround helps.
10103 case $MKDIR_P in
10104 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
10105 esac
10107 if test -z "$BISON"; then
10108 for ac_prog in bison
10110 # Extract the first word of "$ac_prog", so it can be a program name with args.
10111 set dummy $ac_prog; ac_word=$2
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10113 $as_echo_n "checking for $ac_word... " >&6; }
10114 if ${ac_cv_path_BISON+:} false; then :
10115 $as_echo_n "(cached) " >&6
10116 else
10117 case $BISON in
10118 [\\/]* | ?:[\\/]*)
10119 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
10122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10123 for as_dir in $PATH
10125 IFS=$as_save_IFS
10126 test -z "$as_dir" && as_dir=.
10127 for ac_exec_ext in '' $ac_executable_extensions; do
10128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10129 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
10130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10131 break 2
10133 done
10134 done
10135 IFS=$as_save_IFS
10138 esac
10140 BISON=$ac_cv_path_BISON
10141 if test -n "$BISON"; then
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10143 $as_echo "$BISON" >&6; }
10144 else
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10146 $as_echo "no" >&6; }
10150 test -n "$BISON" && break
10151 done
10153 else
10154 # Report the value of BISON in configure's output in all cases.
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
10156 $as_echo_n "checking for BISON... " >&6; }
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10158 $as_echo "$BISON" >&6; }
10162 if test "$BISON"; then
10163 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10165 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10166 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
10167 then
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10169 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10170 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
10171 $as_echo "$as_me: WARNING:
10172 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10173 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
10174 BISON=""
10176 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10177 # of the now preferred %name-prefix "base_yy", but the latter
10178 # doesn't work with Bison 2.3 or less. So for now we silence the
10179 # deprecation warnings.
10180 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10181 then
10182 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10186 if test -z "$BISON"; then
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10188 *** Without Bison you will not be able to build PostgreSQL from Git nor
10189 *** change any of the parser definition files. You can obtain Bison from
10190 *** a GNU mirror site. (If you are using the official distribution of
10191 *** PostgreSQL then you do not need to worry about this, because the Bison
10192 *** output is pre-generated.)" >&5
10193 $as_echo "$as_me: WARNING:
10194 *** Without Bison you will not be able to build PostgreSQL from Git nor
10195 *** change any of the parser definition files. You can obtain Bison from
10196 *** a GNU mirror site. (If you are using the official distribution of
10197 *** PostgreSQL then you do not need to worry about this, because the Bison
10198 *** output is pre-generated.)" >&2;}
10202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
10203 $as_echo_n "checking for flex... " >&6; }
10204 if ${pgac_cv_path_flex+:} false; then :
10205 $as_echo_n "(cached) " >&6
10206 else
10207 # Let the user override the test
10208 if test -n "$FLEX"; then
10209 pgac_cv_path_flex=$FLEX
10210 else
10211 pgac_save_IFS=$IFS
10212 IFS=$PATH_SEPARATOR
10213 for pgac_dir in $PATH; do
10214 IFS=$pgac_save_IFS
10215 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
10216 pgac_dir=`pwd`
10218 for pgac_prog in flex lex; do
10219 pgac_candidate="$pgac_dir/$pgac_prog"
10220 if test -f "$pgac_candidate" \
10221 && $pgac_candidate --version </dev/null >/dev/null 2>&1
10222 then
10223 echo '%%' > conftest.l
10224 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
10225 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
10226 if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 31))) exit 0; else exit 1;}'
10227 then
10228 pgac_cv_path_flex=$pgac_candidate
10229 break 2
10230 else
10231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10232 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10233 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
10234 $as_echo "$as_me: WARNING:
10235 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10236 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
10240 done
10241 done
10242 rm -f conftest.l lex.yy.c
10243 : ${pgac_cv_path_flex=no}
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10248 $as_echo "$pgac_cv_path_flex" >&6; }
10249 if test x"$pgac_cv_path_flex" = x"no"; then
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10251 *** Without Flex you will not be able to build PostgreSQL from Git nor
10252 *** change any of the scanner definition files. You can obtain Flex from
10253 *** a GNU mirror site. (If you are using the official distribution of
10254 *** PostgreSQL then you do not need to worry about this because the Flex
10255 *** output is pre-generated.)" >&5
10256 $as_echo "$as_me: WARNING:
10257 *** Without Flex you will not be able to build PostgreSQL from Git nor
10258 *** change any of the scanner definition files. You can obtain Flex from
10259 *** a GNU mirror site. (If you are using the official distribution of
10260 *** PostgreSQL then you do not need to worry about this because the Flex
10261 *** output is pre-generated.)" >&2;}
10263 FLEX=
10264 else
10265 FLEX=$pgac_cv_path_flex
10266 pgac_flex_version=`$FLEX --version 2>/dev/null`
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10268 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10275 if test -z "$PERL"; then
10276 for ac_prog in perl
10278 # Extract the first word of "$ac_prog", so it can be a program name with args.
10279 set dummy $ac_prog; ac_word=$2
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281 $as_echo_n "checking for $ac_word... " >&6; }
10282 if ${ac_cv_path_PERL+:} false; then :
10283 $as_echo_n "(cached) " >&6
10284 else
10285 case $PERL in
10286 [\\/]* | ?:[\\/]*)
10287 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291 for as_dir in $PATH
10293 IFS=$as_save_IFS
10294 test -z "$as_dir" && as_dir=.
10295 for ac_exec_ext in '' $ac_executable_extensions; do
10296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10297 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299 break 2
10301 done
10302 done
10303 IFS=$as_save_IFS
10306 esac
10308 PERL=$ac_cv_path_PERL
10309 if test -n "$PERL"; then
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10311 $as_echo "$PERL" >&6; }
10312 else
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314 $as_echo "no" >&6; }
10318 test -n "$PERL" && break
10319 done
10321 else
10322 # Report the value of PERL in configure's output in all cases.
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10324 $as_echo_n "checking for PERL... " >&6; }
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10326 $as_echo "$PERL" >&6; }
10330 if test "$PERL"; then
10331 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'`
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10333 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10334 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10335 $AWK '{ if ($1 == 5 && ($2 > 8 || ($2 == 8 && $3 >= 3))) exit 1; else exit 0;}'
10336 then
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10338 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10339 *** Perl version 5.8.3 or later is required, but this is $pgac_perl_version." >&5
10340 $as_echo "$as_me: WARNING:
10341 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10342 *** Perl version 5.8.3 or later is required, but this is $pgac_perl_version." >&2;}
10343 PERL=""
10347 if test -z "$PERL"; then
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10349 *** Without Perl you will not be able to build PostgreSQL from Git.
10350 *** You can obtain Perl from any CPAN mirror site.
10351 *** (If you are using the official distribution of PostgreSQL then you do not
10352 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10353 $as_echo "$as_me: WARNING:
10354 *** Without Perl you will not be able to build PostgreSQL from Git.
10355 *** You can obtain Perl from any CPAN mirror site.
10356 *** (If you are using the official distribution of PostgreSQL then you do not
10357 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10360 if test "$with_perl" = yes; then
10361 if test -z "$PERL"; then
10362 as_fn_error $? "Perl not found" "$LINENO" 5
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10366 $as_echo_n "checking for Perl archlibexp... " >&6; }
10367 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10368 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10370 $as_echo "$perl_archlibexp" >&6; }
10371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10372 $as_echo_n "checking for Perl privlibexp... " >&6; }
10373 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10374 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10376 $as_echo "$perl_privlibexp" >&6; }
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10378 $as_echo_n "checking for Perl useshrplib... " >&6; }
10379 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10380 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10382 $as_echo "$perl_useshrplib" >&6; }
10383 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10384 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10385 You might have to rebuild your Perl installation. Refer to the
10386 documentation for details. Use --without-perl to disable building
10387 PL/Perl." "$LINENO" 5
10389 # On most platforms, archlibexp is also where the Perl include files live ...
10390 perl_includespec="-I$perl_archlibexp/CORE"
10391 # ... but on newer macOS versions, we must use -iwithsysroot to look
10392 # under $PG_SYSROOT
10393 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10394 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10395 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10400 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10401 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10403 $as_echo "$perl_ccflags" >&6; }
10404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10405 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10406 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10408 $as_echo "$perl_embed_ccflags" >&6; }
10411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10412 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10413 if test "$PORTNAME" = "win32" ; then
10414 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10415 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10416 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10417 else
10418 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10419 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10420 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10423 else
10424 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10425 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
10426 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
10428 if test -z "$perl_embed_ldflags" ; then
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10430 $as_echo "no" >&6; }
10431 as_fn_error $? "could not determine flags for linking embedded Perl.
10432 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10433 installed." "$LINENO" 5
10434 else
10435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10436 $as_echo "$perl_embed_ldflags" >&6; }
10441 if test "$with_python" = yes; then
10442 if test -z "$PYTHON"; then
10443 for ac_prog in python3 python
10445 # Extract the first word of "$ac_prog", so it can be a program name with args.
10446 set dummy $ac_prog; ac_word=$2
10447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10448 $as_echo_n "checking for $ac_word... " >&6; }
10449 if ${ac_cv_path_PYTHON+:} false; then :
10450 $as_echo_n "(cached) " >&6
10451 else
10452 case $PYTHON in
10453 [\\/]* | ?:[\\/]*)
10454 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10458 for as_dir in $PATH
10460 IFS=$as_save_IFS
10461 test -z "$as_dir" && as_dir=.
10462 for ac_exec_ext in '' $ac_executable_extensions; do
10463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10464 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10466 break 2
10468 done
10469 done
10470 IFS=$as_save_IFS
10473 esac
10475 PYTHON=$ac_cv_path_PYTHON
10476 if test -n "$PYTHON"; then
10477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10478 $as_echo "$PYTHON" >&6; }
10479 else
10480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10481 $as_echo "no" >&6; }
10485 test -n "$PYTHON" && break
10486 done
10488 else
10489 # Report the value of PYTHON in configure's output in all cases.
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10491 $as_echo_n "checking for PYTHON... " >&6; }
10492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10493 $as_echo "$PYTHON" >&6; }
10496 if test x"$PYTHON" = x""; then
10497 as_fn_error $? "Python not found" "$LINENO" 5
10501 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10502 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10503 $as_echo "$as_me: using python $python_fullversion" >&6;}
10504 # python_fullversion is typically n.n.n plus some trailing junk
10505 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10506 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10507 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10508 # Reject unsupported Python versions as soon as practical.
10509 if test "$python_majorversion" -lt 3; then
10510 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10514 $as_echo_n "checking for Python sysconfig module... " >&6; }
10515 if "${PYTHON}" -c 'import sysconfig' 2>&5
10516 then
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10518 $as_echo "yes" >&6; }
10519 else
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521 $as_echo "no" >&6; }
10522 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10526 $as_echo_n "checking Python configuration directory... " >&6; }
10527 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10529 $as_echo "$python_configdir" >&6; }
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10532 $as_echo_n "checking Python include directory... " >&6; }
10533 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10534 if test "$PORTNAME" = win32 ; then
10535 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10538 $as_echo "$python_includespec" >&6; }
10542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10543 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10545 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10546 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10548 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10549 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10550 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10551 then
10552 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10553 found_shlib=1
10554 else
10555 # Otherwise, guess the base name of the shlib.
10556 # LDVERSION was added in Python 3.2, before that use VERSION,
10557 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10558 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10559 if test x"${python_ldversion}" != x""; then
10560 ldlibrary="python${python_ldversion}"
10561 else
10562 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10563 if test x"${python_version_var}" != x""; then
10564 ldlibrary="python${python_version_var}"
10565 else
10566 ldlibrary="python${python_version}"
10569 # Search for a likely-looking file.
10570 found_shlib=0
10571 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10573 # Note: DLSUFFIX is for loadable modules, not shared
10574 # libraries, so cannot be used here portably. Just
10575 # check all known possibilities.
10576 for e in .so .dll .dylib .sl; do
10577 if test -e "$d/lib${ldlibrary}$e"; then
10578 python_libdir="$d"
10579 found_shlib=1
10580 break 2
10582 done
10583 done
10584 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10585 # (".so.n.n") as well. However, check this only after failing to find
10586 # ".so" anywhere, because yet other platforms (Debian) put the .so
10587 # symlink in a different directory from the underlying versioned shlib.
10588 if test "$found_shlib" != 1; then
10589 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10591 for f in "$d/lib${ldlibrary}.so."* ; do
10592 if test -e "$f"; then
10593 python_libdir="$d"
10594 found_shlib=1
10595 break 2
10597 done
10598 done
10600 # As usual, Windows has its own ideas. Possible default library
10601 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10602 # and the "lib" prefix might not be there.
10603 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10604 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10606 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10607 if test -e "$f"; then
10608 python_libdir="$d"
10609 found_shlib=1
10610 break 2
10612 done
10613 done
10616 if test "$found_shlib" != 1; then
10617 as_fn_error $? "could not find shared library for Python
10618 You might have to rebuild your Python installation. Refer to the
10619 documentation for details. Use --without-python to disable building
10620 PL/Python." "$LINENO" 5
10622 python_libspec="-L${python_libdir} -l${ldlibrary}"
10624 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10627 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10633 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10634 if test -z "$ZIC"; then
10635 for ac_prog in zic
10637 # Extract the first word of "$ac_prog", so it can be a program name with args.
10638 set dummy $ac_prog; ac_word=$2
10639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10640 $as_echo_n "checking for $ac_word... " >&6; }
10641 if ${ac_cv_path_ZIC+:} false; then :
10642 $as_echo_n "(cached) " >&6
10643 else
10644 case $ZIC in
10645 [\\/]* | ?:[\\/]*)
10646 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10650 for as_dir in $PATH
10652 IFS=$as_save_IFS
10653 test -z "$as_dir" && as_dir=.
10654 for ac_exec_ext in '' $ac_executable_extensions; do
10655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10656 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10658 break 2
10660 done
10661 done
10662 IFS=$as_save_IFS
10665 esac
10667 ZIC=$ac_cv_path_ZIC
10668 if test -n "$ZIC"; then
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10670 $as_echo "$ZIC" >&6; }
10671 else
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10673 $as_echo "no" >&6; }
10677 test -n "$ZIC" && break
10678 done
10680 else
10681 # Report the value of ZIC in configure's output in all cases.
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10683 $as_echo_n "checking for ZIC... " >&6; }
10684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10685 $as_echo "$ZIC" >&6; }
10688 if test -z "$ZIC"; then
10689 as_fn_error $? "
10690 When cross-compiling, either use the option --with-system-tzdata to use
10691 existing time-zone data, or set the environment variable ZIC to a zic
10692 program to use during the build." "$LINENO" 5
10697 # Pthreads
10699 # For each platform, we need to know about any special compile and link
10700 # libraries, and whether the normal C function names are thread-safe.
10701 # See the comment at the top of src/port/thread.c for more information.
10702 # WIN32 doesn't need the pthread tests; it always uses threads
10704 # These tests are run before the library-tests, because linking with the
10705 # other libraries can pull in the pthread functions as a side-effect. We
10706 # want to use the -pthread or similar flags directly, and not rely on
10707 # the side-effects of linking with some other library.
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10710 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10711 if ${ac_cv_path_SED+:} false; then :
10712 $as_echo_n "(cached) " >&6
10713 else
10714 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10715 for ac_i in 1 2 3 4 5 6 7; do
10716 ac_script="$ac_script$as_nl$ac_script"
10717 done
10718 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10719 { ac_script=; unset ac_script;}
10720 if test -z "$SED"; then
10721 ac_path_SED_found=false
10722 # Loop through the user's path and test for each of PROGNAME-LIST
10723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10724 for as_dir in $PATH
10726 IFS=$as_save_IFS
10727 test -z "$as_dir" && as_dir=.
10728 for ac_prog in sed gsed; do
10729 for ac_exec_ext in '' $ac_executable_extensions; do
10730 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10731 as_fn_executable_p "$ac_path_SED" || continue
10732 # Check for GNU ac_path_SED and select it if it is found.
10733 # Check for GNU $ac_path_SED
10734 case `"$ac_path_SED" --version 2>&1` in
10735 *GNU*)
10736 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10738 ac_count=0
10739 $as_echo_n 0123456789 >"conftest.in"
10740 while :
10742 cat "conftest.in" "conftest.in" >"conftest.tmp"
10743 mv "conftest.tmp" "conftest.in"
10744 cp "conftest.in" "conftest.nl"
10745 $as_echo '' >> "conftest.nl"
10746 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10747 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10748 as_fn_arith $ac_count + 1 && ac_count=$as_val
10749 if test $ac_count -gt ${ac_path_SED_max-0}; then
10750 # Best one so far, save it but keep looking for a better one
10751 ac_cv_path_SED="$ac_path_SED"
10752 ac_path_SED_max=$ac_count
10754 # 10*(2^10) chars as input seems more than enough
10755 test $ac_count -gt 10 && break
10756 done
10757 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10758 esac
10760 $ac_path_SED_found && break 3
10761 done
10762 done
10763 done
10764 IFS=$as_save_IFS
10765 if test -z "$ac_cv_path_SED"; then
10766 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10768 else
10769 ac_cv_path_SED=$SED
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10774 $as_echo "$ac_cv_path_SED" >&6; }
10775 SED="$ac_cv_path_SED"
10776 rm -f conftest.sed
10779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10780 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10781 if ${ac_cv_path_GREP+:} false; then :
10782 $as_echo_n "(cached) " >&6
10783 else
10784 if test -z "$GREP"; then
10785 ac_path_GREP_found=false
10786 # Loop through the user's path and test for each of PROGNAME-LIST
10787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10788 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10790 IFS=$as_save_IFS
10791 test -z "$as_dir" && as_dir=.
10792 for ac_prog in grep ggrep; do
10793 for ac_exec_ext in '' $ac_executable_extensions; do
10794 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10795 as_fn_executable_p "$ac_path_GREP" || continue
10796 # Check for GNU ac_path_GREP and select it if it is found.
10797 # Check for GNU $ac_path_GREP
10798 case `"$ac_path_GREP" --version 2>&1` in
10799 *GNU*)
10800 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10802 ac_count=0
10803 $as_echo_n 0123456789 >"conftest.in"
10804 while :
10806 cat "conftest.in" "conftest.in" >"conftest.tmp"
10807 mv "conftest.tmp" "conftest.in"
10808 cp "conftest.in" "conftest.nl"
10809 $as_echo 'GREP' >> "conftest.nl"
10810 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10811 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10812 as_fn_arith $ac_count + 1 && ac_count=$as_val
10813 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10814 # Best one so far, save it but keep looking for a better one
10815 ac_cv_path_GREP="$ac_path_GREP"
10816 ac_path_GREP_max=$ac_count
10818 # 10*(2^10) chars as input seems more than enough
10819 test $ac_count -gt 10 && break
10820 done
10821 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10822 esac
10824 $ac_path_GREP_found && break 3
10825 done
10826 done
10827 done
10828 IFS=$as_save_IFS
10829 if test -z "$ac_cv_path_GREP"; then
10830 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10832 else
10833 ac_cv_path_GREP=$GREP
10837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10838 $as_echo "$ac_cv_path_GREP" >&6; }
10839 GREP="$ac_cv_path_GREP"
10842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10843 $as_echo_n "checking for egrep... " >&6; }
10844 if ${ac_cv_path_EGREP+:} false; then :
10845 $as_echo_n "(cached) " >&6
10846 else
10847 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10848 then ac_cv_path_EGREP="$GREP -E"
10849 else
10850 if test -z "$EGREP"; then
10851 ac_path_EGREP_found=false
10852 # Loop through the user's path and test for each of PROGNAME-LIST
10853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10854 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10856 IFS=$as_save_IFS
10857 test -z "$as_dir" && as_dir=.
10858 for ac_prog in egrep; do
10859 for ac_exec_ext in '' $ac_executable_extensions; do
10860 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10861 as_fn_executable_p "$ac_path_EGREP" || continue
10862 # Check for GNU ac_path_EGREP and select it if it is found.
10863 # Check for GNU $ac_path_EGREP
10864 case `"$ac_path_EGREP" --version 2>&1` in
10865 *GNU*)
10866 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10868 ac_count=0
10869 $as_echo_n 0123456789 >"conftest.in"
10870 while :
10872 cat "conftest.in" "conftest.in" >"conftest.tmp"
10873 mv "conftest.tmp" "conftest.in"
10874 cp "conftest.in" "conftest.nl"
10875 $as_echo 'EGREP' >> "conftest.nl"
10876 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10877 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10878 as_fn_arith $ac_count + 1 && ac_count=$as_val
10879 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10880 # Best one so far, save it but keep looking for a better one
10881 ac_cv_path_EGREP="$ac_path_EGREP"
10882 ac_path_EGREP_max=$ac_count
10884 # 10*(2^10) chars as input seems more than enough
10885 test $ac_count -gt 10 && break
10886 done
10887 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10888 esac
10890 $ac_path_EGREP_found && break 3
10891 done
10892 done
10893 done
10894 IFS=$as_save_IFS
10895 if test -z "$ac_cv_path_EGREP"; then
10896 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10898 else
10899 ac_cv_path_EGREP=$EGREP
10904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10905 $as_echo "$ac_cv_path_EGREP" >&6; }
10906 EGREP="$ac_cv_path_EGREP"
10909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10910 $as_echo_n "checking for ANSI C header files... " >&6; }
10911 if ${ac_cv_header_stdc+:} false; then :
10912 $as_echo_n "(cached) " >&6
10913 else
10914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10915 /* end confdefs.h. */
10916 #include <stdlib.h>
10917 #include <stdarg.h>
10918 #include <string.h>
10919 #include <float.h>
10922 main ()
10926 return 0;
10928 _ACEOF
10929 if ac_fn_c_try_compile "$LINENO"; then :
10930 ac_cv_header_stdc=yes
10931 else
10932 ac_cv_header_stdc=no
10934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10936 if test $ac_cv_header_stdc = yes; then
10937 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10939 /* end confdefs.h. */
10940 #include <string.h>
10942 _ACEOF
10943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10944 $EGREP "memchr" >/dev/null 2>&1; then :
10946 else
10947 ac_cv_header_stdc=no
10949 rm -f conftest*
10953 if test $ac_cv_header_stdc = yes; then
10954 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956 /* end confdefs.h. */
10957 #include <stdlib.h>
10959 _ACEOF
10960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10961 $EGREP "free" >/dev/null 2>&1; then :
10963 else
10964 ac_cv_header_stdc=no
10966 rm -f conftest*
10970 if test $ac_cv_header_stdc = yes; then
10971 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10972 if test "$cross_compiling" = yes; then :
10974 else
10975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10976 /* end confdefs.h. */
10977 #include <ctype.h>
10978 #include <stdlib.h>
10979 #if ((' ' & 0x0FF) == 0x020)
10980 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10981 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10982 #else
10983 # define ISLOWER(c) \
10984 (('a' <= (c) && (c) <= 'i') \
10985 || ('j' <= (c) && (c) <= 'r') \
10986 || ('s' <= (c) && (c) <= 'z'))
10987 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10988 #endif
10990 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10992 main ()
10994 int i;
10995 for (i = 0; i < 256; i++)
10996 if (XOR (islower (i), ISLOWER (i))
10997 || toupper (i) != TOUPPER (i))
10998 return 2;
10999 return 0;
11001 _ACEOF
11002 if ac_fn_c_try_run "$LINENO"; then :
11004 else
11005 ac_cv_header_stdc=no
11007 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11008 conftest.$ac_objext conftest.beam conftest.$ac_ext
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11014 $as_echo "$ac_cv_header_stdc" >&6; }
11015 if test $ac_cv_header_stdc = yes; then
11017 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11021 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11022 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11023 inttypes.h stdint.h unistd.h
11024 do :
11025 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11026 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
11028 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11029 cat >>confdefs.h <<_ACEOF
11030 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11031 _ACEOF
11035 done
11038 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
11039 # then
11044 ac_ext=c
11045 ac_cpp='$CPP $CPPFLAGS'
11046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11050 ax_pthread_ok=no
11052 # We used to check for pthread.h first, but this fails if pthread.h
11053 # requires special compiler flags (e.g. on Tru64 or Sequent).
11054 # It gets checked for in the link test anyway.
11056 # First of all, check if the user has set any of the PTHREAD_LIBS,
11057 # etcetera environment variables, and if threads linking works using
11058 # them:
11059 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
11060 ax_pthread_save_CC="$CC"
11061 ax_pthread_save_CFLAGS="$CFLAGS"
11062 ax_pthread_save_LIBS="$LIBS"
11063 if test "x$PTHREAD_CC" != "x"; then :
11064 CC="$PTHREAD_CC"
11066 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11067 LIBS="$PTHREAD_LIBS $LIBS"
11068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
11069 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
11070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11071 /* end confdefs.h. */
11073 /* Override any GCC internal prototype to avoid an error.
11074 Use char because int might match the return type of a GCC
11075 builtin and then its argument prototype would still apply. */
11076 #ifdef __cplusplus
11077 extern "C"
11078 #endif
11079 char pthread_join ();
11081 main ()
11083 return pthread_join ();
11085 return 0;
11087 _ACEOF
11088 if ac_fn_c_try_link "$LINENO"; then :
11089 ax_pthread_ok=yes
11091 rm -f core conftest.err conftest.$ac_objext \
11092 conftest$ac_exeext conftest.$ac_ext
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11094 $as_echo "$ax_pthread_ok" >&6; }
11095 if test "x$ax_pthread_ok" = "xno"; then
11096 PTHREAD_LIBS=""
11097 PTHREAD_CFLAGS=""
11099 CC="$ax_pthread_save_CC"
11100 CFLAGS="$ax_pthread_save_CFLAGS"
11101 LIBS="$ax_pthread_save_LIBS"
11104 # We must check for the threads library under a number of different
11105 # names; the ordering is very important because some systems
11106 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
11107 # libraries is broken (non-POSIX).
11109 # Create a list of thread flags to try. Items starting with a "-" are
11110 # C compiler flags, and other items are library names, except for "none"
11111 # which indicates that we try without any flags at all, and "pthread-config"
11112 # which is a program returning the flags for the Pth emulation library.
11114 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
11116 # The ordering *is* (sometimes) important. Some notes on the
11117 # individual items follow:
11119 # pthreads: AIX (must check this before -lpthread)
11120 # none: in case threads are in libc; should be tried before -Kthread and
11121 # other compiler flags to prevent continual compiler warnings
11122 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
11123 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
11124 # (Note: HP C rejects this with "bad form for `-t' option")
11125 # -pthreads: Solaris/gcc (Note: HP C also rejects)
11126 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
11127 # doesn't hurt to check since this sometimes defines pthreads and
11128 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
11129 # is present but should not be used directly; and before -mthreads,
11130 # because the compiler interprets this as "-mt" + "-hreads")
11131 # -mthreads: Mingw32/gcc, Lynx/gcc
11132 # pthread: Linux, etcetera
11133 # --thread-safe: KAI C++
11134 # pthread-config: use pthread-config program (for GNU Pth library)
11136 case $host_os in
11138 freebsd*)
11140 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
11141 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
11143 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
11146 hpux*)
11148 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
11149 # multi-threading and also sets -lpthread."
11151 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
11154 openedition*)
11156 # IBM z/OS requires a feature-test macro to be defined in order to
11157 # enable POSIX threads at all, so give the user a hint if this is
11158 # not set. (We don't define these ourselves, as they can affect
11159 # other portions of the system API in unpredictable ways.)
11161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11162 /* end confdefs.h. */
11164 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11165 AX_PTHREAD_ZOS_MISSING
11166 # endif
11168 _ACEOF
11169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11170 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11172 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11174 rm -f conftest*
11178 solaris*)
11180 # On Solaris (at least, for some versions), libc contains stubbed
11181 # (non-functional) versions of the pthreads routines, so link-based
11182 # tests will erroneously succeed. (N.B.: The stubs are missing
11183 # pthread_cleanup_push, or rather a function called by this macro,
11184 # so we could check for that, but who knows whether they'll stub
11185 # that too in a future libc.) So we'll check first for the
11186 # standard Solaris way of linking pthreads (-mt -lpthread).
11188 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11190 esac
11192 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11194 if test "x$GCC" = "xyes"; then :
11195 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11198 # The presence of a feature test macro requesting re-entrant function
11199 # definitions is, on some systems, a strong hint that pthreads support is
11200 # correctly enabled
11202 case $host_os in
11203 darwin* | hpux* | linux* | osf* | solaris*)
11204 ax_pthread_check_macro="_REENTRANT"
11207 aix*)
11208 ax_pthread_check_macro="_THREAD_SAFE"
11212 ax_pthread_check_macro="--"
11214 esac
11215 if test "x$ax_pthread_check_macro" = "x--"; then :
11216 ax_pthread_check_cond=0
11217 else
11218 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11221 # Are we compiling with Clang?
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11224 $as_echo_n "checking whether $CC is Clang... " >&6; }
11225 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11226 $as_echo_n "(cached) " >&6
11227 else
11228 ax_cv_PTHREAD_CLANG=no
11229 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11230 if test "x$GCC" = "xyes"; then
11231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11232 /* end confdefs.h. */
11233 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11234 # if defined(__clang__) && defined(__llvm__)
11235 AX_PTHREAD_CC_IS_CLANG
11236 # endif
11238 _ACEOF
11239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11240 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11241 ax_cv_PTHREAD_CLANG=yes
11243 rm -f conftest*
11248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11249 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11250 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11252 ax_pthread_clang_warning=no
11254 # Clang needs special handling, because older versions handle the -pthread
11255 # option in a rather... idiosyncratic way
11257 if test "x$ax_pthread_clang" = "xyes"; then
11259 # Clang takes -pthread; it has never supported any other flag
11261 # (Note 1: This will need to be revisited if a system that Clang
11262 # supports has POSIX threads in a separate library. This tends not
11263 # to be the way of modern systems, but it's conceivable.)
11265 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11266 # to get POSIX threads support; the API is always present and
11267 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11268 # -pthread does define _REENTRANT, and while the Darwin headers
11269 # ignore this macro, third-party headers might not.)
11271 PTHREAD_CFLAGS="-pthread"
11272 PTHREAD_LIBS=
11274 ax_pthread_ok=yes
11276 # However, older versions of Clang make a point of warning the user
11277 # that, in an invocation where only linking and no compilation is
11278 # taking place, the -pthread option has no effect ("argument unused
11279 # during compilation"). They expect -pthread to be passed in only
11280 # when source code is being compiled.
11282 # Problem is, this is at odds with the way Automake and most other
11283 # C build frameworks function, which is that the same flags used in
11284 # compilation (CFLAGS) are also used in linking. Many systems
11285 # supported by AX_PTHREAD require exactly this for POSIX threads
11286 # support, and in fact it is often not straightforward to specify a
11287 # flag that is used only in the compilation phase and not in
11288 # linking. Such a scenario is extremely rare in practice.
11290 # Even though use of the -pthread flag in linking would only print
11291 # a warning, this can be a nuisance for well-run software projects
11292 # that build with -Werror. So if the active version of Clang has
11293 # this misfeature, we search for an option to squash it.
11295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11296 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11297 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11298 $as_echo_n "(cached) " >&6
11299 else
11300 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11301 # Create an alternate version of $ac_link that compiles and
11302 # links in two steps (.c -> .o, .o -> exe) instead of one
11303 # (.c -> exe), because the warning occurs only in the second
11304 # step
11305 ax_pthread_save_ac_link="$ac_link"
11306 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11307 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11308 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11309 ax_pthread_save_CFLAGS="$CFLAGS"
11310 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11311 if test "x$ax_pthread_try" = "xunknown"; then :
11312 break
11314 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11315 ac_link="$ax_pthread_save_ac_link"
11316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11317 /* end confdefs.h. */
11318 int main(void){return 0;}
11319 _ACEOF
11320 if ac_fn_c_try_link "$LINENO"; then :
11321 ac_link="$ax_pthread_2step_ac_link"
11322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11323 /* end confdefs.h. */
11324 int main(void){return 0;}
11325 _ACEOF
11326 if ac_fn_c_try_link "$LINENO"; then :
11327 break
11329 rm -f core conftest.err conftest.$ac_objext \
11330 conftest$ac_exeext conftest.$ac_ext
11333 rm -f core conftest.err conftest.$ac_objext \
11334 conftest$ac_exeext conftest.$ac_ext
11335 done
11336 ac_link="$ax_pthread_save_ac_link"
11337 CFLAGS="$ax_pthread_save_CFLAGS"
11338 if test "x$ax_pthread_try" = "x"; then :
11339 ax_pthread_try=no
11341 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11345 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11347 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11348 no | unknown) ;;
11349 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11350 esac
11352 fi # $ax_pthread_clang = yes
11354 if test "x$ax_pthread_ok" = "xno"; then
11355 for ax_pthread_try_flag in $ax_pthread_flags; do
11357 case $ax_pthread_try_flag in
11358 none)
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11360 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11363 -mt,pthread)
11364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11365 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11366 PTHREAD_CFLAGS="-mt"
11367 PTHREAD_LIBS="-lpthread"
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11372 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11373 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11376 pthread-config)
11377 # Extract the first word of "pthread-config", so it can be a program name with args.
11378 set dummy pthread-config; ac_word=$2
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11380 $as_echo_n "checking for $ac_word... " >&6; }
11381 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11382 $as_echo_n "(cached) " >&6
11383 else
11384 if test -n "$ax_pthread_config"; then
11385 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11386 else
11387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11388 for as_dir in $PATH
11390 IFS=$as_save_IFS
11391 test -z "$as_dir" && as_dir=.
11392 for ac_exec_ext in '' $ac_executable_extensions; do
11393 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11394 ac_cv_prog_ax_pthread_config="yes"
11395 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11396 break 2
11398 done
11399 done
11400 IFS=$as_save_IFS
11402 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11405 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11406 if test -n "$ax_pthread_config"; then
11407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11408 $as_echo "$ax_pthread_config" >&6; }
11409 else
11410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411 $as_echo "no" >&6; }
11415 if test "x$ax_pthread_config" = "xno"; then :
11416 continue
11418 PTHREAD_CFLAGS="`pthread-config --cflags`"
11419 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11424 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11425 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11427 esac
11429 ax_pthread_save_CFLAGS="$CFLAGS"
11430 ax_pthread_save_LIBS="$LIBS"
11431 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11432 LIBS="$PTHREAD_LIBS $LIBS"
11434 # Check for various functions. We must include pthread.h,
11435 # since some functions may be macros. (On the Sequent, we
11436 # need a special flag -Kthread to make this header compile.)
11437 # We check for pthread_join because it is in -lpthread on IRIX
11438 # while pthread_create is in libc. We check for pthread_attr_init
11439 # due to DEC craziness with -lpthreads. We check for
11440 # pthread_cleanup_push because it is one of the few pthread
11441 # functions on Solaris that doesn't have a non-functional libc stub.
11442 # We try pthread_create on general principles.
11444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11445 /* end confdefs.h. */
11446 #include <pthread.h>
11447 # if $ax_pthread_check_cond
11448 # error "$ax_pthread_check_macro must be defined"
11449 # endif
11450 static void routine(void *a) { a = 0; }
11451 static void *start_routine(void *a) { return a; }
11453 main ()
11455 pthread_t th; pthread_attr_t attr;
11456 pthread_create(&th, 0, start_routine, 0);
11457 pthread_join(th, 0);
11458 pthread_attr_init(&attr);
11459 pthread_cleanup_push(routine, 0);
11460 pthread_cleanup_pop(0) /* ; */
11462 return 0;
11464 _ACEOF
11465 if ac_fn_c_try_link "$LINENO"; then :
11466 ax_pthread_ok=yes
11468 rm -f core conftest.err conftest.$ac_objext \
11469 conftest$ac_exeext conftest.$ac_ext
11471 CFLAGS="$ax_pthread_save_CFLAGS"
11472 LIBS="$ax_pthread_save_LIBS"
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11475 $as_echo "$ax_pthread_ok" >&6; }
11476 if test "x$ax_pthread_ok" = "xyes"; then :
11477 break
11480 PTHREAD_LIBS=""
11481 PTHREAD_CFLAGS=""
11482 done
11485 # Various other checks:
11486 if test "x$ax_pthread_ok" = "xyes"; then
11487 ax_pthread_save_CFLAGS="$CFLAGS"
11488 ax_pthread_save_LIBS="$LIBS"
11489 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11490 LIBS="$PTHREAD_LIBS $LIBS"
11492 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11494 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11495 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11496 $as_echo_n "(cached) " >&6
11497 else
11498 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11499 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11501 /* end confdefs.h. */
11502 #include <pthread.h>
11504 main ()
11506 int attr = $ax_pthread_attr; return attr /* ; */
11508 return 0;
11510 _ACEOF
11511 if ac_fn_c_try_link "$LINENO"; then :
11512 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11514 rm -f core conftest.err conftest.$ac_objext \
11515 conftest$ac_exeext conftest.$ac_ext
11516 done
11519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11520 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11521 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11522 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11523 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11525 cat >>confdefs.h <<_ACEOF
11526 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11527 _ACEOF
11529 ax_pthread_joinable_attr_defined=yes
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11534 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11535 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11536 $as_echo_n "(cached) " >&6
11537 else
11538 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11539 case $host_os in
11540 solaris*)
11541 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11543 esac
11546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11547 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11548 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11549 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11550 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11551 ax_pthread_special_flags_added=yes
11554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11555 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11556 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11557 $as_echo_n "(cached) " >&6
11558 else
11559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11560 /* end confdefs.h. */
11561 #include <pthread.h>
11563 main ()
11565 int i = PTHREAD_PRIO_INHERIT;
11567 return 0;
11569 _ACEOF
11570 if ac_fn_c_try_link "$LINENO"; then :
11571 ax_cv_PTHREAD_PRIO_INHERIT=yes
11572 else
11573 ax_cv_PTHREAD_PRIO_INHERIT=no
11575 rm -f core conftest.err conftest.$ac_objext \
11576 conftest$ac_exeext conftest.$ac_ext
11579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11580 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11581 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11582 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11584 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11586 ax_pthread_prio_inherit_defined=yes
11590 CFLAGS="$ax_pthread_save_CFLAGS"
11591 LIBS="$ax_pthread_save_LIBS"
11593 # More AIX lossage: compile with *_r variant
11594 if test "x$GCC" != "xyes"; then
11595 case $host_os in
11596 aix*)
11597 case "x/$CC" in #(
11598 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11599 #handle absolute path differently from PATH based program lookup
11600 case "x$CC" in #(
11601 x/*) :
11602 if as_fn_executable_p ${CC}_r; then :
11603 PTHREAD_CC="${CC}_r"
11604 fi ;; #(
11605 *) :
11606 for ac_prog in ${CC}_r
11608 # Extract the first word of "$ac_prog", so it can be a program name with args.
11609 set dummy $ac_prog; ac_word=$2
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11611 $as_echo_n "checking for $ac_word... " >&6; }
11612 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11613 $as_echo_n "(cached) " >&6
11614 else
11615 if test -n "$PTHREAD_CC"; then
11616 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11617 else
11618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11619 for as_dir in $PATH
11621 IFS=$as_save_IFS
11622 test -z "$as_dir" && as_dir=.
11623 for ac_exec_ext in '' $ac_executable_extensions; do
11624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11625 ac_cv_prog_PTHREAD_CC="$ac_prog"
11626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11627 break 2
11629 done
11630 done
11631 IFS=$as_save_IFS
11635 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11636 if test -n "$PTHREAD_CC"; then
11637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11638 $as_echo "$PTHREAD_CC" >&6; }
11639 else
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11641 $as_echo "no" >&6; }
11645 test -n "$PTHREAD_CC" && break
11646 done
11647 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11649 esac ;; #(
11650 *) :
11652 esac
11654 esac
11658 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11664 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11665 if test "x$ax_pthread_ok" = "xyes"; then
11667 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11670 else
11671 ax_pthread_ok=no
11674 ac_ext=c
11675 ac_cpp='$CPP $CPPFLAGS'
11676 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11677 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11678 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11680 # set thread flags
11682 # Some platforms use these, so just define them. They can't hurt if they
11683 # are not supported.
11684 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11686 # Check for *_r functions
11687 _CFLAGS="$CFLAGS"
11688 _LIBS="$LIBS"
11689 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11690 LIBS="$LIBS $PTHREAD_LIBS"
11692 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11693 if test "x$ac_cv_header_pthread_h" = xyes; then :
11695 else
11696 as_fn_error $? "
11697 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11702 for ac_func in strerror_r getpwuid_r gethostbyname_r
11703 do :
11704 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11705 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11706 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11707 cat >>confdefs.h <<_ACEOF
11708 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11709 _ACEOF
11712 done
11715 # Do test here with the proper thread flags
11716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11717 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11718 if ${pgac_cv_func_strerror_r_int+:} false; then :
11719 $as_echo_n "(cached) " >&6
11720 else
11721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11722 /* end confdefs.h. */
11723 #include <string.h>
11725 main ()
11727 char buf[100];
11728 switch (strerror_r(1, buf, sizeof(buf)))
11729 { case 0: break; default: break; }
11732 return 0;
11734 _ACEOF
11735 if ac_fn_c_try_compile "$LINENO"; then :
11736 pgac_cv_func_strerror_r_int=yes
11737 else
11738 pgac_cv_func_strerror_r_int=no
11740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11743 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11744 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11746 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11751 CFLAGS="$_CFLAGS"
11752 LIBS="$_LIBS"
11755 else
11756 # else
11757 # do not use values from template file
11758 PTHREAD_CFLAGS=
11759 PTHREAD_LIBS=
11761 fi # fi
11768 ## Libraries
11770 ## Most libraries are included only if they demonstrably provide a function
11771 ## we need, but libm is an exception: always include it, because there are
11772 ## too many compilers that play cute optimization games that will break
11773 ## probes for standard functions such as pow().
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11777 $as_echo_n "checking for main in -lm... " >&6; }
11778 if ${ac_cv_lib_m_main+:} false; then :
11779 $as_echo_n "(cached) " >&6
11780 else
11781 ac_check_lib_save_LIBS=$LIBS
11782 LIBS="-lm $LIBS"
11783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11784 /* end confdefs.h. */
11788 main ()
11790 return main ();
11792 return 0;
11794 _ACEOF
11795 if ac_fn_c_try_link "$LINENO"; then :
11796 ac_cv_lib_m_main=yes
11797 else
11798 ac_cv_lib_m_main=no
11800 rm -f core conftest.err conftest.$ac_objext \
11801 conftest$ac_exeext conftest.$ac_ext
11802 LIBS=$ac_check_lib_save_LIBS
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11805 $as_echo "$ac_cv_lib_m_main" >&6; }
11806 if test "x$ac_cv_lib_m_main" = xyes; then :
11807 cat >>confdefs.h <<_ACEOF
11808 #define HAVE_LIBM 1
11809 _ACEOF
11811 LIBS="-lm $LIBS"
11815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11816 $as_echo_n "checking for library containing setproctitle... " >&6; }
11817 if ${ac_cv_search_setproctitle+:} false; then :
11818 $as_echo_n "(cached) " >&6
11819 else
11820 ac_func_search_save_LIBS=$LIBS
11821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11822 /* end confdefs.h. */
11824 /* Override any GCC internal prototype to avoid an error.
11825 Use char because int might match the return type of a GCC
11826 builtin and then its argument prototype would still apply. */
11827 #ifdef __cplusplus
11828 extern "C"
11829 #endif
11830 char setproctitle ();
11832 main ()
11834 return setproctitle ();
11836 return 0;
11838 _ACEOF
11839 for ac_lib in '' util; do
11840 if test -z "$ac_lib"; then
11841 ac_res="none required"
11842 else
11843 ac_res=-l$ac_lib
11844 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11846 if ac_fn_c_try_link "$LINENO"; then :
11847 ac_cv_search_setproctitle=$ac_res
11849 rm -f core conftest.err conftest.$ac_objext \
11850 conftest$ac_exeext
11851 if ${ac_cv_search_setproctitle+:} false; then :
11852 break
11854 done
11855 if ${ac_cv_search_setproctitle+:} false; then :
11857 else
11858 ac_cv_search_setproctitle=no
11860 rm conftest.$ac_ext
11861 LIBS=$ac_func_search_save_LIBS
11863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11864 $as_echo "$ac_cv_search_setproctitle" >&6; }
11865 ac_res=$ac_cv_search_setproctitle
11866 if test "$ac_res" != no; then :
11867 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11871 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11872 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11873 # required. Just checking for dlsym() ought to suffice.
11874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11875 $as_echo_n "checking for library containing dlsym... " >&6; }
11876 if ${ac_cv_search_dlsym+:} false; then :
11877 $as_echo_n "(cached) " >&6
11878 else
11879 ac_func_search_save_LIBS=$LIBS
11880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11881 /* end confdefs.h. */
11883 /* Override any GCC internal prototype to avoid an error.
11884 Use char because int might match the return type of a GCC
11885 builtin and then its argument prototype would still apply. */
11886 #ifdef __cplusplus
11887 extern "C"
11888 #endif
11889 char dlsym ();
11891 main ()
11893 return dlsym ();
11895 return 0;
11897 _ACEOF
11898 for ac_lib in '' dl; do
11899 if test -z "$ac_lib"; then
11900 ac_res="none required"
11901 else
11902 ac_res=-l$ac_lib
11903 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11905 if ac_fn_c_try_link "$LINENO"; then :
11906 ac_cv_search_dlsym=$ac_res
11908 rm -f core conftest.err conftest.$ac_objext \
11909 conftest$ac_exeext
11910 if ${ac_cv_search_dlsym+:} false; then :
11911 break
11913 done
11914 if ${ac_cv_search_dlsym+:} false; then :
11916 else
11917 ac_cv_search_dlsym=no
11919 rm conftest.$ac_ext
11920 LIBS=$ac_func_search_save_LIBS
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11923 $as_echo "$ac_cv_search_dlsym" >&6; }
11924 ac_res=$ac_cv_search_dlsym
11925 if test "$ac_res" != no; then :
11926 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11931 $as_echo_n "checking for library containing socket... " >&6; }
11932 if ${ac_cv_search_socket+:} false; then :
11933 $as_echo_n "(cached) " >&6
11934 else
11935 ac_func_search_save_LIBS=$LIBS
11936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11937 /* end confdefs.h. */
11939 /* Override any GCC internal prototype to avoid an error.
11940 Use char because int might match the return type of a GCC
11941 builtin and then its argument prototype would still apply. */
11942 #ifdef __cplusplus
11943 extern "C"
11944 #endif
11945 char socket ();
11947 main ()
11949 return socket ();
11951 return 0;
11953 _ACEOF
11954 for ac_lib in '' socket ws2_32; do
11955 if test -z "$ac_lib"; then
11956 ac_res="none required"
11957 else
11958 ac_res=-l$ac_lib
11959 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11961 if ac_fn_c_try_link "$LINENO"; then :
11962 ac_cv_search_socket=$ac_res
11964 rm -f core conftest.err conftest.$ac_objext \
11965 conftest$ac_exeext
11966 if ${ac_cv_search_socket+:} false; then :
11967 break
11969 done
11970 if ${ac_cv_search_socket+:} false; then :
11972 else
11973 ac_cv_search_socket=no
11975 rm conftest.$ac_ext
11976 LIBS=$ac_func_search_save_LIBS
11978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11979 $as_echo "$ac_cv_search_socket" >&6; }
11980 ac_res=$ac_cv_search_socket
11981 if test "$ac_res" != no; then :
11982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11987 $as_echo_n "checking for library containing shl_load... " >&6; }
11988 if ${ac_cv_search_shl_load+:} false; then :
11989 $as_echo_n "(cached) " >&6
11990 else
11991 ac_func_search_save_LIBS=$LIBS
11992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11993 /* end confdefs.h. */
11995 /* Override any GCC internal prototype to avoid an error.
11996 Use char because int might match the return type of a GCC
11997 builtin and then its argument prototype would still apply. */
11998 #ifdef __cplusplus
11999 extern "C"
12000 #endif
12001 char shl_load ();
12003 main ()
12005 return shl_load ();
12007 return 0;
12009 _ACEOF
12010 for ac_lib in '' dld; do
12011 if test -z "$ac_lib"; then
12012 ac_res="none required"
12013 else
12014 ac_res=-l$ac_lib
12015 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12017 if ac_fn_c_try_link "$LINENO"; then :
12018 ac_cv_search_shl_load=$ac_res
12020 rm -f core conftest.err conftest.$ac_objext \
12021 conftest$ac_exeext
12022 if ${ac_cv_search_shl_load+:} false; then :
12023 break
12025 done
12026 if ${ac_cv_search_shl_load+:} false; then :
12028 else
12029 ac_cv_search_shl_load=no
12031 rm conftest.$ac_ext
12032 LIBS=$ac_func_search_save_LIBS
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
12035 $as_echo "$ac_cv_search_shl_load" >&6; }
12036 ac_res=$ac_cv_search_shl_load
12037 if test "$ac_res" != no; then :
12038 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
12043 $as_echo_n "checking for library containing getopt_long... " >&6; }
12044 if ${ac_cv_search_getopt_long+:} false; then :
12045 $as_echo_n "(cached) " >&6
12046 else
12047 ac_func_search_save_LIBS=$LIBS
12048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12049 /* end confdefs.h. */
12051 /* Override any GCC internal prototype to avoid an error.
12052 Use char because int might match the return type of a GCC
12053 builtin and then its argument prototype would still apply. */
12054 #ifdef __cplusplus
12055 extern "C"
12056 #endif
12057 char getopt_long ();
12059 main ()
12061 return getopt_long ();
12063 return 0;
12065 _ACEOF
12066 for ac_lib in '' getopt gnugetopt; do
12067 if test -z "$ac_lib"; then
12068 ac_res="none required"
12069 else
12070 ac_res=-l$ac_lib
12071 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12073 if ac_fn_c_try_link "$LINENO"; then :
12074 ac_cv_search_getopt_long=$ac_res
12076 rm -f core conftest.err conftest.$ac_objext \
12077 conftest$ac_exeext
12078 if ${ac_cv_search_getopt_long+:} false; then :
12079 break
12081 done
12082 if ${ac_cv_search_getopt_long+:} false; then :
12084 else
12085 ac_cv_search_getopt_long=no
12087 rm conftest.$ac_ext
12088 LIBS=$ac_func_search_save_LIBS
12090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
12091 $as_echo "$ac_cv_search_getopt_long" >&6; }
12092 ac_res=$ac_cv_search_getopt_long
12093 if test "$ac_res" != no; then :
12094 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
12099 $as_echo_n "checking for library containing shm_open... " >&6; }
12100 if ${ac_cv_search_shm_open+:} false; then :
12101 $as_echo_n "(cached) " >&6
12102 else
12103 ac_func_search_save_LIBS=$LIBS
12104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12105 /* end confdefs.h. */
12107 /* Override any GCC internal prototype to avoid an error.
12108 Use char because int might match the return type of a GCC
12109 builtin and then its argument prototype would still apply. */
12110 #ifdef __cplusplus
12111 extern "C"
12112 #endif
12113 char shm_open ();
12115 main ()
12117 return shm_open ();
12119 return 0;
12121 _ACEOF
12122 for ac_lib in '' rt; do
12123 if test -z "$ac_lib"; then
12124 ac_res="none required"
12125 else
12126 ac_res=-l$ac_lib
12127 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12129 if ac_fn_c_try_link "$LINENO"; then :
12130 ac_cv_search_shm_open=$ac_res
12132 rm -f core conftest.err conftest.$ac_objext \
12133 conftest$ac_exeext
12134 if ${ac_cv_search_shm_open+:} false; then :
12135 break
12137 done
12138 if ${ac_cv_search_shm_open+:} false; then :
12140 else
12141 ac_cv_search_shm_open=no
12143 rm conftest.$ac_ext
12144 LIBS=$ac_func_search_save_LIBS
12146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
12147 $as_echo "$ac_cv_search_shm_open" >&6; }
12148 ac_res=$ac_cv_search_shm_open
12149 if test "$ac_res" != no; then :
12150 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
12155 $as_echo_n "checking for library containing shm_unlink... " >&6; }
12156 if ${ac_cv_search_shm_unlink+:} false; then :
12157 $as_echo_n "(cached) " >&6
12158 else
12159 ac_func_search_save_LIBS=$LIBS
12160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12161 /* end confdefs.h. */
12163 /* Override any GCC internal prototype to avoid an error.
12164 Use char because int might match the return type of a GCC
12165 builtin and then its argument prototype would still apply. */
12166 #ifdef __cplusplus
12167 extern "C"
12168 #endif
12169 char shm_unlink ();
12171 main ()
12173 return shm_unlink ();
12175 return 0;
12177 _ACEOF
12178 for ac_lib in '' rt; do
12179 if test -z "$ac_lib"; then
12180 ac_res="none required"
12181 else
12182 ac_res=-l$ac_lib
12183 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12185 if ac_fn_c_try_link "$LINENO"; then :
12186 ac_cv_search_shm_unlink=$ac_res
12188 rm -f core conftest.err conftest.$ac_objext \
12189 conftest$ac_exeext
12190 if ${ac_cv_search_shm_unlink+:} false; then :
12191 break
12193 done
12194 if ${ac_cv_search_shm_unlink+:} false; then :
12196 else
12197 ac_cv_search_shm_unlink=no
12199 rm conftest.$ac_ext
12200 LIBS=$ac_func_search_save_LIBS
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12203 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12204 ac_res=$ac_cv_search_shm_unlink
12205 if test "$ac_res" != no; then :
12206 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12211 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12212 if ${ac_cv_search_clock_gettime+:} false; then :
12213 $as_echo_n "(cached) " >&6
12214 else
12215 ac_func_search_save_LIBS=$LIBS
12216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12217 /* end confdefs.h. */
12219 /* Override any GCC internal prototype to avoid an error.
12220 Use char because int might match the return type of a GCC
12221 builtin and then its argument prototype would still apply. */
12222 #ifdef __cplusplus
12223 extern "C"
12224 #endif
12225 char clock_gettime ();
12227 main ()
12229 return clock_gettime ();
12231 return 0;
12233 _ACEOF
12234 for ac_lib in '' rt posix4; do
12235 if test -z "$ac_lib"; then
12236 ac_res="none required"
12237 else
12238 ac_res=-l$ac_lib
12239 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12241 if ac_fn_c_try_link "$LINENO"; then :
12242 ac_cv_search_clock_gettime=$ac_res
12244 rm -f core conftest.err conftest.$ac_objext \
12245 conftest$ac_exeext
12246 if ${ac_cv_search_clock_gettime+:} false; then :
12247 break
12249 done
12250 if ${ac_cv_search_clock_gettime+:} false; then :
12252 else
12253 ac_cv_search_clock_gettime=no
12255 rm conftest.$ac_ext
12256 LIBS=$ac_func_search_save_LIBS
12258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12259 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12260 ac_res=$ac_cv_search_clock_gettime
12261 if test "$ac_res" != no; then :
12262 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12266 # Solaris:
12267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
12268 $as_echo_n "checking for library containing fdatasync... " >&6; }
12269 if ${ac_cv_search_fdatasync+:} false; then :
12270 $as_echo_n "(cached) " >&6
12271 else
12272 ac_func_search_save_LIBS=$LIBS
12273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12274 /* end confdefs.h. */
12276 /* Override any GCC internal prototype to avoid an error.
12277 Use char because int might match the return type of a GCC
12278 builtin and then its argument prototype would still apply. */
12279 #ifdef __cplusplus
12280 extern "C"
12281 #endif
12282 char fdatasync ();
12284 main ()
12286 return fdatasync ();
12288 return 0;
12290 _ACEOF
12291 for ac_lib in '' rt posix4; do
12292 if test -z "$ac_lib"; then
12293 ac_res="none required"
12294 else
12295 ac_res=-l$ac_lib
12296 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12298 if ac_fn_c_try_link "$LINENO"; then :
12299 ac_cv_search_fdatasync=$ac_res
12301 rm -f core conftest.err conftest.$ac_objext \
12302 conftest$ac_exeext
12303 if ${ac_cv_search_fdatasync+:} false; then :
12304 break
12306 done
12307 if ${ac_cv_search_fdatasync+:} false; then :
12309 else
12310 ac_cv_search_fdatasync=no
12312 rm conftest.$ac_ext
12313 LIBS=$ac_func_search_save_LIBS
12315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
12316 $as_echo "$ac_cv_search_fdatasync" >&6; }
12317 ac_res=$ac_cv_search_fdatasync
12318 if test "$ac_res" != no; then :
12319 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12323 # Cygwin:
12324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12325 $as_echo_n "checking for library containing shmget... " >&6; }
12326 if ${ac_cv_search_shmget+:} false; then :
12327 $as_echo_n "(cached) " >&6
12328 else
12329 ac_func_search_save_LIBS=$LIBS
12330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12331 /* end confdefs.h. */
12333 /* Override any GCC internal prototype to avoid an error.
12334 Use char because int might match the return type of a GCC
12335 builtin and then its argument prototype would still apply. */
12336 #ifdef __cplusplus
12337 extern "C"
12338 #endif
12339 char shmget ();
12341 main ()
12343 return shmget ();
12345 return 0;
12347 _ACEOF
12348 for ac_lib in '' cygipc; do
12349 if test -z "$ac_lib"; then
12350 ac_res="none required"
12351 else
12352 ac_res=-l$ac_lib
12353 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12355 if ac_fn_c_try_link "$LINENO"; then :
12356 ac_cv_search_shmget=$ac_res
12358 rm -f core conftest.err conftest.$ac_objext \
12359 conftest$ac_exeext
12360 if ${ac_cv_search_shmget+:} false; then :
12361 break
12363 done
12364 if ${ac_cv_search_shmget+:} false; then :
12366 else
12367 ac_cv_search_shmget=no
12369 rm conftest.$ac_ext
12370 LIBS=$ac_func_search_save_LIBS
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12373 $as_echo "$ac_cv_search_shmget" >&6; }
12374 ac_res=$ac_cv_search_shmget
12375 if test "$ac_res" != no; then :
12376 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12380 # *BSD:
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12382 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12383 if ${ac_cv_search_backtrace_symbols+:} false; then :
12384 $as_echo_n "(cached) " >&6
12385 else
12386 ac_func_search_save_LIBS=$LIBS
12387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12388 /* end confdefs.h. */
12390 /* Override any GCC internal prototype to avoid an error.
12391 Use char because int might match the return type of a GCC
12392 builtin and then its argument prototype would still apply. */
12393 #ifdef __cplusplus
12394 extern "C"
12395 #endif
12396 char backtrace_symbols ();
12398 main ()
12400 return backtrace_symbols ();
12402 return 0;
12404 _ACEOF
12405 for ac_lib in '' execinfo; do
12406 if test -z "$ac_lib"; then
12407 ac_res="none required"
12408 else
12409 ac_res=-l$ac_lib
12410 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12412 if ac_fn_c_try_link "$LINENO"; then :
12413 ac_cv_search_backtrace_symbols=$ac_res
12415 rm -f core conftest.err conftest.$ac_objext \
12416 conftest$ac_exeext
12417 if ${ac_cv_search_backtrace_symbols+:} false; then :
12418 break
12420 done
12421 if ${ac_cv_search_backtrace_symbols+:} false; then :
12423 else
12424 ac_cv_search_backtrace_symbols=no
12426 rm conftest.$ac_ext
12427 LIBS=$ac_func_search_save_LIBS
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12430 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12431 ac_res=$ac_cv_search_backtrace_symbols
12432 if test "$ac_res" != no; then :
12433 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12438 if test "$enable_thread_safety" = yes; then
12439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
12440 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
12441 if ${ac_cv_search_gethostbyname_r+:} false; then :
12442 $as_echo_n "(cached) " >&6
12443 else
12444 ac_func_search_save_LIBS=$LIBS
12445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12446 /* end confdefs.h. */
12448 /* Override any GCC internal prototype to avoid an error.
12449 Use char because int might match the return type of a GCC
12450 builtin and then its argument prototype would still apply. */
12451 #ifdef __cplusplus
12452 extern "C"
12453 #endif
12454 char gethostbyname_r ();
12456 main ()
12458 return gethostbyname_r ();
12460 return 0;
12462 _ACEOF
12463 for ac_lib in '' nsl; do
12464 if test -z "$ac_lib"; then
12465 ac_res="none required"
12466 else
12467 ac_res=-l$ac_lib
12468 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12470 if ac_fn_c_try_link "$LINENO"; then :
12471 ac_cv_search_gethostbyname_r=$ac_res
12473 rm -f core conftest.err conftest.$ac_objext \
12474 conftest$ac_exeext
12475 if ${ac_cv_search_gethostbyname_r+:} false; then :
12476 break
12478 done
12479 if ${ac_cv_search_gethostbyname_r+:} false; then :
12481 else
12482 ac_cv_search_gethostbyname_r=no
12484 rm conftest.$ac_ext
12485 LIBS=$ac_func_search_save_LIBS
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
12488 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
12489 ac_res=$ac_cv_search_gethostbyname_r
12490 if test "$ac_res" != no; then :
12491 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12496 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12497 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12498 $as_echo_n "(cached) " >&6
12499 else
12500 ac_func_search_save_LIBS=$LIBS
12501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12502 /* end confdefs.h. */
12504 /* Override any GCC internal prototype to avoid an error.
12505 Use char because int might match the return type of a GCC
12506 builtin and then its argument prototype would still apply. */
12507 #ifdef __cplusplus
12508 extern "C"
12509 #endif
12510 char pthread_barrier_wait ();
12512 main ()
12514 return pthread_barrier_wait ();
12516 return 0;
12518 _ACEOF
12519 for ac_lib in '' pthread; do
12520 if test -z "$ac_lib"; then
12521 ac_res="none required"
12522 else
12523 ac_res=-l$ac_lib
12524 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12526 if ac_fn_c_try_link "$LINENO"; then :
12527 ac_cv_search_pthread_barrier_wait=$ac_res
12529 rm -f core conftest.err conftest.$ac_objext \
12530 conftest$ac_exeext
12531 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12532 break
12534 done
12535 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12537 else
12538 ac_cv_search_pthread_barrier_wait=no
12540 rm conftest.$ac_ext
12541 LIBS=$ac_func_search_save_LIBS
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12544 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12545 ac_res=$ac_cv_search_pthread_barrier_wait
12546 if test "$ac_res" != no; then :
12547 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12553 if test "$with_readline" = yes; then
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12557 $as_echo_n "checking for library containing readline... " >&6; }
12558 if ${pgac_cv_check_readline+:} false; then :
12559 $as_echo_n "(cached) " >&6
12560 else
12561 pgac_cv_check_readline=no
12562 pgac_save_LIBS=$LIBS
12563 if test x"$with_libedit_preferred" != x"yes"
12564 then READLINE_ORDER="-lreadline -ledit"
12565 else READLINE_ORDER="-ledit -lreadline"
12567 for pgac_rllib in $READLINE_ORDER ; do
12568 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12569 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12571 /* end confdefs.h. */
12573 /* Override any GCC internal prototype to avoid an error.
12574 Use char because int might match the return type of a GCC
12575 builtin and then its argument prototype would still apply. */
12576 #ifdef __cplusplus
12577 extern "C"
12578 #endif
12579 char readline ();
12581 main ()
12583 return readline ();
12585 return 0;
12587 _ACEOF
12588 if ac_fn_c_try_link "$LINENO"; then :
12590 # Older NetBSD and OpenBSD have a broken linker that does not
12591 # recognize dependent libraries; assume curses is needed if we didn't
12592 # find any dependency.
12593 case $host_os in
12594 netbsd* | openbsd*)
12595 if test x"$pgac_lib" = x"" ; then
12596 pgac_lib=" -lcurses"
12597 fi ;;
12598 esac
12600 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12601 break
12604 rm -f core conftest.err conftest.$ac_objext \
12605 conftest$ac_exeext conftest.$ac_ext
12606 done
12607 if test "$pgac_cv_check_readline" != no ; then
12608 break
12610 done
12611 LIBS=$pgac_save_LIBS
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12615 $as_echo "$pgac_cv_check_readline" >&6; }
12616 if test "$pgac_cv_check_readline" != no ; then
12617 LIBS="$pgac_cv_check_readline $LIBS"
12619 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12624 if test x"$pgac_cv_check_readline" = x"no"; then
12625 as_fn_error $? "readline library not found
12626 If you have readline already installed, see config.log for details on the
12627 failure. It is possible the compiler isn't looking in the proper directory.
12628 Use --without-readline to disable readline support." "$LINENO" 5
12632 if test "$with_zlib" = yes; then
12633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12634 $as_echo_n "checking for inflate in -lz... " >&6; }
12635 if ${ac_cv_lib_z_inflate+:} false; then :
12636 $as_echo_n "(cached) " >&6
12637 else
12638 ac_check_lib_save_LIBS=$LIBS
12639 LIBS="-lz $LIBS"
12640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12641 /* end confdefs.h. */
12643 /* Override any GCC internal prototype to avoid an error.
12644 Use char because int might match the return type of a GCC
12645 builtin and then its argument prototype would still apply. */
12646 #ifdef __cplusplus
12647 extern "C"
12648 #endif
12649 char inflate ();
12651 main ()
12653 return inflate ();
12655 return 0;
12657 _ACEOF
12658 if ac_fn_c_try_link "$LINENO"; then :
12659 ac_cv_lib_z_inflate=yes
12660 else
12661 ac_cv_lib_z_inflate=no
12663 rm -f core conftest.err conftest.$ac_objext \
12664 conftest$ac_exeext conftest.$ac_ext
12665 LIBS=$ac_check_lib_save_LIBS
12667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12668 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12669 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12670 cat >>confdefs.h <<_ACEOF
12671 #define HAVE_LIBZ 1
12672 _ACEOF
12674 LIBS="-lz $LIBS"
12676 else
12677 as_fn_error $? "zlib library not found
12678 If you have zlib already installed, see config.log for details on the
12679 failure. It is possible the compiler isn't looking in the proper directory.
12680 Use --without-zlib to disable zlib support." "$LINENO" 5
12685 if test "$enable_spinlocks" = yes; then
12687 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12689 else
12690 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12691 *** Not using spinlocks will cause poor performance." >&5
12692 $as_echo "$as_me: WARNING:
12693 *** Not using spinlocks will cause poor performance." >&2;}
12696 if test "$enable_atomics" = yes; then
12698 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12700 else
12701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12702 *** Not using atomic operations will cause poor performance." >&5
12703 $as_echo "$as_me: WARNING:
12704 *** Not using atomic operations will cause poor performance." >&2;}
12707 if test "$with_gssapi" = yes ; then
12708 if test "$PORTNAME" != "win32"; then
12709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12710 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12711 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12712 $as_echo_n "(cached) " >&6
12713 else
12714 ac_func_search_save_LIBS=$LIBS
12715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12716 /* end confdefs.h. */
12718 /* Override any GCC internal prototype to avoid an error.
12719 Use char because int might match the return type of a GCC
12720 builtin and then its argument prototype would still apply. */
12721 #ifdef __cplusplus
12722 extern "C"
12723 #endif
12724 char gss_init_sec_context ();
12726 main ()
12728 return gss_init_sec_context ();
12730 return 0;
12732 _ACEOF
12733 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12734 if test -z "$ac_lib"; then
12735 ac_res="none required"
12736 else
12737 ac_res=-l$ac_lib
12738 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12740 if ac_fn_c_try_link "$LINENO"; then :
12741 ac_cv_search_gss_init_sec_context=$ac_res
12743 rm -f core conftest.err conftest.$ac_objext \
12744 conftest$ac_exeext
12745 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12746 break
12748 done
12749 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12751 else
12752 ac_cv_search_gss_init_sec_context=no
12754 rm conftest.$ac_ext
12755 LIBS=$ac_func_search_save_LIBS
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12758 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12759 ac_res=$ac_cv_search_gss_init_sec_context
12760 if test "$ac_res" != no; then :
12761 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12763 else
12764 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12767 else
12768 LIBS="$LIBS -lgssapi32"
12773 # SSL Library
12775 # There is currently only one supported SSL/TLS library: OpenSSL.
12780 # Check whether --with-ssl was given.
12781 if test "${with_ssl+set}" = set; then :
12782 withval=$with_ssl;
12783 case $withval in
12784 yes)
12785 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12788 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12793 esac
12798 if test x"$with_ssl" = x"" ; then
12799 with_ssl=no
12804 # Check whether --with-openssl was given.
12805 if test "${with_openssl+set}" = set; then :
12806 withval=$with_openssl;
12807 case $withval in
12808 yes)
12815 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12817 esac
12819 else
12820 with_openssl=no
12825 if test "$with_openssl" = yes ; then
12826 with_ssl=openssl
12829 if test "$with_ssl" = openssl ; then
12830 # Minimum required OpenSSL version is 1.0.1
12832 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12834 if test "$PORTNAME" != "win32"; then
12835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12836 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12837 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12838 $as_echo_n "(cached) " >&6
12839 else
12840 ac_check_lib_save_LIBS=$LIBS
12841 LIBS="-lcrypto $LIBS"
12842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12843 /* end confdefs.h. */
12845 /* Override any GCC internal prototype to avoid an error.
12846 Use char because int might match the return type of a GCC
12847 builtin and then its argument prototype would still apply. */
12848 #ifdef __cplusplus
12849 extern "C"
12850 #endif
12851 char CRYPTO_new_ex_data ();
12853 main ()
12855 return CRYPTO_new_ex_data ();
12857 return 0;
12859 _ACEOF
12860 if ac_fn_c_try_link "$LINENO"; then :
12861 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12862 else
12863 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12865 rm -f core conftest.err conftest.$ac_objext \
12866 conftest$ac_exeext conftest.$ac_ext
12867 LIBS=$ac_check_lib_save_LIBS
12869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12870 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12871 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12872 cat >>confdefs.h <<_ACEOF
12873 #define HAVE_LIBCRYPTO 1
12874 _ACEOF
12876 LIBS="-lcrypto $LIBS"
12878 else
12879 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12883 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12884 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12885 $as_echo_n "(cached) " >&6
12886 else
12887 ac_check_lib_save_LIBS=$LIBS
12888 LIBS="-lssl $LIBS"
12889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12890 /* end confdefs.h. */
12892 /* Override any GCC internal prototype to avoid an error.
12893 Use char because int might match the return type of a GCC
12894 builtin and then its argument prototype would still apply. */
12895 #ifdef __cplusplus
12896 extern "C"
12897 #endif
12898 char SSL_new ();
12900 main ()
12902 return SSL_new ();
12904 return 0;
12906 _ACEOF
12907 if ac_fn_c_try_link "$LINENO"; then :
12908 ac_cv_lib_ssl_SSL_new=yes
12909 else
12910 ac_cv_lib_ssl_SSL_new=no
12912 rm -f core conftest.err conftest.$ac_objext \
12913 conftest$ac_exeext conftest.$ac_ext
12914 LIBS=$ac_check_lib_save_LIBS
12916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12917 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12918 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12919 cat >>confdefs.h <<_ACEOF
12920 #define HAVE_LIBSSL 1
12921 _ACEOF
12923 LIBS="-lssl $LIBS"
12925 else
12926 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12929 else
12930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12931 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12932 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12933 $as_echo_n "(cached) " >&6
12934 else
12935 ac_func_search_save_LIBS=$LIBS
12936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12937 /* end confdefs.h. */
12939 /* Override any GCC internal prototype to avoid an error.
12940 Use char because int might match the return type of a GCC
12941 builtin and then its argument prototype would still apply. */
12942 #ifdef __cplusplus
12943 extern "C"
12944 #endif
12945 char CRYPTO_new_ex_data ();
12947 main ()
12949 return CRYPTO_new_ex_data ();
12951 return 0;
12953 _ACEOF
12954 for ac_lib in '' eay32 crypto; do
12955 if test -z "$ac_lib"; then
12956 ac_res="none required"
12957 else
12958 ac_res=-l$ac_lib
12959 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12961 if ac_fn_c_try_link "$LINENO"; then :
12962 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12964 rm -f core conftest.err conftest.$ac_objext \
12965 conftest$ac_exeext
12966 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12967 break
12969 done
12970 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12972 else
12973 ac_cv_search_CRYPTO_new_ex_data=no
12975 rm conftest.$ac_ext
12976 LIBS=$ac_func_search_save_LIBS
12978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12979 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12980 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12981 if test "$ac_res" != no; then :
12982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12984 else
12985 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12989 $as_echo_n "checking for library containing SSL_new... " >&6; }
12990 if ${ac_cv_search_SSL_new+:} false; then :
12991 $as_echo_n "(cached) " >&6
12992 else
12993 ac_func_search_save_LIBS=$LIBS
12994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12995 /* end confdefs.h. */
12997 /* Override any GCC internal prototype to avoid an error.
12998 Use char because int might match the return type of a GCC
12999 builtin and then its argument prototype would still apply. */
13000 #ifdef __cplusplus
13001 extern "C"
13002 #endif
13003 char SSL_new ();
13005 main ()
13007 return SSL_new ();
13009 return 0;
13011 _ACEOF
13012 for ac_lib in '' ssleay32 ssl; do
13013 if test -z "$ac_lib"; then
13014 ac_res="none required"
13015 else
13016 ac_res=-l$ac_lib
13017 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13019 if ac_fn_c_try_link "$LINENO"; then :
13020 ac_cv_search_SSL_new=$ac_res
13022 rm -f core conftest.err conftest.$ac_objext \
13023 conftest$ac_exeext
13024 if ${ac_cv_search_SSL_new+:} false; then :
13025 break
13027 done
13028 if ${ac_cv_search_SSL_new+:} false; then :
13030 else
13031 ac_cv_search_SSL_new=no
13033 rm conftest.$ac_ext
13034 LIBS=$ac_func_search_save_LIBS
13036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
13037 $as_echo "$ac_cv_search_SSL_new" >&6; }
13038 ac_res=$ac_cv_search_SSL_new
13039 if test "$ac_res" != no; then :
13040 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13042 else
13043 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
13047 # Function introduced in OpenSSL 1.0.2.
13048 for ac_func in X509_get_signature_nid
13049 do :
13050 ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
13051 if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
13052 cat >>confdefs.h <<_ACEOF
13053 #define HAVE_X509_GET_SIGNATURE_NID 1
13054 _ACEOF
13057 done
13059 # Functions introduced in OpenSSL 1.1.0. We used to check for
13060 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
13061 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
13062 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
13063 # functions.
13064 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
13065 do :
13066 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13067 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13068 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13069 cat >>confdefs.h <<_ACEOF
13070 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13071 _ACEOF
13074 done
13076 # OpenSSL versions before 1.1.0 required setting callback functions, for
13077 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
13078 # function was removed.
13079 for ac_func in CRYPTO_lock
13080 do :
13081 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
13082 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
13083 cat >>confdefs.h <<_ACEOF
13084 #define HAVE_CRYPTO_LOCK 1
13085 _ACEOF
13088 done
13091 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
13093 elif test "$with_ssl" != no ; then
13094 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
13098 if test "$with_pam" = yes ; then
13099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
13100 $as_echo_n "checking for pam_start in -lpam... " >&6; }
13101 if ${ac_cv_lib_pam_pam_start+:} false; then :
13102 $as_echo_n "(cached) " >&6
13103 else
13104 ac_check_lib_save_LIBS=$LIBS
13105 LIBS="-lpam $LIBS"
13106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107 /* end confdefs.h. */
13109 /* Override any GCC internal prototype to avoid an error.
13110 Use char because int might match the return type of a GCC
13111 builtin and then its argument prototype would still apply. */
13112 #ifdef __cplusplus
13113 extern "C"
13114 #endif
13115 char pam_start ();
13117 main ()
13119 return pam_start ();
13121 return 0;
13123 _ACEOF
13124 if ac_fn_c_try_link "$LINENO"; then :
13125 ac_cv_lib_pam_pam_start=yes
13126 else
13127 ac_cv_lib_pam_pam_start=no
13129 rm -f core conftest.err conftest.$ac_objext \
13130 conftest$ac_exeext conftest.$ac_ext
13131 LIBS=$ac_check_lib_save_LIBS
13133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
13134 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
13135 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
13136 cat >>confdefs.h <<_ACEOF
13137 #define HAVE_LIBPAM 1
13138 _ACEOF
13140 LIBS="-lpam $LIBS"
13142 else
13143 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
13148 if test "$with_libxml" = yes ; then
13149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
13150 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
13151 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
13152 $as_echo_n "(cached) " >&6
13153 else
13154 ac_check_lib_save_LIBS=$LIBS
13155 LIBS="-lxml2 $LIBS"
13156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13157 /* end confdefs.h. */
13159 /* Override any GCC internal prototype to avoid an error.
13160 Use char because int might match the return type of a GCC
13161 builtin and then its argument prototype would still apply. */
13162 #ifdef __cplusplus
13163 extern "C"
13164 #endif
13165 char xmlSaveToBuffer ();
13167 main ()
13169 return xmlSaveToBuffer ();
13171 return 0;
13173 _ACEOF
13174 if ac_fn_c_try_link "$LINENO"; then :
13175 ac_cv_lib_xml2_xmlSaveToBuffer=yes
13176 else
13177 ac_cv_lib_xml2_xmlSaveToBuffer=no
13179 rm -f core conftest.err conftest.$ac_objext \
13180 conftest$ac_exeext conftest.$ac_ext
13181 LIBS=$ac_check_lib_save_LIBS
13183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13184 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13185 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13186 cat >>confdefs.h <<_ACEOF
13187 #define HAVE_LIBXML2 1
13188 _ACEOF
13190 LIBS="-lxml2 $LIBS"
13192 else
13193 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13198 if test "$with_libxslt" = yes ; then
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13200 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13201 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13202 $as_echo_n "(cached) " >&6
13203 else
13204 ac_check_lib_save_LIBS=$LIBS
13205 LIBS="-lxslt $LIBS"
13206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207 /* end confdefs.h. */
13209 /* Override any GCC internal prototype to avoid an error.
13210 Use char because int might match the return type of a GCC
13211 builtin and then its argument prototype would still apply. */
13212 #ifdef __cplusplus
13213 extern "C"
13214 #endif
13215 char xsltCleanupGlobals ();
13217 main ()
13219 return xsltCleanupGlobals ();
13221 return 0;
13223 _ACEOF
13224 if ac_fn_c_try_link "$LINENO"; then :
13225 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13226 else
13227 ac_cv_lib_xslt_xsltCleanupGlobals=no
13229 rm -f core conftest.err conftest.$ac_objext \
13230 conftest$ac_exeext conftest.$ac_ext
13231 LIBS=$ac_check_lib_save_LIBS
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13234 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13235 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13236 cat >>confdefs.h <<_ACEOF
13237 #define HAVE_LIBXSLT 1
13238 _ACEOF
13240 LIBS="-lxslt $LIBS"
13242 else
13243 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13248 if test "$with_lz4" = yes ; then
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13250 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13251 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13252 $as_echo_n "(cached) " >&6
13253 else
13254 ac_check_lib_save_LIBS=$LIBS
13255 LIBS="-llz4 $LIBS"
13256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13257 /* end confdefs.h. */
13259 /* Override any GCC internal prototype to avoid an error.
13260 Use char because int might match the return type of a GCC
13261 builtin and then its argument prototype would still apply. */
13262 #ifdef __cplusplus
13263 extern "C"
13264 #endif
13265 char LZ4_compress_default ();
13267 main ()
13269 return LZ4_compress_default ();
13271 return 0;
13273 _ACEOF
13274 if ac_fn_c_try_link "$LINENO"; then :
13275 ac_cv_lib_lz4_LZ4_compress_default=yes
13276 else
13277 ac_cv_lib_lz4_LZ4_compress_default=no
13279 rm -f core conftest.err conftest.$ac_objext \
13280 conftest$ac_exeext conftest.$ac_ext
13281 LIBS=$ac_check_lib_save_LIBS
13283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
13284 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13285 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13286 cat >>confdefs.h <<_ACEOF
13287 #define HAVE_LIBLZ4 1
13288 _ACEOF
13290 LIBS="-llz4 $LIBS"
13292 else
13293 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13298 if test "$with_zstd" = yes ; then
13299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
13300 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
13301 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
13302 $as_echo_n "(cached) " >&6
13303 else
13304 ac_check_lib_save_LIBS=$LIBS
13305 LIBS="-lzstd $LIBS"
13306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13307 /* end confdefs.h. */
13309 /* Override any GCC internal prototype to avoid an error.
13310 Use char because int might match the return type of a GCC
13311 builtin and then its argument prototype would still apply. */
13312 #ifdef __cplusplus
13313 extern "C"
13314 #endif
13315 char ZSTD_compress ();
13317 main ()
13319 return ZSTD_compress ();
13321 return 0;
13323 _ACEOF
13324 if ac_fn_c_try_link "$LINENO"; then :
13325 ac_cv_lib_zstd_ZSTD_compress=yes
13326 else
13327 ac_cv_lib_zstd_ZSTD_compress=no
13329 rm -f core conftest.err conftest.$ac_objext \
13330 conftest$ac_exeext conftest.$ac_ext
13331 LIBS=$ac_check_lib_save_LIBS
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
13334 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
13335 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
13336 cat >>confdefs.h <<_ACEOF
13337 #define HAVE_LIBZSTD 1
13338 _ACEOF
13340 LIBS="-lzstd $LIBS"
13342 else
13343 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
13348 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
13349 # also, on AIX, we may need to have openssl in LIBS for this step.
13350 if test "$with_ldap" = yes ; then
13351 _LIBS="$LIBS"
13352 if test "$PORTNAME" != "win32"; then
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13354 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13355 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13356 $as_echo_n "(cached) " >&6
13357 else
13358 ac_check_lib_save_LIBS=$LIBS
13359 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
13360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13361 /* end confdefs.h. */
13363 /* Override any GCC internal prototype to avoid an error.
13364 Use char because int might match the return type of a GCC
13365 builtin and then its argument prototype would still apply. */
13366 #ifdef __cplusplus
13367 extern "C"
13368 #endif
13369 char ldap_bind ();
13371 main ()
13373 return ldap_bind ();
13375 return 0;
13377 _ACEOF
13378 if ac_fn_c_try_link "$LINENO"; then :
13379 ac_cv_lib_ldap_ldap_bind=yes
13380 else
13381 ac_cv_lib_ldap_ldap_bind=no
13383 rm -f core conftest.err conftest.$ac_objext \
13384 conftest$ac_exeext conftest.$ac_ext
13385 LIBS=$ac_check_lib_save_LIBS
13387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
13388 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13389 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13390 cat >>confdefs.h <<_ACEOF
13391 #define HAVE_LIBLDAP 1
13392 _ACEOF
13394 LIBS="-lldap $LIBS"
13396 else
13397 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13400 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13401 # This test is carried out against libldap.
13402 for ac_func in ldap_initialize
13403 do :
13404 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13405 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13406 cat >>confdefs.h <<_ACEOF
13407 #define HAVE_LDAP_INITIALIZE 1
13408 _ACEOF
13411 done
13413 if test "$enable_thread_safety" = yes; then
13414 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13415 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13416 LIBS="$_LIBS"
13417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13418 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13419 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13420 $as_echo_n "(cached) " >&6
13421 else
13422 ac_check_lib_save_LIBS=$LIBS
13423 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425 /* end confdefs.h. */
13427 /* Override any GCC internal prototype to avoid an error.
13428 Use char because int might match the return type of a GCC
13429 builtin and then its argument prototype would still apply. */
13430 #ifdef __cplusplus
13431 extern "C"
13432 #endif
13433 char ldap_bind ();
13435 main ()
13437 return ldap_bind ();
13439 return 0;
13441 _ACEOF
13442 if ac_fn_c_try_link "$LINENO"; then :
13443 ac_cv_lib_ldap_r_ldap_bind=yes
13444 else
13445 ac_cv_lib_ldap_r_ldap_bind=no
13447 rm -f core conftest.err conftest.$ac_objext \
13448 conftest$ac_exeext conftest.$ac_ext
13449 LIBS=$ac_check_lib_save_LIBS
13451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13452 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13453 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13454 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13455 else
13456 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13459 else
13460 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13462 else
13463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13464 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13465 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13466 $as_echo_n "(cached) " >&6
13467 else
13468 ac_check_lib_save_LIBS=$LIBS
13469 LIBS="-lwldap32 $LIBS"
13470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13471 /* end confdefs.h. */
13473 /* Override any GCC internal prototype to avoid an error.
13474 Use char because int might match the return type of a GCC
13475 builtin and then its argument prototype would still apply. */
13476 #ifdef __cplusplus
13477 extern "C"
13478 #endif
13479 char ldap_bind ();
13481 main ()
13483 return ldap_bind ();
13485 return 0;
13487 _ACEOF
13488 if ac_fn_c_try_link "$LINENO"; then :
13489 ac_cv_lib_wldap32_ldap_bind=yes
13490 else
13491 ac_cv_lib_wldap32_ldap_bind=no
13493 rm -f core conftest.err conftest.$ac_objext \
13494 conftest$ac_exeext conftest.$ac_ext
13495 LIBS=$ac_check_lib_save_LIBS
13497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13498 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13499 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13500 cat >>confdefs.h <<_ACEOF
13501 #define HAVE_LIBWLDAP32 1
13502 _ACEOF
13504 LIBS="-lwldap32 $LIBS"
13506 else
13507 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13510 LDAP_LIBS_FE="-lwldap32"
13511 LDAP_LIBS_BE="-lwldap32"
13513 LIBS="$_LIBS"
13518 # for contrib/sepgsql
13519 if test "$with_selinux" = yes; then
13520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13521 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13522 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13523 $as_echo_n "(cached) " >&6
13524 else
13525 ac_check_lib_save_LIBS=$LIBS
13526 LIBS="-lselinux $LIBS"
13527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13528 /* end confdefs.h. */
13530 /* Override any GCC internal prototype to avoid an error.
13531 Use char because int might match the return type of a GCC
13532 builtin and then its argument prototype would still apply. */
13533 #ifdef __cplusplus
13534 extern "C"
13535 #endif
13536 char security_compute_create_name ();
13538 main ()
13540 return security_compute_create_name ();
13542 return 0;
13544 _ACEOF
13545 if ac_fn_c_try_link "$LINENO"; then :
13546 ac_cv_lib_selinux_security_compute_create_name=yes
13547 else
13548 ac_cv_lib_selinux_security_compute_create_name=no
13550 rm -f core conftest.err conftest.$ac_objext \
13551 conftest$ac_exeext conftest.$ac_ext
13552 LIBS=$ac_check_lib_save_LIBS
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13555 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13556 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13557 cat >>confdefs.h <<_ACEOF
13558 #define HAVE_LIBSELINUX 1
13559 _ACEOF
13561 LIBS="-lselinux $LIBS"
13563 else
13564 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13569 # for contrib/uuid-ossp
13570 if test "$with_uuid" = bsd ; then
13571 # On BSD, the UUID functions are in libc
13572 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13573 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13574 UUID_LIBS=""
13575 else
13576 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13579 elif test "$with_uuid" = e2fs ; then
13580 # On macOS, the UUID functions are in libc
13581 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13582 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13583 UUID_LIBS=""
13584 else
13585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13586 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13587 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13588 $as_echo_n "(cached) " >&6
13589 else
13590 ac_check_lib_save_LIBS=$LIBS
13591 LIBS="-luuid $LIBS"
13592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13593 /* end confdefs.h. */
13595 /* Override any GCC internal prototype to avoid an error.
13596 Use char because int might match the return type of a GCC
13597 builtin and then its argument prototype would still apply. */
13598 #ifdef __cplusplus
13599 extern "C"
13600 #endif
13601 char uuid_generate ();
13603 main ()
13605 return uuid_generate ();
13607 return 0;
13609 _ACEOF
13610 if ac_fn_c_try_link "$LINENO"; then :
13611 ac_cv_lib_uuid_uuid_generate=yes
13612 else
13613 ac_cv_lib_uuid_uuid_generate=no
13615 rm -f core conftest.err conftest.$ac_objext \
13616 conftest$ac_exeext conftest.$ac_ext
13617 LIBS=$ac_check_lib_save_LIBS
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13620 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13621 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13622 UUID_LIBS="-luuid"
13623 else
13624 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13629 elif test "$with_uuid" = ossp ; then
13630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13631 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13632 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13633 $as_echo_n "(cached) " >&6
13634 else
13635 ac_check_lib_save_LIBS=$LIBS
13636 LIBS="-lossp-uuid $LIBS"
13637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13638 /* end confdefs.h. */
13640 /* Override any GCC internal prototype to avoid an error.
13641 Use char because int might match the return type of a GCC
13642 builtin and then its argument prototype would still apply. */
13643 #ifdef __cplusplus
13644 extern "C"
13645 #endif
13646 char uuid_export ();
13648 main ()
13650 return uuid_export ();
13652 return 0;
13654 _ACEOF
13655 if ac_fn_c_try_link "$LINENO"; then :
13656 ac_cv_lib_ossp_uuid_uuid_export=yes
13657 else
13658 ac_cv_lib_ossp_uuid_uuid_export=no
13660 rm -f core conftest.err conftest.$ac_objext \
13661 conftest$ac_exeext conftest.$ac_ext
13662 LIBS=$ac_check_lib_save_LIBS
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13665 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13666 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13667 UUID_LIBS="-lossp-uuid"
13668 else
13669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13670 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13671 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13672 $as_echo_n "(cached) " >&6
13673 else
13674 ac_check_lib_save_LIBS=$LIBS
13675 LIBS="-luuid $LIBS"
13676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13677 /* end confdefs.h. */
13679 /* Override any GCC internal prototype to avoid an error.
13680 Use char because int might match the return type of a GCC
13681 builtin and then its argument prototype would still apply. */
13682 #ifdef __cplusplus
13683 extern "C"
13684 #endif
13685 char uuid_export ();
13687 main ()
13689 return uuid_export ();
13691 return 0;
13693 _ACEOF
13694 if ac_fn_c_try_link "$LINENO"; then :
13695 ac_cv_lib_uuid_uuid_export=yes
13696 else
13697 ac_cv_lib_uuid_uuid_export=no
13699 rm -f core conftest.err conftest.$ac_objext \
13700 conftest$ac_exeext conftest.$ac_ext
13701 LIBS=$ac_check_lib_save_LIBS
13703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13704 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13705 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13706 UUID_LIBS="-luuid"
13707 else
13708 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13718 ## Header files
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13722 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13723 if ${ac_cv_header_stdbool_h+:} false; then :
13724 $as_echo_n "(cached) " >&6
13725 else
13726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13727 /* end confdefs.h. */
13729 #include <stdbool.h>
13730 #ifndef bool
13731 "error: bool is not defined"
13732 #endif
13733 #ifndef false
13734 "error: false is not defined"
13735 #endif
13736 #if false
13737 "error: false is not 0"
13738 #endif
13739 #ifndef true
13740 "error: true is not defined"
13741 #endif
13742 #if true != 1
13743 "error: true is not 1"
13744 #endif
13745 #ifndef __bool_true_false_are_defined
13746 "error: __bool_true_false_are_defined is not defined"
13747 #endif
13749 struct s { _Bool s: 1; _Bool t; } s;
13751 char a[true == 1 ? 1 : -1];
13752 char b[false == 0 ? 1 : -1];
13753 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13754 char d[(bool) 0.5 == true ? 1 : -1];
13755 /* See body of main program for 'e'. */
13756 char f[(_Bool) 0.0 == false ? 1 : -1];
13757 char g[true];
13758 char h[sizeof (_Bool)];
13759 char i[sizeof s.t];
13760 enum { j = false, k = true, l = false * true, m = true * 256 };
13761 /* The following fails for
13762 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13763 _Bool n[m];
13764 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13765 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13766 /* Catch a bug in an HP-UX C compiler. See
13767 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13768 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13770 _Bool q = true;
13771 _Bool *pq = &q;
13774 main ()
13777 bool e = &s;
13778 *pq |= q;
13779 *pq |= ! q;
13780 /* Refer to every declared value, to avoid compiler optimizations. */
13781 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13782 + !m + !n + !o + !p + !q + !pq);
13785 return 0;
13787 _ACEOF
13788 if ac_fn_c_try_compile "$LINENO"; then :
13789 ac_cv_header_stdbool_h=yes
13790 else
13791 ac_cv_header_stdbool_h=no
13793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13796 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13797 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13798 if test "x$ac_cv_type__Bool" = xyes; then :
13800 cat >>confdefs.h <<_ACEOF
13801 #define HAVE__BOOL 1
13802 _ACEOF
13808 if test $ac_cv_header_stdbool_h = yes; then
13810 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13815 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
13816 do :
13817 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13818 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13819 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13820 cat >>confdefs.h <<_ACEOF
13821 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13822 _ACEOF
13826 done
13829 # On BSD, test for net/if.h will fail unless sys/socket.h
13830 # is included first.
13831 for ac_header in net/if.h
13832 do :
13833 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
13834 #include <sys/socket.h>
13837 if test "x$ac_cv_header_net_if_h" = xyes; then :
13838 cat >>confdefs.h <<_ACEOF
13839 #define HAVE_NET_IF_H 1
13840 _ACEOF
13844 done
13847 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
13848 # is included first.
13849 for ac_header in sys/ucred.h
13850 do :
13851 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13852 #include <sys/param.h>
13855 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13856 cat >>confdefs.h <<_ACEOF
13857 #define HAVE_SYS_UCRED_H 1
13858 _ACEOF
13862 done
13865 # At least on IRIX, test for netinet/tcp.h will fail unless
13866 # netinet/in.h is included first.
13867 for ac_header in netinet/tcp.h
13868 do :
13869 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13870 #include <netinet/in.h>
13873 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13874 cat >>confdefs.h <<_ACEOF
13875 #define HAVE_NETINET_TCP_H 1
13876 _ACEOF
13880 done
13883 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13884 for ac_header in readline/readline.h
13885 do :
13886 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13887 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13888 cat >>confdefs.h <<_ACEOF
13889 #define HAVE_READLINE_READLINE_H 1
13890 _ACEOF
13892 else
13893 for ac_header in readline.h
13894 do :
13895 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13896 if test "x$ac_cv_header_readline_h" = xyes; then :
13897 cat >>confdefs.h <<_ACEOF
13898 #define HAVE_READLINE_H 1
13899 _ACEOF
13901 else
13902 as_fn_error $? "readline header not found
13903 If you have readline already installed, see config.log for details on the
13904 failure. It is possible the compiler isn't looking in the proper directory.
13905 Use --without-readline to disable readline support." "$LINENO" 5
13908 done
13912 done
13914 for ac_header in readline/history.h
13915 do :
13916 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13917 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13918 cat >>confdefs.h <<_ACEOF
13919 #define HAVE_READLINE_HISTORY_H 1
13920 _ACEOF
13922 else
13923 for ac_header in history.h
13924 do :
13925 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13926 if test "x$ac_cv_header_history_h" = xyes; then :
13927 cat >>confdefs.h <<_ACEOF
13928 #define HAVE_HISTORY_H 1
13929 _ACEOF
13931 else
13932 as_fn_error $? "history header not found
13933 If you have readline already installed, see config.log for details on the
13934 failure. It is possible the compiler isn't looking in the proper directory.
13935 Use --without-readline to disable readline support." "$LINENO" 5
13938 done
13942 done
13946 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13947 # Some installations of libedit usurp /usr/include/readline/, which seems
13948 # bad practice, since in combined installations readline will have its headers
13949 # there. We might have to resort to AC_EGREP checks to make sure we found
13950 # the proper header...
13951 for ac_header in editline/readline.h
13952 do :
13953 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13954 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13955 cat >>confdefs.h <<_ACEOF
13956 #define HAVE_EDITLINE_READLINE_H 1
13957 _ACEOF
13959 else
13960 for ac_header in readline.h
13961 do :
13962 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13963 if test "x$ac_cv_header_readline_h" = xyes; then :
13964 cat >>confdefs.h <<_ACEOF
13965 #define HAVE_READLINE_H 1
13966 _ACEOF
13968 else
13969 for ac_header in readline/readline.h
13970 do :
13971 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13972 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13973 cat >>confdefs.h <<_ACEOF
13974 #define HAVE_READLINE_READLINE_H 1
13975 _ACEOF
13977 else
13978 as_fn_error $? "readline header not found
13979 If you have libedit already installed, see config.log for details on the
13980 failure. It is possible the compiler isn't looking in the proper directory.
13981 Use --without-readline to disable libedit support." "$LINENO" 5
13984 done
13988 done
13992 done
13994 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13995 # not be there at all. Hence, don't complain if not found. We must check
13996 # though, since in yet other versions it is an independent header.
13997 for ac_header in editline/history.h
13998 do :
13999 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
14000 if test "x$ac_cv_header_editline_history_h" = xyes; then :
14001 cat >>confdefs.h <<_ACEOF
14002 #define HAVE_EDITLINE_HISTORY_H 1
14003 _ACEOF
14005 else
14006 for ac_header in history.h
14007 do :
14008 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
14009 if test "x$ac_cv_header_history_h" = xyes; then :
14010 cat >>confdefs.h <<_ACEOF
14011 #define HAVE_HISTORY_H 1
14012 _ACEOF
14014 else
14015 for ac_header in readline/history.h
14016 do :
14017 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
14018 if test "x$ac_cv_header_readline_history_h" = xyes; then :
14019 cat >>confdefs.h <<_ACEOF
14020 #define HAVE_READLINE_HISTORY_H 1
14021 _ACEOF
14025 done
14029 done
14033 done
14037 if test "$with_zlib" = yes; then
14038 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
14039 if test "x$ac_cv_header_zlib_h" = xyes; then :
14041 else
14042 as_fn_error $? "zlib header not found
14043 If you have zlib already installed, see config.log for details on the
14044 failure. It is possible the compiler isn't looking in the proper directory.
14045 Use --without-zlib to disable zlib support." "$LINENO" 5
14051 if test -z "$LZ4"; then
14052 for ac_prog in lz4
14054 # Extract the first word of "$ac_prog", so it can be a program name with args.
14055 set dummy $ac_prog; ac_word=$2
14056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14057 $as_echo_n "checking for $ac_word... " >&6; }
14058 if ${ac_cv_path_LZ4+:} false; then :
14059 $as_echo_n "(cached) " >&6
14060 else
14061 case $LZ4 in
14062 [\\/]* | ?:[\\/]*)
14063 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
14066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14067 for as_dir in $PATH
14069 IFS=$as_save_IFS
14070 test -z "$as_dir" && as_dir=.
14071 for ac_exec_ext in '' $ac_executable_extensions; do
14072 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14073 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
14074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14075 break 2
14077 done
14078 done
14079 IFS=$as_save_IFS
14082 esac
14084 LZ4=$ac_cv_path_LZ4
14085 if test -n "$LZ4"; then
14086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
14087 $as_echo "$LZ4" >&6; }
14088 else
14089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14090 $as_echo "no" >&6; }
14094 test -n "$LZ4" && break
14095 done
14097 else
14098 # Report the value of LZ4 in configure's output in all cases.
14099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
14100 $as_echo_n "checking for LZ4... " >&6; }
14101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
14102 $as_echo "$LZ4" >&6; }
14105 if test "$with_lz4" = yes; then
14106 for ac_header in lz4.h
14107 do :
14108 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
14109 if test "x$ac_cv_header_lz4_h" = xyes; then :
14110 cat >>confdefs.h <<_ACEOF
14111 #define HAVE_LZ4_H 1
14112 _ACEOF
14114 else
14115 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
14118 done
14122 if test -z "$ZSTD"; then
14123 for ac_prog in zstd
14125 # Extract the first word of "$ac_prog", so it can be a program name with args.
14126 set dummy $ac_prog; ac_word=$2
14127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14128 $as_echo_n "checking for $ac_word... " >&6; }
14129 if ${ac_cv_path_ZSTD+:} false; then :
14130 $as_echo_n "(cached) " >&6
14131 else
14132 case $ZSTD in
14133 [\\/]* | ?:[\\/]*)
14134 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
14137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14138 for as_dir in $PATH
14140 IFS=$as_save_IFS
14141 test -z "$as_dir" && as_dir=.
14142 for ac_exec_ext in '' $ac_executable_extensions; do
14143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14144 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
14145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14146 break 2
14148 done
14149 done
14150 IFS=$as_save_IFS
14153 esac
14155 ZSTD=$ac_cv_path_ZSTD
14156 if test -n "$ZSTD"; then
14157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14158 $as_echo "$ZSTD" >&6; }
14159 else
14160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14161 $as_echo "no" >&6; }
14165 test -n "$ZSTD" && break
14166 done
14168 else
14169 # Report the value of ZSTD in configure's output in all cases.
14170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
14171 $as_echo_n "checking for ZSTD... " >&6; }
14172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14173 $as_echo "$ZSTD" >&6; }
14176 if test "$with_zstd" = yes; then
14177 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
14178 if test "x$ac_cv_header_zstd_h" = xyes; then :
14180 else
14181 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
14187 if test "$with_gssapi" = yes ; then
14188 for ac_header in gssapi/gssapi.h
14189 do :
14190 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
14191 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
14192 cat >>confdefs.h <<_ACEOF
14193 #define HAVE_GSSAPI_GSSAPI_H 1
14194 _ACEOF
14196 else
14197 for ac_header in gssapi.h
14198 do :
14199 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
14200 if test "x$ac_cv_header_gssapi_h" = xyes; then :
14201 cat >>confdefs.h <<_ACEOF
14202 #define HAVE_GSSAPI_H 1
14203 _ACEOF
14205 else
14206 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
14209 done
14213 done
14217 if test "$with_ssl" = openssl ; then
14218 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
14219 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
14221 else
14222 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
14226 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
14227 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
14229 else
14230 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
14236 if test "$with_pam" = yes ; then
14237 for ac_header in security/pam_appl.h
14238 do :
14239 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
14240 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
14241 cat >>confdefs.h <<_ACEOF
14242 #define HAVE_SECURITY_PAM_APPL_H 1
14243 _ACEOF
14245 else
14246 for ac_header in pam/pam_appl.h
14247 do :
14248 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
14249 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
14250 cat >>confdefs.h <<_ACEOF
14251 #define HAVE_PAM_PAM_APPL_H 1
14252 _ACEOF
14254 else
14255 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
14258 done
14262 done
14266 if test "$with_bsd_auth" = yes ; then
14267 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
14268 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
14270 else
14271 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
14277 if test "$with_systemd" = yes ; then
14278 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
14279 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
14281 else
14282 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
14288 if test "$with_libxml" = yes ; then
14289 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
14290 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
14292 else
14293 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
14299 if test "$with_libxslt" = yes ; then
14300 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
14301 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
14303 else
14304 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
14310 if test "$with_ldap" = yes ; then
14311 if test "$PORTNAME" != "win32"; then
14312 for ac_header in ldap.h
14313 do :
14314 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
14315 if test "x$ac_cv_header_ldap_h" = xyes; then :
14316 cat >>confdefs.h <<_ACEOF
14317 #define HAVE_LDAP_H 1
14318 _ACEOF
14320 else
14321 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
14324 done
14326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
14327 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14328 if ${pgac_cv_ldap_safe+:} false; then :
14329 $as_echo_n "(cached) " >&6
14330 else
14331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14332 /* end confdefs.h. */
14333 #include <ldap.h>
14334 #if !defined(LDAP_VENDOR_VERSION) || \
14335 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14336 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14337 choke me
14338 #endif
14340 main ()
14344 return 0;
14346 _ACEOF
14347 if ac_fn_c_try_compile "$LINENO"; then :
14348 pgac_cv_ldap_safe=yes
14349 else
14350 pgac_cv_ldap_safe=no
14352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14355 $as_echo "$pgac_cv_ldap_safe" >&6; }
14357 if test "$pgac_cv_ldap_safe" != yes; then
14358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14359 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14360 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14361 *** also uses LDAP will crash on exit." >&5
14362 $as_echo "$as_me: WARNING:
14363 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14364 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14365 *** also uses LDAP will crash on exit." >&2;}
14367 else
14368 for ac_header in winldap.h
14369 do :
14370 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14371 #include <windows.h>
14374 if test "x$ac_cv_header_winldap_h" = xyes; then :
14375 cat >>confdefs.h <<_ACEOF
14376 #define HAVE_WINLDAP_H 1
14377 _ACEOF
14379 else
14380 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14383 done
14388 if test "$with_bonjour" = yes ; then
14389 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14390 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14392 else
14393 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14399 # for contrib/uuid-ossp
14400 if test "$with_uuid" = bsd ; then
14401 for ac_header in uuid.h
14402 do :
14403 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14404 if test "x$ac_cv_header_uuid_h" = xyes; then :
14405 cat >>confdefs.h <<_ACEOF
14406 #define HAVE_UUID_H 1
14407 _ACEOF
14408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14409 /* end confdefs.h. */
14410 #include <uuid.h>
14412 _ACEOF
14413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14414 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
14416 else
14417 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14419 rm -f conftest*
14421 else
14422 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14425 done
14427 elif test "$with_uuid" = e2fs ; then
14428 for ac_header in uuid/uuid.h
14429 do :
14430 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14431 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14432 cat >>confdefs.h <<_ACEOF
14433 #define HAVE_UUID_UUID_H 1
14434 _ACEOF
14435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14436 /* end confdefs.h. */
14437 #include <uuid/uuid.h>
14439 _ACEOF
14440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14441 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14443 else
14444 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14446 rm -f conftest*
14448 else
14449 for ac_header in uuid.h
14450 do :
14451 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14452 if test "x$ac_cv_header_uuid_h" = xyes; then :
14453 cat >>confdefs.h <<_ACEOF
14454 #define HAVE_UUID_H 1
14455 _ACEOF
14456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14457 /* end confdefs.h. */
14458 #include <uuid.h>
14460 _ACEOF
14461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14462 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14464 else
14465 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14467 rm -f conftest*
14469 else
14470 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14473 done
14477 done
14479 elif test "$with_uuid" = ossp ; then
14480 for ac_header in ossp/uuid.h
14481 do :
14482 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14483 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14484 cat >>confdefs.h <<_ACEOF
14485 #define HAVE_OSSP_UUID_H 1
14486 _ACEOF
14487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14488 /* end confdefs.h. */
14489 #include <ossp/uuid.h>
14491 _ACEOF
14492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14493 $EGREP "uuid_export" >/dev/null 2>&1; then :
14495 else
14496 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14498 rm -f conftest*
14500 else
14501 for ac_header in uuid.h
14502 do :
14503 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14504 if test "x$ac_cv_header_uuid_h" = xyes; then :
14505 cat >>confdefs.h <<_ACEOF
14506 #define HAVE_UUID_H 1
14507 _ACEOF
14508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14509 /* end confdefs.h. */
14510 #include <uuid.h>
14512 _ACEOF
14513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14514 $EGREP "uuid_export" >/dev/null 2>&1; then :
14516 else
14517 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14519 rm -f conftest*
14521 else
14522 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14525 done
14529 done
14533 if test "$PORTNAME" = "win32" ; then
14534 for ac_header in crtdefs.h
14535 do :
14536 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14537 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14538 cat >>confdefs.h <<_ACEOF
14539 #define HAVE_CRTDEFS_H 1
14540 _ACEOF
14544 done
14549 ## Types, structures, compiler characteristics
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14553 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14554 if ${ac_cv_c_bigendian+:} false; then :
14555 $as_echo_n "(cached) " >&6
14556 else
14557 ac_cv_c_bigendian=unknown
14558 # See if we're dealing with a universal compiler.
14559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14560 /* end confdefs.h. */
14561 #ifndef __APPLE_CC__
14562 not a universal capable compiler
14563 #endif
14564 typedef int dummy;
14566 _ACEOF
14567 if ac_fn_c_try_compile "$LINENO"; then :
14569 # Check for potential -arch flags. It is not universal unless
14570 # there are at least two -arch flags with different values.
14571 ac_arch=
14572 ac_prev=
14573 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14574 if test -n "$ac_prev"; then
14575 case $ac_word in
14576 i?86 | x86_64 | ppc | ppc64)
14577 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14578 ac_arch=$ac_word
14579 else
14580 ac_cv_c_bigendian=universal
14581 break
14584 esac
14585 ac_prev=
14586 elif test "x$ac_word" = "x-arch"; then
14587 ac_prev=arch
14589 done
14591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14592 if test $ac_cv_c_bigendian = unknown; then
14593 # See if sys/param.h defines the BYTE_ORDER macro.
14594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14595 /* end confdefs.h. */
14596 #include <sys/types.h>
14597 #include <sys/param.h>
14600 main ()
14602 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14603 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14604 && LITTLE_ENDIAN)
14605 bogus endian macros
14606 #endif
14609 return 0;
14611 _ACEOF
14612 if ac_fn_c_try_compile "$LINENO"; then :
14613 # It does; now see whether it defined to BIG_ENDIAN or not.
14614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14615 /* end confdefs.h. */
14616 #include <sys/types.h>
14617 #include <sys/param.h>
14620 main ()
14622 #if BYTE_ORDER != BIG_ENDIAN
14623 not big endian
14624 #endif
14627 return 0;
14629 _ACEOF
14630 if ac_fn_c_try_compile "$LINENO"; then :
14631 ac_cv_c_bigendian=yes
14632 else
14633 ac_cv_c_bigendian=no
14635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14639 if test $ac_cv_c_bigendian = unknown; then
14640 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14642 /* end confdefs.h. */
14643 #include <limits.h>
14646 main ()
14648 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14649 bogus endian macros
14650 #endif
14653 return 0;
14655 _ACEOF
14656 if ac_fn_c_try_compile "$LINENO"; then :
14657 # It does; now see whether it defined to _BIG_ENDIAN or not.
14658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14659 /* end confdefs.h. */
14660 #include <limits.h>
14663 main ()
14665 #ifndef _BIG_ENDIAN
14666 not big endian
14667 #endif
14670 return 0;
14672 _ACEOF
14673 if ac_fn_c_try_compile "$LINENO"; then :
14674 ac_cv_c_bigendian=yes
14675 else
14676 ac_cv_c_bigendian=no
14678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14682 if test $ac_cv_c_bigendian = unknown; then
14683 # Compile a test program.
14684 if test "$cross_compiling" = yes; then :
14685 # Try to guess by grepping values from an object file.
14686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14687 /* end confdefs.h. */
14688 short int ascii_mm[] =
14689 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14690 short int ascii_ii[] =
14691 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14692 int use_ascii (int i) {
14693 return ascii_mm[i] + ascii_ii[i];
14695 short int ebcdic_ii[] =
14696 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14697 short int ebcdic_mm[] =
14698 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14699 int use_ebcdic (int i) {
14700 return ebcdic_mm[i] + ebcdic_ii[i];
14702 extern int foo;
14705 main ()
14707 return use_ascii (foo) == use_ebcdic (foo);
14709 return 0;
14711 _ACEOF
14712 if ac_fn_c_try_compile "$LINENO"; then :
14713 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14714 ac_cv_c_bigendian=yes
14716 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14717 if test "$ac_cv_c_bigendian" = unknown; then
14718 ac_cv_c_bigendian=no
14719 else
14720 # finding both strings is unlikely to happen, but who knows?
14721 ac_cv_c_bigendian=unknown
14725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14726 else
14727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14728 /* end confdefs.h. */
14729 $ac_includes_default
14731 main ()
14734 /* Are we little or big endian? From Harbison&Steele. */
14735 union
14737 long int l;
14738 char c[sizeof (long int)];
14739 } u;
14740 u.l = 1;
14741 return u.c[sizeof (long int) - 1] == 1;
14744 return 0;
14746 _ACEOF
14747 if ac_fn_c_try_run "$LINENO"; then :
14748 ac_cv_c_bigendian=no
14749 else
14750 ac_cv_c_bigendian=yes
14752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14753 conftest.$ac_objext conftest.beam conftest.$ac_ext
14758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14759 $as_echo "$ac_cv_c_bigendian" >&6; }
14760 case $ac_cv_c_bigendian in #(
14761 yes)
14762 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14763 ;; #(
14765 ;; #(
14766 universal)
14768 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14770 ;; #(
14772 as_fn_error $? "unknown endianness
14773 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14774 esac
14776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14777 $as_echo_n "checking for inline... " >&6; }
14778 if ${ac_cv_c_inline+:} false; then :
14779 $as_echo_n "(cached) " >&6
14780 else
14781 ac_cv_c_inline=no
14782 for ac_kw in inline __inline__ __inline; do
14783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14784 /* end confdefs.h. */
14785 #ifndef __cplusplus
14786 typedef int foo_t;
14787 static $ac_kw foo_t static_foo () {return 0; }
14788 $ac_kw foo_t foo () {return 0; }
14789 #endif
14791 _ACEOF
14792 if ac_fn_c_try_compile "$LINENO"; then :
14793 ac_cv_c_inline=$ac_kw
14795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14796 test "$ac_cv_c_inline" != no && break
14797 done
14800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14801 $as_echo "$ac_cv_c_inline" >&6; }
14803 case $ac_cv_c_inline in
14804 inline | yes) ;;
14806 case $ac_cv_c_inline in
14807 no) ac_val=;;
14808 *) ac_val=$ac_cv_c_inline;;
14809 esac
14810 cat >>confdefs.h <<_ACEOF
14811 #ifndef __cplusplus
14812 #define inline $ac_val
14813 #endif
14814 _ACEOF
14816 esac
14818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14819 $as_echo_n "checking for printf format archetype... " >&6; }
14820 if ${pgac_cv_printf_archetype+:} false; then :
14821 $as_echo_n "(cached) " >&6
14822 else
14823 pgac_cv_printf_archetype=gnu_printf
14824 ac_save_c_werror_flag=$ac_c_werror_flag
14825 ac_c_werror_flag=yes
14826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14827 /* end confdefs.h. */
14828 extern void pgac_write(int ignore, const char *fmt,...)
14829 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14831 main ()
14833 pgac_write(0, "error %s: %m", "foo");
14835 return 0;
14837 _ACEOF
14838 if ac_fn_c_try_compile "$LINENO"; then :
14839 ac_archetype_ok=yes
14840 else
14841 ac_archetype_ok=no
14843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14844 ac_c_werror_flag=$ac_save_c_werror_flag
14846 if [ "$ac_archetype_ok" = no ]; then
14847 pgac_cv_printf_archetype=__syslog__
14848 ac_save_c_werror_flag=$ac_c_werror_flag
14849 ac_c_werror_flag=yes
14850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14851 /* end confdefs.h. */
14852 extern void pgac_write(int ignore, const char *fmt,...)
14853 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14855 main ()
14857 pgac_write(0, "error %s: %m", "foo");
14859 return 0;
14861 _ACEOF
14862 if ac_fn_c_try_compile "$LINENO"; then :
14863 ac_archetype_ok=yes
14864 else
14865 ac_archetype_ok=no
14867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14868 ac_c_werror_flag=$ac_save_c_werror_flag
14870 if [ "$ac_archetype_ok" = no ]; then
14871 pgac_cv_printf_archetype=printf
14875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14876 $as_echo "$pgac_cv_printf_archetype" >&6; }
14878 cat >>confdefs.h <<_ACEOF
14879 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14880 _ACEOF
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
14884 $as_echo_n "checking for __func__... " >&6; }
14885 if ${pgac_cv_funcname_func_support+:} false; then :
14886 $as_echo_n "(cached) " >&6
14887 else
14888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14889 /* end confdefs.h. */
14890 #include <stdio.h>
14892 main ()
14894 printf("%s\n", __func__);
14896 return 0;
14898 _ACEOF
14899 if ac_fn_c_try_compile "$LINENO"; then :
14900 pgac_cv_funcname_func_support=yes
14901 else
14902 pgac_cv_funcname_func_support=no
14904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
14907 $as_echo "$pgac_cv_funcname_func_support" >&6; }
14908 if test x"$pgac_cv_funcname_func_support" = xyes ; then
14910 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
14912 else
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
14914 $as_echo_n "checking for __FUNCTION__... " >&6; }
14915 if ${pgac_cv_funcname_function_support+:} false; then :
14916 $as_echo_n "(cached) " >&6
14917 else
14918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14919 /* end confdefs.h. */
14920 #include <stdio.h>
14922 main ()
14924 printf("%s\n", __FUNCTION__);
14926 return 0;
14928 _ACEOF
14929 if ac_fn_c_try_compile "$LINENO"; then :
14930 pgac_cv_funcname_function_support=yes
14931 else
14932 pgac_cv_funcname_function_support=no
14934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
14937 $as_echo "$pgac_cv_funcname_function_support" >&6; }
14938 if test x"$pgac_cv_funcname_function_support" = xyes ; then
14940 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
14944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14945 $as_echo_n "checking for _Static_assert... " >&6; }
14946 if ${pgac_cv__static_assert+:} false; then :
14947 $as_echo_n "(cached) " >&6
14948 else
14949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14950 /* end confdefs.h. */
14953 main ()
14955 ({ _Static_assert(1, "foo"); })
14957 return 0;
14959 _ACEOF
14960 if ac_fn_c_try_link "$LINENO"; then :
14961 pgac_cv__static_assert=yes
14962 else
14963 pgac_cv__static_assert=no
14965 rm -f core conftest.err conftest.$ac_objext \
14966 conftest$ac_exeext conftest.$ac_ext
14968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14969 $as_echo "$pgac_cv__static_assert" >&6; }
14970 if test x"$pgac_cv__static_assert" = xyes ; then
14972 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14976 $as_echo_n "checking for typeof... " >&6; }
14977 if ${pgac_cv_c_typeof+:} false; then :
14978 $as_echo_n "(cached) " >&6
14979 else
14980 pgac_cv_c_typeof=no
14981 for pgac_kw in typeof __typeof__ decltype; do
14982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14983 /* end confdefs.h. */
14986 main ()
14988 int x = 0;
14989 $pgac_kw(x) y;
14990 y = x;
14991 return y;
14993 return 0;
14995 _ACEOF
14996 if ac_fn_c_try_compile "$LINENO"; then :
14997 pgac_cv_c_typeof=$pgac_kw
14999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15000 test "$pgac_cv_c_typeof" != no && break
15001 done
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
15004 $as_echo "$pgac_cv_c_typeof" >&6; }
15005 if test "$pgac_cv_c_typeof" != no; then
15007 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
15009 if test "$pgac_cv_c_typeof" != typeof; then
15011 cat >>confdefs.h <<_ACEOF
15012 #define typeof $pgac_cv_c_typeof
15013 _ACEOF
15017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
15018 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
15019 if ${pgac_cv__types_compatible+:} false; then :
15020 $as_echo_n "(cached) " >&6
15021 else
15022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15023 /* end confdefs.h. */
15026 main ()
15028 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
15030 return 0;
15032 _ACEOF
15033 if ac_fn_c_try_compile "$LINENO"; then :
15034 pgac_cv__types_compatible=yes
15035 else
15036 pgac_cv__types_compatible=no
15038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
15041 $as_echo "$pgac_cv__types_compatible" >&6; }
15042 if test x"$pgac_cv__types_compatible" = xyes ; then
15044 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
15048 $as_echo_n "checking for __builtin_constant_p... " >&6; }
15049 if ${pgac_cv__builtin_constant_p+:} false; then :
15050 $as_echo_n "(cached) " >&6
15051 else
15052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15053 /* end confdefs.h. */
15054 static int x;
15055 static int y[__builtin_constant_p(x) ? x : 1];
15056 static int z[__builtin_constant_p("string literal") ? 1 : x];
15059 _ACEOF
15060 if ac_fn_c_try_compile "$LINENO"; then :
15061 pgac_cv__builtin_constant_p=yes
15062 else
15063 pgac_cv__builtin_constant_p=no
15065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
15068 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
15069 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
15071 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
15074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
15075 $as_echo_n "checking for __builtin_unreachable... " >&6; }
15076 if ${pgac_cv__builtin_unreachable+:} false; then :
15077 $as_echo_n "(cached) " >&6
15078 else
15079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15080 /* end confdefs.h. */
15083 main ()
15085 __builtin_unreachable();
15087 return 0;
15089 _ACEOF
15090 if ac_fn_c_try_link "$LINENO"; then :
15091 pgac_cv__builtin_unreachable=yes
15092 else
15093 pgac_cv__builtin_unreachable=no
15095 rm -f core conftest.err conftest.$ac_objext \
15096 conftest$ac_exeext conftest.$ac_ext
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
15099 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
15100 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
15102 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
15105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
15106 $as_echo_n "checking for computed goto support... " >&6; }
15107 if ${pgac_cv_computed_goto+:} false; then :
15108 $as_echo_n "(cached) " >&6
15109 else
15110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15111 /* end confdefs.h. */
15114 main ()
15116 void *labeladdrs[] = {&&my_label};
15117 goto *labeladdrs[0];
15118 my_label:
15119 return 1;
15122 return 0;
15124 _ACEOF
15125 if ac_fn_c_try_compile "$LINENO"; then :
15126 pgac_cv_computed_goto=yes
15127 else
15128 pgac_cv_computed_goto=no
15130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
15133 $as_echo "$pgac_cv_computed_goto" >&6; }
15134 if test x"$pgac_cv_computed_goto" = xyes ; then
15136 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
15139 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
15140 #include <time.h>
15143 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
15145 cat >>confdefs.h <<_ACEOF
15146 #define HAVE_STRUCT_TM_TM_ZONE 1
15147 _ACEOF
15153 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
15154 #ifdef HAVE_SYS_IPC_H
15155 #include <sys/ipc.h>
15156 #endif
15157 #ifdef HAVE_SYS_SEM_H
15158 #include <sys/sem.h>
15159 #endif
15161 if test "x$ac_cv_type_union_semun" = xyes; then :
15163 cat >>confdefs.h <<_ACEOF
15164 #define HAVE_UNION_SEMUN 1
15165 _ACEOF
15170 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
15172 if test "x$ac_cv_type_socklen_t" = xyes; then :
15174 cat >>confdefs.h <<_ACEOF
15175 #define HAVE_SOCKLEN_T 1
15176 _ACEOF
15181 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
15182 #ifdef HAVE_SYS_UN_H
15183 #include <sys/un.h>
15184 #endif
15187 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
15189 cat >>confdefs.h <<_ACEOF
15190 #define HAVE_STRUCT_SOCKADDR_UN 1
15191 _ACEOF
15196 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
15197 #include <sys/socket.h>
15200 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
15202 cat >>confdefs.h <<_ACEOF
15203 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
15204 _ACEOF
15209 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
15210 #include <sys/socket.h>
15213 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
15215 cat >>confdefs.h <<_ACEOF
15216 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
15217 _ACEOF
15221 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
15222 #include <sys/socket.h>
15225 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
15227 cat >>confdefs.h <<_ACEOF
15228 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
15229 _ACEOF
15233 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
15234 #include <sys/socket.h>
15237 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
15239 cat >>confdefs.h <<_ACEOF
15240 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
15241 _ACEOF
15245 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
15246 #include <sys/socket.h>
15249 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
15251 cat >>confdefs.h <<_ACEOF
15252 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
15253 _ACEOF
15257 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
15258 #include <sys/socket.h>
15261 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
15263 cat >>confdefs.h <<_ACEOF
15264 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
15265 _ACEOF
15270 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
15271 #include <sys/socket.h>
15272 #include <netdb.h>
15275 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
15277 cat >>confdefs.h <<_ACEOF
15278 #define HAVE_STRUCT_ADDRINFO 1
15279 _ACEOF
15285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
15286 $as_echo_n "checking for locale_t... " >&6; }
15287 if ${pgac_cv_type_locale_t+:} false; then :
15288 $as_echo_n "(cached) " >&6
15289 else
15290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15291 /* end confdefs.h. */
15292 #include <locale.h>
15293 locale_t x;
15295 main ()
15299 return 0;
15301 _ACEOF
15302 if ac_fn_c_try_compile "$LINENO"; then :
15303 pgac_cv_type_locale_t=yes
15304 else
15305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15306 /* end confdefs.h. */
15307 #include <xlocale.h>
15308 locale_t x;
15310 main ()
15314 return 0;
15316 _ACEOF
15317 if ac_fn_c_try_compile "$LINENO"; then :
15318 pgac_cv_type_locale_t='yes (in xlocale.h)'
15319 else
15320 pgac_cv_type_locale_t=no
15322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
15327 $as_echo "$pgac_cv_type_locale_t" >&6; }
15328 if test "$pgac_cv_type_locale_t" != no; then
15330 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
15333 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
15335 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
15339 # MSVC doesn't cope well with defining restrict to __restrict, the
15340 # spelling it understands, because it conflicts with
15341 # __declspec(restrict). Therefore we define pg_restrict to the
15342 # appropriate definition, which presumably won't conflict.
15344 # Allow platforms with buggy compilers to force restrict to not be
15345 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
15346 # template.
15347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15348 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15349 if ${ac_cv_c_restrict+:} false; then :
15350 $as_echo_n "(cached) " >&6
15351 else
15352 ac_cv_c_restrict=no
15353 # The order here caters to the fact that C++ does not require restrict.
15354 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15356 /* end confdefs.h. */
15357 typedef int * int_ptr;
15358 int foo (int_ptr $ac_kw ip) {
15359 return ip[0];
15362 main ()
15364 int s[1];
15365 int * $ac_kw t = s;
15366 t[0] = 0;
15367 return foo(t)
15369 return 0;
15371 _ACEOF
15372 if ac_fn_c_try_compile "$LINENO"; then :
15373 ac_cv_c_restrict=$ac_kw
15375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15376 test "$ac_cv_c_restrict" != no && break
15377 done
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15381 $as_echo "$ac_cv_c_restrict" >&6; }
15383 case $ac_cv_c_restrict in
15384 restrict) ;;
15385 no) $as_echo "#define restrict /**/" >>confdefs.h
15387 *) cat >>confdefs.h <<_ACEOF
15388 #define restrict $ac_cv_c_restrict
15389 _ACEOF
15391 esac
15393 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15394 pg_restrict=""
15395 else
15396 pg_restrict="$ac_cv_c_restrict"
15399 cat >>confdefs.h <<_ACEOF
15400 #define pg_restrict $pg_restrict
15401 _ACEOF
15404 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
15405 #include <sys/param.h>
15406 #ifdef HAVE_SYS_UCRED_H
15407 #include <sys/ucred.h>
15408 #endif
15410 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
15412 cat >>confdefs.h <<_ACEOF
15413 #define HAVE_STRUCT_CMSGCRED 1
15414 _ACEOF
15420 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15421 #include <getopt.h>
15422 #endif
15424 if test "x$ac_cv_type_struct_option" = xyes; then :
15426 cat >>confdefs.h <<_ACEOF
15427 #define HAVE_STRUCT_OPTION 1
15428 _ACEOF
15434 if test "$with_zlib" = yes; then
15435 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
15436 # did not). While we could work around the lack of z_streamp, it
15437 # seems unwise to encourage people to use such old zlib versions...
15438 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
15440 if test "x$ac_cv_type_z_streamp" = xyes; then :
15442 else
15443 as_fn_error $? "zlib version is too old
15444 Use --without-zlib to disable zlib support." "$LINENO" 5
15449 case $host_cpu in
15450 x86_64)
15451 # On x86_64, check if we can compile a popcntq instruction
15452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15453 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15454 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15455 $as_echo_n "(cached) " >&6
15456 else
15457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15458 /* end confdefs.h. */
15461 main ()
15463 long long x = 1; long long r;
15464 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15466 return 0;
15468 _ACEOF
15469 if ac_fn_c_try_compile "$LINENO"; then :
15470 pgac_cv_have_x86_64_popcntq=yes
15471 else
15472 pgac_cv_have_x86_64_popcntq=no
15474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15477 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15478 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15480 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15484 ppc*|powerpc*)
15485 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
15486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
15487 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
15488 if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
15489 $as_echo_n "(cached) " >&6
15490 else
15491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15492 /* end confdefs.h. */
15495 main ()
15497 int a = 0; int *p = &a; int r;
15498 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
15500 return 0;
15502 _ACEOF
15503 if ac_fn_c_try_compile "$LINENO"; then :
15504 pgac_cv_have_ppc_mutex_hint=yes
15505 else
15506 pgac_cv_have_ppc_mutex_hint=no
15508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
15511 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
15512 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
15514 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
15517 # Check if compiler accepts "i"(x) when __builtin_constant_p(x).
15518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15519 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15520 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15521 $as_echo_n "(cached) " >&6
15522 else
15523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15524 /* end confdefs.h. */
15525 static inline int
15526 addi(int ra, int si)
15528 int res = 0;
15529 if (__builtin_constant_p(si))
15530 __asm__ __volatile__(
15531 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15532 return res;
15534 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15536 main ()
15540 return 0;
15542 _ACEOF
15543 if ac_fn_c_try_compile "$LINENO"; then :
15544 pgac_cv_have_i_constraint__builtin_constant_p=yes
15545 else
15546 pgac_cv_have_i_constraint__builtin_constant_p=no
15548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15551 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15552 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15554 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15558 esac
15560 # Check largefile support. You might think this is a system service not a
15561 # compiler characteristic, but you'd be wrong. We must check this before
15562 # probing existence of related functions such as fseeko, since the largefile
15563 # defines can affect what is generated for that.
15564 if test "$PORTNAME" != "win32"; then
15565 # Check whether --enable-largefile was given.
15566 if test "${enable_largefile+set}" = set; then :
15567 enableval=$enable_largefile;
15570 if test "$enable_largefile" != no; then
15572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15573 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15574 if ${ac_cv_sys_largefile_CC+:} false; then :
15575 $as_echo_n "(cached) " >&6
15576 else
15577 ac_cv_sys_largefile_CC=no
15578 if test "$GCC" != yes; then
15579 ac_save_CC=$CC
15580 while :; do
15581 # IRIX 6.2 and later do not support large files by default,
15582 # so use the C compiler's -n32 option if that helps.
15583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15584 /* end confdefs.h. */
15585 #include <sys/types.h>
15586 /* Check that off_t can represent 2**63 - 1 correctly.
15587 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15588 since some C++ compilers masquerading as C compilers
15589 incorrectly reject 9223372036854775807. */
15590 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15591 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15592 && LARGE_OFF_T % 2147483647 == 1)
15593 ? 1 : -1];
15595 main ()
15599 return 0;
15601 _ACEOF
15602 if ac_fn_c_try_compile "$LINENO"; then :
15603 break
15605 rm -f core conftest.err conftest.$ac_objext
15606 CC="$CC -n32"
15607 if ac_fn_c_try_compile "$LINENO"; then :
15608 ac_cv_sys_largefile_CC=' -n32'; break
15610 rm -f core conftest.err conftest.$ac_objext
15611 break
15612 done
15613 CC=$ac_save_CC
15614 rm -f conftest.$ac_ext
15617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15618 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15619 if test "$ac_cv_sys_largefile_CC" != no; then
15620 CC=$CC$ac_cv_sys_largefile_CC
15623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15624 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15625 if ${ac_cv_sys_file_offset_bits+:} false; then :
15626 $as_echo_n "(cached) " >&6
15627 else
15628 while :; do
15629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15630 /* end confdefs.h. */
15631 #include <sys/types.h>
15632 /* Check that off_t can represent 2**63 - 1 correctly.
15633 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15634 since some C++ compilers masquerading as C compilers
15635 incorrectly reject 9223372036854775807. */
15636 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15637 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15638 && LARGE_OFF_T % 2147483647 == 1)
15639 ? 1 : -1];
15641 main ()
15645 return 0;
15647 _ACEOF
15648 if ac_fn_c_try_compile "$LINENO"; then :
15649 ac_cv_sys_file_offset_bits=no; break
15651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15653 /* end confdefs.h. */
15654 #define _FILE_OFFSET_BITS 64
15655 #include <sys/types.h>
15656 /* Check that off_t can represent 2**63 - 1 correctly.
15657 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15658 since some C++ compilers masquerading as C compilers
15659 incorrectly reject 9223372036854775807. */
15660 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15661 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15662 && LARGE_OFF_T % 2147483647 == 1)
15663 ? 1 : -1];
15665 main ()
15669 return 0;
15671 _ACEOF
15672 if ac_fn_c_try_compile "$LINENO"; then :
15673 ac_cv_sys_file_offset_bits=64; break
15675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15676 ac_cv_sys_file_offset_bits=unknown
15677 break
15678 done
15680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15681 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15682 case $ac_cv_sys_file_offset_bits in #(
15683 no | unknown) ;;
15685 cat >>confdefs.h <<_ACEOF
15686 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15687 _ACEOF
15689 esac
15690 rm -rf conftest*
15691 if test $ac_cv_sys_file_offset_bits = unknown; then
15692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15693 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15694 if ${ac_cv_sys_large_files+:} false; then :
15695 $as_echo_n "(cached) " >&6
15696 else
15697 while :; do
15698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15699 /* end confdefs.h. */
15700 #include <sys/types.h>
15701 /* Check that off_t can represent 2**63 - 1 correctly.
15702 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15703 since some C++ compilers masquerading as C compilers
15704 incorrectly reject 9223372036854775807. */
15705 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15706 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15707 && LARGE_OFF_T % 2147483647 == 1)
15708 ? 1 : -1];
15710 main ()
15714 return 0;
15716 _ACEOF
15717 if ac_fn_c_try_compile "$LINENO"; then :
15718 ac_cv_sys_large_files=no; break
15720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15722 /* end confdefs.h. */
15723 #define _LARGE_FILES 1
15724 #include <sys/types.h>
15725 /* Check that off_t can represent 2**63 - 1 correctly.
15726 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15727 since some C++ compilers masquerading as C compilers
15728 incorrectly reject 9223372036854775807. */
15729 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15730 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15731 && LARGE_OFF_T % 2147483647 == 1)
15732 ? 1 : -1];
15734 main ()
15738 return 0;
15740 _ACEOF
15741 if ac_fn_c_try_compile "$LINENO"; then :
15742 ac_cv_sys_large_files=1; break
15744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15745 ac_cv_sys_large_files=unknown
15746 break
15747 done
15749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15750 $as_echo "$ac_cv_sys_large_files" >&6; }
15751 case $ac_cv_sys_large_files in #(
15752 no | unknown) ;;
15754 cat >>confdefs.h <<_ACEOF
15755 #define _LARGE_FILES $ac_cv_sys_large_files
15756 _ACEOF
15758 esac
15759 rm -rf conftest*
15768 # The cast to long int works around a bug in the HP C Compiler
15769 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15770 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15771 # This bug is HP SR number 8606223364.
15772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15773 $as_echo_n "checking size of off_t... " >&6; }
15774 if ${ac_cv_sizeof_off_t+:} false; then :
15775 $as_echo_n "(cached) " >&6
15776 else
15777 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15779 else
15780 if test "$ac_cv_type_off_t" = yes; then
15781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15782 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15783 as_fn_error 77 "cannot compute sizeof (off_t)
15784 See \`config.log' for more details" "$LINENO" 5; }
15785 else
15786 ac_cv_sizeof_off_t=0
15791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15792 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15796 cat >>confdefs.h <<_ACEOF
15797 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15798 _ACEOF
15802 # If we don't have largefile support, can't handle segsize >= 2GB.
15803 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15804 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15807 # The cast to long int works around a bug in the HP C Compiler
15808 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15809 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15810 # This bug is HP SR number 8606223364.
15811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15812 $as_echo_n "checking size of bool... " >&6; }
15813 if ${ac_cv_sizeof_bool+:} false; then :
15814 $as_echo_n "(cached) " >&6
15815 else
15816 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15817 #include <stdbool.h>
15818 #endif
15819 "; then :
15821 else
15822 if test "$ac_cv_type_bool" = yes; then
15823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15824 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15825 as_fn_error 77 "cannot compute sizeof (bool)
15826 See \`config.log' for more details" "$LINENO" 5; }
15827 else
15828 ac_cv_sizeof_bool=0
15833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15834 $as_echo "$ac_cv_sizeof_bool" >&6; }
15838 cat >>confdefs.h <<_ACEOF
15839 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15840 _ACEOF
15844 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15846 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15852 ## Functions, global variables
15855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15856 $as_echo_n "checking for int timezone... " >&6; }
15857 if ${pgac_cv_var_int_timezone+:} false; then :
15858 $as_echo_n "(cached) " >&6
15859 else
15860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15861 /* end confdefs.h. */
15862 #include <time.h>
15863 int res;
15865 main ()
15867 #ifndef __CYGWIN__
15868 res = timezone / 60;
15869 #else
15870 res = _timezone / 60;
15871 #endif
15873 return 0;
15875 _ACEOF
15876 if ac_fn_c_try_link "$LINENO"; then :
15877 pgac_cv_var_int_timezone=yes
15878 else
15879 pgac_cv_var_int_timezone=no
15881 rm -f core conftest.err conftest.$ac_objext \
15882 conftest$ac_exeext conftest.$ac_ext
15884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15885 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15886 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15888 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15892 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15893 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15894 $as_echo_n "(cached) " >&6
15895 else
15896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15897 /* end confdefs.h. */
15898 #include <sys/time.h>
15900 main ()
15902 struct timeval *tp;
15903 struct timezone *tzp;
15904 gettimeofday(tp,tzp);
15906 return 0;
15908 _ACEOF
15909 if ac_fn_c_try_compile "$LINENO"; then :
15910 pgac_cv_func_gettimeofday_1arg=no
15911 else
15912 pgac_cv_func_gettimeofday_1arg=yes
15914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15917 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15918 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15920 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15925 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15926 if ${pgac_cv_func_wcstombs_l+:} false; then :
15927 $as_echo_n "(cached) " >&6
15928 else
15929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15930 /* end confdefs.h. */
15931 #include <stdlib.h>
15932 #include <locale.h>
15934 main ()
15936 #ifndef wcstombs_l
15937 (void) wcstombs_l;
15938 #endif
15940 return 0;
15942 _ACEOF
15943 if ac_fn_c_try_compile "$LINENO"; then :
15944 pgac_cv_func_wcstombs_l='yes'
15945 else
15946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15947 /* end confdefs.h. */
15948 #include <stdlib.h>
15949 #include <locale.h>
15950 #include <xlocale.h>
15952 main ()
15954 #ifndef wcstombs_l
15955 (void) wcstombs_l;
15956 #endif
15958 return 0;
15960 _ACEOF
15961 if ac_fn_c_try_compile "$LINENO"; then :
15962 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15963 else
15964 pgac_cv_func_wcstombs_l='no'
15966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15971 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15972 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15974 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15978 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15979 # symbols that that library has no business exposing to the world. Pending
15980 # acquisition of a clue by those developers, ignore libedit (including its
15981 # possible alias of libreadline) while checking for everything else.
15982 LIBS_including_readline="$LIBS"
15983 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15985 for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit inet_pton kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink readv setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink syncfs sync_file_range uselocale wcstombs_l writev
15986 do :
15987 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15988 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15989 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15990 cat >>confdefs.h <<_ACEOF
15991 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15992 _ACEOF
15995 done
15998 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
16000 $as_echo_n "checking for __builtin_bswap16... " >&6; }
16001 if ${pgac_cv__builtin_bswap16+:} false; then :
16002 $as_echo_n "(cached) " >&6
16003 else
16004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16005 /* end confdefs.h. */
16008 call__builtin_bswap16(int x)
16010 return __builtin_bswap16(x);
16013 main ()
16017 return 0;
16019 _ACEOF
16020 if ac_fn_c_try_link "$LINENO"; then :
16021 pgac_cv__builtin_bswap16=yes
16022 else
16023 pgac_cv__builtin_bswap16=no
16025 rm -f core conftest.err conftest.$ac_objext \
16026 conftest$ac_exeext conftest.$ac_ext
16028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
16029 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
16030 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
16032 cat >>confdefs.h <<_ACEOF
16033 #define HAVE__BUILTIN_BSWAP16 1
16034 _ACEOF
16037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
16038 $as_echo_n "checking for __builtin_bswap32... " >&6; }
16039 if ${pgac_cv__builtin_bswap32+:} false; then :
16040 $as_echo_n "(cached) " >&6
16041 else
16042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16043 /* end confdefs.h. */
16046 call__builtin_bswap32(int x)
16048 return __builtin_bswap32(x);
16051 main ()
16055 return 0;
16057 _ACEOF
16058 if ac_fn_c_try_link "$LINENO"; then :
16059 pgac_cv__builtin_bswap32=yes
16060 else
16061 pgac_cv__builtin_bswap32=no
16063 rm -f core conftest.err conftest.$ac_objext \
16064 conftest$ac_exeext conftest.$ac_ext
16066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
16067 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
16068 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
16070 cat >>confdefs.h <<_ACEOF
16071 #define HAVE__BUILTIN_BSWAP32 1
16072 _ACEOF
16075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
16076 $as_echo_n "checking for __builtin_bswap64... " >&6; }
16077 if ${pgac_cv__builtin_bswap64+:} false; then :
16078 $as_echo_n "(cached) " >&6
16079 else
16080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16081 /* end confdefs.h. */
16084 call__builtin_bswap64(long int x)
16086 return __builtin_bswap64(x);
16089 main ()
16093 return 0;
16095 _ACEOF
16096 if ac_fn_c_try_link "$LINENO"; then :
16097 pgac_cv__builtin_bswap64=yes
16098 else
16099 pgac_cv__builtin_bswap64=no
16101 rm -f core conftest.err conftest.$ac_objext \
16102 conftest$ac_exeext conftest.$ac_ext
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
16105 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
16106 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
16108 cat >>confdefs.h <<_ACEOF
16109 #define HAVE__BUILTIN_BSWAP64 1
16110 _ACEOF
16113 # We assume that we needn't test all widths of these explicitly:
16114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
16115 $as_echo_n "checking for __builtin_clz... " >&6; }
16116 if ${pgac_cv__builtin_clz+:} false; then :
16117 $as_echo_n "(cached) " >&6
16118 else
16119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16120 /* end confdefs.h. */
16123 call__builtin_clz(unsigned int x)
16125 return __builtin_clz(x);
16128 main ()
16132 return 0;
16134 _ACEOF
16135 if ac_fn_c_try_link "$LINENO"; then :
16136 pgac_cv__builtin_clz=yes
16137 else
16138 pgac_cv__builtin_clz=no
16140 rm -f core conftest.err conftest.$ac_objext \
16141 conftest$ac_exeext conftest.$ac_ext
16143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
16144 $as_echo "$pgac_cv__builtin_clz" >&6; }
16145 if test x"${pgac_cv__builtin_clz}" = xyes ; then
16147 cat >>confdefs.h <<_ACEOF
16148 #define HAVE__BUILTIN_CLZ 1
16149 _ACEOF
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
16153 $as_echo_n "checking for __builtin_ctz... " >&6; }
16154 if ${pgac_cv__builtin_ctz+:} false; then :
16155 $as_echo_n "(cached) " >&6
16156 else
16157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16158 /* end confdefs.h. */
16161 call__builtin_ctz(unsigned int x)
16163 return __builtin_ctz(x);
16166 main ()
16170 return 0;
16172 _ACEOF
16173 if ac_fn_c_try_link "$LINENO"; then :
16174 pgac_cv__builtin_ctz=yes
16175 else
16176 pgac_cv__builtin_ctz=no
16178 rm -f core conftest.err conftest.$ac_objext \
16179 conftest$ac_exeext conftest.$ac_ext
16181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
16182 $as_echo "$pgac_cv__builtin_ctz" >&6; }
16183 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
16185 cat >>confdefs.h <<_ACEOF
16186 #define HAVE__BUILTIN_CTZ 1
16187 _ACEOF
16190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
16191 $as_echo_n "checking for __builtin_popcount... " >&6; }
16192 if ${pgac_cv__builtin_popcount+:} false; then :
16193 $as_echo_n "(cached) " >&6
16194 else
16195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16196 /* end confdefs.h. */
16199 call__builtin_popcount(unsigned int x)
16201 return __builtin_popcount(x);
16204 main ()
16208 return 0;
16210 _ACEOF
16211 if ac_fn_c_try_link "$LINENO"; then :
16212 pgac_cv__builtin_popcount=yes
16213 else
16214 pgac_cv__builtin_popcount=no
16216 rm -f core conftest.err conftest.$ac_objext \
16217 conftest$ac_exeext conftest.$ac_ext
16219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
16220 $as_echo "$pgac_cv__builtin_popcount" >&6; }
16221 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
16223 cat >>confdefs.h <<_ACEOF
16224 #define HAVE__BUILTIN_POPCOUNT 1
16225 _ACEOF
16228 # __builtin_frame_address may draw a diagnostic for non-constant argument,
16229 # so it needs a different test function.
16230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
16231 $as_echo_n "checking for __builtin_frame_address... " >&6; }
16232 if ${pgac_cv__builtin_frame_address+:} false; then :
16233 $as_echo_n "(cached) " >&6
16234 else
16235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16236 /* end confdefs.h. */
16238 void *
16239 call__builtin_frame_address(void)
16241 return __builtin_frame_address(0);
16244 main ()
16248 return 0;
16250 _ACEOF
16251 if ac_fn_c_try_link "$LINENO"; then :
16252 pgac_cv__builtin_frame_address=yes
16253 else
16254 pgac_cv__builtin_frame_address=no
16256 rm -f core conftest.err conftest.$ac_objext \
16257 conftest$ac_exeext conftest.$ac_ext
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
16260 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
16261 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
16263 cat >>confdefs.h <<_ACEOF
16264 #define HAVE__BUILTIN_FRAME_ADDRESS 1
16265 _ACEOF
16269 # We require 64-bit fseeko() to be available, but run this check anyway
16270 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
16271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16272 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
16273 if ${ac_cv_sys_largefile_source+:} false; then :
16274 $as_echo_n "(cached) " >&6
16275 else
16276 while :; do
16277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16278 /* end confdefs.h. */
16279 #include <sys/types.h> /* for off_t */
16280 #include <stdio.h>
16282 main ()
16284 int (*fp) (FILE *, off_t, int) = fseeko;
16285 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16287 return 0;
16289 _ACEOF
16290 if ac_fn_c_try_link "$LINENO"; then :
16291 ac_cv_sys_largefile_source=no; break
16293 rm -f core conftest.err conftest.$ac_objext \
16294 conftest$ac_exeext conftest.$ac_ext
16295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16296 /* end confdefs.h. */
16297 #define _LARGEFILE_SOURCE 1
16298 #include <sys/types.h> /* for off_t */
16299 #include <stdio.h>
16301 main ()
16303 int (*fp) (FILE *, off_t, int) = fseeko;
16304 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16306 return 0;
16308 _ACEOF
16309 if ac_fn_c_try_link "$LINENO"; then :
16310 ac_cv_sys_largefile_source=1; break
16312 rm -f core conftest.err conftest.$ac_objext \
16313 conftest$ac_exeext conftest.$ac_ext
16314 ac_cv_sys_largefile_source=unknown
16315 break
16316 done
16318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
16319 $as_echo "$ac_cv_sys_largefile_source" >&6; }
16320 case $ac_cv_sys_largefile_source in #(
16321 no | unknown) ;;
16323 cat >>confdefs.h <<_ACEOF
16324 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16325 _ACEOF
16327 esac
16328 rm -rf conftest*
16330 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16331 # in glibc 2.1.3, but that breaks too many other things.
16332 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16333 if test $ac_cv_sys_largefile_source != unknown; then
16335 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
16340 # Make sure there's a declaration for sigwait(), then make sure
16341 # that it conforms to the POSIX standard (there seem to still be
16342 # some platforms out there with pre-POSIX sigwait()). On Solaris,
16343 # _POSIX_PTHREAD_SEMANTICS affects the result, but we already
16344 # added that to CPPFLAGS.
16345 # The Clang compiler raises a warning for an undeclared identifier that matches
16346 # a compiler builtin function. All extant Clang versions are affected, as of
16347 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
16348 # C and Objective C languages, but Clang does report an error under C++ and
16349 # Objective C++.
16351 # Passing -fno-builtin to the compiler would suppress this problem. That
16352 # strategy would have the advantage of being insensitive to stray warnings, but
16353 # it would make tests less realistic.
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
16355 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
16356 if ${ac_cv_c_decl_report+:} false; then :
16357 $as_echo_n "(cached) " >&6
16358 else
16359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16360 /* end confdefs.h. */
16363 main ()
16365 (void) strchr;
16367 return 0;
16369 _ACEOF
16370 if ac_fn_c_try_compile "$LINENO"; then :
16371 if test -s conftest.err; then :
16372 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
16373 # valid AC_CHECK_DECL input. No library function is consistently available
16374 # on freestanding implementations, so test against a dummy declaration.
16375 # Include always-available headers on the off chance that they somehow
16376 # elicit warnings.
16377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16378 /* end confdefs.h. */
16379 #include <float.h>
16380 #include <limits.h>
16381 #include <stdarg.h>
16382 #include <stddef.h>
16383 extern void ac_decl (int, char *);
16385 main ()
16387 #ifdef __cplusplus
16388 (void) ac_decl ((int) 0, (char *) 0);
16389 (void) ac_decl;
16390 #else
16391 (void) ac_decl;
16392 #endif
16395 return 0;
16397 _ACEOF
16398 if ac_fn_c_try_compile "$LINENO"; then :
16399 if test -s conftest.err; then :
16400 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16401 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16402 as_fn_error $? "cannot detect from compiler exit status or warnings
16403 See \`config.log' for more details" "$LINENO" 5; }
16404 else
16405 ac_cv_c_decl_report=warning
16407 else
16408 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16409 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16410 as_fn_error $? "cannot compile a simple declaration test
16411 See \`config.log' for more details" "$LINENO" 5; }
16413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16414 else
16415 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16416 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16417 as_fn_error $? "compiler does not report undeclared identifiers
16418 See \`config.log' for more details" "$LINENO" 5; }
16420 else
16421 ac_cv_c_decl_report=error
16423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16426 $as_echo "$ac_cv_c_decl_report" >&6; }
16428 case $ac_cv_c_decl_report in
16429 warning) ac_c_decl_warn_flag=yes ;;
16430 *) ac_c_decl_warn_flag= ;;
16431 esac
16433 ac_fn_c_check_decl "$LINENO" "sigwait" "ac_cv_have_decl_sigwait" "#include <signal.h>
16435 if test "x$ac_cv_have_decl_sigwait" = xyes; then :
16436 ac_have_decl=1
16437 else
16438 ac_have_decl=0
16441 cat >>confdefs.h <<_ACEOF
16442 #define HAVE_DECL_SIGWAIT $ac_have_decl
16443 _ACEOF
16445 if test "x$ac_cv_have_decl_sigwait" = xyes; then
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX-conforming sigwait declaration" >&5
16447 $as_echo_n "checking for POSIX-conforming sigwait declaration... " >&6; }
16448 if ${pgac_cv_have_posix_decl_sigwait+:} false; then :
16449 $as_echo_n "(cached) " >&6
16450 else
16451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16452 /* end confdefs.h. */
16454 #include <signal.h>
16455 int sigwait(const sigset_t *set, int *sig);
16458 main ()
16462 return 0;
16464 _ACEOF
16465 if ac_fn_c_try_compile "$LINENO"; then :
16466 pgac_cv_have_posix_decl_sigwait=yes
16467 else
16468 pgac_cv_have_posix_decl_sigwait=no
16470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_posix_decl_sigwait" >&5
16473 $as_echo "$pgac_cv_have_posix_decl_sigwait" >&6; }
16475 if test "x$pgac_cv_have_posix_decl_sigwait" = xyes; then
16477 $as_echo "#define HAVE_POSIX_DECL_SIGWAIT 1" >>confdefs.h
16479 else
16480 # On non-Windows, libpq requires POSIX sigwait() for thread safety.
16481 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
16482 as_fn_error $? "POSIX-conforming sigwait is required to enable thread safety." "$LINENO" 5
16486 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
16487 # by calling it, 2009-04-02
16488 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
16489 if test "$PORTNAME" != "solaris"; then :
16491 for ac_func in posix_fadvise
16492 do :
16493 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16494 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16495 cat >>confdefs.h <<_ACEOF
16496 #define HAVE_POSIX_FADVISE 1
16497 _ACEOF
16500 done
16502 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16504 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16505 ac_have_decl=1
16506 else
16507 ac_have_decl=0
16510 cat >>confdefs.h <<_ACEOF
16511 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16512 _ACEOF
16515 fi # fi
16517 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16519 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16520 ac_have_decl=1
16521 else
16522 ac_have_decl=0
16525 cat >>confdefs.h <<_ACEOF
16526 #define HAVE_DECL_FDATASYNC $ac_have_decl
16527 _ACEOF
16529 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16530 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16531 ac_have_decl=1
16532 else
16533 ac_have_decl=0
16536 cat >>confdefs.h <<_ACEOF
16537 #define HAVE_DECL_STRLCAT $ac_have_decl
16538 _ACEOF
16539 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16540 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16541 ac_have_decl=1
16542 else
16543 ac_have_decl=0
16546 cat >>confdefs.h <<_ACEOF
16547 #define HAVE_DECL_STRLCPY $ac_have_decl
16548 _ACEOF
16549 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16550 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16551 ac_have_decl=1
16552 else
16553 ac_have_decl=0
16556 cat >>confdefs.h <<_ACEOF
16557 #define HAVE_DECL_STRNLEN $ac_have_decl
16558 _ACEOF
16561 # We can't use AC_REPLACE_FUNCS to replace these functions, because it
16562 # won't handle deployment target restrictions on macOS
16563 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16565 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16566 ac_have_decl=1
16567 else
16568 ac_have_decl=0
16571 cat >>confdefs.h <<_ACEOF
16572 #define HAVE_DECL_PREADV $ac_have_decl
16573 _ACEOF
16574 if test $ac_have_decl = 1; then :
16576 else
16577 case " $LIBOBJS " in
16578 *" preadv.$ac_objext "* ) ;;
16579 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16581 esac
16585 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16587 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16588 ac_have_decl=1
16589 else
16590 ac_have_decl=0
16593 cat >>confdefs.h <<_ACEOF
16594 #define HAVE_DECL_PWRITEV $ac_have_decl
16595 _ACEOF
16596 if test $ac_have_decl = 1; then :
16598 else
16599 case " $LIBOBJS " in
16600 *" pwritev.$ac_objext "* ) ;;
16601 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16603 esac
16608 # This is probably only present on macOS, but may as well check always
16609 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16611 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16612 ac_have_decl=1
16613 else
16614 ac_have_decl=0
16617 cat >>confdefs.h <<_ACEOF
16618 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16619 _ACEOF
16622 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
16624 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
16625 ac_have_decl=1
16626 else
16627 ac_have_decl=0
16630 cat >>confdefs.h <<_ACEOF
16631 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
16632 _ACEOF
16633 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
16635 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
16636 ac_have_decl=1
16637 else
16638 ac_have_decl=0
16641 cat >>confdefs.h <<_ACEOF
16642 #define HAVE_DECL_RTLD_NOW $ac_have_decl
16643 _ACEOF
16646 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
16647 #include <netinet/in.h>
16649 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
16651 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
16656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
16657 $as_echo_n "checking for PS_STRINGS... " >&6; }
16658 if ${pgac_cv_var_PS_STRINGS+:} false; then :
16659 $as_echo_n "(cached) " >&6
16660 else
16661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16662 /* end confdefs.h. */
16663 #include <machine/vmparam.h>
16664 #include <sys/exec.h>
16667 main ()
16669 PS_STRINGS->ps_nargvstr = 1;
16670 PS_STRINGS->ps_argvstr = "foo";
16672 return 0;
16674 _ACEOF
16675 if ac_fn_c_try_link "$LINENO"; then :
16676 pgac_cv_var_PS_STRINGS=yes
16677 else
16678 pgac_cv_var_PS_STRINGS=no
16680 rm -f core conftest.err conftest.$ac_objext \
16681 conftest$ac_exeext conftest.$ac_ext
16683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16684 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16685 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16687 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16691 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16692 if test "x$ac_cv_func_dlopen" = xyes; then :
16693 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
16695 else
16696 case " $LIBOBJS " in
16697 *" dlopen.$ac_objext "* ) ;;
16698 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
16700 esac
16704 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16705 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16706 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16708 else
16709 case " $LIBOBJS " in
16710 *" explicit_bzero.$ac_objext "* ) ;;
16711 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16713 esac
16717 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
16718 if test "x$ac_cv_func_fls" = xyes; then :
16719 $as_echo "#define HAVE_FLS 1" >>confdefs.h
16721 else
16722 case " $LIBOBJS " in
16723 *" fls.$ac_objext "* ) ;;
16724 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
16726 esac
16730 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16731 if test "x$ac_cv_func_getopt" = xyes; then :
16732 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16734 else
16735 case " $LIBOBJS " in
16736 *" getopt.$ac_objext "* ) ;;
16737 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16739 esac
16743 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16744 if test "x$ac_cv_func_getpeereid" = xyes; then :
16745 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16747 else
16748 case " $LIBOBJS " in
16749 *" getpeereid.$ac_objext "* ) ;;
16750 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16752 esac
16756 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
16757 if test "x$ac_cv_func_getrusage" = xyes; then :
16758 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
16760 else
16761 case " $LIBOBJS " in
16762 *" getrusage.$ac_objext "* ) ;;
16763 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16765 esac
16769 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16770 if test "x$ac_cv_func_inet_aton" = xyes; then :
16771 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16773 else
16774 case " $LIBOBJS " in
16775 *" inet_aton.$ac_objext "* ) ;;
16776 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16778 esac
16782 ac_fn_c_check_func "$LINENO" "link" "ac_cv_func_link"
16783 if test "x$ac_cv_func_link" = xyes; then :
16784 $as_echo "#define HAVE_LINK 1" >>confdefs.h
16786 else
16787 case " $LIBOBJS " in
16788 *" link.$ac_objext "* ) ;;
16789 *) LIBOBJS="$LIBOBJS link.$ac_objext"
16791 esac
16795 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16796 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16797 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16799 else
16800 case " $LIBOBJS " in
16801 *" mkdtemp.$ac_objext "* ) ;;
16802 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16804 esac
16808 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
16809 if test "x$ac_cv_func_pread" = xyes; then :
16810 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
16812 else
16813 case " $LIBOBJS " in
16814 *" pread.$ac_objext "* ) ;;
16815 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
16817 esac
16821 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
16822 if test "x$ac_cv_func_pwrite" = xyes; then :
16823 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
16825 else
16826 case " $LIBOBJS " in
16827 *" pwrite.$ac_objext "* ) ;;
16828 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
16830 esac
16834 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16835 if test "x$ac_cv_func_strlcat" = xyes; then :
16836 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16838 else
16839 case " $LIBOBJS " in
16840 *" strlcat.$ac_objext "* ) ;;
16841 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16843 esac
16847 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16848 if test "x$ac_cv_func_strlcpy" = xyes; then :
16849 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16851 else
16852 case " $LIBOBJS " in
16853 *" strlcpy.$ac_objext "* ) ;;
16854 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16856 esac
16860 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16861 if test "x$ac_cv_func_strnlen" = xyes; then :
16862 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16864 else
16865 case " $LIBOBJS " in
16866 *" strnlen.$ac_objext "* ) ;;
16867 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16869 esac
16873 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
16874 if test "x$ac_cv_func_strtof" = xyes; then :
16875 $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
16877 else
16878 case " $LIBOBJS " in
16879 *" strtof.$ac_objext "* ) ;;
16880 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16882 esac
16888 if test "$enable_thread_safety" = yes; then
16889 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16890 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16891 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16893 else
16894 case " $LIBOBJS " in
16895 *" pthread_barrier_wait.$ac_objext "* ) ;;
16896 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16898 esac
16905 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16906 # Cygwin and (apparently, based on test results) Mingw both
16907 # have a broken strtof(), so substitute the same replacement
16908 # code we use with VS2013. That's not a perfect fix, since
16909 # (unlike with VS2013) it doesn't avoid double-rounding, but
16910 # we have no better options. To get that, though, we have to
16911 # force the file to be compiled despite HAVE_STRTOF.
16912 case " $LIBOBJS " in
16913 *" strtof.$ac_objext "* ) ;;
16914 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16916 esac
16918 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16919 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16922 case $host_os in
16923 # Windows uses a specialised env handler
16924 mingw*)
16926 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16929 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16931 ac_cv_func_setenv=yes
16932 ac_cv_func_unsetenv=yes
16935 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
16936 if test "x$ac_cv_func_setenv" = xyes; then :
16937 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16939 else
16940 case " $LIBOBJS " in
16941 *" setenv.$ac_objext "* ) ;;
16942 *) LIBOBJS="$LIBOBJS setenv.$ac_objext"
16944 esac
16948 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16949 if test "x$ac_cv_func_unsetenv" = xyes; then :
16950 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16952 else
16953 case " $LIBOBJS " in
16954 *" unsetenv.$ac_objext "* ) ;;
16955 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16957 esac
16963 esac
16965 # System's version of getaddrinfo(), if any, may be used only if we found
16966 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16967 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16968 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16969 test "$PORTNAME" != "win32"; then
16970 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16971 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16972 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16974 else
16975 case " $LIBOBJS " in
16976 *" getaddrinfo.$ac_objext "* ) ;;
16977 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16979 esac
16984 else
16985 case " $LIBOBJS " in
16986 *" getaddrinfo.$ac_objext "* ) ;;
16987 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16989 esac
16993 # Similarly, use system's getopt_long() only if system provides struct option.
16994 if test x"$ac_cv_type_struct_option" = xyes ; then
16995 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16996 if test "x$ac_cv_func_getopt_long" = xyes; then :
16997 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16999 else
17000 case " $LIBOBJS " in
17001 *" getopt_long.$ac_objext "* ) ;;
17002 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
17004 esac
17009 else
17010 case " $LIBOBJS " in
17011 *" getopt_long.$ac_objext "* ) ;;
17012 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
17014 esac
17018 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
17019 # (i.e., allow '-' as a flag character), so use our version on those platforms.
17020 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
17021 case " $LIBOBJS " in
17022 *" getopt.$ac_objext "* ) ;;
17023 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
17025 esac
17029 # mingw has adopted a GNU-centric interpretation of optind/optreset,
17030 # so always use our version on Windows.
17031 if test "$PORTNAME" = "win32"; then
17032 case " $LIBOBJS " in
17033 *" getopt.$ac_objext "* ) ;;
17034 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
17036 esac
17038 case " $LIBOBJS " in
17039 *" getopt_long.$ac_objext "* ) ;;
17040 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
17042 esac
17046 # Win32 (really MinGW) support
17047 if test "$PORTNAME" = "win32"; then
17048 for ac_func in _configthreadlocale
17049 do :
17050 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
17051 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
17052 cat >>confdefs.h <<_ACEOF
17053 #define HAVE__CONFIGTHREADLOCALE 1
17054 _ACEOF
17057 done
17059 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
17060 if test "x$ac_cv_func_gettimeofday" = xyes; then :
17061 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
17063 else
17064 case " $LIBOBJS " in
17065 *" gettimeofday.$ac_objext "* ) ;;
17066 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
17068 esac
17073 case " $LIBOBJS " in
17074 *" dirmod.$ac_objext "* ) ;;
17075 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
17077 esac
17079 case " $LIBOBJS " in
17080 *" kill.$ac_objext "* ) ;;
17081 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
17083 esac
17085 case " $LIBOBJS " in
17086 *" open.$ac_objext "* ) ;;
17087 *) LIBOBJS="$LIBOBJS open.$ac_objext"
17089 esac
17091 case " $LIBOBJS " in
17092 *" system.$ac_objext "* ) ;;
17093 *) LIBOBJS="$LIBOBJS system.$ac_objext"
17095 esac
17097 case " $LIBOBJS " in
17098 *" win32env.$ac_objext "* ) ;;
17099 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
17101 esac
17103 case " $LIBOBJS " in
17104 *" win32error.$ac_objext "* ) ;;
17105 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
17107 esac
17109 case " $LIBOBJS " in
17110 *" win32ntdll.$ac_objext "* ) ;;
17111 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
17113 esac
17115 case " $LIBOBJS " in
17116 *" win32security.$ac_objext "* ) ;;
17117 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
17119 esac
17121 case " $LIBOBJS " in
17122 *" win32setlocale.$ac_objext "* ) ;;
17123 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
17125 esac
17127 case " $LIBOBJS " in
17128 *" win32stat.$ac_objext "* ) ;;
17129 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
17131 esac
17134 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
17136 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
17137 #define WIN32_LEAN_AND_MEAN
17138 #include <windows.h>
17139 #include <string.h>
17140 #include <dbghelp.h>
17142 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
17144 cat >>confdefs.h <<_ACEOF
17145 #define HAVE_MINIDUMP_TYPE 1
17146 _ACEOF
17148 pgac_minidump_type=yes
17149 else
17150 pgac_minidump_type=no
17154 if test x"$pgac_minidump_type" = x"yes" ; then
17155 have_win32_dbghelp=yes
17157 else
17158 have_win32_dbghelp=no
17162 # Cygwin needs only a bit of that
17163 if test "$PORTNAME" = "cygwin"; then
17164 case " $LIBOBJS " in
17165 *" dirmod.$ac_objext "* ) ;;
17166 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
17168 esac
17172 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
17173 if test "x$ac_cv_func_syslog" = xyes; then :
17174 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
17175 if test "x$ac_cv_header_syslog_h" = xyes; then :
17177 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
17185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
17186 $as_echo_n "checking for opterr... " >&6; }
17187 if ${pgac_cv_var_int_opterr+:} false; then :
17188 $as_echo_n "(cached) " >&6
17189 else
17190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17191 /* end confdefs.h. */
17192 #include <unistd.h>
17194 main ()
17196 extern int opterr; opterr = 1;
17198 return 0;
17200 _ACEOF
17201 if ac_fn_c_try_link "$LINENO"; then :
17202 pgac_cv_var_int_opterr=yes
17203 else
17204 pgac_cv_var_int_opterr=no
17206 rm -f core conftest.err conftest.$ac_objext \
17207 conftest$ac_exeext conftest.$ac_ext
17209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
17210 $as_echo "$pgac_cv_var_int_opterr" >&6; }
17211 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
17213 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
17217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
17218 $as_echo_n "checking for optreset... " >&6; }
17219 if ${pgac_cv_var_int_optreset+:} false; then :
17220 $as_echo_n "(cached) " >&6
17221 else
17222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17223 /* end confdefs.h. */
17224 #include <unistd.h>
17226 main ()
17228 extern int optreset; optreset = 1;
17230 return 0;
17232 _ACEOF
17233 if ac_fn_c_try_link "$LINENO"; then :
17234 pgac_cv_var_int_optreset=yes
17235 else
17236 pgac_cv_var_int_optreset=no
17238 rm -f core conftest.err conftest.$ac_objext \
17239 conftest$ac_exeext conftest.$ac_ext
17241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
17242 $as_echo "$pgac_cv_var_int_optreset" >&6; }
17243 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
17245 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
17249 for ac_func in strtoll __strtoll strtoq
17250 do :
17251 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17252 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17253 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17254 cat >>confdefs.h <<_ACEOF
17255 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17256 _ACEOF
17257 break
17259 done
17261 for ac_func in strtoull __strtoull strtouq
17262 do :
17263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17264 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17265 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17266 cat >>confdefs.h <<_ACEOF
17267 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17268 _ACEOF
17269 break
17271 done
17273 # strto[u]ll may exist but not be declared
17274 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
17275 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
17276 ac_have_decl=1
17277 else
17278 ac_have_decl=0
17281 cat >>confdefs.h <<_ACEOF
17282 #define HAVE_DECL_STRTOLL $ac_have_decl
17283 _ACEOF
17284 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
17285 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
17286 ac_have_decl=1
17287 else
17288 ac_have_decl=0
17291 cat >>confdefs.h <<_ACEOF
17292 #define HAVE_DECL_STRTOULL $ac_have_decl
17293 _ACEOF
17296 if test "$with_icu" = yes; then
17297 ac_save_CPPFLAGS=$CPPFLAGS
17298 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
17300 # Verify we have ICU's header files
17301 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
17302 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
17304 else
17305 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
17310 CPPFLAGS=$ac_save_CPPFLAGS
17313 if test "$with_llvm" = yes; then
17315 # Check which functionality is present
17316 SAVE_CPPFLAGS="$CPPFLAGS"
17317 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
17318 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
17320 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
17321 ac_have_decl=1
17322 else
17323 ac_have_decl=0
17326 cat >>confdefs.h <<_ACEOF
17327 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
17328 _ACEOF
17330 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
17332 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
17333 ac_have_decl=1
17334 else
17335 ac_have_decl=0
17338 cat >>confdefs.h <<_ACEOF
17339 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
17340 _ACEOF
17341 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
17343 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
17344 ac_have_decl=1
17345 else
17346 ac_have_decl=0
17349 cat >>confdefs.h <<_ACEOF
17350 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
17351 _ACEOF
17353 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
17355 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
17356 ac_have_decl=1
17357 else
17358 ac_have_decl=0
17361 cat >>confdefs.h <<_ACEOF
17362 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
17363 _ACEOF
17364 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
17366 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
17367 ac_have_decl=1
17368 else
17369 ac_have_decl=0
17372 cat >>confdefs.h <<_ACEOF
17373 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
17374 _ACEOF
17376 CPPFLAGS="$SAVE_CPPFLAGS"
17380 # Lastly, restore full LIBS list and check for readline/libedit symbols
17381 LIBS="$LIBS_including_readline"
17383 if test "$with_readline" = yes; then
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
17385 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
17386 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
17387 $as_echo_n "(cached) " >&6
17388 else
17389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17390 /* end confdefs.h. */
17391 #include <stdio.h>
17392 #if defined(HAVE_READLINE_READLINE_H)
17393 #include <readline/readline.h>
17394 #elif defined(HAVE_EDITLINE_READLINE_H)
17395 #include <editline/readline.h>
17396 #elif defined(HAVE_READLINE_H)
17397 #include <readline.h>
17398 #endif
17401 main ()
17403 rl_completion_suppress_quote = 1;
17405 return 0;
17407 _ACEOF
17408 if ac_fn_c_try_link "$LINENO"; then :
17409 pgac_cv_var_rl_completion_suppress_quote=yes
17410 else
17411 pgac_cv_var_rl_completion_suppress_quote=no
17413 rm -f core conftest.err conftest.$ac_objext \
17414 conftest$ac_exeext conftest.$ac_ext
17416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
17417 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
17418 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
17420 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
17423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
17424 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
17425 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
17426 $as_echo_n "(cached) " >&6
17427 else
17428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17429 /* end confdefs.h. */
17430 #include <stdio.h>
17431 #if defined(HAVE_READLINE_READLINE_H)
17432 #include <readline/readline.h>
17433 #elif defined(HAVE_EDITLINE_READLINE_H)
17434 #include <editline/readline.h>
17435 #elif defined(HAVE_READLINE_H)
17436 #include <readline.h>
17437 #endif
17440 main ()
17442 rl_filename_quote_characters = "x";
17444 return 0;
17446 _ACEOF
17447 if ac_fn_c_try_link "$LINENO"; then :
17448 pgac_cv_var_rl_filename_quote_characters=yes
17449 else
17450 pgac_cv_var_rl_filename_quote_characters=no
17452 rm -f core conftest.err conftest.$ac_objext \
17453 conftest$ac_exeext conftest.$ac_ext
17455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
17456 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
17457 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
17459 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
17462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
17463 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
17464 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
17465 $as_echo_n "(cached) " >&6
17466 else
17467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17468 /* end confdefs.h. */
17469 #include <stdio.h>
17470 #if defined(HAVE_READLINE_READLINE_H)
17471 #include <readline/readline.h>
17472 #elif defined(HAVE_EDITLINE_READLINE_H)
17473 #include <editline/readline.h>
17474 #elif defined(HAVE_READLINE_H)
17475 #include <readline.h>
17476 #endif
17479 main ()
17481 rl_filename_quoting_function = 0;
17483 return 0;
17485 _ACEOF
17486 if ac_fn_c_try_link "$LINENO"; then :
17487 pgac_cv_var_rl_filename_quoting_function=yes
17488 else
17489 pgac_cv_var_rl_filename_quoting_function=no
17491 rm -f core conftest.err conftest.$ac_objext \
17492 conftest$ac_exeext conftest.$ac_ext
17494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
17495 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
17496 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
17498 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
17502 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
17503 do :
17504 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17505 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17506 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17507 cat >>confdefs.h <<_ACEOF
17508 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17509 _ACEOF
17512 done
17517 # This test makes sure that run tests work at all. Sometimes a shared
17518 # library is found by the linker, but the runtime linker can't find it.
17519 # This check should come after all modifications of compiler or linker
17520 # variables, and before any other run tests.
17521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
17522 $as_echo_n "checking test program... " >&6; }
17523 if test "$cross_compiling" = yes; then :
17524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
17525 $as_echo "cross-compiling" >&6; }
17526 else
17527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17528 /* end confdefs.h. */
17529 int main() { return 0; }
17530 _ACEOF
17531 if ac_fn_c_try_run "$LINENO"; then :
17532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17533 $as_echo "ok" >&6; }
17534 else
17535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17536 $as_echo "failed" >&6; }
17537 as_fn_error $? "
17538 Could not execute a simple test program. This may be a problem
17539 related to locating shared libraries. Check the file 'config.log'
17540 for the exact reason." "$LINENO" 5
17542 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17543 conftest.$ac_objext conftest.beam conftest.$ac_ext
17547 # --------------------
17548 # Run tests below here
17549 # --------------------
17552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
17553 $as_echo_n "checking whether long int is 64 bits... " >&6; }
17554 if ${pgac_cv_type_long_int_64+:} false; then :
17555 $as_echo_n "(cached) " >&6
17556 else
17557 if test "$cross_compiling" = yes; then :
17558 # If cross-compiling, check the size reported by the compiler and
17559 # trust that the arithmetic works.
17560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17561 /* end confdefs.h. */
17564 main ()
17566 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17567 test_array [0] = 0;
17568 return test_array [0];
17571 return 0;
17573 _ACEOF
17574 if ac_fn_c_try_compile "$LINENO"; then :
17575 pgac_cv_type_long_int_64=yes
17576 else
17577 pgac_cv_type_long_int_64=no
17579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17580 else
17581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17582 /* end confdefs.h. */
17583 typedef long int ac_int64;
17586 * These are globals to discourage the compiler from folding all the
17587 * arithmetic tests down to compile-time constants.
17589 ac_int64 a = 20000001;
17590 ac_int64 b = 40000005;
17592 int does_int64_work()
17594 ac_int64 c,d;
17596 if (sizeof(ac_int64) != 8)
17597 return 0; /* definitely not the right size */
17599 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17600 c = a * b;
17601 d = (c + b) / b;
17602 if (d != a+1)
17603 return 0;
17604 return 1;
17608 main() {
17609 return (! does_int64_work());
17611 _ACEOF
17612 if ac_fn_c_try_run "$LINENO"; then :
17613 pgac_cv_type_long_int_64=yes
17614 else
17615 pgac_cv_type_long_int_64=no
17617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17618 conftest.$ac_objext conftest.beam conftest.$ac_ext
17622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
17623 $as_echo "$pgac_cv_type_long_int_64" >&6; }
17625 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17626 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17628 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
17633 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
17634 pg_int64_type="long int"
17635 else
17636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
17637 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
17638 if ${pgac_cv_type_long_long_int_64+:} false; then :
17639 $as_echo_n "(cached) " >&6
17640 else
17641 if test "$cross_compiling" = yes; then :
17642 # If cross-compiling, check the size reported by the compiler and
17643 # trust that the arithmetic works.
17644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17645 /* end confdefs.h. */
17648 main ()
17650 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17651 test_array [0] = 0;
17652 return test_array [0];
17655 return 0;
17657 _ACEOF
17658 if ac_fn_c_try_compile "$LINENO"; then :
17659 pgac_cv_type_long_long_int_64=yes
17660 else
17661 pgac_cv_type_long_long_int_64=no
17663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17664 else
17665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17666 /* end confdefs.h. */
17667 typedef long long int ac_int64;
17670 * These are globals to discourage the compiler from folding all the
17671 * arithmetic tests down to compile-time constants.
17673 ac_int64 a = 20000001;
17674 ac_int64 b = 40000005;
17676 int does_int64_work()
17678 ac_int64 c,d;
17680 if (sizeof(ac_int64) != 8)
17681 return 0; /* definitely not the right size */
17683 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17684 c = a * b;
17685 d = (c + b) / b;
17686 if (d != a+1)
17687 return 0;
17688 return 1;
17692 main() {
17693 return (! does_int64_work());
17695 _ACEOF
17696 if ac_fn_c_try_run "$LINENO"; then :
17697 pgac_cv_type_long_long_int_64=yes
17698 else
17699 pgac_cv_type_long_long_int_64=no
17701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17702 conftest.$ac_objext conftest.beam conftest.$ac_ext
17706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17707 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17709 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17710 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17712 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17716 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17717 pg_int64_type="long long int"
17718 else
17719 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17724 cat >>confdefs.h <<_ACEOF
17725 #define PG_INT64_TYPE $pg_int64_type
17726 _ACEOF
17729 # Select the printf length modifier that goes with that, too.
17730 if test x"$pg_int64_type" = x"long long int" ; then
17731 INT64_MODIFIER='"ll"'
17732 else
17733 INT64_MODIFIER='"l"'
17737 cat >>confdefs.h <<_ACEOF
17738 #define INT64_MODIFIER $INT64_MODIFIER
17739 _ACEOF
17742 # has to be down here, rather than with the other builtins, because
17743 # the test uses PG_INT64_TYPE.
17744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17745 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17746 if ${pgac_cv__builtin_op_overflow+:} false; then :
17747 $as_echo_n "(cached) " >&6
17748 else
17749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17750 /* end confdefs.h. */
17752 PG_INT64_TYPE a = 1;
17753 PG_INT64_TYPE b = 1;
17754 PG_INT64_TYPE result;
17755 int oflo;
17758 main ()
17760 oflo = __builtin_mul_overflow(a, b, &result);
17762 return 0;
17764 _ACEOF
17765 if ac_fn_c_try_link "$LINENO"; then :
17766 pgac_cv__builtin_op_overflow=yes
17767 else
17768 pgac_cv__builtin_op_overflow=no
17770 rm -f core conftest.err conftest.$ac_objext \
17771 conftest$ac_exeext conftest.$ac_ext
17773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17774 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17775 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17777 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17781 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17782 # The cast to long int works around a bug in the HP C Compiler
17783 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17784 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17785 # This bug is HP SR number 8606223364.
17786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17787 $as_echo_n "checking size of void *... " >&6; }
17788 if ${ac_cv_sizeof_void_p+:} false; then :
17789 $as_echo_n "(cached) " >&6
17790 else
17791 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17793 else
17794 if test "$ac_cv_type_void_p" = yes; then
17795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17796 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17797 as_fn_error 77 "cannot compute sizeof (void *)
17798 See \`config.log' for more details" "$LINENO" 5; }
17799 else
17800 ac_cv_sizeof_void_p=0
17805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17806 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17810 cat >>confdefs.h <<_ACEOF
17811 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17812 _ACEOF
17815 # The cast to long int works around a bug in the HP C Compiler
17816 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17817 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17818 # This bug is HP SR number 8606223364.
17819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17820 $as_echo_n "checking size of size_t... " >&6; }
17821 if ${ac_cv_sizeof_size_t+:} false; then :
17822 $as_echo_n "(cached) " >&6
17823 else
17824 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17826 else
17827 if test "$ac_cv_type_size_t" = yes; then
17828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17829 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17830 as_fn_error 77 "cannot compute sizeof (size_t)
17831 See \`config.log' for more details" "$LINENO" 5; }
17832 else
17833 ac_cv_sizeof_size_t=0
17838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17839 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17843 cat >>confdefs.h <<_ACEOF
17844 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17845 _ACEOF
17848 # The cast to long int works around a bug in the HP C Compiler
17849 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17850 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17851 # This bug is HP SR number 8606223364.
17852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17853 $as_echo_n "checking size of long... " >&6; }
17854 if ${ac_cv_sizeof_long+:} false; then :
17855 $as_echo_n "(cached) " >&6
17856 else
17857 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17859 else
17860 if test "$ac_cv_type_long" = yes; then
17861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17862 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17863 as_fn_error 77 "cannot compute sizeof (long)
17864 See \`config.log' for more details" "$LINENO" 5; }
17865 else
17866 ac_cv_sizeof_long=0
17871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17872 $as_echo "$ac_cv_sizeof_long" >&6; }
17876 cat >>confdefs.h <<_ACEOF
17877 #define SIZEOF_LONG $ac_cv_sizeof_long
17878 _ACEOF
17882 # Determine memory alignment requirements for the basic C data types.
17884 # The cast to long int works around a bug in the HP C Compiler,
17885 # see AC_CHECK_SIZEOF for more information.
17886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17887 $as_echo_n "checking alignment of short... " >&6; }
17888 if ${ac_cv_alignof_short+:} false; then :
17889 $as_echo_n "(cached) " >&6
17890 else
17891 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17892 #ifndef offsetof
17893 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17894 #endif
17895 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17897 else
17898 if test "$ac_cv_type_short" = yes; then
17899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17900 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17901 as_fn_error 77 "cannot compute alignment of short
17902 See \`config.log' for more details" "$LINENO" 5; }
17903 else
17904 ac_cv_alignof_short=0
17909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17910 $as_echo "$ac_cv_alignof_short" >&6; }
17914 cat >>confdefs.h <<_ACEOF
17915 #define ALIGNOF_SHORT $ac_cv_alignof_short
17916 _ACEOF
17919 # The cast to long int works around a bug in the HP C Compiler,
17920 # see AC_CHECK_SIZEOF for more information.
17921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17922 $as_echo_n "checking alignment of int... " >&6; }
17923 if ${ac_cv_alignof_int+:} false; then :
17924 $as_echo_n "(cached) " >&6
17925 else
17926 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17927 #ifndef offsetof
17928 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17929 #endif
17930 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17932 else
17933 if test "$ac_cv_type_int" = yes; then
17934 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17935 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17936 as_fn_error 77 "cannot compute alignment of int
17937 See \`config.log' for more details" "$LINENO" 5; }
17938 else
17939 ac_cv_alignof_int=0
17944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17945 $as_echo "$ac_cv_alignof_int" >&6; }
17949 cat >>confdefs.h <<_ACEOF
17950 #define ALIGNOF_INT $ac_cv_alignof_int
17951 _ACEOF
17954 # The cast to long int works around a bug in the HP C Compiler,
17955 # see AC_CHECK_SIZEOF for more information.
17956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17957 $as_echo_n "checking alignment of long... " >&6; }
17958 if ${ac_cv_alignof_long+:} false; then :
17959 $as_echo_n "(cached) " >&6
17960 else
17961 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17962 #ifndef offsetof
17963 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17964 #endif
17965 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17967 else
17968 if test "$ac_cv_type_long" = yes; then
17969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17970 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17971 as_fn_error 77 "cannot compute alignment of long
17972 See \`config.log' for more details" "$LINENO" 5; }
17973 else
17974 ac_cv_alignof_long=0
17979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17980 $as_echo "$ac_cv_alignof_long" >&6; }
17984 cat >>confdefs.h <<_ACEOF
17985 #define ALIGNOF_LONG $ac_cv_alignof_long
17986 _ACEOF
17989 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17990 # The cast to long int works around a bug in the HP C Compiler,
17991 # see AC_CHECK_SIZEOF for more information.
17992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17993 $as_echo_n "checking alignment of long long int... " >&6; }
17994 if ${ac_cv_alignof_long_long_int+:} false; then :
17995 $as_echo_n "(cached) " >&6
17996 else
17997 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17998 #ifndef offsetof
17999 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
18000 #endif
18001 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
18003 else
18004 if test "$ac_cv_type_long_long_int" = yes; then
18005 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18006 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18007 as_fn_error 77 "cannot compute alignment of long long int
18008 See \`config.log' for more details" "$LINENO" 5; }
18009 else
18010 ac_cv_alignof_long_long_int=0
18015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
18016 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
18020 cat >>confdefs.h <<_ACEOF
18021 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
18022 _ACEOF
18026 # The cast to long int works around a bug in the HP C Compiler,
18027 # see AC_CHECK_SIZEOF for more information.
18028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
18029 $as_echo_n "checking alignment of double... " >&6; }
18030 if ${ac_cv_alignof_double+:} false; then :
18031 $as_echo_n "(cached) " >&6
18032 else
18033 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
18034 #ifndef offsetof
18035 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
18036 #endif
18037 typedef struct { char x; double y; } ac__type_alignof_;"; then :
18039 else
18040 if test "$ac_cv_type_double" = yes; then
18041 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18042 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18043 as_fn_error 77 "cannot compute alignment of double
18044 See \`config.log' for more details" "$LINENO" 5; }
18045 else
18046 ac_cv_alignof_double=0
18051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
18052 $as_echo "$ac_cv_alignof_double" >&6; }
18056 cat >>confdefs.h <<_ACEOF
18057 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
18058 _ACEOF
18062 # Compute maximum alignment of any basic type.
18063 # We assume long's alignment is at least as strong as char, short, or int;
18064 # but we must check long long (if it is being used for int64) and double.
18065 # Note that we intentionally do not consider any types wider than 64 bits,
18066 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
18067 # for disk and memory space.
18069 MAX_ALIGNOF=$ac_cv_alignof_long
18070 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
18071 MAX_ALIGNOF=$ac_cv_alignof_double
18073 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
18074 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
18077 cat >>confdefs.h <<_ACEOF
18078 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
18079 _ACEOF
18083 # Some platforms predefine the types int8, int16, etc. Only check
18084 # a (hopefully) representative subset.
18085 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
18087 if test "x$ac_cv_type_int8" = xyes; then :
18089 cat >>confdefs.h <<_ACEOF
18090 #define HAVE_INT8 1
18091 _ACEOF
18095 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
18097 if test "x$ac_cv_type_uint8" = xyes; then :
18099 cat >>confdefs.h <<_ACEOF
18100 #define HAVE_UINT8 1
18101 _ACEOF
18105 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
18107 if test "x$ac_cv_type_int64" = xyes; then :
18109 cat >>confdefs.h <<_ACEOF
18110 #define HAVE_INT64 1
18111 _ACEOF
18115 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
18117 if test "x$ac_cv_type_uint64" = xyes; then :
18119 cat >>confdefs.h <<_ACEOF
18120 #define HAVE_UINT64 1
18121 _ACEOF
18127 # Some compilers offer a 128-bit integer scalar type.
18128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
18129 $as_echo_n "checking for __int128... " >&6; }
18130 if ${pgac_cv__128bit_int+:} false; then :
18131 $as_echo_n "(cached) " >&6
18132 else
18133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18134 /* end confdefs.h. */
18137 * We don't actually run this test, just link it to verify that any support
18138 * functions needed for __int128 are present.
18140 * These are globals to discourage the compiler from folding all the
18141 * arithmetic tests down to compile-time constants. We do not have
18142 * convenient support for 128bit literals at this point...
18144 __int128 a = 48828125;
18145 __int128 b = 97656250;
18148 main ()
18151 __int128 c,d;
18152 a = (a << 12) + 1; /* 200000000001 */
18153 b = (b << 12) + 5; /* 400000000005 */
18154 /* try the most relevant arithmetic ops */
18155 c = a * b;
18156 d = (c + b) / b;
18157 /* must use the results, else compiler may optimize arithmetic away */
18158 if (d != a+1)
18159 return 1;
18162 return 0;
18164 _ACEOF
18165 if ac_fn_c_try_link "$LINENO"; then :
18166 pgac_cv__128bit_int=yes
18167 else
18168 pgac_cv__128bit_int=no
18170 rm -f core conftest.err conftest.$ac_objext \
18171 conftest$ac_exeext conftest.$ac_ext
18173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
18174 $as_echo "$pgac_cv__128bit_int" >&6; }
18175 if test x"$pgac_cv__128bit_int" = xyes ; then
18176 # Use of non-default alignment with __int128 tickles bugs in some compilers.
18177 # If not cross-compiling, we can test for bugs and disable use of __int128
18178 # with buggy compilers. If cross-compiling, hope for the best.
18179 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
18180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
18181 $as_echo_n "checking for __int128 alignment bug... " >&6; }
18182 if ${pgac_cv__128bit_int_bug+:} false; then :
18183 $as_echo_n "(cached) " >&6
18184 else
18185 if test "$cross_compiling" = yes; then :
18186 pgac_cv__128bit_int_bug="assuming ok"
18187 else
18188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18189 /* end confdefs.h. */
18191 /* This must match the corresponding code in c.h: */
18192 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
18193 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
18194 #endif
18195 typedef __int128 int128a
18196 #if defined(pg_attribute_aligned)
18197 pg_attribute_aligned(8)
18198 #endif
18200 int128a holder;
18201 void pass_by_val(void *buffer, int128a par) { holder = par; }
18204 main ()
18207 long int i64 = 97656225L << 12;
18208 int128a q;
18209 pass_by_val(main, (int128a) i64);
18210 q = (int128a) i64;
18211 if (q != holder)
18212 return 1;
18215 return 0;
18217 _ACEOF
18218 if ac_fn_c_try_run "$LINENO"; then :
18219 pgac_cv__128bit_int_bug=ok
18220 else
18221 pgac_cv__128bit_int_bug=broken
18223 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18224 conftest.$ac_objext conftest.beam conftest.$ac_ext
18228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
18229 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
18230 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
18232 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
18234 # The cast to long int works around a bug in the HP C Compiler,
18235 # see AC_CHECK_SIZEOF for more information.
18236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
18237 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
18238 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
18239 $as_echo_n "(cached) " >&6
18240 else
18241 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
18242 #ifndef offsetof
18243 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
18244 #endif
18245 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
18247 else
18248 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
18249 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18250 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18251 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
18252 See \`config.log' for more details" "$LINENO" 5; }
18253 else
18254 ac_cv_alignof_PG_INT128_TYPE=0
18259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
18260 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
18264 cat >>confdefs.h <<_ACEOF
18265 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
18266 _ACEOF
18272 # Check for various atomic operations now that we have checked how to declare
18273 # 64bit integers.
18274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
18275 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
18276 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
18277 $as_echo_n "(cached) " >&6
18278 else
18279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18280 /* end confdefs.h. */
18283 main ()
18285 char lock = 0;
18286 __sync_lock_test_and_set(&lock, 1);
18287 __sync_lock_release(&lock);
18289 return 0;
18291 _ACEOF
18292 if ac_fn_c_try_link "$LINENO"; then :
18293 pgac_cv_gcc_sync_char_tas="yes"
18294 else
18295 pgac_cv_gcc_sync_char_tas="no"
18297 rm -f core conftest.err conftest.$ac_objext \
18298 conftest$ac_exeext conftest.$ac_ext
18300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
18301 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
18302 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
18304 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
18307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
18308 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
18309 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
18310 $as_echo_n "(cached) " >&6
18311 else
18312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18313 /* end confdefs.h. */
18316 main ()
18318 int lock = 0;
18319 __sync_lock_test_and_set(&lock, 1);
18320 __sync_lock_release(&lock);
18322 return 0;
18324 _ACEOF
18325 if ac_fn_c_try_link "$LINENO"; then :
18326 pgac_cv_gcc_sync_int32_tas="yes"
18327 else
18328 pgac_cv_gcc_sync_int32_tas="no"
18330 rm -f core conftest.err conftest.$ac_objext \
18331 conftest$ac_exeext conftest.$ac_ext
18333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
18334 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
18335 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
18337 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
18340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
18341 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
18342 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
18343 $as_echo_n "(cached) " >&6
18344 else
18345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18346 /* end confdefs.h. */
18349 main ()
18351 int val = 0;
18352 __sync_val_compare_and_swap(&val, 0, 37);
18354 return 0;
18356 _ACEOF
18357 if ac_fn_c_try_link "$LINENO"; then :
18358 pgac_cv_gcc_sync_int32_cas="yes"
18359 else
18360 pgac_cv_gcc_sync_int32_cas="no"
18362 rm -f core conftest.err conftest.$ac_objext \
18363 conftest$ac_exeext conftest.$ac_ext
18365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
18366 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
18367 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
18369 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
18372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
18373 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
18374 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
18375 $as_echo_n "(cached) " >&6
18376 else
18377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18378 /* end confdefs.h. */
18381 main ()
18383 PG_INT64_TYPE lock = 0;
18384 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
18386 return 0;
18388 _ACEOF
18389 if ac_fn_c_try_link "$LINENO"; then :
18390 pgac_cv_gcc_sync_int64_cas="yes"
18391 else
18392 pgac_cv_gcc_sync_int64_cas="no"
18394 rm -f core conftest.err conftest.$ac_objext \
18395 conftest$ac_exeext conftest.$ac_ext
18397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
18398 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
18399 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
18401 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
18404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
18405 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
18406 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
18407 $as_echo_n "(cached) " >&6
18408 else
18409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18410 /* end confdefs.h. */
18413 main ()
18415 int val = 0;
18416 int expect = 0;
18417 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
18419 return 0;
18421 _ACEOF
18422 if ac_fn_c_try_link "$LINENO"; then :
18423 pgac_cv_gcc_atomic_int32_cas="yes"
18424 else
18425 pgac_cv_gcc_atomic_int32_cas="no"
18427 rm -f core conftest.err conftest.$ac_objext \
18428 conftest$ac_exeext conftest.$ac_ext
18430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
18431 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
18432 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
18434 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
18437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
18438 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
18439 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
18440 $as_echo_n "(cached) " >&6
18441 else
18442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18443 /* end confdefs.h. */
18446 main ()
18448 PG_INT64_TYPE val = 0;
18449 PG_INT64_TYPE expect = 0;
18450 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
18452 return 0;
18454 _ACEOF
18455 if ac_fn_c_try_link "$LINENO"; then :
18456 pgac_cv_gcc_atomic_int64_cas="yes"
18457 else
18458 pgac_cv_gcc_atomic_int64_cas="no"
18460 rm -f core conftest.err conftest.$ac_objext \
18461 conftest$ac_exeext conftest.$ac_ext
18463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
18464 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
18465 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
18467 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
18472 # Check for x86 cpuid instruction
18473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
18474 $as_echo_n "checking for __get_cpuid... " >&6; }
18475 if ${pgac_cv__get_cpuid+:} false; then :
18476 $as_echo_n "(cached) " >&6
18477 else
18478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18479 /* end confdefs.h. */
18480 #include <cpuid.h>
18482 main ()
18484 unsigned int exx[4] = {0, 0, 0, 0};
18485 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
18488 return 0;
18490 _ACEOF
18491 if ac_fn_c_try_link "$LINENO"; then :
18492 pgac_cv__get_cpuid="yes"
18493 else
18494 pgac_cv__get_cpuid="no"
18496 rm -f core conftest.err conftest.$ac_objext \
18497 conftest$ac_exeext conftest.$ac_ext
18499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
18500 $as_echo "$pgac_cv__get_cpuid" >&6; }
18501 if test x"$pgac_cv__get_cpuid" = x"yes"; then
18503 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
18507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
18508 $as_echo_n "checking for __cpuid... " >&6; }
18509 if ${pgac_cv__cpuid+:} false; then :
18510 $as_echo_n "(cached) " >&6
18511 else
18512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18513 /* end confdefs.h. */
18514 #include <intrin.h>
18516 main ()
18518 unsigned int exx[4] = {0, 0, 0, 0};
18519 __get_cpuid(exx[0], 1);
18522 return 0;
18524 _ACEOF
18525 if ac_fn_c_try_link "$LINENO"; then :
18526 pgac_cv__cpuid="yes"
18527 else
18528 pgac_cv__cpuid="no"
18530 rm -f core conftest.err conftest.$ac_objext \
18531 conftest$ac_exeext conftest.$ac_ext
18533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
18534 $as_echo "$pgac_cv__cpuid" >&6; }
18535 if test x"$pgac_cv__cpuid" = x"yes"; then
18537 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
18541 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
18543 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
18544 # with the default compiler flags. If not, check if adding the -msse4.2
18545 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
18546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
18547 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
18548 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
18549 $as_echo_n "(cached) " >&6
18550 else
18551 pgac_save_CFLAGS=$CFLAGS
18552 CFLAGS="$pgac_save_CFLAGS "
18553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18554 /* end confdefs.h. */
18555 #include <nmmintrin.h>
18557 main ()
18559 unsigned int crc = 0;
18560 crc = _mm_crc32_u8(crc, 0);
18561 crc = _mm_crc32_u32(crc, 0);
18562 /* return computed value, to prevent the above being optimized away */
18563 return crc == 0;
18565 return 0;
18567 _ACEOF
18568 if ac_fn_c_try_link "$LINENO"; then :
18569 pgac_cv_sse42_crc32_intrinsics_=yes
18570 else
18571 pgac_cv_sse42_crc32_intrinsics_=no
18573 rm -f core conftest.err conftest.$ac_objext \
18574 conftest$ac_exeext conftest.$ac_ext
18575 CFLAGS="$pgac_save_CFLAGS"
18577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
18578 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
18579 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
18580 CFLAGS_SSE42=""
18581 pgac_sse42_crc32_intrinsics=yes
18584 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
18585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
18586 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
18587 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
18588 $as_echo_n "(cached) " >&6
18589 else
18590 pgac_save_CFLAGS=$CFLAGS
18591 CFLAGS="$pgac_save_CFLAGS -msse4.2"
18592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18593 /* end confdefs.h. */
18594 #include <nmmintrin.h>
18596 main ()
18598 unsigned int crc = 0;
18599 crc = _mm_crc32_u8(crc, 0);
18600 crc = _mm_crc32_u32(crc, 0);
18601 /* return computed value, to prevent the above being optimized away */
18602 return crc == 0;
18604 return 0;
18606 _ACEOF
18607 if ac_fn_c_try_link "$LINENO"; then :
18608 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
18609 else
18610 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
18612 rm -f core conftest.err conftest.$ac_objext \
18613 conftest$ac_exeext conftest.$ac_ext
18614 CFLAGS="$pgac_save_CFLAGS"
18616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
18617 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
18618 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
18619 CFLAGS_SSE42="-msse4.2"
18620 pgac_sse42_crc32_intrinsics=yes
18626 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18627 # define __SSE4_2__ in that case.
18628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18629 /* end confdefs.h. */
18632 main ()
18635 #ifndef __SSE4_2__
18636 #error __SSE4_2__ not defined
18637 #endif
18640 return 0;
18642 _ACEOF
18643 if ac_fn_c_try_compile "$LINENO"; then :
18644 SSE4_2_TARGETED=1
18646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18648 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18650 # First check if __crc32c* intrinsics can be used with the default compiler
18651 # flags. If not, check if adding -march=armv8-a+crc flag helps.
18652 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
18653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18654 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18655 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18656 $as_echo_n "(cached) " >&6
18657 else
18658 pgac_save_CFLAGS=$CFLAGS
18659 CFLAGS="$pgac_save_CFLAGS "
18660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18661 /* end confdefs.h. */
18662 #include <arm_acle.h>
18664 main ()
18666 unsigned int crc = 0;
18667 crc = __crc32cb(crc, 0);
18668 crc = __crc32ch(crc, 0);
18669 crc = __crc32cw(crc, 0);
18670 crc = __crc32cd(crc, 0);
18671 /* return computed value, to prevent the above being optimized away */
18672 return crc == 0;
18674 return 0;
18676 _ACEOF
18677 if ac_fn_c_try_link "$LINENO"; then :
18678 pgac_cv_armv8_crc32c_intrinsics_=yes
18679 else
18680 pgac_cv_armv8_crc32c_intrinsics_=no
18682 rm -f core conftest.err conftest.$ac_objext \
18683 conftest$ac_exeext conftest.$ac_ext
18684 CFLAGS="$pgac_save_CFLAGS"
18686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18687 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18688 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18689 CFLAGS_ARMV8_CRC32C=""
18690 pgac_armv8_crc32c_intrinsics=yes
18693 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18695 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18696 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18697 $as_echo_n "(cached) " >&6
18698 else
18699 pgac_save_CFLAGS=$CFLAGS
18700 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18702 /* end confdefs.h. */
18703 #include <arm_acle.h>
18705 main ()
18707 unsigned int crc = 0;
18708 crc = __crc32cb(crc, 0);
18709 crc = __crc32ch(crc, 0);
18710 crc = __crc32cw(crc, 0);
18711 crc = __crc32cd(crc, 0);
18712 /* return computed value, to prevent the above being optimized away */
18713 return crc == 0;
18715 return 0;
18717 _ACEOF
18718 if ac_fn_c_try_link "$LINENO"; then :
18719 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18720 else
18721 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18723 rm -f core conftest.err conftest.$ac_objext \
18724 conftest$ac_exeext conftest.$ac_ext
18725 CFLAGS="$pgac_save_CFLAGS"
18727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18728 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18729 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18730 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18731 pgac_armv8_crc32c_intrinsics=yes
18737 # Select CRC-32C implementation.
18739 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18740 # use the special CRC instructions for calculating CRC-32C. If we're not
18741 # targeting such a processor, but we can nevertheless produce code that uses
18742 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18743 # implementations and select which one to use at runtime, depending on whether
18744 # SSE 4.2 is supported by the processor we're running on.
18746 # Similarly, if we are targeting an ARM processor that has the CRC
18747 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18748 # we're not targeting such a processor, but can nevertheless produce code that
18749 # uses the CRC instructions, compile both, and select at runtime.
18751 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18752 # in the template or configure command line.
18753 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
18754 # Use Intel SSE 4.2 if available.
18755 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18756 USE_SSE42_CRC32C=1
18757 else
18758 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18759 # the runtime check.
18760 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
18761 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18762 else
18763 # Use ARM CRC Extension if available.
18764 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18765 USE_ARMV8_CRC32C=1
18766 else
18767 # ARM CRC Extension, with runtime check?
18768 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18769 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18770 else
18771 # fall back to slicing-by-8 algorithm, which doesn't require any
18772 # special CPU support.
18773 USE_SLICING_BY_8_CRC32C=1
18780 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18782 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18783 if test x"$USE_SSE42_CRC32C" = x"1"; then
18785 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18787 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18789 $as_echo "SSE 4.2" >&6; }
18790 else
18791 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18793 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18795 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18797 $as_echo "SSE 4.2 with runtime check" >&6; }
18798 else
18799 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18801 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18803 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18805 $as_echo "ARMv8 CRC instructions" >&6; }
18806 else
18807 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18809 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18811 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18813 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18814 else
18816 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18818 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18820 $as_echo "slicing-by-8" >&6; }
18828 # Select semaphore implementation type.
18829 if test "$PORTNAME" != "win32"; then
18830 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18831 # Need sem_open for this
18832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18833 $as_echo_n "checking for library containing sem_open... " >&6; }
18834 if ${ac_cv_search_sem_open+:} false; then :
18835 $as_echo_n "(cached) " >&6
18836 else
18837 ac_func_search_save_LIBS=$LIBS
18838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18839 /* end confdefs.h. */
18841 /* Override any GCC internal prototype to avoid an error.
18842 Use char because int might match the return type of a GCC
18843 builtin and then its argument prototype would still apply. */
18844 #ifdef __cplusplus
18845 extern "C"
18846 #endif
18847 char sem_open ();
18849 main ()
18851 return sem_open ();
18853 return 0;
18855 _ACEOF
18856 for ac_lib in '' rt pthread; do
18857 if test -z "$ac_lib"; then
18858 ac_res="none required"
18859 else
18860 ac_res=-l$ac_lib
18861 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18863 if ac_fn_c_try_link "$LINENO"; then :
18864 ac_cv_search_sem_open=$ac_res
18866 rm -f core conftest.err conftest.$ac_objext \
18867 conftest$ac_exeext
18868 if ${ac_cv_search_sem_open+:} false; then :
18869 break
18871 done
18872 if ${ac_cv_search_sem_open+:} false; then :
18874 else
18875 ac_cv_search_sem_open=no
18877 rm conftest.$ac_ext
18878 LIBS=$ac_func_search_save_LIBS
18880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18881 $as_echo "$ac_cv_search_sem_open" >&6; }
18882 ac_res=$ac_cv_search_sem_open
18883 if test "$ac_res" != no; then :
18884 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18885 USE_NAMED_POSIX_SEMAPHORES=1
18889 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18890 # Need sem_init for this
18891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18892 $as_echo_n "checking for library containing sem_init... " >&6; }
18893 if ${ac_cv_search_sem_init+:} false; then :
18894 $as_echo_n "(cached) " >&6
18895 else
18896 ac_func_search_save_LIBS=$LIBS
18897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18898 /* end confdefs.h. */
18900 /* Override any GCC internal prototype to avoid an error.
18901 Use char because int might match the return type of a GCC
18902 builtin and then its argument prototype would still apply. */
18903 #ifdef __cplusplus
18904 extern "C"
18905 #endif
18906 char sem_init ();
18908 main ()
18910 return sem_init ();
18912 return 0;
18914 _ACEOF
18915 for ac_lib in '' rt pthread; do
18916 if test -z "$ac_lib"; then
18917 ac_res="none required"
18918 else
18919 ac_res=-l$ac_lib
18920 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18922 if ac_fn_c_try_link "$LINENO"; then :
18923 ac_cv_search_sem_init=$ac_res
18925 rm -f core conftest.err conftest.$ac_objext \
18926 conftest$ac_exeext
18927 if ${ac_cv_search_sem_init+:} false; then :
18928 break
18930 done
18931 if ${ac_cv_search_sem_init+:} false; then :
18933 else
18934 ac_cv_search_sem_init=no
18936 rm conftest.$ac_ext
18937 LIBS=$ac_func_search_save_LIBS
18939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18940 $as_echo "$ac_cv_search_sem_init" >&6; }
18941 ac_res=$ac_cv_search_sem_init
18942 if test "$ac_res" != no; then :
18943 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18944 USE_UNNAMED_POSIX_SEMAPHORES=1
18948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18949 $as_echo_n "checking which semaphore API to use... " >&6; }
18950 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18952 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18954 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18955 sematype="named POSIX"
18956 else
18957 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18959 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18961 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18962 sematype="unnamed POSIX"
18963 else
18965 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18967 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18968 sematype="System V"
18971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18972 $as_echo "$sematype" >&6; }
18973 else
18975 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18977 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18981 # Select shared-memory implementation type.
18982 if test "$PORTNAME" != "win32"; then
18984 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18986 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18987 else
18989 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18991 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18994 # Select random number source. If a TLS library is used then it will be the
18995 # first choice, else the native platform sources (Windows API or /dev/urandom)
18996 # will be used.
18997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18998 $as_echo_n "checking which random number source to use... " >&6; }
18999 if test x"$with_ssl" = x"openssl" ; then
19000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
19001 $as_echo "OpenSSL" >&6; }
19002 elif test x"$PORTNAME" = x"win32" ; then
19003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
19004 $as_echo "Windows native" >&6; }
19005 elif test x"$cross_compiling" = x"yes"; then
19006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
19007 $as_echo "assuming /dev/urandom" >&6; }
19008 else
19009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
19010 $as_echo "/dev/urandom" >&6; }
19011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
19012 $as_echo_n "checking for /dev/urandom... " >&6; }
19013 if ${ac_cv_file__dev_urandom+:} false; then :
19014 $as_echo_n "(cached) " >&6
19015 else
19016 test "$cross_compiling" = yes &&
19017 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19018 if test -r "/dev/urandom"; then
19019 ac_cv_file__dev_urandom=yes
19020 else
19021 ac_cv_file__dev_urandom=no
19024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
19025 $as_echo "$ac_cv_file__dev_urandom" >&6; }
19026 if test "x$ac_cv_file__dev_urandom" = xyes; then :
19031 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
19032 as_fn_error $? "
19033 no source of strong random numbers was found
19034 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
19038 # If not set in template file, set bytes to use libc memset()
19039 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
19040 MEMSET_LOOP_LIMIT=1024
19043 cat >>confdefs.h <<_ACEOF
19044 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
19045 _ACEOF
19049 if test "$enable_nls" = yes ; then
19051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
19052 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
19053 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
19054 $as_echo_n "(cached) " >&6
19055 else
19056 ac_func_search_save_LIBS=$LIBS
19057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19058 /* end confdefs.h. */
19060 /* Override any GCC internal prototype to avoid an error.
19061 Use char because int might match the return type of a GCC
19062 builtin and then its argument prototype would still apply. */
19063 #ifdef __cplusplus
19064 extern "C"
19065 #endif
19066 char bind_textdomain_codeset ();
19068 main ()
19070 return bind_textdomain_codeset ();
19072 return 0;
19074 _ACEOF
19075 for ac_lib in '' intl; do
19076 if test -z "$ac_lib"; then
19077 ac_res="none required"
19078 else
19079 ac_res=-l$ac_lib
19080 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19082 if ac_fn_c_try_link "$LINENO"; then :
19083 ac_cv_search_bind_textdomain_codeset=$ac_res
19085 rm -f core conftest.err conftest.$ac_objext \
19086 conftest$ac_exeext
19087 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
19088 break
19090 done
19091 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
19093 else
19094 ac_cv_search_bind_textdomain_codeset=no
19096 rm conftest.$ac_ext
19097 LIBS=$ac_func_search_save_LIBS
19099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
19100 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
19101 ac_res=$ac_cv_search_bind_textdomain_codeset
19102 if test "$ac_res" != no; then :
19103 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19105 else
19106 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
19109 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
19110 if test "x$ac_cv_header_libintl_h" = xyes; then :
19112 else
19113 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
19117 if test -z "$MSGFMT"; then
19118 for ac_prog in msgfmt
19120 # Extract the first word of "$ac_prog", so it can be a program name with args.
19121 set dummy $ac_prog; ac_word=$2
19122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19123 $as_echo_n "checking for $ac_word... " >&6; }
19124 if ${ac_cv_path_MSGFMT+:} false; then :
19125 $as_echo_n "(cached) " >&6
19126 else
19127 case $MSGFMT in
19128 [\\/]* | ?:[\\/]*)
19129 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
19132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19133 for as_dir in $PATH
19135 IFS=$as_save_IFS
19136 test -z "$as_dir" && as_dir=.
19137 for ac_exec_ext in '' $ac_executable_extensions; do
19138 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19139 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
19140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19141 break 2
19143 done
19144 done
19145 IFS=$as_save_IFS
19148 esac
19150 MSGFMT=$ac_cv_path_MSGFMT
19151 if test -n "$MSGFMT"; then
19152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
19153 $as_echo "$MSGFMT" >&6; }
19154 else
19155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19156 $as_echo "no" >&6; }
19160 test -n "$MSGFMT" && break
19161 done
19163 else
19164 # Report the value of MSGFMT in configure's output in all cases.
19165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
19166 $as_echo_n "checking for MSGFMT... " >&6; }
19167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
19168 $as_echo "$MSGFMT" >&6; }
19171 if test -z "$MSGFMT"; then
19172 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
19174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
19175 $as_echo_n "checking for msgfmt flags... " >&6; }
19176 if ${pgac_cv_msgfmt_flags+:} false; then :
19177 $as_echo_n "(cached) " >&6
19178 else
19179 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
19180 pgac_cv_msgfmt_flags=-c
19183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
19184 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
19185 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
19187 if test -z "$MSGMERGE"; then
19188 for ac_prog in msgmerge
19190 # Extract the first word of "$ac_prog", so it can be a program name with args.
19191 set dummy $ac_prog; ac_word=$2
19192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19193 $as_echo_n "checking for $ac_word... " >&6; }
19194 if ${ac_cv_path_MSGMERGE+:} false; then :
19195 $as_echo_n "(cached) " >&6
19196 else
19197 case $MSGMERGE in
19198 [\\/]* | ?:[\\/]*)
19199 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
19202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19203 for as_dir in $PATH
19205 IFS=$as_save_IFS
19206 test -z "$as_dir" && as_dir=.
19207 for ac_exec_ext in '' $ac_executable_extensions; do
19208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19209 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
19210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19211 break 2
19213 done
19214 done
19215 IFS=$as_save_IFS
19218 esac
19220 MSGMERGE=$ac_cv_path_MSGMERGE
19221 if test -n "$MSGMERGE"; then
19222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
19223 $as_echo "$MSGMERGE" >&6; }
19224 else
19225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19226 $as_echo "no" >&6; }
19230 test -n "$MSGMERGE" && break
19231 done
19233 else
19234 # Report the value of MSGMERGE in configure's output in all cases.
19235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
19236 $as_echo_n "checking for MSGMERGE... " >&6; }
19237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
19238 $as_echo "$MSGMERGE" >&6; }
19241 if test -z "$XGETTEXT"; then
19242 for ac_prog in xgettext
19244 # Extract the first word of "$ac_prog", so it can be a program name with args.
19245 set dummy $ac_prog; ac_word=$2
19246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19247 $as_echo_n "checking for $ac_word... " >&6; }
19248 if ${ac_cv_path_XGETTEXT+:} false; then :
19249 $as_echo_n "(cached) " >&6
19250 else
19251 case $XGETTEXT in
19252 [\\/]* | ?:[\\/]*)
19253 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
19256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19257 for as_dir in $PATH
19259 IFS=$as_save_IFS
19260 test -z "$as_dir" && as_dir=.
19261 for ac_exec_ext in '' $ac_executable_extensions; do
19262 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19263 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
19264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19265 break 2
19267 done
19268 done
19269 IFS=$as_save_IFS
19272 esac
19274 XGETTEXT=$ac_cv_path_XGETTEXT
19275 if test -n "$XGETTEXT"; then
19276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
19277 $as_echo "$XGETTEXT" >&6; }
19278 else
19279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19280 $as_echo "no" >&6; }
19284 test -n "$XGETTEXT" && break
19285 done
19287 else
19288 # Report the value of XGETTEXT in configure's output in all cases.
19289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
19290 $as_echo_n "checking for XGETTEXT... " >&6; }
19291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
19292 $as_echo "$XGETTEXT" >&6; }
19298 # Check for Tcl configuration script tclConfig.sh
19299 if test "$with_tcl" = yes; then
19300 if test -z "$TCLSH"; then
19301 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
19303 # Extract the first word of "$ac_prog", so it can be a program name with args.
19304 set dummy $ac_prog; ac_word=$2
19305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19306 $as_echo_n "checking for $ac_word... " >&6; }
19307 if ${ac_cv_path_TCLSH+:} false; then :
19308 $as_echo_n "(cached) " >&6
19309 else
19310 case $TCLSH in
19311 [\\/]* | ?:[\\/]*)
19312 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
19315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19316 for as_dir in $PATH
19318 IFS=$as_save_IFS
19319 test -z "$as_dir" && as_dir=.
19320 for ac_exec_ext in '' $ac_executable_extensions; do
19321 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19322 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
19323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19324 break 2
19326 done
19327 done
19328 IFS=$as_save_IFS
19331 esac
19333 TCLSH=$ac_cv_path_TCLSH
19334 if test -n "$TCLSH"; then
19335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
19336 $as_echo "$TCLSH" >&6; }
19337 else
19338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19339 $as_echo "no" >&6; }
19343 test -n "$TCLSH" && break
19344 done
19346 else
19347 # Report the value of TCLSH in configure's output in all cases.
19348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
19349 $as_echo_n "checking for TCLSH... " >&6; }
19350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
19351 $as_echo "$TCLSH" >&6; }
19354 if test x"$TCLSH" = x""; then
19355 as_fn_error $? "Tcl shell not found" "$LINENO" 5
19358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
19359 $as_echo_n "checking for tclConfig.sh... " >&6; }
19360 # Let user override test
19361 if test -z "$TCL_CONFIG_SH"; then
19362 pgac_test_dirs="$with_tclconfig"
19364 set X $pgac_test_dirs; shift
19365 if test $# -eq 0; then
19366 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
19367 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
19368 # On newer macOS, $auto_path frequently doesn't include the place
19369 # where tclConfig.sh actually lives. Append that to the end, so as not
19370 # to break cases where a non-default Tcl installation is being used.
19371 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
19372 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
19374 set X $pgac_test_dirs; shift
19377 for pgac_dir do
19378 if test -r "$pgac_dir/tclConfig.sh"; then
19379 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
19380 break
19382 done
19385 if test -z "$TCL_CONFIG_SH"; then
19386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19387 $as_echo "no" >&6; }
19388 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
19389 else
19390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
19391 $as_echo "$TCL_CONFIG_SH" >&6; }
19396 . "$TCL_CONFIG_SH"
19397 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
19398 eval TCL_LIBS=\"$TCL_LIBS\"
19399 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
19400 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
19402 if test "$TCL_SHARED_BUILD" != 1; then
19403 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
19404 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
19406 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
19407 ac_save_CPPFLAGS=$CPPFLAGS
19408 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
19409 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
19410 if test "x$ac_cv_header_tcl_h" = xyes; then :
19412 else
19413 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
19417 CPPFLAGS=$ac_save_CPPFLAGS
19420 # check for <perl.h>
19421 if test "$with_perl" = yes; then
19422 ac_save_CPPFLAGS=$CPPFLAGS
19423 CPPFLAGS="$CPPFLAGS $perl_includespec"
19424 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
19426 if test "x$ac_cv_header_perl_h" = xyes; then :
19428 else
19429 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
19433 # While we're at it, check that we can link to libperl.
19434 # On most platforms, if perl.h is there then libperl.so will be too, but at
19435 # this writing Debian packages them separately. There is no known reason to
19436 # waste cycles on separate probes for the Tcl or Python libraries, though.
19437 # On some Red Hat platforms, the link attempt can fail if we don't use
19438 # CFLAGS_SL while building the test program.
19439 ac_save_CFLAGS=$CFLAGS
19440 CFLAGS="$CFLAGS $CFLAGS_SL"
19441 pgac_save_LIBS=$LIBS
19442 LIBS="$perl_embed_ldflags"
19443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
19444 $as_echo_n "checking for libperl... " >&6; }
19445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19446 /* end confdefs.h. */
19448 #include <EXTERN.h>
19449 #include <perl.h>
19452 main ()
19454 perl_alloc();
19456 return 0;
19458 _ACEOF
19459 if ac_fn_c_try_link "$LINENO"; then :
19460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19461 $as_echo "yes" >&6; }
19462 else
19463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19464 $as_echo "no" >&6; }
19465 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
19467 rm -f core conftest.err conftest.$ac_objext \
19468 conftest$ac_exeext conftest.$ac_ext
19469 LIBS=$pgac_save_LIBS
19470 CFLAGS=$ac_save_CFLAGS
19471 CPPFLAGS=$ac_save_CPPFLAGS
19474 # check for <Python.h>
19475 if test "$with_python" = yes; then
19476 ac_save_CPPFLAGS=$CPPFLAGS
19477 CPPFLAGS="$python_includespec $CPPFLAGS"
19478 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
19479 if test "x$ac_cv_header_Python_h" = xyes; then :
19481 else
19482 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
19486 CPPFLAGS=$ac_save_CPPFLAGS
19490 # Check for documentation-building tools
19492 if test -z "$XMLLINT"; then
19493 for ac_prog in xmllint
19495 # Extract the first word of "$ac_prog", so it can be a program name with args.
19496 set dummy $ac_prog; ac_word=$2
19497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19498 $as_echo_n "checking for $ac_word... " >&6; }
19499 if ${ac_cv_path_XMLLINT+:} false; then :
19500 $as_echo_n "(cached) " >&6
19501 else
19502 case $XMLLINT in
19503 [\\/]* | ?:[\\/]*)
19504 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
19507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19508 for as_dir in $PATH
19510 IFS=$as_save_IFS
19511 test -z "$as_dir" && as_dir=.
19512 for ac_exec_ext in '' $ac_executable_extensions; do
19513 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19514 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
19515 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19516 break 2
19518 done
19519 done
19520 IFS=$as_save_IFS
19523 esac
19525 XMLLINT=$ac_cv_path_XMLLINT
19526 if test -n "$XMLLINT"; then
19527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19528 $as_echo "$XMLLINT" >&6; }
19529 else
19530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19531 $as_echo "no" >&6; }
19535 test -n "$XMLLINT" && break
19536 done
19538 else
19539 # Report the value of XMLLINT in configure's output in all cases.
19540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
19541 $as_echo_n "checking for XMLLINT... " >&6; }
19542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19543 $as_echo "$XMLLINT" >&6; }
19546 if test -z "$XSLTPROC"; then
19547 for ac_prog in xsltproc
19549 # Extract the first word of "$ac_prog", so it can be a program name with args.
19550 set dummy $ac_prog; ac_word=$2
19551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19552 $as_echo_n "checking for $ac_word... " >&6; }
19553 if ${ac_cv_path_XSLTPROC+:} false; then :
19554 $as_echo_n "(cached) " >&6
19555 else
19556 case $XSLTPROC in
19557 [\\/]* | ?:[\\/]*)
19558 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19562 for as_dir in $PATH
19564 IFS=$as_save_IFS
19565 test -z "$as_dir" && as_dir=.
19566 for ac_exec_ext in '' $ac_executable_extensions; do
19567 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19568 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19569 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19570 break 2
19572 done
19573 done
19574 IFS=$as_save_IFS
19577 esac
19579 XSLTPROC=$ac_cv_path_XSLTPROC
19580 if test -n "$XSLTPROC"; then
19581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19582 $as_echo "$XSLTPROC" >&6; }
19583 else
19584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19585 $as_echo "no" >&6; }
19589 test -n "$XSLTPROC" && break
19590 done
19592 else
19593 # Report the value of XSLTPROC in configure's output in all cases.
19594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
19595 $as_echo_n "checking for XSLTPROC... " >&6; }
19596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19597 $as_echo "$XSLTPROC" >&6; }
19600 if test -z "$FOP"; then
19601 for ac_prog in fop
19603 # Extract the first word of "$ac_prog", so it can be a program name with args.
19604 set dummy $ac_prog; ac_word=$2
19605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19606 $as_echo_n "checking for $ac_word... " >&6; }
19607 if ${ac_cv_path_FOP+:} false; then :
19608 $as_echo_n "(cached) " >&6
19609 else
19610 case $FOP in
19611 [\\/]* | ?:[\\/]*)
19612 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19616 for as_dir in $PATH
19618 IFS=$as_save_IFS
19619 test -z "$as_dir" && as_dir=.
19620 for ac_exec_ext in '' $ac_executable_extensions; do
19621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19622 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19623 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19624 break 2
19626 done
19627 done
19628 IFS=$as_save_IFS
19631 esac
19633 FOP=$ac_cv_path_FOP
19634 if test -n "$FOP"; then
19635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19636 $as_echo "$FOP" >&6; }
19637 else
19638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19639 $as_echo "no" >&6; }
19643 test -n "$FOP" && break
19644 done
19646 else
19647 # Report the value of FOP in configure's output in all cases.
19648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19649 $as_echo_n "checking for FOP... " >&6; }
19650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19651 $as_echo "$FOP" >&6; }
19654 if test -z "$DBTOEPUB"; then
19655 for ac_prog in dbtoepub
19657 # Extract the first word of "$ac_prog", so it can be a program name with args.
19658 set dummy $ac_prog; ac_word=$2
19659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19660 $as_echo_n "checking for $ac_word... " >&6; }
19661 if ${ac_cv_path_DBTOEPUB+:} false; then :
19662 $as_echo_n "(cached) " >&6
19663 else
19664 case $DBTOEPUB in
19665 [\\/]* | ?:[\\/]*)
19666 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19670 for as_dir in $PATH
19672 IFS=$as_save_IFS
19673 test -z "$as_dir" && as_dir=.
19674 for ac_exec_ext in '' $ac_executable_extensions; do
19675 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19676 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19678 break 2
19680 done
19681 done
19682 IFS=$as_save_IFS
19685 esac
19687 DBTOEPUB=$ac_cv_path_DBTOEPUB
19688 if test -n "$DBTOEPUB"; then
19689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19690 $as_echo "$DBTOEPUB" >&6; }
19691 else
19692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19693 $as_echo "no" >&6; }
19697 test -n "$DBTOEPUB" && break
19698 done
19700 else
19701 # Report the value of DBTOEPUB in configure's output in all cases.
19702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19703 $as_echo_n "checking for DBTOEPUB... " >&6; }
19704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19705 $as_echo "$DBTOEPUB" >&6; }
19710 # Check for test tools
19712 if test "$enable_tap_tests" = yes; then
19713 # Make sure we know where prove is.
19714 if test -z "$PROVE"; then
19715 for ac_prog in prove
19717 # Extract the first word of "$ac_prog", so it can be a program name with args.
19718 set dummy $ac_prog; ac_word=$2
19719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19720 $as_echo_n "checking for $ac_word... " >&6; }
19721 if ${ac_cv_path_PROVE+:} false; then :
19722 $as_echo_n "(cached) " >&6
19723 else
19724 case $PROVE in
19725 [\\/]* | ?:[\\/]*)
19726 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19730 for as_dir in $PATH
19732 IFS=$as_save_IFS
19733 test -z "$as_dir" && as_dir=.
19734 for ac_exec_ext in '' $ac_executable_extensions; do
19735 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19736 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19737 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19738 break 2
19740 done
19741 done
19742 IFS=$as_save_IFS
19745 esac
19747 PROVE=$ac_cv_path_PROVE
19748 if test -n "$PROVE"; then
19749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19750 $as_echo "$PROVE" >&6; }
19751 else
19752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19753 $as_echo "no" >&6; }
19757 test -n "$PROVE" && break
19758 done
19760 else
19761 # Report the value of PROVE in configure's output in all cases.
19762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19763 $as_echo_n "checking for PROVE... " >&6; }
19764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19765 $as_echo "$PROVE" >&6; }
19768 if test -z "$PROVE"; then
19769 as_fn_error $? "prove not found" "$LINENO" 5
19771 # Check for necessary Perl modules. You might think we should use
19772 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19773 # installation than perl, eg on MSys, so we have to check using prove.
19774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19775 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19776 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
19777 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19778 if test $? -eq 0; then
19779 # log the module version details, but don't show them interactively
19780 echo "$modulestderr" >&5
19781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19782 $as_echo "yes" >&6; }
19783 else
19784 # on failure, though, show the results to the user
19785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19786 $as_echo "$modulestderr" >&6; }
19787 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19791 # If compiler will take -Wl,--as-needed (or various platform-specific
19792 # spellings thereof) then add that to LDFLAGS. This is much easier than
19793 # trying to filter LIBS to the minimum for each executable.
19794 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19795 # libreadline; therefore we postpone testing it until we know what library
19796 # dependencies readline has. The test code will try to link with $LIBS.
19797 if test "$with_readline" = yes; then
19798 link_test_func=readline
19799 else
19800 link_test_func=exit
19803 if test "$PORTNAME" = "darwin"; then
19804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19805 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19806 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19807 $as_echo_n "(cached) " >&6
19808 else
19809 pgac_save_LDFLAGS=$LDFLAGS
19810 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19811 if test "$cross_compiling" = yes; then :
19812 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19813 else
19814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19815 /* end confdefs.h. */
19816 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19818 main ()
19822 return 0;
19824 _ACEOF
19825 if ac_fn_c_try_run "$LINENO"; then :
19826 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19827 else
19828 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19830 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19831 conftest.$ac_objext conftest.beam conftest.$ac_ext
19834 LDFLAGS="$pgac_save_LDFLAGS"
19836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19837 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19838 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19839 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19842 elif test "$PORTNAME" = "openbsd"; then
19843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19844 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19845 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19846 $as_echo_n "(cached) " >&6
19847 else
19848 pgac_save_LDFLAGS=$LDFLAGS
19849 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19850 if test "$cross_compiling" = yes; then :
19851 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19852 else
19853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19854 /* end confdefs.h. */
19855 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19857 main ()
19861 return 0;
19863 _ACEOF
19864 if ac_fn_c_try_run "$LINENO"; then :
19865 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19866 else
19867 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19870 conftest.$ac_objext conftest.beam conftest.$ac_ext
19873 LDFLAGS="$pgac_save_LDFLAGS"
19875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19876 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19877 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19878 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19881 else
19882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19883 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19884 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19885 $as_echo_n "(cached) " >&6
19886 else
19887 pgac_save_LDFLAGS=$LDFLAGS
19888 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19889 if test "$cross_compiling" = yes; then :
19890 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19891 else
19892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19893 /* end confdefs.h. */
19894 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19896 main ()
19900 return 0;
19902 _ACEOF
19903 if ac_fn_c_try_run "$LINENO"; then :
19904 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19905 else
19906 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19908 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19909 conftest.$ac_objext conftest.beam conftest.$ac_ext
19912 LDFLAGS="$pgac_save_LDFLAGS"
19914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19915 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19916 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19917 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19922 # Create compiler version string
19923 if test x"$GCC" = x"yes" ; then
19924 cc_string=`${CC} --version | sed q`
19925 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19926 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19927 cc_string=`${CC} -V 2>&1 | sed q`
19928 else
19929 cc_string=$CC
19933 cat >>confdefs.h <<_ACEOF
19934 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19935 _ACEOF
19938 # Supply a numeric version string for use by 3rd party add-ons
19939 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19940 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19941 $AWK '{printf "%d%04d", $1, $2}'`"
19943 cat >>confdefs.h <<_ACEOF
19944 #define PG_VERSION_NUM $PG_VERSION_NUM
19945 _ACEOF
19949 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19950 # literally, so that it's possible to override it at build time using
19951 # a command like "make ... PG_SYSROOT=path". This has to be done after
19952 # we've finished all configure checks that depend on CPPFLAGS.
19953 # The same for LDFLAGS, too.
19954 if test x"$PG_SYSROOT" != x; then
19955 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19956 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19961 # Begin output steps
19963 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19964 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19965 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19966 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19967 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19968 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19969 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19970 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19971 # Currently only used when LLVM is used
19972 if test "$with_llvm" = yes ; then
19973 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19974 $as_echo "$as_me: using CXX=$CXX" >&6;}
19975 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19976 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19977 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19978 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19979 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19980 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19981 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19982 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19985 # prepare build tree if outside source tree
19986 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19987 # Note 2: /bin/pwd might be better than shell's built-in at getting
19988 # a symlink-free name.
19989 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19990 vpath_build=no
19991 else
19992 vpath_build=yes
19993 if test "$no_create" != yes; then
19994 $as_echo_n "preparing build tree... " >&6
19995 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19996 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19997 || as_fn_error $? "failed" "$LINENO" 5
19998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19999 $as_echo "done" >&6; }
20005 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
20008 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}"
20011 if test "$PORTNAME" = "win32"; then
20012 ac_config_commands="$ac_config_commands check_win32_symlinks"
20016 ac_config_headers="$ac_config_headers src/include/pg_config.h"
20019 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
20022 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
20025 cat >confcache <<\_ACEOF
20026 # This file is a shell script that caches the results of configure
20027 # tests run on this system so they can be shared between configure
20028 # scripts and configure runs, see configure's option --config-cache.
20029 # It is not useful on other systems. If it contains results you don't
20030 # want to keep, you may remove or edit it.
20032 # config.status only pays attention to the cache file if you give it
20033 # the --recheck option to rerun configure.
20035 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20036 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20037 # following values.
20039 _ACEOF
20041 # The following way of writing the cache mishandles newlines in values,
20042 # but we know of no workaround that is simple, portable, and efficient.
20043 # So, we kill variables containing newlines.
20044 # Ultrix sh set writes to stderr and can't be redirected directly,
20045 # and sets the high bit in the cache file unless we assign to the vars.
20047 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20048 eval ac_val=\$$ac_var
20049 case $ac_val in #(
20050 *${as_nl}*)
20051 case $ac_var in #(
20052 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20053 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20054 esac
20055 case $ac_var in #(
20056 _ | IFS | as_nl) ;; #(
20057 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20058 *) { eval $ac_var=; unset $ac_var;} ;;
20059 esac ;;
20060 esac
20061 done
20063 (set) 2>&1 |
20064 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20065 *${as_nl}ac_space=\ *)
20066 # `set' does not quote correctly, so add quotes: double-quote
20067 # substitution turns \\\\ into \\, and sed turns \\ into \.
20068 sed -n \
20069 "s/'/'\\\\''/g;
20070 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20071 ;; #(
20073 # `set' quotes correctly as required by POSIX, so do not add quotes.
20074 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20076 esac |
20077 sort
20079 sed '
20080 /^ac_cv_env_/b end
20081 t clear
20082 :clear
20083 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20084 t end
20085 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20086 :end' >>confcache
20087 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20088 if test -w "$cache_file"; then
20089 if test "x$cache_file" != "x/dev/null"; then
20090 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20091 $as_echo "$as_me: updating cache $cache_file" >&6;}
20092 if test ! -f "$cache_file" || test -h "$cache_file"; then
20093 cat confcache >"$cache_file"
20094 else
20095 case $cache_file in #(
20096 */* | ?:*)
20097 mv -f confcache "$cache_file"$$ &&
20098 mv -f "$cache_file"$$ "$cache_file" ;; #(
20100 mv -f confcache "$cache_file" ;;
20101 esac
20104 else
20105 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20106 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20109 rm -f confcache
20111 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20112 # Let make expand exec_prefix.
20113 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20115 DEFS=-DHAVE_CONFIG_H
20117 ac_libobjs=
20118 ac_ltlibobjs=
20120 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20121 # 1. Remove the extension, and $U if already installed.
20122 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20123 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20124 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20125 # will be set to the directory where LIBOBJS objects are built.
20126 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20127 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20128 done
20129 LIBOBJS=$ac_libobjs
20131 LTLIBOBJS=$ac_ltlibobjs
20136 : "${CONFIG_STATUS=./config.status}"
20137 ac_write_fail=0
20138 ac_clean_files_save=$ac_clean_files
20139 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20140 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20141 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20142 as_write_fail=0
20143 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20144 #! $SHELL
20145 # Generated by $as_me.
20146 # Run this file to recreate the current configuration.
20147 # Compiler output produced by configure, useful for debugging
20148 # configure, is in config.log if it exists.
20150 debug=false
20151 ac_cs_recheck=false
20152 ac_cs_silent=false
20154 SHELL=\${CONFIG_SHELL-$SHELL}
20155 export SHELL
20156 _ASEOF
20157 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20158 ## -------------------- ##
20159 ## M4sh Initialization. ##
20160 ## -------------------- ##
20162 # Be more Bourne compatible
20163 DUALCASE=1; export DUALCASE # for MKS sh
20164 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20165 emulate sh
20166 NULLCMD=:
20167 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20168 # is contrary to our usage. Disable this feature.
20169 alias -g '${1+"$@"}'='"$@"'
20170 setopt NO_GLOB_SUBST
20171 else
20172 case `(set -o) 2>/dev/null` in #(
20173 *posix*) :
20174 set -o posix ;; #(
20175 *) :
20177 esac
20181 as_nl='
20183 export as_nl
20184 # Printing a long string crashes Solaris 7 /usr/bin/printf.
20185 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20186 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20187 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20188 # Prefer a ksh shell builtin over an external printf program on Solaris,
20189 # but without wasting forks for bash or zsh.
20190 if test -z "$BASH_VERSION$ZSH_VERSION" \
20191 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20192 as_echo='print -r --'
20193 as_echo_n='print -rn --'
20194 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20195 as_echo='printf %s\n'
20196 as_echo_n='printf %s'
20197 else
20198 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20199 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20200 as_echo_n='/usr/ucb/echo -n'
20201 else
20202 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20203 as_echo_n_body='eval
20204 arg=$1;
20205 case $arg in #(
20206 *"$as_nl"*)
20207 expr "X$arg" : "X\\(.*\\)$as_nl";
20208 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20209 esac;
20210 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20212 export as_echo_n_body
20213 as_echo_n='sh -c $as_echo_n_body as_echo'
20215 export as_echo_body
20216 as_echo='sh -c $as_echo_body as_echo'
20219 # The user is always right.
20220 if test "${PATH_SEPARATOR+set}" != set; then
20221 PATH_SEPARATOR=:
20222 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20223 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20224 PATH_SEPARATOR=';'
20229 # IFS
20230 # We need space, tab and new line, in precisely that order. Quoting is
20231 # there to prevent editors from complaining about space-tab.
20232 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20233 # splitting by setting IFS to empty value.)
20234 IFS=" "" $as_nl"
20236 # Find who we are. Look in the path if we contain no directory separator.
20237 as_myself=
20238 case $0 in #((
20239 *[\\/]* ) as_myself=$0 ;;
20240 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20241 for as_dir in $PATH
20243 IFS=$as_save_IFS
20244 test -z "$as_dir" && as_dir=.
20245 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20246 done
20247 IFS=$as_save_IFS
20250 esac
20251 # We did not find ourselves, most probably we were run as `sh COMMAND'
20252 # in which case we are not to be found in the path.
20253 if test "x$as_myself" = x; then
20254 as_myself=$0
20256 if test ! -f "$as_myself"; then
20257 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20258 exit 1
20261 # Unset variables that we do not need and which cause bugs (e.g. in
20262 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20263 # suppresses any "Segmentation fault" message there. '((' could
20264 # trigger a bug in pdksh 5.2.14.
20265 for as_var in BASH_ENV ENV MAIL MAILPATH
20266 do eval test x\${$as_var+set} = xset \
20267 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20268 done
20269 PS1='$ '
20270 PS2='> '
20271 PS4='+ '
20273 # NLS nuisances.
20274 LC_ALL=C
20275 export LC_ALL
20276 LANGUAGE=C
20277 export LANGUAGE
20279 # CDPATH.
20280 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20283 # as_fn_error STATUS ERROR [LINENO LOG_FD]
20284 # ----------------------------------------
20285 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20286 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20287 # script with STATUS, using 1 if that was 0.
20288 as_fn_error ()
20290 as_status=$1; test $as_status -eq 0 && as_status=1
20291 if test "$4"; then
20292 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20293 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20295 $as_echo "$as_me: error: $2" >&2
20296 as_fn_exit $as_status
20297 } # as_fn_error
20300 # as_fn_set_status STATUS
20301 # -----------------------
20302 # Set $? to STATUS, without forking.
20303 as_fn_set_status ()
20305 return $1
20306 } # as_fn_set_status
20308 # as_fn_exit STATUS
20309 # -----------------
20310 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20311 as_fn_exit ()
20313 set +e
20314 as_fn_set_status $1
20315 exit $1
20316 } # as_fn_exit
20318 # as_fn_unset VAR
20319 # ---------------
20320 # Portably unset VAR.
20321 as_fn_unset ()
20323 { eval $1=; unset $1;}
20325 as_unset=as_fn_unset
20326 # as_fn_append VAR VALUE
20327 # ----------------------
20328 # Append the text in VALUE to the end of the definition contained in VAR. Take
20329 # advantage of any shell optimizations that allow amortized linear growth over
20330 # repeated appends, instead of the typical quadratic growth present in naive
20331 # implementations.
20332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20333 eval 'as_fn_append ()
20335 eval $1+=\$2
20337 else
20338 as_fn_append ()
20340 eval $1=\$$1\$2
20342 fi # as_fn_append
20344 # as_fn_arith ARG...
20345 # ------------------
20346 # Perform arithmetic evaluation on the ARGs, and store the result in the
20347 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20348 # must be portable across $(()) and expr.
20349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20350 eval 'as_fn_arith ()
20352 as_val=$(( $* ))
20354 else
20355 as_fn_arith ()
20357 as_val=`expr "$@" || test $? -eq 1`
20359 fi # as_fn_arith
20362 if expr a : '\(a\)' >/dev/null 2>&1 &&
20363 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20364 as_expr=expr
20365 else
20366 as_expr=false
20369 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20370 as_basename=basename
20371 else
20372 as_basename=false
20375 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20376 as_dirname=dirname
20377 else
20378 as_dirname=false
20381 as_me=`$as_basename -- "$0" ||
20382 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20383 X"$0" : 'X\(//\)$' \| \
20384 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20385 $as_echo X/"$0" |
20386 sed '/^.*\/\([^/][^/]*\)\/*$/{
20387 s//\1/
20390 /^X\/\(\/\/\)$/{
20391 s//\1/
20394 /^X\/\(\/\).*/{
20395 s//\1/
20398 s/.*/./; q'`
20400 # Avoid depending upon Character Ranges.
20401 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20402 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20403 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20404 as_cr_digits='0123456789'
20405 as_cr_alnum=$as_cr_Letters$as_cr_digits
20407 ECHO_C= ECHO_N= ECHO_T=
20408 case `echo -n x` in #(((((
20409 -n*)
20410 case `echo 'xy\c'` in
20411 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20412 xy) ECHO_C='\c';;
20413 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20414 ECHO_T=' ';;
20415 esac;;
20417 ECHO_N='-n';;
20418 esac
20420 rm -f conf$$ conf$$.exe conf$$.file
20421 if test -d conf$$.dir; then
20422 rm -f conf$$.dir/conf$$.file
20423 else
20424 rm -f conf$$.dir
20425 mkdir conf$$.dir 2>/dev/null
20427 if (echo >conf$$.file) 2>/dev/null; then
20428 if ln -s conf$$.file conf$$ 2>/dev/null; then
20429 as_ln_s='ln -s'
20430 # ... but there are two gotchas:
20431 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20432 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20433 # In both cases, we have to default to `cp -pR'.
20434 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20435 as_ln_s='cp -pR'
20436 elif ln conf$$.file conf$$ 2>/dev/null; then
20437 as_ln_s=ln
20438 else
20439 as_ln_s='cp -pR'
20441 else
20442 as_ln_s='cp -pR'
20444 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20445 rmdir conf$$.dir 2>/dev/null
20448 # as_fn_mkdir_p
20449 # -------------
20450 # Create "$as_dir" as a directory, including parents if necessary.
20451 as_fn_mkdir_p ()
20454 case $as_dir in #(
20455 -*) as_dir=./$as_dir;;
20456 esac
20457 test -d "$as_dir" || eval $as_mkdir_p || {
20458 as_dirs=
20459 while :; do
20460 case $as_dir in #(
20461 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20462 *) as_qdir=$as_dir;;
20463 esac
20464 as_dirs="'$as_qdir' $as_dirs"
20465 as_dir=`$as_dirname -- "$as_dir" ||
20466 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20467 X"$as_dir" : 'X\(//\)[^/]' \| \
20468 X"$as_dir" : 'X\(//\)$' \| \
20469 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20470 $as_echo X"$as_dir" |
20471 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20472 s//\1/
20475 /^X\(\/\/\)[^/].*/{
20476 s//\1/
20479 /^X\(\/\/\)$/{
20480 s//\1/
20483 /^X\(\/\).*/{
20484 s//\1/
20487 s/.*/./; q'`
20488 test -d "$as_dir" && break
20489 done
20490 test -z "$as_dirs" || eval "mkdir $as_dirs"
20491 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20494 } # as_fn_mkdir_p
20495 if mkdir -p . 2>/dev/null; then
20496 as_mkdir_p='mkdir -p "$as_dir"'
20497 else
20498 test -d ./-p && rmdir ./-p
20499 as_mkdir_p=false
20503 # as_fn_executable_p FILE
20504 # -----------------------
20505 # Test if FILE is an executable regular file.
20506 as_fn_executable_p ()
20508 test -f "$1" && test -x "$1"
20509 } # as_fn_executable_p
20510 as_test_x='test -x'
20511 as_executable_p=as_fn_executable_p
20513 # Sed expression to map a string onto a valid CPP name.
20514 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20516 # Sed expression to map a string onto a valid variable name.
20517 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20520 exec 6>&1
20521 ## ----------------------------------- ##
20522 ## Main body of $CONFIG_STATUS script. ##
20523 ## ----------------------------------- ##
20524 _ASEOF
20525 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20527 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20528 # Save the log message, to keep $0 and so on meaningful, and to
20529 # report actual input values of CONFIG_FILES etc. instead of their
20530 # values after options handling.
20531 ac_log="
20532 This file was extended by PostgreSQL $as_me 15devel, which was
20533 generated by GNU Autoconf 2.69. Invocation command line was
20535 CONFIG_FILES = $CONFIG_FILES
20536 CONFIG_HEADERS = $CONFIG_HEADERS
20537 CONFIG_LINKS = $CONFIG_LINKS
20538 CONFIG_COMMANDS = $CONFIG_COMMANDS
20539 $ $0 $@
20541 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20544 _ACEOF
20546 case $ac_config_files in *"
20547 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20548 esac
20550 case $ac_config_headers in *"
20551 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20552 esac
20555 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20556 # Files that config.status was made for.
20557 config_files="$ac_config_files"
20558 config_headers="$ac_config_headers"
20559 config_links="$ac_config_links"
20560 config_commands="$ac_config_commands"
20562 _ACEOF
20564 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20565 ac_cs_usage="\
20566 \`$as_me' instantiates files and other configuration actions
20567 from templates according to the current configuration. Unless the files
20568 and actions are specified as TAGs, all are instantiated by default.
20570 Usage: $0 [OPTION]... [TAG]...
20572 -h, --help print this help, then exit
20573 -V, --version print version number and configuration settings, then exit
20574 --config print configuration, then exit
20575 -q, --quiet, --silent
20576 do not print progress messages
20577 -d, --debug don't remove temporary files
20578 --recheck update $as_me by reconfiguring in the same conditions
20579 --file=FILE[:TEMPLATE]
20580 instantiate the configuration file FILE
20581 --header=FILE[:TEMPLATE]
20582 instantiate the configuration header FILE
20584 Configuration files:
20585 $config_files
20587 Configuration headers:
20588 $config_headers
20590 Configuration links:
20591 $config_links
20593 Configuration commands:
20594 $config_commands
20596 Report bugs to <pgsql-bugs@lists.postgresql.org>.
20597 PostgreSQL home page: <https://www.postgresql.org/>."
20599 _ACEOF
20600 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20601 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20602 ac_cs_version="\\
20603 PostgreSQL config.status 15devel
20604 configured by $0, generated by GNU Autoconf 2.69,
20605 with options \\"\$ac_cs_config\\"
20607 Copyright (C) 2012 Free Software Foundation, Inc.
20608 This config.status script is free software; the Free Software Foundation
20609 gives unlimited permission to copy, distribute and modify it."
20611 ac_pwd='$ac_pwd'
20612 srcdir='$srcdir'
20613 INSTALL='$INSTALL'
20614 MKDIR_P='$MKDIR_P'
20615 AWK='$AWK'
20616 test -n "\$AWK" || AWK=awk
20617 _ACEOF
20619 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20620 # The default lists apply if the user does not specify any file.
20621 ac_need_defaults=:
20622 while test $# != 0
20624 case $1 in
20625 --*=?*)
20626 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20627 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20628 ac_shift=:
20630 --*=)
20631 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20632 ac_optarg=
20633 ac_shift=:
20636 ac_option=$1
20637 ac_optarg=$2
20638 ac_shift=shift
20640 esac
20642 case $ac_option in
20643 # Handling of the options.
20644 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20645 ac_cs_recheck=: ;;
20646 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20647 $as_echo "$ac_cs_version"; exit ;;
20648 --config | --confi | --conf | --con | --co | --c )
20649 $as_echo "$ac_cs_config"; exit ;;
20650 --debug | --debu | --deb | --de | --d | -d )
20651 debug=: ;;
20652 --file | --fil | --fi | --f )
20653 $ac_shift
20654 case $ac_optarg in
20655 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20656 '') as_fn_error $? "missing file argument" ;;
20657 esac
20658 as_fn_append CONFIG_FILES " '$ac_optarg'"
20659 ac_need_defaults=false;;
20660 --header | --heade | --head | --hea )
20661 $ac_shift
20662 case $ac_optarg in
20663 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20664 esac
20665 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20666 ac_need_defaults=false;;
20667 --he | --h)
20668 # Conflict between --help and --header
20669 as_fn_error $? "ambiguous option: \`$1'
20670 Try \`$0 --help' for more information.";;
20671 --help | --hel | -h )
20672 $as_echo "$ac_cs_usage"; exit ;;
20673 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20674 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20675 ac_cs_silent=: ;;
20677 # This is an error.
20678 -*) as_fn_error $? "unrecognized option: \`$1'
20679 Try \`$0 --help' for more information." ;;
20681 *) as_fn_append ac_config_targets " $1"
20682 ac_need_defaults=false ;;
20684 esac
20685 shift
20686 done
20688 ac_configure_extra_args=
20690 if $ac_cs_silent; then
20691 exec 6>/dev/null
20692 ac_configure_extra_args="$ac_configure_extra_args --silent"
20695 _ACEOF
20696 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20697 if \$ac_cs_recheck; then
20698 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20699 shift
20700 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20701 CONFIG_SHELL='$SHELL'
20702 export CONFIG_SHELL
20703 exec "\$@"
20706 _ACEOF
20707 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20708 exec 5>>config.log
20710 echo
20711 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20712 ## Running $as_me. ##
20713 _ASBOX
20714 $as_echo "$ac_log"
20715 } >&5
20717 _ACEOF
20718 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20719 _ACEOF
20721 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20723 # Handling of arguments.
20724 for ac_config_target in $ac_config_targets
20726 case $ac_config_target in
20727 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20728 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20729 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20730 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20731 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20732 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20733 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20734 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20735 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20736 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20737 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20739 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20740 esac
20741 done
20744 # If the user did not use the arguments to specify the items to instantiate,
20745 # then the envvar interface is used. Set only those that are not.
20746 # We use the long form for the default assignment because of an extremely
20747 # bizarre bug on SunOS 4.1.3.
20748 if $ac_need_defaults; then
20749 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20750 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20751 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20752 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20755 # Have a temporary directory for convenience. Make it in the build tree
20756 # simply because there is no reason against having it here, and in addition,
20757 # creating and moving files from /tmp can sometimes cause problems.
20758 # Hook for its removal unless debugging.
20759 # Note that there is a small window in which the directory will not be cleaned:
20760 # after its creation but before its name has been assigned to `$tmp'.
20761 $debug ||
20763 tmp= ac_tmp=
20764 trap 'exit_status=$?
20765 : "${ac_tmp:=$tmp}"
20766 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20768 trap 'as_fn_exit 1' 1 2 13 15
20770 # Create a (secure) tmp directory for tmp files.
20773 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20774 test -d "$tmp"
20775 } ||
20777 tmp=./conf$$-$RANDOM
20778 (umask 077 && mkdir "$tmp")
20779 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20780 ac_tmp=$tmp
20782 # Set up the scripts for CONFIG_FILES section.
20783 # No need to generate them if there are no CONFIG_FILES.
20784 # This happens for instance with `./config.status config.h'.
20785 if test -n "$CONFIG_FILES"; then
20788 ac_cr=`echo X | tr X '\015'`
20789 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20790 # But we know of no other shell where ac_cr would be empty at this
20791 # point, so we can use a bashism as a fallback.
20792 if test "x$ac_cr" = x; then
20793 eval ac_cr=\$\'\\r\'
20795 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20796 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20797 ac_cs_awk_cr='\\r'
20798 else
20799 ac_cs_awk_cr=$ac_cr
20802 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20803 _ACEOF
20807 echo "cat >conf$$subs.awk <<_ACEOF" &&
20808 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20809 echo "_ACEOF"
20810 } >conf$$subs.sh ||
20811 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20812 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20813 ac_delim='%!_!# '
20814 for ac_last_try in false false false false false :; do
20815 . ./conf$$subs.sh ||
20816 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20818 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20819 if test $ac_delim_n = $ac_delim_num; then
20820 break
20821 elif $ac_last_try; then
20822 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20823 else
20824 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20826 done
20827 rm -f conf$$subs.sh
20829 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20830 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20831 _ACEOF
20832 sed -n '
20834 s/^/S["/; s/!.*/"]=/
20837 s/^[^!]*!//
20838 :repl
20839 t repl
20840 s/'"$ac_delim"'$//
20841 t delim
20844 s/\(.\{148\}\)..*/\1/
20845 t more1
20846 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20849 b repl
20850 :more1
20851 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20854 s/.\{148\}//
20855 t nl
20856 :delim
20858 s/\(.\{148\}\)..*/\1/
20859 t more2
20860 s/["\\]/\\&/g; s/^/"/; s/$/"/
20863 :more2
20864 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20867 s/.\{148\}//
20868 t delim
20869 ' <conf$$subs.awk | sed '
20870 /^[^""]/{
20872 s/\n//
20874 ' >>$CONFIG_STATUS || ac_write_fail=1
20875 rm -f conf$$subs.awk
20876 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20877 _ACAWK
20878 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20879 for (key in S) S_is_set[key] = 1
20880 FS = "\a"
20884 line = $ 0
20885 nfields = split(line, field, "@")
20886 substed = 0
20887 len = length(field[1])
20888 for (i = 2; i < nfields; i++) {
20889 key = field[i]
20890 keylen = length(key)
20891 if (S_is_set[key]) {
20892 value = S[key]
20893 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20894 len += length(value) + length(field[++i])
20895 substed = 1
20896 } else
20897 len += 1 + keylen
20900 print line
20903 _ACAWK
20904 _ACEOF
20905 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20906 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20907 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20908 else
20910 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20911 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20912 _ACEOF
20914 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20915 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20916 # trailing colons and then remove the whole line if VPATH becomes empty
20917 # (actually we leave an empty line to preserve line numbers).
20918 if test "x$srcdir" = x.; then
20919 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20921 s///
20922 s/^/:/
20923 s/[ ]*$/:/
20924 s/:\$(srcdir):/:/g
20925 s/:\${srcdir}:/:/g
20926 s/:@srcdir@:/:/g
20927 s/^:*//
20928 s/:*$//
20930 s/\(=[ ]*\).*/\1/
20932 s/\n//
20933 s/^[^=]*=[ ]*$//
20937 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20938 fi # test -n "$CONFIG_FILES"
20940 # Set up the scripts for CONFIG_HEADERS section.
20941 # No need to generate them if there are no CONFIG_HEADERS.
20942 # This happens for instance with `./config.status Makefile'.
20943 if test -n "$CONFIG_HEADERS"; then
20944 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20945 BEGIN {
20946 _ACEOF
20948 # Transform confdefs.h into an awk script `defines.awk', embedded as
20949 # here-document in config.status, that substitutes the proper values into
20950 # config.h.in to produce config.h.
20952 # Create a delimiter string that does not exist in confdefs.h, to ease
20953 # handling of long lines.
20954 ac_delim='%!_!# '
20955 for ac_last_try in false false :; do
20956 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20957 if test -z "$ac_tt"; then
20958 break
20959 elif $ac_last_try; then
20960 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20961 else
20962 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20964 done
20966 # For the awk script, D is an array of macro values keyed by name,
20967 # likewise P contains macro parameters if any. Preserve backslash
20968 # newline sequences.
20970 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20971 sed -n '
20972 s/.\{148\}/&'"$ac_delim"'/g
20973 t rset
20974 :rset
20975 s/^[ ]*#[ ]*define[ ][ ]*/ /
20976 t def
20978 :def
20979 s/\\$//
20980 t bsnl
20981 s/["\\]/\\&/g
20982 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20983 D["\1"]=" \3"/p
20984 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20986 :bsnl
20987 s/["\\]/\\&/g
20988 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20989 D["\1"]=" \3\\\\\\n"\\/p
20990 t cont
20991 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20992 t cont
20994 :cont
20996 s/.\{148\}/&'"$ac_delim"'/g
20997 t clear
20998 :clear
20999 s/\\$//
21000 t bsnlc
21001 s/["\\]/\\&/g; s/^/"/; s/$/"/p
21003 :bsnlc
21004 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21005 b cont
21006 ' <confdefs.h | sed '
21007 s/'"$ac_delim"'/"\\\
21008 "/g' >>$CONFIG_STATUS || ac_write_fail=1
21010 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21011 for (key in D) D_is_set[key] = 1
21012 FS = "\a"
21014 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21015 line = \$ 0
21016 split(line, arg, " ")
21017 if (arg[1] == "#") {
21018 defundef = arg[2]
21019 mac1 = arg[3]
21020 } else {
21021 defundef = substr(arg[1], 2)
21022 mac1 = arg[2]
21024 split(mac1, mac2, "(") #)
21025 macro = mac2[1]
21026 prefix = substr(line, 1, index(line, defundef) - 1)
21027 if (D_is_set[macro]) {
21028 # Preserve the white space surrounding the "#".
21029 print prefix "define", macro P[macro] D[macro]
21030 next
21031 } else {
21032 # Replace #undef with comments. This is necessary, for example,
21033 # in the case of _POSIX_SOURCE, which is predefined and required
21034 # on some systems where configure will not decide to define it.
21035 if (defundef == "undef") {
21036 print "/*", prefix defundef, macro, "*/"
21037 next
21041 { print }
21042 _ACAWK
21043 _ACEOF
21044 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21045 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
21046 fi # test -n "$CONFIG_HEADERS"
21049 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
21050 shift
21051 for ac_tag
21053 case $ac_tag in
21054 :[FHLC]) ac_mode=$ac_tag; continue;;
21055 esac
21056 case $ac_mode$ac_tag in
21057 :[FHL]*:*);;
21058 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
21059 :[FH]-) ac_tag=-:-;;
21060 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21061 esac
21062 ac_save_IFS=$IFS
21063 IFS=:
21064 set x $ac_tag
21065 IFS=$ac_save_IFS
21066 shift
21067 ac_file=$1
21068 shift
21070 case $ac_mode in
21071 :L) ac_source=$1;;
21072 :[FH])
21073 ac_file_inputs=
21074 for ac_f
21076 case $ac_f in
21077 -) ac_f="$ac_tmp/stdin";;
21078 *) # Look for the file first in the build tree, then in the source tree
21079 # (if the path is not absolute). The absolute path cannot be DOS-style,
21080 # because $ac_f cannot contain `:'.
21081 test -f "$ac_f" ||
21082 case $ac_f in
21083 [\\/$]*) false;;
21084 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21085 esac ||
21086 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21087 esac
21088 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21089 as_fn_append ac_file_inputs " '$ac_f'"
21090 done
21092 # Let's still pretend it is `configure' which instantiates (i.e., don't
21093 # use $as_me), people would be surprised to read:
21094 # /* config.h. Generated by config.status. */
21095 configure_input='Generated from '`
21096 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21097 `' by configure.'
21098 if test x"$ac_file" != x-; then
21099 configure_input="$ac_file. $configure_input"
21100 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21101 $as_echo "$as_me: creating $ac_file" >&6;}
21103 # Neutralize special characters interpreted by sed in replacement strings.
21104 case $configure_input in #(
21105 *\&* | *\|* | *\\* )
21106 ac_sed_conf_input=`$as_echo "$configure_input" |
21107 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21108 *) ac_sed_conf_input=$configure_input;;
21109 esac
21111 case $ac_tag in
21112 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21113 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21114 esac
21116 esac
21118 ac_dir=`$as_dirname -- "$ac_file" ||
21119 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21120 X"$ac_file" : 'X\(//\)[^/]' \| \
21121 X"$ac_file" : 'X\(//\)$' \| \
21122 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21123 $as_echo X"$ac_file" |
21124 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21125 s//\1/
21128 /^X\(\/\/\)[^/].*/{
21129 s//\1/
21132 /^X\(\/\/\)$/{
21133 s//\1/
21136 /^X\(\/\).*/{
21137 s//\1/
21140 s/.*/./; q'`
21141 as_dir="$ac_dir"; as_fn_mkdir_p
21142 ac_builddir=.
21144 case "$ac_dir" in
21145 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21147 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21148 # A ".." for each directory in $ac_dir_suffix.
21149 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21150 case $ac_top_builddir_sub in
21151 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21152 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21153 esac ;;
21154 esac
21155 ac_abs_top_builddir=$ac_pwd
21156 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21157 # for backward compatibility:
21158 ac_top_builddir=$ac_top_build_prefix
21160 case $srcdir in
21161 .) # We are building in place.
21162 ac_srcdir=.
21163 ac_top_srcdir=$ac_top_builddir_sub
21164 ac_abs_top_srcdir=$ac_pwd ;;
21165 [\\/]* | ?:[\\/]* ) # Absolute name.
21166 ac_srcdir=$srcdir$ac_dir_suffix;
21167 ac_top_srcdir=$srcdir
21168 ac_abs_top_srcdir=$srcdir ;;
21169 *) # Relative name.
21170 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21171 ac_top_srcdir=$ac_top_build_prefix$srcdir
21172 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21173 esac
21174 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21177 case $ac_mode in
21180 # CONFIG_FILE
21183 case $INSTALL in
21184 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21185 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21186 esac
21187 ac_MKDIR_P=$MKDIR_P
21188 case $MKDIR_P in
21189 [\\/$]* | ?:[\\/]* ) ;;
21190 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21191 esac
21192 _ACEOF
21194 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21195 # If the template does not know about datarootdir, expand it.
21196 # FIXME: This hack should be removed a few years after 2.60.
21197 ac_datarootdir_hack=; ac_datarootdir_seen=
21198 ac_sed_dataroot='
21199 /datarootdir/ {
21203 /@datadir@/p
21204 /@docdir@/p
21205 /@infodir@/p
21206 /@localedir@/p
21207 /@mandir@/p'
21208 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21209 *datarootdir*) ac_datarootdir_seen=yes;;
21210 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21211 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21212 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21213 _ACEOF
21214 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21215 ac_datarootdir_hack='
21216 s&@datadir@&$datadir&g
21217 s&@docdir@&$docdir&g
21218 s&@infodir@&$infodir&g
21219 s&@localedir@&$localedir&g
21220 s&@mandir@&$mandir&g
21221 s&\\\${datarootdir}&$datarootdir&g' ;;
21222 esac
21223 _ACEOF
21225 # Neutralize VPATH when `$srcdir' = `.'.
21226 # Shell code in configure.ac might set extrasub.
21227 # FIXME: do we really want to maintain this feature?
21228 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21229 ac_sed_extra="$ac_vpsub
21230 $extrasub
21231 _ACEOF
21232 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21234 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21235 s|@configure_input@|$ac_sed_conf_input|;t t
21236 s&@top_builddir@&$ac_top_builddir_sub&;t t
21237 s&@top_build_prefix@&$ac_top_build_prefix&;t t
21238 s&@srcdir@&$ac_srcdir&;t t
21239 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21240 s&@top_srcdir@&$ac_top_srcdir&;t t
21241 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21242 s&@builddir@&$ac_builddir&;t t
21243 s&@abs_builddir@&$ac_abs_builddir&;t t
21244 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21245 s&@INSTALL@&$ac_INSTALL&;t t
21246 s&@MKDIR_P@&$ac_MKDIR_P&;t t
21247 $ac_datarootdir_hack
21249 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21250 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21252 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21253 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21254 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21255 "$ac_tmp/out"`; test -z "$ac_out"; } &&
21256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21257 which seems to be undefined. Please make sure it is defined" >&5
21258 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21259 which seems to be undefined. Please make sure it is defined" >&2;}
21261 rm -f "$ac_tmp/stdin"
21262 case $ac_file in
21263 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21264 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21265 esac \
21266 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21270 # CONFIG_HEADER
21272 if test x"$ac_file" != x-; then
21274 $as_echo "/* $configure_input */" \
21275 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21276 } >"$ac_tmp/config.h" \
21277 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21278 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21279 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21280 $as_echo "$as_me: $ac_file is unchanged" >&6;}
21281 else
21282 rm -f "$ac_file"
21283 mv "$ac_tmp/config.h" "$ac_file" \
21284 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21286 else
21287 $as_echo "/* $configure_input */" \
21288 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21289 || as_fn_error $? "could not create -" "$LINENO" 5
21294 # CONFIG_LINK
21297 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21299 else
21300 # Prefer the file from the source tree if names are identical.
21301 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21302 ac_source=$srcdir/$ac_source
21305 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21306 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
21308 if test ! -r "$ac_source"; then
21309 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
21311 rm -f "$ac_file"
21313 # Try a relative symlink, then a hard link, then a copy.
21314 case $ac_source in
21315 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21316 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21317 esac
21318 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21319 ln "$ac_source" "$ac_file" 2>/dev/null ||
21320 cp -p "$ac_source" "$ac_file" ||
21321 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
21324 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21325 $as_echo "$as_me: executing $ac_file commands" >&6;}
21327 esac
21330 case $ac_file$ac_mode in
21331 "check_win32_symlinks":C)
21332 # Links sometimes fail undetected on Mingw -
21333 # so here we detect it and warn the user
21334 for FILE in $CONFIG_LINKS
21336 # test -e works for symlinks in the MinGW console
21337 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
21338 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
21339 done
21341 "src/include/pg_config.h":H)
21342 # Update timestamp for pg_config.h (see Makefile.global)
21343 echo >src/include/stamp-h
21345 "src/include/pg_config_ext.h":H)
21346 # Update timestamp for pg_config_ext.h (see Makefile.global)
21347 echo >src/include/stamp-ext-h
21349 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
21351 esac
21352 done # for ac_tag
21355 as_fn_exit 0
21356 _ACEOF
21357 ac_clean_files=$ac_clean_files_save
21359 test $ac_write_fail = 0 ||
21360 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21363 # configure is writing to config.log, and then calls config.status.
21364 # config.status does its own redirection, appending to config.log.
21365 # Unfortunately, on DOS this fails, as config.log is still kept open
21366 # by configure, so config.status won't be able to write to it; its
21367 # output is simply discarded. So we exec the FD to /dev/null,
21368 # effectively closing config.log, so it can be properly (re)opened and
21369 # appended to by config.status. When coming back to configure, we
21370 # need to make the FD available again.
21371 if test "$no_create" != yes; then
21372 ac_cs_success=:
21373 ac_config_status_args=
21374 test "$silent" = yes &&
21375 ac_config_status_args="$ac_config_status_args --quiet"
21376 exec 5>/dev/null
21377 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21378 exec 5>>config.log
21379 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21380 # would make configure fail if this is the last instruction.
21381 $ac_cs_success || as_fn_exit 1
21383 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21384 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21385 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}