Stamp 13.16.
[pgsql.git] / configure
blobedd5c28add8cb7ad3646dbcf12c2732ce2ab0d66
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 13.16.
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-2020, 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='13.16'
586 PACKAGE_STRING='PostgreSQL 13.16'
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 UUID_LIBS
654 LDAP_LIBS_BE
655 LDAP_LIBS_FE
656 PTHREAD_CFLAGS
657 PTHREAD_LIBS
658 PTHREAD_CC
659 ax_pthread_config
660 EGREP
661 GREP
664 python_additional_libs
665 python_libspec
666 python_libdir
667 python_includespec
668 python_version
669 python_majorversion
670 PYTHON
671 perl_embed_ldflags
672 perl_embed_ccflags
673 perl_includespec
674 perl_useshrplib
675 perl_privlibexp
676 perl_archlibexp
677 PERL
678 FLEXFLAGS
679 FLEX
680 BISONFLAGS
681 BISON
682 MKDIR_P
683 LN_S
685 install_bin
686 INSTALL_DATA
687 INSTALL_SCRIPT
688 INSTALL_PROGRAM
689 WINDRES
690 DLLWRAP
691 DLLTOOL
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 RANLIB
697 with_gnu_ld
699 LDFLAGS_SL
700 LDFLAGS_EX
701 with_zlib
702 with_system_tzdata
703 with_libxslt
704 XML2_LIBS
705 XML2_CFLAGS
706 XML2_CONFIG
707 with_libxml
708 UUID_EXTRA_OBJS
709 with_uuid
710 with_readline
711 with_systemd
712 with_selinux
713 with_openssl
714 with_ldap
715 with_krb_srvnam
716 krb_srvtab
717 with_gssapi
718 with_python
719 with_perl
720 with_tcl
721 ICU_LIBS
722 ICU_CFLAGS
723 with_icu
724 enable_thread_safety
725 INCLUDES
726 autodepend
727 PKG_CONFIG_LIBDIR
728 PKG_CONFIG_PATH
729 PKG_CONFIG
733 CFLAGS_SL
734 BITCODE_CXXFLAGS
735 BITCODE_CFLAGS
736 CFLAGS_VECTOR
737 PERMIT_DECLARATION_AFTER_STATEMENT
738 LLVM_BINPATH
739 LLVM_CXXFLAGS
740 LLVM_CFLAGS
741 LLVM_CPPFLAGS
742 LLVM_LIBS
743 CLANG
744 LLVM_CONFIG
746 with_llvm
747 SUN_STUDIO_CC
748 ac_ct_CXX
749 CXXFLAGS
751 OBJEXT
752 EXEEXT
753 ac_ct_CC
754 CPPFLAGS
755 LDFLAGS
756 CFLAGS
758 enable_tap_tests
759 enable_dtrace
760 DTRACEFLAGS
761 DTRACE
762 enable_coverage
763 GENHTML
764 LCOV
765 GCOV
766 enable_debug
767 enable_rpath
768 default_port
769 WANTED_LANGUAGES
770 enable_nls
771 PORTNAME
772 host_os
773 host_vendor
774 host_cpu
775 host
776 build_os
777 build_vendor
778 build_cpu
779 build
780 PG_MAJORVERSION
781 target_alias
782 host_alias
783 build_alias
784 LIBS
785 ECHO_T
786 ECHO_N
787 ECHO_C
788 DEFS
789 mandir
790 localedir
791 libdir
792 psdir
793 pdfdir
794 dvidir
795 htmldir
796 infodir
797 docdir
798 oldincludedir
799 includedir
800 localstatedir
801 sharedstatedir
802 sysconfdir
803 datadir
804 datarootdir
805 libexecdir
806 sbindir
807 bindir
808 program_transform_name
809 prefix
810 exec_prefix
811 PACKAGE_URL
812 PACKAGE_BUGREPORT
813 PACKAGE_STRING
814 PACKAGE_VERSION
815 PACKAGE_TARNAME
816 PACKAGE_NAME
817 PATH_SEPARATOR
818 SHELL'
819 ac_subst_files=''
820 ac_user_opts='
821 enable_option_checking
822 with_extra_version
823 with_template
824 with_includes
825 with_libraries
826 with_libs
827 enable_integer_datetimes
828 enable_nls
829 with_pgport
830 enable_rpath
831 enable_spinlocks
832 enable_atomics
833 enable_debug
834 enable_profiling
835 enable_coverage
836 enable_dtrace
837 enable_tap_tests
838 with_blocksize
839 with_segsize
840 with_wal_blocksize
841 with_CC
842 with_llvm
843 enable_depend
844 enable_cassert
845 enable_thread_safety
846 with_icu
847 with_tcl
848 with_tclconfig
849 with_perl
850 with_python
851 with_gssapi
852 with_krb_srvnam
853 with_pam
854 with_bsd_auth
855 with_ldap
856 with_bonjour
857 with_openssl
858 with_selinux
859 with_systemd
860 with_readline
861 with_libedit_preferred
862 with_uuid
863 with_ossp_uuid
864 with_libxml
865 with_libxslt
866 with_system_tzdata
867 with_zlib
868 with_gnu_ld
869 enable_largefile
871 ac_precious_vars='build_alias
872 host_alias
873 target_alias
875 CFLAGS
876 LDFLAGS
877 LIBS
878 CPPFLAGS
880 CXXFLAGS
882 LLVM_CONFIG
883 CLANG
885 PKG_CONFIG
886 PKG_CONFIG_PATH
887 PKG_CONFIG_LIBDIR
888 ICU_CFLAGS
889 ICU_LIBS
890 XML2_CONFIG
891 XML2_CFLAGS
892 XML2_LIBS
893 LDFLAGS_EX
894 LDFLAGS_SL
895 PERL
896 PYTHON
897 MSGFMT
898 TCLSH'
901 # Initialize some variables set by options.
902 ac_init_help=
903 ac_init_version=false
904 ac_unrecognized_opts=
905 ac_unrecognized_sep=
906 # The variables have the same names as the options, with
907 # dashes changed to underlines.
908 cache_file=/dev/null
909 exec_prefix=NONE
910 no_create=
911 no_recursion=
912 prefix=NONE
913 program_prefix=NONE
914 program_suffix=NONE
915 program_transform_name=s,x,x,
916 silent=
917 site=
918 srcdir=
919 verbose=
920 x_includes=NONE
921 x_libraries=NONE
923 # Installation directory options.
924 # These are left unexpanded so users can "make install exec_prefix=/foo"
925 # and all the variables that are supposed to be based on exec_prefix
926 # by default will actually change.
927 # Use braces instead of parens because sh, perl, etc. also accept them.
928 # (The list follows the same order as the GNU Coding Standards.)
929 bindir='${exec_prefix}/bin'
930 sbindir='${exec_prefix}/sbin'
931 libexecdir='${exec_prefix}/libexec'
932 datarootdir='${prefix}/share'
933 datadir='${datarootdir}'
934 sysconfdir='${prefix}/etc'
935 sharedstatedir='${prefix}/com'
936 localstatedir='${prefix}/var'
937 includedir='${prefix}/include'
938 oldincludedir='/usr/include'
939 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
940 infodir='${datarootdir}/info'
941 htmldir='${docdir}'
942 dvidir='${docdir}'
943 pdfdir='${docdir}'
944 psdir='${docdir}'
945 libdir='${exec_prefix}/lib'
946 localedir='${datarootdir}/locale'
947 mandir='${datarootdir}/man'
949 ac_prev=
950 ac_dashdash=
951 for ac_option
953 # If the previous option needs an argument, assign it.
954 if test -n "$ac_prev"; then
955 eval $ac_prev=\$ac_option
956 ac_prev=
957 continue
960 case $ac_option in
961 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
962 *=) ac_optarg= ;;
963 *) ac_optarg=yes ;;
964 esac
966 # Accept the important Cygnus configure options, so we can diagnose typos.
968 case $ac_dashdash$ac_option in
970 ac_dashdash=yes ;;
972 -bindir | --bindir | --bindi | --bind | --bin | --bi)
973 ac_prev=bindir ;;
974 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
975 bindir=$ac_optarg ;;
977 -build | --build | --buil | --bui | --bu)
978 ac_prev=build_alias ;;
979 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
980 build_alias=$ac_optarg ;;
982 -cache-file | --cache-file | --cache-fil | --cache-fi \
983 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
984 ac_prev=cache_file ;;
985 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
986 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
987 cache_file=$ac_optarg ;;
989 --config-cache | -C)
990 cache_file=config.cache ;;
992 -datadir | --datadir | --datadi | --datad)
993 ac_prev=datadir ;;
994 -datadir=* | --datadir=* | --datadi=* | --datad=*)
995 datadir=$ac_optarg ;;
997 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
998 | --dataroo | --dataro | --datar)
999 ac_prev=datarootdir ;;
1000 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1001 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1002 datarootdir=$ac_optarg ;;
1004 -disable-* | --disable-*)
1005 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1006 # Reject names that are not valid shell variable names.
1007 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1008 as_fn_error $? "invalid feature name: $ac_useropt"
1009 ac_useropt_orig=$ac_useropt
1010 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1011 case $ac_user_opts in
1013 "enable_$ac_useropt"
1014 "*) ;;
1015 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1016 ac_unrecognized_sep=', ';;
1017 esac
1018 eval enable_$ac_useropt=no ;;
1020 -docdir | --docdir | --docdi | --doc | --do)
1021 ac_prev=docdir ;;
1022 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1023 docdir=$ac_optarg ;;
1025 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1026 ac_prev=dvidir ;;
1027 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1028 dvidir=$ac_optarg ;;
1030 -enable-* | --enable-*)
1031 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1032 # Reject names that are not valid shell variable names.
1033 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1034 as_fn_error $? "invalid feature name: $ac_useropt"
1035 ac_useropt_orig=$ac_useropt
1036 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1037 case $ac_user_opts in
1039 "enable_$ac_useropt"
1040 "*) ;;
1041 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1042 ac_unrecognized_sep=', ';;
1043 esac
1044 eval enable_$ac_useropt=\$ac_optarg ;;
1046 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1047 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1048 | --exec | --exe | --ex)
1049 ac_prev=exec_prefix ;;
1050 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1051 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1052 | --exec=* | --exe=* | --ex=*)
1053 exec_prefix=$ac_optarg ;;
1055 -gas | --gas | --ga | --g)
1056 # Obsolete; use --with-gas.
1057 with_gas=yes ;;
1059 -help | --help | --hel | --he | -h)
1060 ac_init_help=long ;;
1061 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1062 ac_init_help=recursive ;;
1063 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1064 ac_init_help=short ;;
1066 -host | --host | --hos | --ho)
1067 ac_prev=host_alias ;;
1068 -host=* | --host=* | --hos=* | --ho=*)
1069 host_alias=$ac_optarg ;;
1071 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1072 ac_prev=htmldir ;;
1073 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1074 | --ht=*)
1075 htmldir=$ac_optarg ;;
1077 -includedir | --includedir | --includedi | --included | --include \
1078 | --includ | --inclu | --incl | --inc)
1079 ac_prev=includedir ;;
1080 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1081 | --includ=* | --inclu=* | --incl=* | --inc=*)
1082 includedir=$ac_optarg ;;
1084 -infodir | --infodir | --infodi | --infod | --info | --inf)
1085 ac_prev=infodir ;;
1086 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1087 infodir=$ac_optarg ;;
1089 -libdir | --libdir | --libdi | --libd)
1090 ac_prev=libdir ;;
1091 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1092 libdir=$ac_optarg ;;
1094 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1095 | --libexe | --libex | --libe)
1096 ac_prev=libexecdir ;;
1097 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1098 | --libexe=* | --libex=* | --libe=*)
1099 libexecdir=$ac_optarg ;;
1101 -localedir | --localedir | --localedi | --localed | --locale)
1102 ac_prev=localedir ;;
1103 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1104 localedir=$ac_optarg ;;
1106 -localstatedir | --localstatedir | --localstatedi | --localstated \
1107 | --localstate | --localstat | --localsta | --localst | --locals)
1108 ac_prev=localstatedir ;;
1109 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1110 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1111 localstatedir=$ac_optarg ;;
1113 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1114 ac_prev=mandir ;;
1115 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1116 mandir=$ac_optarg ;;
1118 -nfp | --nfp | --nf)
1119 # Obsolete; use --without-fp.
1120 with_fp=no ;;
1122 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1123 | --no-cr | --no-c | -n)
1124 no_create=yes ;;
1126 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1127 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1128 no_recursion=yes ;;
1130 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1131 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1132 | --oldin | --oldi | --old | --ol | --o)
1133 ac_prev=oldincludedir ;;
1134 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1135 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1136 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1137 oldincludedir=$ac_optarg ;;
1139 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1140 ac_prev=prefix ;;
1141 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1142 prefix=$ac_optarg ;;
1144 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1145 | --program-pre | --program-pr | --program-p)
1146 ac_prev=program_prefix ;;
1147 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1148 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1149 program_prefix=$ac_optarg ;;
1151 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1152 | --program-suf | --program-su | --program-s)
1153 ac_prev=program_suffix ;;
1154 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1155 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1156 program_suffix=$ac_optarg ;;
1158 -program-transform-name | --program-transform-name \
1159 | --program-transform-nam | --program-transform-na \
1160 | --program-transform-n | --program-transform- \
1161 | --program-transform | --program-transfor \
1162 | --program-transfo | --program-transf \
1163 | --program-trans | --program-tran \
1164 | --progr-tra | --program-tr | --program-t)
1165 ac_prev=program_transform_name ;;
1166 -program-transform-name=* | --program-transform-name=* \
1167 | --program-transform-nam=* | --program-transform-na=* \
1168 | --program-transform-n=* | --program-transform-=* \
1169 | --program-transform=* | --program-transfor=* \
1170 | --program-transfo=* | --program-transf=* \
1171 | --program-trans=* | --program-tran=* \
1172 | --progr-tra=* | --program-tr=* | --program-t=*)
1173 program_transform_name=$ac_optarg ;;
1175 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1176 ac_prev=pdfdir ;;
1177 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1178 pdfdir=$ac_optarg ;;
1180 -psdir | --psdir | --psdi | --psd | --ps)
1181 ac_prev=psdir ;;
1182 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1183 psdir=$ac_optarg ;;
1185 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1186 | -silent | --silent | --silen | --sile | --sil)
1187 silent=yes ;;
1189 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1190 ac_prev=sbindir ;;
1191 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1192 | --sbi=* | --sb=*)
1193 sbindir=$ac_optarg ;;
1195 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1196 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1197 | --sharedst | --shareds | --shared | --share | --shar \
1198 | --sha | --sh)
1199 ac_prev=sharedstatedir ;;
1200 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1201 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1202 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1203 | --sha=* | --sh=*)
1204 sharedstatedir=$ac_optarg ;;
1206 -site | --site | --sit)
1207 ac_prev=site ;;
1208 -site=* | --site=* | --sit=*)
1209 site=$ac_optarg ;;
1211 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1212 ac_prev=srcdir ;;
1213 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1214 srcdir=$ac_optarg ;;
1216 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1217 | --syscon | --sysco | --sysc | --sys | --sy)
1218 ac_prev=sysconfdir ;;
1219 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1220 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1221 sysconfdir=$ac_optarg ;;
1223 -target | --target | --targe | --targ | --tar | --ta | --t)
1224 ac_prev=target_alias ;;
1225 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1226 target_alias=$ac_optarg ;;
1228 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1229 verbose=yes ;;
1231 -version | --version | --versio | --versi | --vers | -V)
1232 ac_init_version=: ;;
1234 -with-* | --with-*)
1235 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1236 # Reject names that are not valid shell variable names.
1237 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1238 as_fn_error $? "invalid package name: $ac_useropt"
1239 ac_useropt_orig=$ac_useropt
1240 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1241 case $ac_user_opts in
1243 "with_$ac_useropt"
1244 "*) ;;
1245 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1246 ac_unrecognized_sep=', ';;
1247 esac
1248 eval with_$ac_useropt=\$ac_optarg ;;
1250 -without-* | --without-*)
1251 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
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--without-$ac_useropt_orig"
1262 ac_unrecognized_sep=', ';;
1263 esac
1264 eval with_$ac_useropt=no ;;
1266 --x)
1267 # Obsolete; use --with-x.
1268 with_x=yes ;;
1270 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1271 | --x-incl | --x-inc | --x-in | --x-i)
1272 ac_prev=x_includes ;;
1273 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1274 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1275 x_includes=$ac_optarg ;;
1277 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1278 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1279 ac_prev=x_libraries ;;
1280 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1281 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1282 x_libraries=$ac_optarg ;;
1284 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1285 Try \`$0 --help' for more information"
1288 *=*)
1289 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1290 # Reject names that are not valid shell variable names.
1291 case $ac_envvar in #(
1292 '' | [0-9]* | *[!_$as_cr_alnum]* )
1293 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1294 esac
1295 eval $ac_envvar=\$ac_optarg
1296 export $ac_envvar ;;
1299 # FIXME: should be removed in autoconf 3.0.
1300 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1301 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1302 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1303 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1306 esac
1307 done
1309 if test -n "$ac_prev"; then
1310 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1311 as_fn_error $? "missing argument to $ac_option"
1314 if test -n "$ac_unrecognized_opts"; then
1315 case $enable_option_checking in
1316 no) ;;
1317 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1318 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1319 esac
1322 # Check all directory arguments for consistency.
1323 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1324 datadir sysconfdir sharedstatedir localstatedir includedir \
1325 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1326 libdir localedir mandir
1328 eval ac_val=\$$ac_var
1329 # Remove trailing slashes.
1330 case $ac_val in
1331 */ )
1332 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1333 eval $ac_var=\$ac_val;;
1334 esac
1335 # Be sure to have absolute directory names.
1336 case $ac_val in
1337 [\\/$]* | ?:[\\/]* ) continue;;
1338 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1339 esac
1340 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1341 done
1343 # There might be people who depend on the old broken behavior: `$host'
1344 # used to hold the argument of --host etc.
1345 # FIXME: To remove some day.
1346 build=$build_alias
1347 host=$host_alias
1348 target=$target_alias
1350 # FIXME: To remove some day.
1351 if test "x$host_alias" != x; then
1352 if test "x$build_alias" = x; then
1353 cross_compiling=maybe
1354 elif test "x$build_alias" != "x$host_alias"; then
1355 cross_compiling=yes
1359 ac_tool_prefix=
1360 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1362 test "$silent" = yes && exec 6>/dev/null
1365 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1366 ac_ls_di=`ls -di .` &&
1367 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1368 as_fn_error $? "working directory cannot be determined"
1369 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1370 as_fn_error $? "pwd does not report name of working directory"
1373 # Find the source files, if location was not specified.
1374 if test -z "$srcdir"; then
1375 ac_srcdir_defaulted=yes
1376 # Try the directory containing this script, then the parent directory.
1377 ac_confdir=`$as_dirname -- "$as_myself" ||
1378 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1379 X"$as_myself" : 'X\(//\)[^/]' \| \
1380 X"$as_myself" : 'X\(//\)$' \| \
1381 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1382 $as_echo X"$as_myself" |
1383 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1384 s//\1/
1387 /^X\(\/\/\)[^/].*/{
1388 s//\1/
1391 /^X\(\/\/\)$/{
1392 s//\1/
1395 /^X\(\/\).*/{
1396 s//\1/
1399 s/.*/./; q'`
1400 srcdir=$ac_confdir
1401 if test ! -r "$srcdir/$ac_unique_file"; then
1402 srcdir=..
1404 else
1405 ac_srcdir_defaulted=no
1407 if test ! -r "$srcdir/$ac_unique_file"; then
1408 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1409 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1411 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1412 ac_abs_confdir=`(
1413 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1414 pwd)`
1415 # When building in place, set srcdir=.
1416 if test "$ac_abs_confdir" = "$ac_pwd"; then
1417 srcdir=.
1419 # Remove unnecessary trailing slashes from srcdir.
1420 # Double slashes in file names in object file debugging info
1421 # mess up M-x gdb in Emacs.
1422 case $srcdir in
1423 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1424 esac
1425 for ac_var in $ac_precious_vars; do
1426 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1427 eval ac_env_${ac_var}_value=\$${ac_var}
1428 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1429 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1430 done
1433 # Report the --help message.
1435 if test "$ac_init_help" = "long"; then
1436 # Omit some internal or obsolete options to make the list less imposing.
1437 # This message is too long to be a string in the A/UX 3.1 sh.
1438 cat <<_ACEOF
1439 \`configure' configures PostgreSQL 13.16 to adapt to many kinds of systems.
1441 Usage: $0 [OPTION]... [VAR=VALUE]...
1443 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1444 VAR=VALUE. See below for descriptions of some of the useful variables.
1446 Defaults for the options are specified in brackets.
1448 Configuration:
1449 -h, --help display this help and exit
1450 --help=short display options specific to this package
1451 --help=recursive display the short help of all the included packages
1452 -V, --version display version information and exit
1453 -q, --quiet, --silent do not print \`checking ...' messages
1454 --cache-file=FILE cache test results in FILE [disabled]
1455 -C, --config-cache alias for \`--cache-file=config.cache'
1456 -n, --no-create do not create output files
1457 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1459 Installation directories:
1460 --prefix=PREFIX install architecture-independent files in PREFIX
1461 [$ac_default_prefix]
1462 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1463 [PREFIX]
1465 By default, \`make install' will install all the files in
1466 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1467 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1468 for instance \`--prefix=\$HOME'.
1470 For better control, use the options below.
1472 Fine tuning of the installation directories:
1473 --bindir=DIR user executables [EPREFIX/bin]
1474 --sbindir=DIR system admin executables [EPREFIX/sbin]
1475 --libexecdir=DIR program executables [EPREFIX/libexec]
1476 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1477 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1478 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1479 --libdir=DIR object code libraries [EPREFIX/lib]
1480 --includedir=DIR C header files [PREFIX/include]
1481 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1482 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1483 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1484 --infodir=DIR info documentation [DATAROOTDIR/info]
1485 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1486 --mandir=DIR man documentation [DATAROOTDIR/man]
1487 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1488 --htmldir=DIR html documentation [DOCDIR]
1489 --dvidir=DIR dvi documentation [DOCDIR]
1490 --pdfdir=DIR pdf documentation [DOCDIR]
1491 --psdir=DIR ps documentation [DOCDIR]
1492 _ACEOF
1494 cat <<\_ACEOF
1496 System types:
1497 --build=BUILD configure for building on BUILD [guessed]
1498 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1499 _ACEOF
1502 if test -n "$ac_init_help"; then
1503 case $ac_init_help in
1504 short | recursive ) echo "Configuration of PostgreSQL 13.16:";;
1505 esac
1506 cat <<\_ACEOF
1508 Optional Features:
1509 --disable-option-checking ignore unrecognized --enable/--with options
1510 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1511 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1512 --disable-integer-datetimes
1513 obsolete option, no longer supported
1514 --enable-nls[=LANGUAGES]
1515 enable Native Language Support
1516 --disable-rpath do not embed shared library search path in
1517 executables
1518 --disable-spinlocks do not use spinlocks
1519 --disable-atomics do not use atomic operations
1520 --enable-debug build with debugging symbols (-g)
1521 --enable-profiling build with profiling enabled
1522 --enable-coverage build with coverage testing instrumentation
1523 --enable-dtrace build with DTrace support
1524 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1525 --enable-depend turn on automatic dependency tracking
1526 --enable-cassert enable assertion checks (for debugging)
1527 --disable-thread-safety disable thread-safety in client libraries
1528 --disable-largefile omit support for large files
1530 Optional Packages:
1531 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1532 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1533 --with-extra-version=STRING
1534 append STRING to version
1535 --with-template=NAME override operating system template
1536 --with-includes=DIRS look for additional header files in DIRS
1537 --with-libraries=DIRS look for additional libraries in DIRS
1538 --with-libs=DIRS alternative spelling of --with-libraries
1539 --with-pgport=PORTNUM set default port number [5432]
1540 --with-blocksize=BLOCKSIZE
1541 set table block size in kB [8]
1542 --with-segsize=SEGSIZE set table segment size in GB [1]
1543 --with-wal-blocksize=BLOCKSIZE
1544 set WAL block size in kB [8]
1545 --with-CC=CMD set compiler (deprecated)
1546 --with-llvm build with LLVM based JIT support
1547 --with-icu build with ICU support
1548 --with-tcl build Tcl modules (PL/Tcl)
1549 --with-tclconfig=DIR tclConfig.sh is in DIR
1550 --with-perl build Perl modules (PL/Perl)
1551 --with-python build Python modules (PL/Python)
1552 --with-gssapi build with GSSAPI support
1553 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1554 [postgres]
1555 --with-pam build with PAM support
1556 --with-bsd-auth build with BSD Authentication support
1557 --with-ldap build with LDAP support
1558 --with-bonjour build with Bonjour support
1559 --with-openssl build with OpenSSL support
1560 --with-selinux build with SELinux support
1561 --with-systemd build with systemd support
1562 --without-readline do not use GNU Readline nor BSD Libedit for editing
1563 --with-libedit-preferred
1564 prefer BSD Libedit over GNU Readline
1565 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1566 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1567 --with-libxml build with XML support
1568 --with-libxslt use XSLT support when building contrib/xml2
1569 --with-system-tzdata=DIR
1570 use system time zone data in DIR
1571 --without-zlib do not use Zlib
1572 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1574 Some influential environment variables:
1575 CC C compiler command
1576 CFLAGS C compiler flags
1577 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1578 nonstandard directory <lib dir>
1579 LIBS libraries to pass to the linker, e.g. -l<library>
1580 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1581 you have headers in a nonstandard directory <include dir>
1582 CXX C++ compiler command
1583 CXXFLAGS C++ compiler flags
1584 LLVM_CONFIG path to llvm-config command
1585 CLANG path to clang compiler to generate bitcode
1586 CPP C preprocessor
1587 PKG_CONFIG path to pkg-config utility
1588 PKG_CONFIG_PATH
1589 directories to add to pkg-config's search path
1590 PKG_CONFIG_LIBDIR
1591 path overriding pkg-config's built-in search path
1592 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1593 ICU_LIBS linker flags for ICU, overriding pkg-config
1594 XML2_CONFIG path to xml2-config utility
1595 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1596 XML2_LIBS linker flags for XML2, overriding pkg-config
1597 LDFLAGS_EX extra linker flags for linking executables only
1598 LDFLAGS_SL extra linker flags for linking shared libraries only
1599 PERL Perl program
1600 PYTHON Python program
1601 MSGFMT msgfmt program for NLS
1602 TCLSH Tcl interpreter program (tclsh)
1604 Use these variables to override the choices made by `configure' or to help
1605 it to find libraries and programs with nonstandard names/locations.
1607 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1608 PostgreSQL home page: <https://www.postgresql.org/>.
1609 _ACEOF
1610 ac_status=$?
1613 if test "$ac_init_help" = "recursive"; then
1614 # If there are subdirs, report their specific --help.
1615 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1616 test -d "$ac_dir" ||
1617 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1618 continue
1619 ac_builddir=.
1621 case "$ac_dir" in
1622 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1624 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1625 # A ".." for each directory in $ac_dir_suffix.
1626 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1627 case $ac_top_builddir_sub in
1628 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1629 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1630 esac ;;
1631 esac
1632 ac_abs_top_builddir=$ac_pwd
1633 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1634 # for backward compatibility:
1635 ac_top_builddir=$ac_top_build_prefix
1637 case $srcdir in
1638 .) # We are building in place.
1639 ac_srcdir=.
1640 ac_top_srcdir=$ac_top_builddir_sub
1641 ac_abs_top_srcdir=$ac_pwd ;;
1642 [\\/]* | ?:[\\/]* ) # Absolute name.
1643 ac_srcdir=$srcdir$ac_dir_suffix;
1644 ac_top_srcdir=$srcdir
1645 ac_abs_top_srcdir=$srcdir ;;
1646 *) # Relative name.
1647 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1648 ac_top_srcdir=$ac_top_build_prefix$srcdir
1649 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1650 esac
1651 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1653 cd "$ac_dir" || { ac_status=$?; continue; }
1654 # Check for guested configure.
1655 if test -f "$ac_srcdir/configure.gnu"; then
1656 echo &&
1657 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1658 elif test -f "$ac_srcdir/configure"; then
1659 echo &&
1660 $SHELL "$ac_srcdir/configure" --help=recursive
1661 else
1662 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1663 fi || ac_status=$?
1664 cd "$ac_pwd" || { ac_status=$?; break; }
1665 done
1668 test -n "$ac_init_help" && exit $ac_status
1669 if $ac_init_version; then
1670 cat <<\_ACEOF
1671 PostgreSQL configure 13.16
1672 generated by GNU Autoconf 2.69
1674 Copyright (C) 2012 Free Software Foundation, Inc.
1675 This configure script is free software; the Free Software Foundation
1676 gives unlimited permission to copy, distribute and modify it.
1678 Copyright (c) 1996-2020, PostgreSQL Global Development Group
1679 _ACEOF
1680 exit
1683 ## ------------------------ ##
1684 ## Autoconf initialization. ##
1685 ## ------------------------ ##
1687 # ac_fn_c_try_compile LINENO
1688 # --------------------------
1689 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1690 ac_fn_c_try_compile ()
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 rm -f conftest.$ac_objext
1694 if { { ac_try="$ac_compile"
1695 case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698 esac
1699 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700 $as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_compile") 2>conftest.err
1702 ac_status=$?
1703 if test -s conftest.err; then
1704 grep -v '^ *+' conftest.err >conftest.er1
1705 cat conftest.er1 >&5
1706 mv -f conftest.er1 conftest.err
1708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709 test $ac_status = 0; } && {
1710 test -z "$ac_c_werror_flag" ||
1711 test ! -s conftest.err
1712 } && test -s conftest.$ac_objext; then :
1713 ac_retval=0
1714 else
1715 $as_echo "$as_me: failed program was:" >&5
1716 sed 's/^/| /' conftest.$ac_ext >&5
1718 ac_retval=1
1720 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1721 as_fn_set_status $ac_retval
1723 } # ac_fn_c_try_compile
1725 # ac_fn_cxx_try_compile LINENO
1726 # ----------------------------
1727 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1728 ac_fn_cxx_try_compile ()
1730 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1731 rm -f conftest.$ac_objext
1732 if { { ac_try="$ac_compile"
1733 case "(($ac_try" in
1734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1735 *) ac_try_echo=$ac_try;;
1736 esac
1737 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1738 $as_echo "$ac_try_echo"; } >&5
1739 (eval "$ac_compile") 2>conftest.err
1740 ac_status=$?
1741 if test -s conftest.err; then
1742 grep -v '^ *+' conftest.err >conftest.er1
1743 cat conftest.er1 >&5
1744 mv -f conftest.er1 conftest.err
1746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1747 test $ac_status = 0; } && {
1748 test -z "$ac_cxx_werror_flag" ||
1749 test ! -s conftest.err
1750 } && test -s conftest.$ac_objext; then :
1751 ac_retval=0
1752 else
1753 $as_echo "$as_me: failed program was:" >&5
1754 sed 's/^/| /' conftest.$ac_ext >&5
1756 ac_retval=1
1758 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1759 as_fn_set_status $ac_retval
1761 } # ac_fn_cxx_try_compile
1763 # ac_fn_c_try_link LINENO
1764 # -----------------------
1765 # Try to link conftest.$ac_ext, and return whether this succeeded.
1766 ac_fn_c_try_link ()
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1769 rm -f conftest.$ac_objext conftest$ac_exeext
1770 if { { ac_try="$ac_link"
1771 case "(($ac_try" in
1772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1773 *) ac_try_echo=$ac_try;;
1774 esac
1775 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1776 $as_echo "$ac_try_echo"; } >&5
1777 (eval "$ac_link") 2>conftest.err
1778 ac_status=$?
1779 if test -s conftest.err; then
1780 grep -v '^ *+' conftest.err >conftest.er1
1781 cat conftest.er1 >&5
1782 mv -f conftest.er1 conftest.err
1784 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1785 test $ac_status = 0; } && {
1786 test -z "$ac_c_werror_flag" ||
1787 test ! -s conftest.err
1788 } && test -s conftest$ac_exeext && {
1789 test "$cross_compiling" = yes ||
1790 test -x conftest$ac_exeext
1791 }; then :
1792 ac_retval=0
1793 else
1794 $as_echo "$as_me: failed program was:" >&5
1795 sed 's/^/| /' conftest.$ac_ext >&5
1797 ac_retval=1
1799 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1800 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1801 # interfere with the next link command; also delete a directory that is
1802 # left behind by Apple's compiler. We do this before executing the actions.
1803 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1804 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1805 as_fn_set_status $ac_retval
1807 } # ac_fn_c_try_link
1809 # ac_fn_c_try_cpp LINENO
1810 # ----------------------
1811 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1812 ac_fn_c_try_cpp ()
1814 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815 if { { ac_try="$ac_cpp conftest.$ac_ext"
1816 case "(($ac_try" in
1817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1818 *) ac_try_echo=$ac_try;;
1819 esac
1820 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1821 $as_echo "$ac_try_echo"; } >&5
1822 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1823 ac_status=$?
1824 if test -s conftest.err; then
1825 grep -v '^ *+' conftest.err >conftest.er1
1826 cat conftest.er1 >&5
1827 mv -f conftest.er1 conftest.err
1829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1830 test $ac_status = 0; } > conftest.i && {
1831 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1832 test ! -s conftest.err
1833 }; then :
1834 ac_retval=0
1835 else
1836 $as_echo "$as_me: failed program was:" >&5
1837 sed 's/^/| /' conftest.$ac_ext >&5
1839 ac_retval=1
1841 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1842 as_fn_set_status $ac_retval
1844 } # ac_fn_c_try_cpp
1846 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1847 # -------------------------------------------------------
1848 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1849 # the include files in INCLUDES and setting the cache variable VAR
1850 # accordingly.
1851 ac_fn_c_check_header_mongrel ()
1853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1854 if eval \${$3+:} false; then :
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856 $as_echo_n "checking for $2... " >&6; }
1857 if eval \${$3+:} false; then :
1858 $as_echo_n "(cached) " >&6
1860 eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862 $as_echo "$ac_res" >&6; }
1863 else
1864 # Is the header compilable?
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1866 $as_echo_n "checking $2 usability... " >&6; }
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868 /* end confdefs.h. */
1870 #include <$2>
1871 _ACEOF
1872 if ac_fn_c_try_compile "$LINENO"; then :
1873 ac_header_compiler=yes
1874 else
1875 ac_header_compiler=no
1877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1879 $as_echo "$ac_header_compiler" >&6; }
1881 # Is the header present?
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1883 $as_echo_n "checking $2 presence... " >&6; }
1884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885 /* end confdefs.h. */
1886 #include <$2>
1887 _ACEOF
1888 if ac_fn_c_try_cpp "$LINENO"; then :
1889 ac_header_preproc=yes
1890 else
1891 ac_header_preproc=no
1893 rm -f conftest.err conftest.i conftest.$ac_ext
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1895 $as_echo "$ac_header_preproc" >&6; }
1897 # So? What about this header?
1898 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1899 yes:no: )
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1901 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1903 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1905 no:yes:* )
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1907 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1909 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1911 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1913 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1915 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1916 ( $as_echo "## ---------------------------------------------- ##
1917 ## Report this to pgsql-bugs@lists.postgresql.org ##
1918 ## ---------------------------------------------- ##"
1919 ) | sed "s/^/$as_me: WARNING: /" >&2
1921 esac
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1923 $as_echo_n "checking for $2... " >&6; }
1924 if eval \${$3+:} false; then :
1925 $as_echo_n "(cached) " >&6
1926 else
1927 eval "$3=\$ac_header_compiler"
1929 eval ac_res=\$$3
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1931 $as_echo "$ac_res" >&6; }
1933 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1935 } # ac_fn_c_check_header_mongrel
1937 # ac_fn_c_try_run LINENO
1938 # ----------------------
1939 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1940 # that executables *can* be run.
1941 ac_fn_c_try_run ()
1943 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1944 if { { ac_try="$ac_link"
1945 case "(($ac_try" in
1946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1947 *) ac_try_echo=$ac_try;;
1948 esac
1949 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1950 $as_echo "$ac_try_echo"; } >&5
1951 (eval "$ac_link") 2>&5
1952 ac_status=$?
1953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1954 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1955 { { case "(($ac_try" in
1956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1957 *) ac_try_echo=$ac_try;;
1958 esac
1959 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1960 $as_echo "$ac_try_echo"; } >&5
1961 (eval "$ac_try") 2>&5
1962 ac_status=$?
1963 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1964 test $ac_status = 0; }; }; then :
1965 ac_retval=0
1966 else
1967 $as_echo "$as_me: program exited with status $ac_status" >&5
1968 $as_echo "$as_me: failed program was:" >&5
1969 sed 's/^/| /' conftest.$ac_ext >&5
1971 ac_retval=$ac_status
1973 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1974 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1975 as_fn_set_status $ac_retval
1977 } # ac_fn_c_try_run
1979 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1980 # -------------------------------------------------------
1981 # Tests whether HEADER exists and can be compiled using the include files in
1982 # INCLUDES, setting the cache variable VAR accordingly.
1983 ac_fn_c_check_header_compile ()
1985 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1987 $as_echo_n "checking for $2... " >&6; }
1988 if eval \${$3+:} false; then :
1989 $as_echo_n "(cached) " >&6
1990 else
1991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1992 /* end confdefs.h. */
1994 #include <$2>
1995 _ACEOF
1996 if ac_fn_c_try_compile "$LINENO"; then :
1997 eval "$3=yes"
1998 else
1999 eval "$3=no"
2001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2003 eval ac_res=\$$3
2004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2005 $as_echo "$ac_res" >&6; }
2006 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2008 } # ac_fn_c_check_header_compile
2010 # ac_fn_c_check_func LINENO FUNC VAR
2011 # ----------------------------------
2012 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2013 ac_fn_c_check_func ()
2015 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2017 $as_echo_n "checking for $2... " >&6; }
2018 if eval \${$3+:} false; then :
2019 $as_echo_n "(cached) " >&6
2020 else
2021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022 /* end confdefs.h. */
2023 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2024 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2025 #define $2 innocuous_$2
2027 /* System header to define __stub macros and hopefully few prototypes,
2028 which can conflict with char $2 (); below.
2029 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2030 <limits.h> exists even on freestanding compilers. */
2032 #ifdef __STDC__
2033 # include <limits.h>
2034 #else
2035 # include <assert.h>
2036 #endif
2038 #undef $2
2040 /* Override any GCC internal prototype to avoid an error.
2041 Use char because int might match the return type of a GCC
2042 builtin and then its argument prototype would still apply. */
2043 #ifdef __cplusplus
2044 extern "C"
2045 #endif
2046 char $2 ();
2047 /* The GNU C library defines this for functions which it implements
2048 to always fail with ENOSYS. Some functions are actually named
2049 something starting with __ and the normal name is an alias. */
2050 #if defined __stub_$2 || defined __stub___$2
2051 choke me
2052 #endif
2055 main ()
2057 return $2 ();
2059 return 0;
2061 _ACEOF
2062 if ac_fn_c_try_link "$LINENO"; then :
2063 eval "$3=yes"
2064 else
2065 eval "$3=no"
2067 rm -f core conftest.err conftest.$ac_objext \
2068 conftest$ac_exeext conftest.$ac_ext
2070 eval ac_res=\$$3
2071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2072 $as_echo "$ac_res" >&6; }
2073 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2075 } # ac_fn_c_check_func
2077 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2078 # -------------------------------------------
2079 # Tests whether TYPE exists after having included INCLUDES, setting cache
2080 # variable VAR accordingly.
2081 ac_fn_c_check_type ()
2083 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2085 $as_echo_n "checking for $2... " >&6; }
2086 if eval \${$3+:} false; then :
2087 $as_echo_n "(cached) " >&6
2088 else
2089 eval "$3=no"
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091 /* end confdefs.h. */
2094 main ()
2096 if (sizeof ($2))
2097 return 0;
2099 return 0;
2101 _ACEOF
2102 if ac_fn_c_try_compile "$LINENO"; then :
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104 /* end confdefs.h. */
2107 main ()
2109 if (sizeof (($2)))
2110 return 0;
2112 return 0;
2114 _ACEOF
2115 if ac_fn_c_try_compile "$LINENO"; then :
2117 else
2118 eval "$3=yes"
2120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124 eval ac_res=\$$3
2125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2126 $as_echo "$ac_res" >&6; }
2127 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2129 } # ac_fn_c_check_type
2131 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2132 # ----------------------------------------------------
2133 # Tries to find if the field MEMBER exists in type AGGR, after including
2134 # INCLUDES, setting cache variable VAR accordingly.
2135 ac_fn_c_check_member ()
2137 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2139 $as_echo_n "checking for $2.$3... " >&6; }
2140 if eval \${$4+:} false; then :
2141 $as_echo_n "(cached) " >&6
2142 else
2143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144 /* end confdefs.h. */
2147 main ()
2149 static $2 ac_aggr;
2150 if (ac_aggr.$3)
2151 return 0;
2153 return 0;
2155 _ACEOF
2156 if ac_fn_c_try_compile "$LINENO"; then :
2157 eval "$4=yes"
2158 else
2159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160 /* end confdefs.h. */
2163 main ()
2165 static $2 ac_aggr;
2166 if (sizeof ac_aggr.$3)
2167 return 0;
2169 return 0;
2171 _ACEOF
2172 if ac_fn_c_try_compile "$LINENO"; then :
2173 eval "$4=yes"
2174 else
2175 eval "$4=no"
2177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2181 eval ac_res=\$$4
2182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2183 $as_echo "$ac_res" >&6; }
2184 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2186 } # ac_fn_c_check_member
2188 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2189 # --------------------------------------------
2190 # Tries to find the compile-time value of EXPR in a program that includes
2191 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2192 # computed
2193 ac_fn_c_compute_int ()
2195 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2196 if test "$cross_compiling" = yes; then
2197 # Depending upon the size, compute the lo and hi bounds.
2198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199 /* end confdefs.h. */
2202 main ()
2204 static int test_array [1 - 2 * !(($2) >= 0)];
2205 test_array [0] = 0;
2206 return test_array [0];
2209 return 0;
2211 _ACEOF
2212 if ac_fn_c_try_compile "$LINENO"; then :
2213 ac_lo=0 ac_mid=0
2214 while :; do
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216 /* end confdefs.h. */
2219 main ()
2221 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2222 test_array [0] = 0;
2223 return test_array [0];
2226 return 0;
2228 _ACEOF
2229 if ac_fn_c_try_compile "$LINENO"; then :
2230 ac_hi=$ac_mid; break
2231 else
2232 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2233 if test $ac_lo -le $ac_mid; then
2234 ac_lo= ac_hi=
2235 break
2237 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2240 done
2241 else
2242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243 /* end confdefs.h. */
2246 main ()
2248 static int test_array [1 - 2 * !(($2) < 0)];
2249 test_array [0] = 0;
2250 return test_array [0];
2253 return 0;
2255 _ACEOF
2256 if ac_fn_c_try_compile "$LINENO"; then :
2257 ac_hi=-1 ac_mid=-1
2258 while :; do
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260 /* end confdefs.h. */
2263 main ()
2265 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2266 test_array [0] = 0;
2267 return test_array [0];
2270 return 0;
2272 _ACEOF
2273 if ac_fn_c_try_compile "$LINENO"; then :
2274 ac_lo=$ac_mid; break
2275 else
2276 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2277 if test $ac_mid -le $ac_hi; then
2278 ac_lo= ac_hi=
2279 break
2281 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284 done
2285 else
2286 ac_lo= ac_hi=
2288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291 # Binary search between lo and hi bounds.
2292 while test "x$ac_lo" != "x$ac_hi"; do
2293 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295 /* end confdefs.h. */
2298 main ()
2300 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2301 test_array [0] = 0;
2302 return test_array [0];
2305 return 0;
2307 _ACEOF
2308 if ac_fn_c_try_compile "$LINENO"; then :
2309 ac_hi=$ac_mid
2310 else
2311 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314 done
2315 case $ac_lo in #((
2316 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2317 '') ac_retval=1 ;;
2318 esac
2319 else
2320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321 /* end confdefs.h. */
2323 static long int longval () { return $2; }
2324 static unsigned long int ulongval () { return $2; }
2325 #include <stdio.h>
2326 #include <stdlib.h>
2328 main ()
2331 FILE *f = fopen ("conftest.val", "w");
2332 if (! f)
2333 return 1;
2334 if (($2) < 0)
2336 long int i = longval ();
2337 if (i != ($2))
2338 return 1;
2339 fprintf (f, "%ld", i);
2341 else
2343 unsigned long int i = ulongval ();
2344 if (i != ($2))
2345 return 1;
2346 fprintf (f, "%lu", i);
2348 /* Do not output a trailing newline, as this causes \r\n confusion
2349 on some platforms. */
2350 return ferror (f) || fclose (f) != 0;
2353 return 0;
2355 _ACEOF
2356 if ac_fn_c_try_run "$LINENO"; then :
2357 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2358 else
2359 ac_retval=1
2361 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2362 conftest.$ac_objext conftest.beam conftest.$ac_ext
2363 rm -f conftest.val
2366 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2367 as_fn_set_status $ac_retval
2369 } # ac_fn_c_compute_int
2371 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2372 # ---------------------------------------------
2373 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2374 # accordingly.
2375 ac_fn_c_check_decl ()
2377 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2378 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2379 as_decl_name=`echo $2|sed 's/ *(.*//'`
2380 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2382 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2383 if eval \${$3+:} false; then :
2384 $as_echo_n "(cached) " >&6
2385 else
2386 ac_save_werror_flag=$ac_c_werror_flag
2387 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2389 /* end confdefs.h. */
2392 main ()
2394 #ifndef $as_decl_name
2395 #ifdef __cplusplus
2396 (void) $as_decl_use;
2397 #else
2398 (void) $as_decl_name;
2399 #endif
2400 #endif
2403 return 0;
2405 _ACEOF
2406 if ac_fn_c_try_compile "$LINENO"; then :
2407 eval "$3=yes"
2408 else
2409 eval "$3=no"
2411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2412 ac_c_werror_flag=$ac_save_werror_flag
2414 eval ac_res=\$$3
2415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2416 $as_echo "$ac_res" >&6; }
2417 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2419 } # ac_fn_c_check_decl
2420 cat >config.log <<_ACEOF
2421 This file contains any messages produced by compilers while
2422 running configure, to aid debugging if configure makes a mistake.
2424 It was created by PostgreSQL $as_me 13.16, which was
2425 generated by GNU Autoconf 2.69. Invocation command line was
2427 $ $0 $@
2429 _ACEOF
2430 exec 5>>config.log
2432 cat <<_ASUNAME
2433 ## --------- ##
2434 ## Platform. ##
2435 ## --------- ##
2437 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2438 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2439 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2440 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2441 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2443 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2444 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2446 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2447 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2448 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2449 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2450 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2451 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2452 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2454 _ASUNAME
2456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2457 for as_dir in $PATH
2459 IFS=$as_save_IFS
2460 test -z "$as_dir" && as_dir=.
2461 $as_echo "PATH: $as_dir"
2462 done
2463 IFS=$as_save_IFS
2465 } >&5
2467 cat >&5 <<_ACEOF
2470 ## ----------- ##
2471 ## Core tests. ##
2472 ## ----------- ##
2474 _ACEOF
2477 # Keep a trace of the command line.
2478 # Strip out --no-create and --no-recursion so they do not pile up.
2479 # Strip out --silent because we don't want to record it for future runs.
2480 # Also quote any args containing shell meta-characters.
2481 # Make two passes to allow for proper duplicate-argument suppression.
2482 ac_configure_args=
2483 ac_configure_args0=
2484 ac_configure_args1=
2485 ac_must_keep_next=false
2486 for ac_pass in 1 2
2488 for ac_arg
2490 case $ac_arg in
2491 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2492 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2493 | -silent | --silent | --silen | --sile | --sil)
2494 continue ;;
2495 *\'*)
2496 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2497 esac
2498 case $ac_pass in
2499 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2501 as_fn_append ac_configure_args1 " '$ac_arg'"
2502 if test $ac_must_keep_next = true; then
2503 ac_must_keep_next=false # Got value, back to normal.
2504 else
2505 case $ac_arg in
2506 *=* | --config-cache | -C | -disable-* | --disable-* \
2507 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2508 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2509 | -with-* | --with-* | -without-* | --without-* | --x)
2510 case "$ac_configure_args0 " in
2511 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2512 esac
2514 -* ) ac_must_keep_next=true ;;
2515 esac
2517 as_fn_append ac_configure_args " '$ac_arg'"
2519 esac
2520 done
2521 done
2522 { ac_configure_args0=; unset ac_configure_args0;}
2523 { ac_configure_args1=; unset ac_configure_args1;}
2525 # When interrupted or exit'd, cleanup temporary files, and complete
2526 # config.log. We remove comments because anyway the quotes in there
2527 # would cause problems or look ugly.
2528 # WARNING: Use '\'' to represent an apostrophe within the trap.
2529 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2530 trap 'exit_status=$?
2531 # Save into config.log some information that might help in debugging.
2533 echo
2535 $as_echo "## ---------------- ##
2536 ## Cache variables. ##
2537 ## ---------------- ##"
2538 echo
2539 # The following way of writing the cache mishandles newlines in values,
2541 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2542 eval ac_val=\$$ac_var
2543 case $ac_val in #(
2544 *${as_nl}*)
2545 case $ac_var in #(
2546 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2547 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2548 esac
2549 case $ac_var in #(
2550 _ | IFS | as_nl) ;; #(
2551 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2552 *) { eval $ac_var=; unset $ac_var;} ;;
2553 esac ;;
2554 esac
2555 done
2556 (set) 2>&1 |
2557 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2558 *${as_nl}ac_space=\ *)
2559 sed -n \
2560 "s/'\''/'\''\\\\'\'''\''/g;
2561 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2562 ;; #(
2564 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2566 esac |
2567 sort
2569 echo
2571 $as_echo "## ----------------- ##
2572 ## Output variables. ##
2573 ## ----------------- ##"
2574 echo
2575 for ac_var in $ac_subst_vars
2577 eval ac_val=\$$ac_var
2578 case $ac_val in
2579 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2580 esac
2581 $as_echo "$ac_var='\''$ac_val'\''"
2582 done | sort
2583 echo
2585 if test -n "$ac_subst_files"; then
2586 $as_echo "## ------------------- ##
2587 ## File substitutions. ##
2588 ## ------------------- ##"
2589 echo
2590 for ac_var in $ac_subst_files
2592 eval ac_val=\$$ac_var
2593 case $ac_val in
2594 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2595 esac
2596 $as_echo "$ac_var='\''$ac_val'\''"
2597 done | sort
2598 echo
2601 if test -s confdefs.h; then
2602 $as_echo "## ----------- ##
2603 ## confdefs.h. ##
2604 ## ----------- ##"
2605 echo
2606 cat confdefs.h
2607 echo
2609 test "$ac_signal" != 0 &&
2610 $as_echo "$as_me: caught signal $ac_signal"
2611 $as_echo "$as_me: exit $exit_status"
2612 } >&5
2613 rm -f core *.core core.conftest.* &&
2614 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2615 exit $exit_status
2617 for ac_signal in 1 2 13 15; do
2618 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2619 done
2620 ac_signal=0
2622 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2623 rm -f -r conftest* confdefs.h
2625 $as_echo "/* confdefs.h */" > confdefs.h
2627 # Predefined preprocessor variables.
2629 cat >>confdefs.h <<_ACEOF
2630 #define PACKAGE_NAME "$PACKAGE_NAME"
2631 _ACEOF
2633 cat >>confdefs.h <<_ACEOF
2634 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2635 _ACEOF
2637 cat >>confdefs.h <<_ACEOF
2638 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2639 _ACEOF
2641 cat >>confdefs.h <<_ACEOF
2642 #define PACKAGE_STRING "$PACKAGE_STRING"
2643 _ACEOF
2645 cat >>confdefs.h <<_ACEOF
2646 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2647 _ACEOF
2649 cat >>confdefs.h <<_ACEOF
2650 #define PACKAGE_URL "$PACKAGE_URL"
2651 _ACEOF
2654 # Let the site file select an alternate cache file if it wants to.
2655 # Prefer an explicitly selected file to automatically selected ones.
2656 ac_site_file1=NONE
2657 ac_site_file2=NONE
2658 if test -n "$CONFIG_SITE"; then
2659 # We do not want a PATH search for config.site.
2660 case $CONFIG_SITE in #((
2661 -*) ac_site_file1=./$CONFIG_SITE;;
2662 */*) ac_site_file1=$CONFIG_SITE;;
2663 *) ac_site_file1=./$CONFIG_SITE;;
2664 esac
2665 elif test "x$prefix" != xNONE; then
2666 ac_site_file1=$prefix/share/config.site
2667 ac_site_file2=$prefix/etc/config.site
2668 else
2669 ac_site_file1=$ac_default_prefix/share/config.site
2670 ac_site_file2=$ac_default_prefix/etc/config.site
2672 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2674 test "x$ac_site_file" = xNONE && continue
2675 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2677 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2678 sed 's/^/| /' "$ac_site_file" >&5
2679 . "$ac_site_file" \
2680 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2681 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2682 as_fn_error $? "failed to load site script $ac_site_file
2683 See \`config.log' for more details" "$LINENO" 5; }
2685 done
2687 if test -r "$cache_file"; then
2688 # Some versions of bash will fail to source /dev/null (special files
2689 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2690 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2692 $as_echo "$as_me: loading cache $cache_file" >&6;}
2693 case $cache_file in
2694 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2695 *) . "./$cache_file";;
2696 esac
2698 else
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2700 $as_echo "$as_me: creating cache $cache_file" >&6;}
2701 >$cache_file
2704 # Check that the precious variables saved in the cache have kept the same
2705 # value.
2706 ac_cache_corrupted=false
2707 for ac_var in $ac_precious_vars; do
2708 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2709 eval ac_new_set=\$ac_env_${ac_var}_set
2710 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2711 eval ac_new_val=\$ac_env_${ac_var}_value
2712 case $ac_old_set,$ac_new_set in
2713 set,)
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2715 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2716 ac_cache_corrupted=: ;;
2717 ,set)
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2719 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2720 ac_cache_corrupted=: ;;
2721 ,);;
2723 if test "x$ac_old_val" != "x$ac_new_val"; then
2724 # differences in whitespace do not lead to failure.
2725 ac_old_val_w=`echo x $ac_old_val`
2726 ac_new_val_w=`echo x $ac_new_val`
2727 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2729 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2730 ac_cache_corrupted=:
2731 else
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2733 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2734 eval $ac_var=\$ac_old_val
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2737 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2739 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2740 fi;;
2741 esac
2742 # Pass precious variables to config.status.
2743 if test "$ac_new_set" = set; then
2744 case $ac_new_val in
2745 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2746 *) ac_arg=$ac_var=$ac_new_val ;;
2747 esac
2748 case " $ac_configure_args " in
2749 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2750 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2751 esac
2753 done
2754 if $ac_cache_corrupted; then
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2756 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2758 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2759 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2761 ## -------------------- ##
2762 ## Main body of script. ##
2763 ## -------------------- ##
2765 ac_ext=c
2766 ac_cpp='$CPP $CPPFLAGS'
2767 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2768 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2769 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2776 ac_aux_dir=
2777 for ac_dir in config "$srcdir"/config; do
2778 if test -f "$ac_dir/install-sh"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/install-sh -c"
2781 break
2782 elif test -f "$ac_dir/install.sh"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/install.sh -c"
2785 break
2786 elif test -f "$ac_dir/shtool"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/shtool install -c"
2789 break
2791 done
2792 if test -z "$ac_aux_dir"; then
2793 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2796 # These three variables are undocumented and unsupported,
2797 # and are intended to be withdrawn in a future Autoconf release.
2798 # They can cause serious problems if a builder's source tree is in a directory
2799 # whose full name contains unusual characters.
2800 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2801 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2802 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2807 cat >>confdefs.h <<_ACEOF
2808 #define CONFIGURE_ARGS "$ac_configure_args"
2809 _ACEOF
2812 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2813 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2814 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2817 cat >>confdefs.h <<_ACEOF
2818 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2819 _ACEOF
2822 cat >>confdefs.h <<_ACEOF
2823 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2824 _ACEOF
2827 cat >>confdefs.h <<_ACEOF
2828 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2829 _ACEOF
2835 # Check whether --with-extra-version was given.
2836 if test "${with_extra_version+set}" = set; then :
2837 withval=$with_extra_version;
2838 case $withval in
2839 yes)
2840 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2843 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2846 PG_VERSION="$PACKAGE_VERSION$withval"
2848 esac
2850 else
2851 PG_VERSION="$PACKAGE_VERSION"
2856 cat >>confdefs.h <<_ACEOF
2857 #define PG_VERSION "$PG_VERSION"
2858 _ACEOF
2861 # Make sure we can run config.sub.
2862 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2863 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2866 $as_echo_n "checking build system type... " >&6; }
2867 if ${ac_cv_build+:} false; then :
2868 $as_echo_n "(cached) " >&6
2869 else
2870 ac_build_alias=$build_alias
2871 test "x$ac_build_alias" = x &&
2872 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2873 test "x$ac_build_alias" = x &&
2874 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2875 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2876 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2880 $as_echo "$ac_cv_build" >&6; }
2881 case $ac_cv_build in
2882 *-*-*) ;;
2883 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2884 esac
2885 build=$ac_cv_build
2886 ac_save_IFS=$IFS; IFS='-'
2887 set x $ac_cv_build
2888 shift
2889 build_cpu=$1
2890 build_vendor=$2
2891 shift; shift
2892 # Remember, the first character of IFS is used to create $*,
2893 # except with old shells:
2894 build_os=$*
2895 IFS=$ac_save_IFS
2896 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2900 $as_echo_n "checking host system type... " >&6; }
2901 if ${ac_cv_host+:} false; then :
2902 $as_echo_n "(cached) " >&6
2903 else
2904 if test "x$host_alias" = x; then
2905 ac_cv_host=$ac_cv_build
2906 else
2907 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2908 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2913 $as_echo "$ac_cv_host" >&6; }
2914 case $ac_cv_host in
2915 *-*-*) ;;
2916 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2917 esac
2918 host=$ac_cv_host
2919 ac_save_IFS=$IFS; IFS='-'
2920 set x $ac_cv_host
2921 shift
2922 host_cpu=$1
2923 host_vendor=$2
2924 shift; shift
2925 # Remember, the first character of IFS is used to create $*,
2926 # except with old shells:
2927 host_os=$*
2928 IFS=$ac_save_IFS
2929 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2933 template=
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2935 $as_echo_n "checking which template to use... " >&6; }
2940 # Check whether --with-template was given.
2941 if test "${with_template+set}" = set; then :
2942 withval=$with_template;
2943 case $withval in
2944 yes)
2945 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2948 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2952 case $withval in
2953 list) echo; ls "$srcdir/src/template"; exit;;
2954 *) if test -f "$srcdir/src/template/$with_template" ; then
2955 template=$withval
2956 else
2957 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2958 fi;;
2959 esac
2962 esac
2964 else
2966 # --with-template not given
2968 case $host_os in
2969 aix*) template=aix ;;
2970 cygwin*|msys*) template=cygwin ;;
2971 darwin*) template=darwin ;;
2972 dragonfly*) template=netbsd ;;
2973 freebsd*) template=freebsd ;;
2974 hpux*) template=hpux ;;
2975 linux*|gnu*|k*bsd*-gnu)
2976 template=linux ;;
2977 mingw*) template=win32 ;;
2978 netbsd*) template=netbsd ;;
2979 openbsd*) template=openbsd ;;
2980 solaris*) template=solaris ;;
2981 esac
2983 if test x"$template" = x"" ; then
2984 as_fn_error $? "
2985 *******************************************************************
2986 PostgreSQL has apparently not been ported to your platform yet.
2987 To try a manual configuration, look into the src/template directory
2988 for a similar platform and use the '--with-template=' option.
2990 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
2991 rectifying this. Include the above 'checking host system type...'
2992 line.
2993 *******************************************************************
2994 " "$LINENO" 5
3002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3003 $as_echo "$template" >&6; }
3005 PORTNAME=$template
3008 # Initialize default assumption that we do not need separate assembly code
3009 # for TAS (test-and-set). This can be overridden by the template file
3010 # when it's executed.
3011 need_tas=no
3012 tas_file=dummy.s
3017 ## Command line options
3021 # Add non-standard directories to the include path
3026 # Check whether --with-includes was given.
3027 if test "${with_includes+set}" = set; then :
3028 withval=$with_includes;
3029 case $withval in
3030 yes)
3031 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3034 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3039 esac
3047 # Add non-standard directories to the library search path
3052 # Check whether --with-libraries was given.
3053 if test "${with_libraries+set}" = set; then :
3054 withval=$with_libraries;
3055 case $withval in
3056 yes)
3057 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3060 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3063 LIBRARY_DIRS=$withval
3065 esac
3074 # Check whether --with-libs was given.
3075 if test "${with_libs+set}" = set; then :
3076 withval=$with_libs;
3077 case $withval in
3078 yes)
3079 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3082 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3085 LIBRARY_DIRS=$withval
3087 esac
3095 # 64-bit integer date/time storage is now the only option, but to avoid
3096 # unnecessary breakage of build scripts, continue to accept an explicit
3097 # "--enable-integer-datetimes" switch.
3101 # Check whether --enable-integer-datetimes was given.
3102 if test "${enable_integer_datetimes+set}" = set; then :
3103 enableval=$enable_integer_datetimes;
3104 case $enableval in
3105 yes)
3109 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3112 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3114 esac
3116 else
3117 enable_integer_datetimes=yes
3125 # NLS
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3128 $as_echo_n "checking whether NLS is wanted... " >&6; }
3131 # Check whether --enable-nls was given.
3132 if test "${enable_nls+set}" = set; then :
3133 enableval=$enable_nls;
3134 case $enableval in
3135 yes)
3142 enable_nls=yes
3143 WANTED_LANGUAGES=$enableval
3145 esac
3147 else
3148 enable_nls=no
3153 if test "$enable_nls" = yes; then
3155 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3160 $as_echo "$enable_nls" >&6; }
3165 # Default port number (--with-pgport), default 5432
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3168 $as_echo_n "checking for default port number... " >&6; }
3172 # Check whether --with-pgport was given.
3173 if test "${with_pgport+set}" = set; then :
3174 withval=$with_pgport;
3175 case $withval in
3176 yes)
3177 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3180 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3183 default_port=$withval
3185 esac
3187 else
3188 default_port=5432
3192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3193 $as_echo "$default_port" >&6; }
3194 # Need both of these because some places want an integer and some a string
3196 cat >>confdefs.h <<_ACEOF
3197 #define DEF_PGPORT ${default_port}
3198 _ACEOF
3201 cat >>confdefs.h <<_ACEOF
3202 #define DEF_PGPORT_STR "${default_port}"
3203 _ACEOF
3207 # It's worth validating port; you can get very confusing errors otherwise
3208 if test x"$default_port" = x""; then
3209 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3210 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3211 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3212 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3213 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3214 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3215 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3219 # '-rpath'-like feature can be disabled
3223 # Check whether --enable-rpath was given.
3224 if test "${enable_rpath+set}" = set; then :
3225 enableval=$enable_rpath;
3226 case $enableval in
3227 yes)
3234 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3236 esac
3238 else
3239 enable_rpath=yes
3247 # Spinlocks
3251 # Check whether --enable-spinlocks was given.
3252 if test "${enable_spinlocks+set}" = set; then :
3253 enableval=$enable_spinlocks;
3254 case $enableval in
3255 yes)
3262 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3264 esac
3266 else
3267 enable_spinlocks=yes
3274 # Atomic operations
3278 # Check whether --enable-atomics was given.
3279 if test "${enable_atomics+set}" = set; then :
3280 enableval=$enable_atomics;
3281 case $enableval in
3282 yes)
3289 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3291 esac
3293 else
3294 enable_atomics=yes
3301 # --enable-debug adds -g to compiler flags
3305 # Check whether --enable-debug was given.
3306 if test "${enable_debug+set}" = set; then :
3307 enableval=$enable_debug;
3308 case $enableval in
3309 yes)
3316 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3318 esac
3320 else
3321 enable_debug=no
3329 # --enable-profiling enables gcc profiling
3333 # Check whether --enable-profiling was given.
3334 if test "${enable_profiling+set}" = set; then :
3335 enableval=$enable_profiling;
3336 case $enableval in
3337 yes)
3344 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3346 esac
3348 else
3349 enable_profiling=no
3356 # --enable-coverage enables generation of code coverage metrics with gcov
3360 # Check whether --enable-coverage was given.
3361 if test "${enable_coverage+set}" = set; then :
3362 enableval=$enable_coverage;
3363 case $enableval in
3364 yes)
3365 if test -z "$GCOV"; then
3366 for ac_prog in gcov
3368 # Extract the first word of "$ac_prog", so it can be a program name with args.
3369 set dummy $ac_prog; ac_word=$2
3370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3371 $as_echo_n "checking for $ac_word... " >&6; }
3372 if ${ac_cv_path_GCOV+:} false; then :
3373 $as_echo_n "(cached) " >&6
3374 else
3375 case $GCOV in
3376 [\\/]* | ?:[\\/]*)
3377 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3381 for as_dir in $PATH
3383 IFS=$as_save_IFS
3384 test -z "$as_dir" && as_dir=.
3385 for ac_exec_ext in '' $ac_executable_extensions; do
3386 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3387 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3388 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3389 break 2
3391 done
3392 done
3393 IFS=$as_save_IFS
3396 esac
3398 GCOV=$ac_cv_path_GCOV
3399 if test -n "$GCOV"; then
3400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3401 $as_echo "$GCOV" >&6; }
3402 else
3403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3404 $as_echo "no" >&6; }
3408 test -n "$GCOV" && break
3409 done
3411 else
3412 # Report the value of GCOV in configure's output in all cases.
3413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3414 $as_echo_n "checking for GCOV... " >&6; }
3415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3416 $as_echo "$GCOV" >&6; }
3419 if test -z "$GCOV"; then
3420 as_fn_error $? "gcov not found" "$LINENO" 5
3422 if test -z "$LCOV"; then
3423 for ac_prog in lcov
3425 # Extract the first word of "$ac_prog", so it can be a program name with args.
3426 set dummy $ac_prog; ac_word=$2
3427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3428 $as_echo_n "checking for $ac_word... " >&6; }
3429 if ${ac_cv_path_LCOV+:} false; then :
3430 $as_echo_n "(cached) " >&6
3431 else
3432 case $LCOV in
3433 [\\/]* | ?:[\\/]*)
3434 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3438 for as_dir in $PATH
3440 IFS=$as_save_IFS
3441 test -z "$as_dir" && as_dir=.
3442 for ac_exec_ext in '' $ac_executable_extensions; do
3443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3444 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3446 break 2
3448 done
3449 done
3450 IFS=$as_save_IFS
3453 esac
3455 LCOV=$ac_cv_path_LCOV
3456 if test -n "$LCOV"; then
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3458 $as_echo "$LCOV" >&6; }
3459 else
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3461 $as_echo "no" >&6; }
3465 test -n "$LCOV" && break
3466 done
3468 else
3469 # Report the value of LCOV in configure's output in all cases.
3470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3471 $as_echo_n "checking for LCOV... " >&6; }
3472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3473 $as_echo "$LCOV" >&6; }
3476 if test -z "$LCOV"; then
3477 as_fn_error $? "lcov not found" "$LINENO" 5
3479 if test -z "$GENHTML"; then
3480 for ac_prog in genhtml
3482 # Extract the first word of "$ac_prog", so it can be a program name with args.
3483 set dummy $ac_prog; ac_word=$2
3484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3485 $as_echo_n "checking for $ac_word... " >&6; }
3486 if ${ac_cv_path_GENHTML+:} false; then :
3487 $as_echo_n "(cached) " >&6
3488 else
3489 case $GENHTML in
3490 [\\/]* | ?:[\\/]*)
3491 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3495 for as_dir in $PATH
3497 IFS=$as_save_IFS
3498 test -z "$as_dir" && as_dir=.
3499 for ac_exec_ext in '' $ac_executable_extensions; do
3500 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3501 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3503 break 2
3505 done
3506 done
3507 IFS=$as_save_IFS
3510 esac
3512 GENHTML=$ac_cv_path_GENHTML
3513 if test -n "$GENHTML"; then
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3515 $as_echo "$GENHTML" >&6; }
3516 else
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3518 $as_echo "no" >&6; }
3522 test -n "$GENHTML" && break
3523 done
3525 else
3526 # Report the value of GENHTML in configure's output in all cases.
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3528 $as_echo_n "checking for GENHTML... " >&6; }
3529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3530 $as_echo "$GENHTML" >&6; }
3533 if test -z "$GENHTML"; then
3534 as_fn_error $? "genhtml not found" "$LINENO" 5
3541 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3543 esac
3545 else
3546 enable_coverage=no
3554 # DTrace
3558 # Check whether --enable-dtrace was given.
3559 if test "${enable_dtrace+set}" = set; then :
3560 enableval=$enable_dtrace;
3561 case $enableval in
3562 yes)
3563 if test -z "$DTRACE"; then
3564 for ac_prog in dtrace
3566 # Extract the first word of "$ac_prog", so it can be a program name with args.
3567 set dummy $ac_prog; ac_word=$2
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3569 $as_echo_n "checking for $ac_word... " >&6; }
3570 if ${ac_cv_path_DTRACE+:} false; then :
3571 $as_echo_n "(cached) " >&6
3572 else
3573 case $DTRACE in
3574 [\\/]* | ?:[\\/]*)
3575 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3579 for as_dir in $PATH
3581 IFS=$as_save_IFS
3582 test -z "$as_dir" && as_dir=.
3583 for ac_exec_ext in '' $ac_executable_extensions; do
3584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3585 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3587 break 2
3589 done
3590 done
3591 IFS=$as_save_IFS
3594 esac
3596 DTRACE=$ac_cv_path_DTRACE
3597 if test -n "$DTRACE"; then
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3599 $as_echo "$DTRACE" >&6; }
3600 else
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3602 $as_echo "no" >&6; }
3606 test -n "$DTRACE" && break
3607 done
3609 else
3610 # Report the value of DTRACE in configure's output in all cases.
3611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3612 $as_echo_n "checking for DTRACE... " >&6; }
3613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3614 $as_echo "$DTRACE" >&6; }
3617 if test -z "$DTRACE"; then
3618 as_fn_error $? "dtrace not found" "$LINENO" 5
3626 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3628 esac
3630 else
3631 enable_dtrace=no
3639 # TAP tests
3643 # Check whether --enable-tap-tests was given.
3644 if test "${enable_tap_tests+set}" = set; then :
3645 enableval=$enable_tap_tests;
3646 case $enableval in
3647 yes)
3654 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3656 esac
3658 else
3659 enable_tap_tests=no
3667 # Block size
3669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3670 $as_echo_n "checking for block size... " >&6; }
3674 # Check whether --with-blocksize was given.
3675 if test "${with_blocksize+set}" = set; then :
3676 withval=$with_blocksize;
3677 case $withval in
3678 yes)
3679 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3682 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3685 blocksize=$withval
3687 esac
3689 else
3690 blocksize=8
3694 case ${blocksize} in
3695 1) BLCKSZ=1024;;
3696 2) BLCKSZ=2048;;
3697 4) BLCKSZ=4096;;
3698 8) BLCKSZ=8192;;
3699 16) BLCKSZ=16384;;
3700 32) BLCKSZ=32768;;
3701 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3702 esac
3703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3704 $as_echo "${blocksize}kB" >&6; }
3707 cat >>confdefs.h <<_ACEOF
3708 #define BLCKSZ ${BLCKSZ}
3709 _ACEOF
3713 # Relation segment size
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3716 $as_echo_n "checking for segment size... " >&6; }
3720 # Check whether --with-segsize was given.
3721 if test "${with_segsize+set}" = set; then :
3722 withval=$with_segsize;
3723 case $withval in
3724 yes)
3725 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3728 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3731 segsize=$withval
3733 esac
3735 else
3736 segsize=1
3740 # this expression is set up to avoid unnecessary integer overflow
3741 # blocksize is already guaranteed to be a factor of 1024
3742 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3743 test $? -eq 0 || exit 1
3744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3745 $as_echo "${segsize}GB" >&6; }
3748 cat >>confdefs.h <<_ACEOF
3749 #define RELSEG_SIZE ${RELSEG_SIZE}
3750 _ACEOF
3754 # WAL block size
3756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3757 $as_echo_n "checking for WAL block size... " >&6; }
3761 # Check whether --with-wal-blocksize was given.
3762 if test "${with_wal_blocksize+set}" = set; then :
3763 withval=$with_wal_blocksize;
3764 case $withval in
3765 yes)
3766 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3769 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3772 wal_blocksize=$withval
3774 esac
3776 else
3777 wal_blocksize=8
3781 case ${wal_blocksize} in
3782 1) XLOG_BLCKSZ=1024;;
3783 2) XLOG_BLCKSZ=2048;;
3784 4) XLOG_BLCKSZ=4096;;
3785 8) XLOG_BLCKSZ=8192;;
3786 16) XLOG_BLCKSZ=16384;;
3787 32) XLOG_BLCKSZ=32768;;
3788 64) XLOG_BLCKSZ=65536;;
3789 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3790 esac
3791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3792 $as_echo "${wal_blocksize}kB" >&6; }
3795 cat >>confdefs.h <<_ACEOF
3796 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3797 _ACEOF
3801 # C compiler
3804 # For historical reasons you can also use --with-CC to specify the C compiler
3805 # to use, although the standard way to do this is to set the CC environment
3806 # variable.
3810 # Check whether --with-CC was given.
3811 if test "${with_CC+set}" = set; then :
3812 withval=$with_CC;
3813 case $withval in
3814 yes)
3815 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3818 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3821 CC=$with_CC
3823 esac
3829 case $template in
3830 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3831 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3832 esac
3834 ac_ext=c
3835 ac_cpp='$CPP $CPPFLAGS'
3836 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3837 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3838 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3839 if test -n "$ac_tool_prefix"; then
3840 for ac_prog in $pgac_cc_list
3842 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3843 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3845 $as_echo_n "checking for $ac_word... " >&6; }
3846 if ${ac_cv_prog_CC+:} false; then :
3847 $as_echo_n "(cached) " >&6
3848 else
3849 if test -n "$CC"; then
3850 ac_cv_prog_CC="$CC" # Let the user override the test.
3851 else
3852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853 for as_dir in $PATH
3855 IFS=$as_save_IFS
3856 test -z "$as_dir" && as_dir=.
3857 for ac_exec_ext in '' $ac_executable_extensions; do
3858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3859 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3861 break 2
3863 done
3864 done
3865 IFS=$as_save_IFS
3869 CC=$ac_cv_prog_CC
3870 if test -n "$CC"; then
3871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3872 $as_echo "$CC" >&6; }
3873 else
3874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3875 $as_echo "no" >&6; }
3879 test -n "$CC" && break
3880 done
3882 if test -z "$CC"; then
3883 ac_ct_CC=$CC
3884 for ac_prog in $pgac_cc_list
3886 # Extract the first word of "$ac_prog", so it can be a program name with args.
3887 set dummy $ac_prog; ac_word=$2
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3889 $as_echo_n "checking for $ac_word... " >&6; }
3890 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3891 $as_echo_n "(cached) " >&6
3892 else
3893 if test -n "$ac_ct_CC"; then
3894 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3895 else
3896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3897 for as_dir in $PATH
3899 IFS=$as_save_IFS
3900 test -z "$as_dir" && as_dir=.
3901 for ac_exec_ext in '' $ac_executable_extensions; do
3902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3903 ac_cv_prog_ac_ct_CC="$ac_prog"
3904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3905 break 2
3907 done
3908 done
3909 IFS=$as_save_IFS
3913 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3914 if test -n "$ac_ct_CC"; then
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3916 $as_echo "$ac_ct_CC" >&6; }
3917 else
3918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3919 $as_echo "no" >&6; }
3923 test -n "$ac_ct_CC" && break
3924 done
3926 if test "x$ac_ct_CC" = x; then
3927 CC=""
3928 else
3929 case $cross_compiling:$ac_tool_warned in
3930 yes:)
3931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3932 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3933 ac_tool_warned=yes ;;
3934 esac
3935 CC=$ac_ct_CC
3940 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3941 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3942 as_fn_error $? "no acceptable C compiler found in \$PATH
3943 See \`config.log' for more details" "$LINENO" 5; }
3945 # Provide some information about the compiler.
3946 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3947 set X $ac_compile
3948 ac_compiler=$2
3949 for ac_option in --version -v -V -qversion; do
3950 { { ac_try="$ac_compiler $ac_option >&5"
3951 case "(($ac_try" in
3952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3953 *) ac_try_echo=$ac_try;;
3954 esac
3955 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3956 $as_echo "$ac_try_echo"; } >&5
3957 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3958 ac_status=$?
3959 if test -s conftest.err; then
3960 sed '10a\
3961 ... rest of stderr output deleted ...
3962 10q' conftest.err >conftest.er1
3963 cat conftest.er1 >&5
3965 rm -f conftest.er1 conftest.err
3966 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3967 test $ac_status = 0; }
3968 done
3970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3971 /* end confdefs.h. */
3974 main ()
3978 return 0;
3980 _ACEOF
3981 ac_clean_files_save=$ac_clean_files
3982 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3983 # Try to create an executable without -o first, disregard a.out.
3984 # It will help us diagnose broken compilers, and finding out an intuition
3985 # of exeext.
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3987 $as_echo_n "checking whether the C compiler works... " >&6; }
3988 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3990 # The possible output files:
3991 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3993 ac_rmfiles=
3994 for ac_file in $ac_files
3996 case $ac_file in
3997 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3998 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3999 esac
4000 done
4001 rm -f $ac_rmfiles
4003 if { { ac_try="$ac_link_default"
4004 case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007 esac
4008 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4009 $as_echo "$ac_try_echo"; } >&5
4010 (eval "$ac_link_default") 2>&5
4011 ac_status=$?
4012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4013 test $ac_status = 0; }; then :
4014 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4015 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4016 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4017 # so that the user can short-circuit this test for compilers unknown to
4018 # Autoconf.
4019 for ac_file in $ac_files ''
4021 test -f "$ac_file" || continue
4022 case $ac_file in
4023 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4025 [ab].out )
4026 # We found the default executable, but exeext='' is most
4027 # certainly right.
4028 break;;
4029 *.* )
4030 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4031 then :; else
4032 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4034 # We set ac_cv_exeext here because the later test for it is not
4035 # safe: cross compilers may not add the suffix if given an `-o'
4036 # argument, so we may need to know it at that point already.
4037 # Even if this section looks crufty: it has the advantage of
4038 # actually working.
4039 break;;
4041 break;;
4042 esac
4043 done
4044 test "$ac_cv_exeext" = no && ac_cv_exeext=
4046 else
4047 ac_file=''
4049 if test -z "$ac_file"; then :
4050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4051 $as_echo "no" >&6; }
4052 $as_echo "$as_me: failed program was:" >&5
4053 sed 's/^/| /' conftest.$ac_ext >&5
4055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4056 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4057 as_fn_error 77 "C compiler cannot create executables
4058 See \`config.log' for more details" "$LINENO" 5; }
4059 else
4060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4061 $as_echo "yes" >&6; }
4063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4064 $as_echo_n "checking for C compiler default output file name... " >&6; }
4065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4066 $as_echo "$ac_file" >&6; }
4067 ac_exeext=$ac_cv_exeext
4069 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4070 ac_clean_files=$ac_clean_files_save
4071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4072 $as_echo_n "checking for suffix of executables... " >&6; }
4073 if { { ac_try="$ac_link"
4074 case "(($ac_try" in
4075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4076 *) ac_try_echo=$ac_try;;
4077 esac
4078 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079 $as_echo "$ac_try_echo"; } >&5
4080 (eval "$ac_link") 2>&5
4081 ac_status=$?
4082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083 test $ac_status = 0; }; then :
4084 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4085 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4086 # work properly (i.e., refer to `conftest.exe'), while it won't with
4087 # `rm'.
4088 for ac_file in conftest.exe conftest conftest.*; do
4089 test -f "$ac_file" || continue
4090 case $ac_file in
4091 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4092 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4093 break;;
4094 * ) break;;
4095 esac
4096 done
4097 else
4098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4099 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4100 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4101 See \`config.log' for more details" "$LINENO" 5; }
4103 rm -f conftest conftest$ac_cv_exeext
4104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4105 $as_echo "$ac_cv_exeext" >&6; }
4107 rm -f conftest.$ac_ext
4108 EXEEXT=$ac_cv_exeext
4109 ac_exeext=$EXEEXT
4110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4111 /* end confdefs.h. */
4112 #include <stdio.h>
4114 main ()
4116 FILE *f = fopen ("conftest.out", "w");
4117 return ferror (f) || fclose (f) != 0;
4120 return 0;
4122 _ACEOF
4123 ac_clean_files="$ac_clean_files conftest.out"
4124 # Check that the compiler produces executables we can run. If not, either
4125 # the compiler is broken, or we cross compile.
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4127 $as_echo_n "checking whether we are cross compiling... " >&6; }
4128 if test "$cross_compiling" != yes; then
4129 { { ac_try="$ac_link"
4130 case "(($ac_try" in
4131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4132 *) ac_try_echo=$ac_try;;
4133 esac
4134 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4135 $as_echo "$ac_try_echo"; } >&5
4136 (eval "$ac_link") 2>&5
4137 ac_status=$?
4138 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4139 test $ac_status = 0; }
4140 if { ac_try='./conftest$ac_cv_exeext'
4141 { { case "(($ac_try" in
4142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4143 *) ac_try_echo=$ac_try;;
4144 esac
4145 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4146 $as_echo "$ac_try_echo"; } >&5
4147 (eval "$ac_try") 2>&5
4148 ac_status=$?
4149 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150 test $ac_status = 0; }; }; then
4151 cross_compiling=no
4152 else
4153 if test "$cross_compiling" = maybe; then
4154 cross_compiling=yes
4155 else
4156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4157 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4158 as_fn_error $? "cannot run C compiled programs.
4159 If you meant to cross compile, use \`--host'.
4160 See \`config.log' for more details" "$LINENO" 5; }
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4165 $as_echo "$cross_compiling" >&6; }
4167 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4168 ac_clean_files=$ac_clean_files_save
4169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4170 $as_echo_n "checking for suffix of object files... " >&6; }
4171 if ${ac_cv_objext+:} false; then :
4172 $as_echo_n "(cached) " >&6
4173 else
4174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4175 /* end confdefs.h. */
4178 main ()
4182 return 0;
4184 _ACEOF
4185 rm -f conftest.o conftest.obj
4186 if { { ac_try="$ac_compile"
4187 case "(($ac_try" in
4188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4189 *) ac_try_echo=$ac_try;;
4190 esac
4191 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4192 $as_echo "$ac_try_echo"; } >&5
4193 (eval "$ac_compile") 2>&5
4194 ac_status=$?
4195 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4196 test $ac_status = 0; }; then :
4197 for ac_file in conftest.o conftest.obj conftest.*; do
4198 test -f "$ac_file" || continue;
4199 case $ac_file in
4200 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4201 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4202 break;;
4203 esac
4204 done
4205 else
4206 $as_echo "$as_me: failed program was:" >&5
4207 sed 's/^/| /' conftest.$ac_ext >&5
4209 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4210 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4211 as_fn_error $? "cannot compute suffix of object files: cannot compile
4212 See \`config.log' for more details" "$LINENO" 5; }
4214 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4217 $as_echo "$ac_cv_objext" >&6; }
4218 OBJEXT=$ac_cv_objext
4219 ac_objext=$OBJEXT
4220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4221 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4222 if ${ac_cv_c_compiler_gnu+:} false; then :
4223 $as_echo_n "(cached) " >&6
4224 else
4225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4226 /* end confdefs.h. */
4229 main ()
4231 #ifndef __GNUC__
4232 choke me
4233 #endif
4236 return 0;
4238 _ACEOF
4239 if ac_fn_c_try_compile "$LINENO"; then :
4240 ac_compiler_gnu=yes
4241 else
4242 ac_compiler_gnu=no
4244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4249 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4250 if test $ac_compiler_gnu = yes; then
4251 GCC=yes
4252 else
4253 GCC=
4255 ac_test_CFLAGS=${CFLAGS+set}
4256 ac_save_CFLAGS=$CFLAGS
4257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4258 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4259 if ${ac_cv_prog_cc_g+:} false; then :
4260 $as_echo_n "(cached) " >&6
4261 else
4262 ac_save_c_werror_flag=$ac_c_werror_flag
4263 ac_c_werror_flag=yes
4264 ac_cv_prog_cc_g=no
4265 CFLAGS="-g"
4266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4267 /* end confdefs.h. */
4270 main ()
4274 return 0;
4276 _ACEOF
4277 if ac_fn_c_try_compile "$LINENO"; then :
4278 ac_cv_prog_cc_g=yes
4279 else
4280 CFLAGS=""
4281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4282 /* end confdefs.h. */
4285 main ()
4289 return 0;
4291 _ACEOF
4292 if ac_fn_c_try_compile "$LINENO"; then :
4294 else
4295 ac_c_werror_flag=$ac_save_c_werror_flag
4296 CFLAGS="-g"
4297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4298 /* end confdefs.h. */
4301 main ()
4305 return 0;
4307 _ACEOF
4308 if ac_fn_c_try_compile "$LINENO"; then :
4309 ac_cv_prog_cc_g=yes
4311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4316 ac_c_werror_flag=$ac_save_c_werror_flag
4318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4319 $as_echo "$ac_cv_prog_cc_g" >&6; }
4320 if test "$ac_test_CFLAGS" = set; then
4321 CFLAGS=$ac_save_CFLAGS
4322 elif test $ac_cv_prog_cc_g = yes; then
4323 if test "$GCC" = yes; then
4324 CFLAGS="-g -O2"
4325 else
4326 CFLAGS="-g"
4328 else
4329 if test "$GCC" = yes; then
4330 CFLAGS="-O2"
4331 else
4332 CFLAGS=
4335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4336 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4337 if ${ac_cv_prog_cc_c89+:} false; then :
4338 $as_echo_n "(cached) " >&6
4339 else
4340 ac_cv_prog_cc_c89=no
4341 ac_save_CC=$CC
4342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4343 /* end confdefs.h. */
4344 #include <stdarg.h>
4345 #include <stdio.h>
4346 struct stat;
4347 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4348 struct buf { int x; };
4349 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4350 static char *e (p, i)
4351 char **p;
4352 int i;
4354 return p[i];
4356 static char *f (char * (*g) (char **, int), char **p, ...)
4358 char *s;
4359 va_list v;
4360 va_start (v,p);
4361 s = g (p, va_arg (v,int));
4362 va_end (v);
4363 return s;
4366 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4367 function prototypes and stuff, but not '\xHH' hex character constants.
4368 These don't provoke an error unfortunately, instead are silently treated
4369 as 'x'. The following induces an error, until -std is added to get
4370 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4371 array size at least. It's necessary to write '\x00'==0 to get something
4372 that's true only with -std. */
4373 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4375 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4376 inside strings and character constants. */
4377 #define FOO(x) 'x'
4378 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4380 int test (int i, double x);
4381 struct s1 {int (*f) (int a);};
4382 struct s2 {int (*f) (double a);};
4383 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4384 int argc;
4385 char **argv;
4387 main ()
4389 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4391 return 0;
4393 _ACEOF
4394 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4395 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4397 CC="$ac_save_CC $ac_arg"
4398 if ac_fn_c_try_compile "$LINENO"; then :
4399 ac_cv_prog_cc_c89=$ac_arg
4401 rm -f core conftest.err conftest.$ac_objext
4402 test "x$ac_cv_prog_cc_c89" != "xno" && break
4403 done
4404 rm -f conftest.$ac_ext
4405 CC=$ac_save_CC
4408 # AC_CACHE_VAL
4409 case "x$ac_cv_prog_cc_c89" in
4411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4412 $as_echo "none needed" >&6; } ;;
4413 xno)
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4415 $as_echo "unsupported" >&6; } ;;
4417 CC="$CC $ac_cv_prog_cc_c89"
4418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4419 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4420 esac
4421 if test "x$ac_cv_prog_cc_c89" != xno; then :
4425 ac_ext=c
4426 ac_cpp='$CPP $CPPFLAGS'
4427 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4428 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4429 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4432 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4433 if ${ac_cv_prog_cc_c99+:} false; then :
4434 $as_echo_n "(cached) " >&6
4435 else
4436 ac_cv_prog_cc_c99=no
4437 ac_save_CC=$CC
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439 /* end confdefs.h. */
4440 #include <stdarg.h>
4441 #include <stdbool.h>
4442 #include <stdlib.h>
4443 #include <wchar.h>
4444 #include <stdio.h>
4446 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4447 #define debug(...) fprintf (stderr, __VA_ARGS__)
4448 #define showlist(...) puts (#__VA_ARGS__)
4449 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4450 static void
4451 test_varargs_macros (void)
4453 int x = 1234;
4454 int y = 5678;
4455 debug ("Flag");
4456 debug ("X = %d\n", x);
4457 showlist (The first, second, and third items.);
4458 report (x>y, "x is %d but y is %d", x, y);
4461 // Check long long types.
4462 #define BIG64 18446744073709551615ull
4463 #define BIG32 4294967295ul
4464 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4465 #if !BIG_OK
4466 your preprocessor is broken;
4467 #endif
4468 #if BIG_OK
4469 #else
4470 your preprocessor is broken;
4471 #endif
4472 static long long int bignum = -9223372036854775807LL;
4473 static unsigned long long int ubignum = BIG64;
4475 struct incomplete_array
4477 int datasize;
4478 double data[];
4481 struct named_init {
4482 int number;
4483 const wchar_t *name;
4484 double average;
4487 typedef const char *ccp;
4489 static inline int
4490 test_restrict (ccp restrict text)
4492 // See if C++-style comments work.
4493 // Iterate through items via the restricted pointer.
4494 // Also check for declarations in for loops.
4495 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4496 continue;
4497 return 0;
4500 // Check varargs and va_copy.
4501 static void
4502 test_varargs (const char *format, ...)
4504 va_list args;
4505 va_start (args, format);
4506 va_list args_copy;
4507 va_copy (args_copy, args);
4509 const char *str;
4510 int number;
4511 float fnumber;
4513 while (*format)
4515 switch (*format++)
4517 case 's': // string
4518 str = va_arg (args_copy, const char *);
4519 break;
4520 case 'd': // int
4521 number = va_arg (args_copy, int);
4522 break;
4523 case 'f': // float
4524 fnumber = va_arg (args_copy, double);
4525 break;
4526 default:
4527 break;
4530 va_end (args_copy);
4531 va_end (args);
4535 main ()
4538 // Check bool.
4539 _Bool success = false;
4541 // Check restrict.
4542 if (test_restrict ("String literal") == 0)
4543 success = true;
4544 char *restrict newvar = "Another string";
4546 // Check varargs.
4547 test_varargs ("s, d' f .", "string", 65, 34.234);
4548 test_varargs_macros ();
4550 // Check flexible array members.
4551 struct incomplete_array *ia =
4552 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4553 ia->datasize = 10;
4554 for (int i = 0; i < ia->datasize; ++i)
4555 ia->data[i] = i * 1.234;
4557 // Check named initializers.
4558 struct named_init ni = {
4559 .number = 34,
4560 .name = L"Test wide string",
4561 .average = 543.34343,
4564 ni.number = 58;
4566 int dynamic_array[ni.number];
4567 dynamic_array[ni.number - 1] = 543;
4569 // work around unused variable warnings
4570 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4571 || dynamic_array[ni.number - 1] != 543);
4574 return 0;
4576 _ACEOF
4577 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4579 CC="$ac_save_CC $ac_arg"
4580 if ac_fn_c_try_compile "$LINENO"; then :
4581 ac_cv_prog_cc_c99=$ac_arg
4583 rm -f core conftest.err conftest.$ac_objext
4584 test "x$ac_cv_prog_cc_c99" != "xno" && break
4585 done
4586 rm -f conftest.$ac_ext
4587 CC=$ac_save_CC
4590 # AC_CACHE_VAL
4591 case "x$ac_cv_prog_cc_c99" in
4593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4594 $as_echo "none needed" >&6; } ;;
4595 xno)
4596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4597 $as_echo "unsupported" >&6; } ;;
4599 CC="$CC $ac_cv_prog_cc_c99"
4600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4601 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4602 esac
4603 if test "x$ac_cv_prog_cc_c99" != xno; then :
4609 # Error out if the compiler does not support C99, as the codebase
4610 # relies on that.
4611 if test "$ac_cv_prog_cc_c99" = no; then
4612 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4615 ac_ext=cpp
4616 ac_cpp='$CXXCPP $CPPFLAGS'
4617 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4618 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4619 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4620 if test -z "$CXX"; then
4621 if test -n "$CCC"; then
4622 CXX=$CCC
4623 else
4624 if test -n "$ac_tool_prefix"; then
4625 for ac_prog in $pgac_cxx_list
4627 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4628 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4630 $as_echo_n "checking for $ac_word... " >&6; }
4631 if ${ac_cv_prog_CXX+:} false; then :
4632 $as_echo_n "(cached) " >&6
4633 else
4634 if test -n "$CXX"; then
4635 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4636 else
4637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638 for as_dir in $PATH
4640 IFS=$as_save_IFS
4641 test -z "$as_dir" && as_dir=.
4642 for ac_exec_ext in '' $ac_executable_extensions; do
4643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646 break 2
4648 done
4649 done
4650 IFS=$as_save_IFS
4654 CXX=$ac_cv_prog_CXX
4655 if test -n "$CXX"; then
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4657 $as_echo "$CXX" >&6; }
4658 else
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660 $as_echo "no" >&6; }
4664 test -n "$CXX" && break
4665 done
4667 if test -z "$CXX"; then
4668 ac_ct_CXX=$CXX
4669 for ac_prog in $pgac_cxx_list
4671 # Extract the first word of "$ac_prog", so it can be a program name with args.
4672 set dummy $ac_prog; ac_word=$2
4673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674 $as_echo_n "checking for $ac_word... " >&6; }
4675 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4676 $as_echo_n "(cached) " >&6
4677 else
4678 if test -n "$ac_ct_CXX"; then
4679 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4680 else
4681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682 for as_dir in $PATH
4684 IFS=$as_save_IFS
4685 test -z "$as_dir" && as_dir=.
4686 for ac_exec_ext in '' $ac_executable_extensions; do
4687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4688 ac_cv_prog_ac_ct_CXX="$ac_prog"
4689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690 break 2
4692 done
4693 done
4694 IFS=$as_save_IFS
4698 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4699 if test -n "$ac_ct_CXX"; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4701 $as_echo "$ac_ct_CXX" >&6; }
4702 else
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704 $as_echo "no" >&6; }
4708 test -n "$ac_ct_CXX" && break
4709 done
4711 if test "x$ac_ct_CXX" = x; then
4712 CXX="g++"
4713 else
4714 case $cross_compiling:$ac_tool_warned in
4715 yes:)
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4717 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4718 ac_tool_warned=yes ;;
4719 esac
4720 CXX=$ac_ct_CXX
4726 # Provide some information about the compiler.
4727 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4728 set X $ac_compile
4729 ac_compiler=$2
4730 for ac_option in --version -v -V -qversion; do
4731 { { ac_try="$ac_compiler $ac_option >&5"
4732 case "(($ac_try" in
4733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4734 *) ac_try_echo=$ac_try;;
4735 esac
4736 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4737 $as_echo "$ac_try_echo"; } >&5
4738 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4739 ac_status=$?
4740 if test -s conftest.err; then
4741 sed '10a\
4742 ... rest of stderr output deleted ...
4743 10q' conftest.err >conftest.er1
4744 cat conftest.er1 >&5
4746 rm -f conftest.er1 conftest.err
4747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4748 test $ac_status = 0; }
4749 done
4751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4752 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4753 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4754 $as_echo_n "(cached) " >&6
4755 else
4756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4757 /* end confdefs.h. */
4760 main ()
4762 #ifndef __GNUC__
4763 choke me
4764 #endif
4767 return 0;
4769 _ACEOF
4770 if ac_fn_cxx_try_compile "$LINENO"; then :
4771 ac_compiler_gnu=yes
4772 else
4773 ac_compiler_gnu=no
4775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4776 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4780 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4781 if test $ac_compiler_gnu = yes; then
4782 GXX=yes
4783 else
4784 GXX=
4786 ac_test_CXXFLAGS=${CXXFLAGS+set}
4787 ac_save_CXXFLAGS=$CXXFLAGS
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4789 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4790 if ${ac_cv_prog_cxx_g+:} false; then :
4791 $as_echo_n "(cached) " >&6
4792 else
4793 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4794 ac_cxx_werror_flag=yes
4795 ac_cv_prog_cxx_g=no
4796 CXXFLAGS="-g"
4797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4798 /* end confdefs.h. */
4801 main ()
4805 return 0;
4807 _ACEOF
4808 if ac_fn_cxx_try_compile "$LINENO"; then :
4809 ac_cv_prog_cxx_g=yes
4810 else
4811 CXXFLAGS=""
4812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4813 /* end confdefs.h. */
4816 main ()
4820 return 0;
4822 _ACEOF
4823 if ac_fn_cxx_try_compile "$LINENO"; then :
4825 else
4826 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4827 CXXFLAGS="-g"
4828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4829 /* end confdefs.h. */
4832 main ()
4836 return 0;
4838 _ACEOF
4839 if ac_fn_cxx_try_compile "$LINENO"; then :
4840 ac_cv_prog_cxx_g=yes
4842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4847 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4850 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4851 if test "$ac_test_CXXFLAGS" = set; then
4852 CXXFLAGS=$ac_save_CXXFLAGS
4853 elif test $ac_cv_prog_cxx_g = yes; then
4854 if test "$GXX" = yes; then
4855 CXXFLAGS="-g -O2"
4856 else
4857 CXXFLAGS="-g"
4859 else
4860 if test "$GXX" = yes; then
4861 CXXFLAGS="-O2"
4862 else
4863 CXXFLAGS=
4866 ac_ext=c
4867 ac_cpp='$CPP $CPPFLAGS'
4868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4873 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4874 # but has idiosyncrasies of its own. We assume icc will define
4875 # __INTEL_COMPILER regardless of CFLAGS.
4877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4878 /* end confdefs.h. */
4881 main ()
4883 #ifndef __INTEL_COMPILER
4884 choke me
4885 #endif
4887 return 0;
4889 _ACEOF
4890 if ac_fn_c_try_compile "$LINENO"; then :
4891 ICC=yes
4892 else
4893 ICC=no
4895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4897 # Check if it's Sun Studio compiler. We assume that
4898 # __SUNPRO_C will be defined for Sun Studio compilers
4899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900 /* end confdefs.h. */
4903 main ()
4905 #ifndef __SUNPRO_C
4906 choke me
4907 #endif
4909 return 0;
4911 _ACEOF
4912 if ac_fn_c_try_compile "$LINENO"; then :
4913 SUN_STUDIO_CC=yes
4914 else
4915 SUN_STUDIO_CC=no
4917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 # LLVM
4925 # Checked early because subsequent tests depend on it.
4929 # Check whether --with-llvm was given.
4930 if test "${with_llvm+set}" = set; then :
4931 withval=$with_llvm;
4932 case $withval in
4933 yes)
4935 $as_echo "#define USE_LLVM 1" >>confdefs.h
4942 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4944 esac
4946 else
4947 with_llvm=no
4953 for ac_prog in gawk mawk nawk awk
4955 # Extract the first word of "$ac_prog", so it can be a program name with args.
4956 set dummy $ac_prog; ac_word=$2
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4958 $as_echo_n "checking for $ac_word... " >&6; }
4959 if ${ac_cv_prog_AWK+:} false; then :
4960 $as_echo_n "(cached) " >&6
4961 else
4962 if test -n "$AWK"; then
4963 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4964 else
4965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4966 for as_dir in $PATH
4968 IFS=$as_save_IFS
4969 test -z "$as_dir" && as_dir=.
4970 for ac_exec_ext in '' $ac_executable_extensions; do
4971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4972 ac_cv_prog_AWK="$ac_prog"
4973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4974 break 2
4976 done
4977 done
4978 IFS=$as_save_IFS
4982 AWK=$ac_cv_prog_AWK
4983 if test -n "$AWK"; then
4984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4985 $as_echo "$AWK" >&6; }
4986 else
4987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4988 $as_echo "no" >&6; }
4992 test -n "$AWK" && break
4993 done
4995 if test "$with_llvm" = yes; then :
5001 if test -z "$LLVM_CONFIG"; then
5002 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
5004 # Extract the first word of "$ac_prog", so it can be a program name with args.
5005 set dummy $ac_prog; ac_word=$2
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5007 $as_echo_n "checking for $ac_word... " >&6; }
5008 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5009 $as_echo_n "(cached) " >&6
5010 else
5011 case $LLVM_CONFIG in
5012 [\\/]* | ?:[\\/]*)
5013 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5017 for as_dir in $PATH
5019 IFS=$as_save_IFS
5020 test -z "$as_dir" && as_dir=.
5021 for ac_exec_ext in '' $ac_executable_extensions; do
5022 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5023 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5024 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5025 break 2
5027 done
5028 done
5029 IFS=$as_save_IFS
5032 esac
5034 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5035 if test -n "$LLVM_CONFIG"; then
5036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5037 $as_echo "$LLVM_CONFIG" >&6; }
5038 else
5039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5040 $as_echo "no" >&6; }
5044 test -n "$LLVM_CONFIG" && break
5045 done
5047 else
5048 # Report the value of LLVM_CONFIG in configure's output in all cases.
5049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5050 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5052 $as_echo "$LLVM_CONFIG" >&6; }
5056 # no point continuing if llvm wasn't found
5057 if test -z "$LLVM_CONFIG"; then
5058 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5060 # check if detected $LLVM_CONFIG is executable
5061 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5062 if test "x$pgac_llvm_version" = "xno"; then
5063 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5065 # and whether the version is supported
5066 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5067 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5069 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5070 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5072 # need clang to create some bitcode files
5074 if test -z "$CLANG"; then
5075 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5077 # Extract the first word of "$ac_prog", so it can be a program name with args.
5078 set dummy $ac_prog; ac_word=$2
5079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5080 $as_echo_n "checking for $ac_word... " >&6; }
5081 if ${ac_cv_path_CLANG+:} false; then :
5082 $as_echo_n "(cached) " >&6
5083 else
5084 case $CLANG in
5085 [\\/]* | ?:[\\/]*)
5086 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5090 for as_dir in $PATH
5092 IFS=$as_save_IFS
5093 test -z "$as_dir" && as_dir=.
5094 for ac_exec_ext in '' $ac_executable_extensions; do
5095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5096 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5098 break 2
5100 done
5101 done
5102 IFS=$as_save_IFS
5105 esac
5107 CLANG=$ac_cv_path_CLANG
5108 if test -n "$CLANG"; then
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5110 $as_echo "$CLANG" >&6; }
5111 else
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5113 $as_echo "no" >&6; }
5117 test -n "$CLANG" && break
5118 done
5120 else
5121 # Report the value of CLANG in configure's output in all cases.
5122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5123 $as_echo_n "checking for CLANG... " >&6; }
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5125 $as_echo "$CLANG" >&6; }
5128 if test -z "$CLANG"; then
5129 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5131 # make sure clang is executable
5132 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5133 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5135 # Could check clang version, but it doesn't seem that
5136 # important. Systems with a new enough LLVM version are usually
5137 # going to have a decent clang version too. It's also not entirely
5138 # clear what the minimum version is.
5140 # Collect compiler flags necessary to build the LLVM dependent
5141 # shared library.
5142 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5143 case $pgac_option in
5144 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5145 esac
5146 done
5148 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5149 case $pgac_option in
5150 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5151 esac
5152 done
5154 # ABI influencing options, standard influencing options
5155 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5156 case $pgac_option in
5157 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5158 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5159 esac
5160 done
5162 # Look for components we're interested in, collect necessary
5163 # libs. As some components are optional, we can't just list all of
5164 # them as it'd raise an error.
5165 pgac_components='';
5166 for pgac_component in `$LLVM_CONFIG --components`; do
5167 case $pgac_component in
5168 engine) pgac_components="$pgac_components $pgac_component";;
5169 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5170 orcjit) pgac_components="$pgac_components $pgac_component";;
5171 passes) pgac_components="$pgac_components $pgac_component";;
5172 native) pgac_components="$pgac_components $pgac_component";;
5173 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5174 esac
5175 done;
5177 # And then get the libraries that need to be linked in for the
5178 # selected components. They're large libraries, we only want to
5179 # link them into the LLVM using shared library.
5180 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5181 case $pgac_option in
5182 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5183 esac
5184 done
5186 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5196 fi # fi
5199 unset CFLAGS
5200 unset CXXFLAGS
5203 # Read the template
5205 . "$srcdir/src/template/$template" || exit
5207 # C[XX]FLAGS are selected so:
5208 # If the user specifies something in the environment, that is used.
5209 # else: If the template file set something, that is used.
5210 # else: If coverage was enabled, don't set anything.
5211 # else: If the compiler is GCC, then we use -O2.
5212 # else: If the compiler is something else, then we use -O, unless debugging.
5214 if test "$ac_env_CFLAGS_set" = set; then
5215 CFLAGS=$ac_env_CFLAGS_value
5216 elif test "${CFLAGS+set}" = set; then
5217 : # (keep what template set)
5218 elif test "$enable_coverage" = yes; then
5219 : # no optimization by default
5220 elif test "$GCC" = yes; then
5221 CFLAGS="-O2"
5222 else
5223 # if the user selected debug mode, don't use -O
5224 if test "$enable_debug" != yes; then
5225 CFLAGS="-O"
5229 if test "$ac_env_CXXFLAGS_set" = set; then
5230 CXXFLAGS=$ac_env_CXXFLAGS_value
5231 elif test "${CXXFLAGS+set}" = set; then
5232 : # (keep what template set)
5233 elif test "$enable_coverage" = yes; then
5234 : # no optimization by default
5235 elif test "$GCC" = yes; then
5236 CXXFLAGS="-O2"
5237 else
5238 # if the user selected debug mode, don't use -O
5239 if test "$enable_debug" != yes; then
5240 CXXFLAGS="-O"
5244 # When generating bitcode (for inlining) we always want to use -O2
5245 # even when --enable-debug is specified. The bitcode is not going to
5246 # be used for line-by-line debugging, and JIT inlining doesn't work
5247 # without at least -O1 (otherwise clang will emit 'noinline'
5248 # attributes everywhere), which is bad for testing. Still allow the
5249 # environment to override if done explicitly.
5250 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5251 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5252 else
5253 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5255 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5256 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5257 else
5258 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5261 # C[XX]FLAGS we determined above will be added back at the end
5262 user_CFLAGS=$CFLAGS
5263 CFLAGS=""
5264 user_CXXFLAGS=$CXXFLAGS
5265 CXXFLAGS=""
5266 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5267 BITCODE_CFLAGS=""
5268 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5269 BITCODE_CXXFLAGS=""
5271 # set CFLAGS_VECTOR from the environment, if available
5272 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5273 CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5276 # Some versions of GCC support some additional useful warning flags.
5277 # Check whether they are supported, and add them to CFLAGS if so.
5278 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5279 # but has its own. Also check other compiler-specific flags here.
5281 if test "$GCC" = yes -a "$ICC" = no; then
5282 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5283 CXXFLAGS="-Wall -Wpointer-arith"
5284 # These work in some but not all gcc versions
5285 save_CFLAGS=$CFLAGS
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5288 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5289 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5290 $as_echo_n "(cached) " >&6
5291 else
5292 pgac_save_CFLAGS=$CFLAGS
5293 pgac_save_CC=$CC
5294 CC=${CC}
5295 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5296 ac_save_c_werror_flag=$ac_c_werror_flag
5297 ac_c_werror_flag=yes
5298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5299 /* end confdefs.h. */
5302 main ()
5306 return 0;
5308 _ACEOF
5309 if ac_fn_c_try_compile "$LINENO"; then :
5310 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5311 else
5312 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5315 ac_c_werror_flag=$ac_save_c_werror_flag
5316 CFLAGS="$pgac_save_CFLAGS"
5317 CC="$pgac_save_CC"
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5320 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5321 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5322 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5326 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5327 # disable it, so AC_SUBST the negative form.
5328 PERMIT_DECLARATION_AFTER_STATEMENT=
5329 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5330 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5333 # Really don't want VLAs to be used in our dialect of C
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5336 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5337 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5338 $as_echo_n "(cached) " >&6
5339 else
5340 pgac_save_CFLAGS=$CFLAGS
5341 pgac_save_CC=$CC
5342 CC=${CC}
5343 CFLAGS="${CFLAGS} -Werror=vla"
5344 ac_save_c_werror_flag=$ac_c_werror_flag
5345 ac_c_werror_flag=yes
5346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5347 /* end confdefs.h. */
5350 main ()
5354 return 0;
5356 _ACEOF
5357 if ac_fn_c_try_compile "$LINENO"; then :
5358 pgac_cv_prog_CC_cflags__Werror_vla=yes
5359 else
5360 pgac_cv_prog_CC_cflags__Werror_vla=no
5362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5363 ac_c_werror_flag=$ac_save_c_werror_flag
5364 CFLAGS="$pgac_save_CFLAGS"
5365 CC="$pgac_save_CC"
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5368 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5369 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5370 CFLAGS="${CFLAGS} -Werror=vla"
5374 # -Wvla is not applicable for C++
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5377 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5378 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5379 $as_echo_n "(cached) " >&6
5380 else
5381 pgac_save_CFLAGS=$CFLAGS
5382 pgac_save_CC=$CC
5383 CC=${CC}
5384 CFLAGS="${CFLAGS} -Wendif-labels"
5385 ac_save_c_werror_flag=$ac_c_werror_flag
5386 ac_c_werror_flag=yes
5387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5388 /* end confdefs.h. */
5391 main ()
5395 return 0;
5397 _ACEOF
5398 if ac_fn_c_try_compile "$LINENO"; then :
5399 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5400 else
5401 pgac_cv_prog_CC_cflags__Wendif_labels=no
5403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5404 ac_c_werror_flag=$ac_save_c_werror_flag
5405 CFLAGS="$pgac_save_CFLAGS"
5406 CC="$pgac_save_CC"
5408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5409 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5410 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5411 CFLAGS="${CFLAGS} -Wendif-labels"
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5416 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5417 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5418 $as_echo_n "(cached) " >&6
5419 else
5420 pgac_save_CXXFLAGS=$CXXFLAGS
5421 pgac_save_CXX=$CXX
5422 CXX=${CXX}
5423 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5424 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5425 ac_cxx_werror_flag=yes
5426 ac_ext=cpp
5427 ac_cpp='$CXXCPP $CPPFLAGS'
5428 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5429 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5430 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5433 /* end confdefs.h. */
5436 main ()
5440 return 0;
5442 _ACEOF
5443 if ac_fn_cxx_try_compile "$LINENO"; then :
5444 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5445 else
5446 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5449 ac_ext=c
5450 ac_cpp='$CPP $CPPFLAGS'
5451 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5452 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5453 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5455 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5456 CXXFLAGS="$pgac_save_CXXFLAGS"
5457 CXX="$pgac_save_CXX"
5459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5460 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5461 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5462 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5468 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5469 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5470 $as_echo_n "(cached) " >&6
5471 else
5472 pgac_save_CFLAGS=$CFLAGS
5473 pgac_save_CC=$CC
5474 CC=${CC}
5475 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5476 ac_save_c_werror_flag=$ac_c_werror_flag
5477 ac_c_werror_flag=yes
5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479 /* end confdefs.h. */
5482 main ()
5486 return 0;
5488 _ACEOF
5489 if ac_fn_c_try_compile "$LINENO"; then :
5490 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5491 else
5492 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5495 ac_c_werror_flag=$ac_save_c_werror_flag
5496 CFLAGS="$pgac_save_CFLAGS"
5497 CC="$pgac_save_CC"
5499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5500 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5501 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5502 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5507 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5508 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5509 $as_echo_n "(cached) " >&6
5510 else
5511 pgac_save_CXXFLAGS=$CXXFLAGS
5512 pgac_save_CXX=$CXX
5513 CXX=${CXX}
5514 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5515 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5516 ac_cxx_werror_flag=yes
5517 ac_ext=cpp
5518 ac_cpp='$CXXCPP $CPPFLAGS'
5519 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5520 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5521 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5524 /* end confdefs.h. */
5527 main ()
5531 return 0;
5533 _ACEOF
5534 if ac_fn_cxx_try_compile "$LINENO"; then :
5535 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5536 else
5537 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5540 ac_ext=c
5541 ac_cpp='$CPP $CPPFLAGS'
5542 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5543 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5544 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5546 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5547 CXXFLAGS="$pgac_save_CXXFLAGS"
5548 CXX="$pgac_save_CXX"
5550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5551 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5552 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5553 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5559 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5560 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5561 $as_echo_n "(cached) " >&6
5562 else
5563 pgac_save_CFLAGS=$CFLAGS
5564 pgac_save_CC=$CC
5565 CC=${CC}
5566 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5567 ac_save_c_werror_flag=$ac_c_werror_flag
5568 ac_c_werror_flag=yes
5569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5570 /* end confdefs.h. */
5573 main ()
5577 return 0;
5579 _ACEOF
5580 if ac_fn_c_try_compile "$LINENO"; then :
5581 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5582 else
5583 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5586 ac_c_werror_flag=$ac_save_c_werror_flag
5587 CFLAGS="$pgac_save_CFLAGS"
5588 CC="$pgac_save_CC"
5590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5591 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5592 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5593 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5598 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5599 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5600 $as_echo_n "(cached) " >&6
5601 else
5602 pgac_save_CXXFLAGS=$CXXFLAGS
5603 pgac_save_CXX=$CXX
5604 CXX=${CXX}
5605 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5606 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5607 ac_cxx_werror_flag=yes
5608 ac_ext=cpp
5609 ac_cpp='$CXXCPP $CPPFLAGS'
5610 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5611 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5612 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615 /* end confdefs.h. */
5618 main ()
5622 return 0;
5624 _ACEOF
5625 if ac_fn_cxx_try_compile "$LINENO"; then :
5626 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5627 else
5628 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5631 ac_ext=c
5632 ac_cpp='$CPP $CPPFLAGS'
5633 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5634 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5635 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5637 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5638 CXXFLAGS="$pgac_save_CXXFLAGS"
5639 CXX="$pgac_save_CXX"
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5642 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5643 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5644 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5648 # This was included in -Wall/-Wformat in older GCC versions
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5651 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5652 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5653 $as_echo_n "(cached) " >&6
5654 else
5655 pgac_save_CFLAGS=$CFLAGS
5656 pgac_save_CC=$CC
5657 CC=${CC}
5658 CFLAGS="${CFLAGS} -Wformat-security"
5659 ac_save_c_werror_flag=$ac_c_werror_flag
5660 ac_c_werror_flag=yes
5661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5662 /* end confdefs.h. */
5665 main ()
5669 return 0;
5671 _ACEOF
5672 if ac_fn_c_try_compile "$LINENO"; then :
5673 pgac_cv_prog_CC_cflags__Wformat_security=yes
5674 else
5675 pgac_cv_prog_CC_cflags__Wformat_security=no
5677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5678 ac_c_werror_flag=$ac_save_c_werror_flag
5679 CFLAGS="$pgac_save_CFLAGS"
5680 CC="$pgac_save_CC"
5682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5683 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5684 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5685 CFLAGS="${CFLAGS} -Wformat-security"
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5690 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5691 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5692 $as_echo_n "(cached) " >&6
5693 else
5694 pgac_save_CXXFLAGS=$CXXFLAGS
5695 pgac_save_CXX=$CXX
5696 CXX=${CXX}
5697 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5698 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5699 ac_cxx_werror_flag=yes
5700 ac_ext=cpp
5701 ac_cpp='$CXXCPP $CPPFLAGS'
5702 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5703 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5704 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5707 /* end confdefs.h. */
5710 main ()
5714 return 0;
5716 _ACEOF
5717 if ac_fn_cxx_try_compile "$LINENO"; then :
5718 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5719 else
5720 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5723 ac_ext=c
5724 ac_cpp='$CPP $CPPFLAGS'
5725 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5726 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5727 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5729 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5730 CXXFLAGS="$pgac_save_CXXFLAGS"
5731 CXX="$pgac_save_CXX"
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5734 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5735 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5736 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5740 # Disable strict-aliasing rules; needed for gcc 3.3+
5742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5743 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5744 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5745 $as_echo_n "(cached) " >&6
5746 else
5747 pgac_save_CFLAGS=$CFLAGS
5748 pgac_save_CC=$CC
5749 CC=${CC}
5750 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5751 ac_save_c_werror_flag=$ac_c_werror_flag
5752 ac_c_werror_flag=yes
5753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5754 /* end confdefs.h. */
5757 main ()
5761 return 0;
5763 _ACEOF
5764 if ac_fn_c_try_compile "$LINENO"; then :
5765 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5766 else
5767 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5770 ac_c_werror_flag=$ac_save_c_werror_flag
5771 CFLAGS="$pgac_save_CFLAGS"
5772 CC="$pgac_save_CC"
5774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5775 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5776 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5777 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5782 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5783 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5784 $as_echo_n "(cached) " >&6
5785 else
5786 pgac_save_CXXFLAGS=$CXXFLAGS
5787 pgac_save_CXX=$CXX
5788 CXX=${CXX}
5789 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5790 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5791 ac_cxx_werror_flag=yes
5792 ac_ext=cpp
5793 ac_cpp='$CXXCPP $CPPFLAGS'
5794 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5795 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5796 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5799 /* end confdefs.h. */
5802 main ()
5806 return 0;
5808 _ACEOF
5809 if ac_fn_cxx_try_compile "$LINENO"; then :
5810 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5811 else
5812 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5815 ac_ext=c
5816 ac_cpp='$CPP $CPPFLAGS'
5817 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5818 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5819 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5821 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5822 CXXFLAGS="$pgac_save_CXXFLAGS"
5823 CXX="$pgac_save_CXX"
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5826 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5827 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5828 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5832 # Disable optimizations that assume no overflow; needed for gcc 4.3+
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5835 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5836 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5837 $as_echo_n "(cached) " >&6
5838 else
5839 pgac_save_CFLAGS=$CFLAGS
5840 pgac_save_CC=$CC
5841 CC=${CC}
5842 CFLAGS="${CFLAGS} -fwrapv"
5843 ac_save_c_werror_flag=$ac_c_werror_flag
5844 ac_c_werror_flag=yes
5845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5846 /* end confdefs.h. */
5849 main ()
5853 return 0;
5855 _ACEOF
5856 if ac_fn_c_try_compile "$LINENO"; then :
5857 pgac_cv_prog_CC_cflags__fwrapv=yes
5858 else
5859 pgac_cv_prog_CC_cflags__fwrapv=no
5861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5862 ac_c_werror_flag=$ac_save_c_werror_flag
5863 CFLAGS="$pgac_save_CFLAGS"
5864 CC="$pgac_save_CC"
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5867 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5868 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5869 CFLAGS="${CFLAGS} -fwrapv"
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5874 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5875 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5876 $as_echo_n "(cached) " >&6
5877 else
5878 pgac_save_CXXFLAGS=$CXXFLAGS
5879 pgac_save_CXX=$CXX
5880 CXX=${CXX}
5881 CXXFLAGS="${CXXFLAGS} -fwrapv"
5882 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5883 ac_cxx_werror_flag=yes
5884 ac_ext=cpp
5885 ac_cpp='$CXXCPP $CPPFLAGS'
5886 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5887 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5888 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5891 /* end confdefs.h. */
5894 main ()
5898 return 0;
5900 _ACEOF
5901 if ac_fn_cxx_try_compile "$LINENO"; then :
5902 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5903 else
5904 pgac_cv_prog_CXX_cxxflags__fwrapv=no
5906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5907 ac_ext=c
5908 ac_cpp='$CPP $CPPFLAGS'
5909 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5910 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5911 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5913 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5914 CXXFLAGS="$pgac_save_CXXFLAGS"
5915 CXX="$pgac_save_CXX"
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5918 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5919 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5920 CXXFLAGS="${CXXFLAGS} -fwrapv"
5924 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5927 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5928 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5929 $as_echo_n "(cached) " >&6
5930 else
5931 pgac_save_CFLAGS=$CFLAGS
5932 pgac_save_CC=$CC
5933 CC=${CC}
5934 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5935 ac_save_c_werror_flag=$ac_c_werror_flag
5936 ac_c_werror_flag=yes
5937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5938 /* end confdefs.h. */
5941 main ()
5945 return 0;
5947 _ACEOF
5948 if ac_fn_c_try_compile "$LINENO"; then :
5949 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5950 else
5951 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5954 ac_c_werror_flag=$ac_save_c_werror_flag
5955 CFLAGS="$pgac_save_CFLAGS"
5956 CC="$pgac_save_CC"
5958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5959 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5960 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5961 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5966 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5967 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5968 $as_echo_n "(cached) " >&6
5969 else
5970 pgac_save_CXXFLAGS=$CXXFLAGS
5971 pgac_save_CXX=$CXX
5972 CXX=${CXX}
5973 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5974 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5975 ac_cxx_werror_flag=yes
5976 ac_ext=cpp
5977 ac_cpp='$CXXCPP $CPPFLAGS'
5978 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5979 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5980 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5983 /* end confdefs.h. */
5986 main ()
5990 return 0;
5992 _ACEOF
5993 if ac_fn_cxx_try_compile "$LINENO"; then :
5994 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5995 else
5996 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5999 ac_ext=c
6000 ac_cpp='$CPP $CPPFLAGS'
6001 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6002 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6003 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6005 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6006 CXXFLAGS="$pgac_save_CXXFLAGS"
6007 CXX="$pgac_save_CXX"
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6010 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6011 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6012 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6016 # Optimization flags for specific files that benefit from vectorization
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
6018 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
6019 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6020 $as_echo_n "(cached) " >&6
6021 else
6022 pgac_save_CFLAGS=$CFLAGS
6023 pgac_save_CC=$CC
6024 CC=${CC}
6025 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
6026 ac_save_c_werror_flag=$ac_c_werror_flag
6027 ac_c_werror_flag=yes
6028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6029 /* end confdefs.h. */
6032 main ()
6036 return 0;
6038 _ACEOF
6039 if ac_fn_c_try_compile "$LINENO"; then :
6040 pgac_cv_prog_CC_cflags__funroll_loops=yes
6041 else
6042 pgac_cv_prog_CC_cflags__funroll_loops=no
6044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6045 ac_c_werror_flag=$ac_save_c_werror_flag
6046 CFLAGS="$pgac_save_CFLAGS"
6047 CC="$pgac_save_CC"
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6050 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6051 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6052 CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
6057 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
6058 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6059 $as_echo_n "(cached) " >&6
6060 else
6061 pgac_save_CFLAGS=$CFLAGS
6062 pgac_save_CC=$CC
6063 CC=${CC}
6064 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
6065 ac_save_c_werror_flag=$ac_c_werror_flag
6066 ac_c_werror_flag=yes
6067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6068 /* end confdefs.h. */
6071 main ()
6075 return 0;
6077 _ACEOF
6078 if ac_fn_c_try_compile "$LINENO"; then :
6079 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6080 else
6081 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6084 ac_c_werror_flag=$ac_save_c_werror_flag
6085 CFLAGS="$pgac_save_CFLAGS"
6086 CC="$pgac_save_CC"
6088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6089 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6090 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6091 CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
6096 # The following tests want to suppress various unhelpful warnings by adding
6097 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6098 # switches, so we have to test for the positive form and if that works,
6099 # add the negative form. Note that tests of this form typically need to
6100 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6102 # Suppress clang's unhelpful unused-command-line-argument warnings.
6103 NOT_THE_CFLAGS=""
6104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6105 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6106 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6107 $as_echo_n "(cached) " >&6
6108 else
6109 pgac_save_CFLAGS=$CFLAGS
6110 pgac_save_CC=$CC
6111 CC=${CC}
6112 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6113 ac_save_c_werror_flag=$ac_c_werror_flag
6114 ac_c_werror_flag=yes
6115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6116 /* end confdefs.h. */
6119 main ()
6123 return 0;
6125 _ACEOF
6126 if ac_fn_c_try_compile "$LINENO"; then :
6127 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6128 else
6129 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6132 ac_c_werror_flag=$ac_save_c_werror_flag
6133 CFLAGS="$pgac_save_CFLAGS"
6134 CC="$pgac_save_CC"
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6137 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6138 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6139 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6143 if test -n "$NOT_THE_CFLAGS"; then
6144 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6146 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6147 # of warnings when building plperl because of usages in the Perl headers.
6148 NOT_THE_CFLAGS=""
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6150 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6151 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6152 $as_echo_n "(cached) " >&6
6153 else
6154 pgac_save_CFLAGS=$CFLAGS
6155 pgac_save_CC=$CC
6156 CC=${CC}
6157 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6158 ac_save_c_werror_flag=$ac_c_werror_flag
6159 ac_c_werror_flag=yes
6160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6161 /* end confdefs.h. */
6164 main ()
6168 return 0;
6170 _ACEOF
6171 if ac_fn_c_try_compile "$LINENO"; then :
6172 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6173 else
6174 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6177 ac_c_werror_flag=$ac_save_c_werror_flag
6178 CFLAGS="$pgac_save_CFLAGS"
6179 CC="$pgac_save_CC"
6181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6182 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6183 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6184 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6188 if test -n "$NOT_THE_CFLAGS"; then
6189 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6191 # Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
6192 # tree-walking APIs that we can't reasonably change in the back branches.
6193 NOT_THE_CFLAGS=""
6194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS" >&5
6195 $as_echo_n "checking whether ${CC} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS... " >&6; }
6196 if ${pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype+:} false; then :
6197 $as_echo_n "(cached) " >&6
6198 else
6199 pgac_save_CFLAGS=$CFLAGS
6200 pgac_save_CC=$CC
6201 CC=${CC}
6202 CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
6203 ac_save_c_werror_flag=$ac_c_werror_flag
6204 ac_c_werror_flag=yes
6205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6206 /* end confdefs.h. */
6209 main ()
6213 return 0;
6215 _ACEOF
6216 if ac_fn_c_try_compile "$LINENO"; then :
6217 pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype=yes
6218 else
6219 pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype=no
6221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6222 ac_c_werror_flag=$ac_save_c_werror_flag
6223 CFLAGS="$pgac_save_CFLAGS"
6224 CC="$pgac_save_CC"
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" >&5
6227 $as_echo "$pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" >&6; }
6228 if test x"$pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" = x"yes"; then
6229 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
6233 if test -n "$NOT_THE_CFLAGS"; then
6234 CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
6236 # Similarly disable useless truncation warnings from gcc 8+
6237 NOT_THE_CFLAGS=""
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6239 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6240 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6241 $as_echo_n "(cached) " >&6
6242 else
6243 pgac_save_CFLAGS=$CFLAGS
6244 pgac_save_CC=$CC
6245 CC=${CC}
6246 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6247 ac_save_c_werror_flag=$ac_c_werror_flag
6248 ac_c_werror_flag=yes
6249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6250 /* end confdefs.h. */
6253 main ()
6257 return 0;
6259 _ACEOF
6260 if ac_fn_c_try_compile "$LINENO"; then :
6261 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6262 else
6263 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6266 ac_c_werror_flag=$ac_save_c_werror_flag
6267 CFLAGS="$pgac_save_CFLAGS"
6268 CC="$pgac_save_CC"
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6271 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6272 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6273 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6277 if test -n "$NOT_THE_CFLAGS"; then
6278 CFLAGS="$CFLAGS -Wno-format-truncation"
6280 NOT_THE_CFLAGS=""
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6282 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6283 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6284 $as_echo_n "(cached) " >&6
6285 else
6286 pgac_save_CFLAGS=$CFLAGS
6287 pgac_save_CC=$CC
6288 CC=${CC}
6289 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6290 ac_save_c_werror_flag=$ac_c_werror_flag
6291 ac_c_werror_flag=yes
6292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6293 /* end confdefs.h. */
6296 main ()
6300 return 0;
6302 _ACEOF
6303 if ac_fn_c_try_compile "$LINENO"; then :
6304 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6305 else
6306 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6309 ac_c_werror_flag=$ac_save_c_werror_flag
6310 CFLAGS="$pgac_save_CFLAGS"
6311 CC="$pgac_save_CC"
6313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6314 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6315 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6316 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6320 if test -n "$NOT_THE_CFLAGS"; then
6321 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6323 elif test "$ICC" = yes; then
6324 # Intel's compiler has a bug/misoptimization in checking for
6325 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6328 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6329 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6330 $as_echo_n "(cached) " >&6
6331 else
6332 pgac_save_CFLAGS=$CFLAGS
6333 pgac_save_CC=$CC
6334 CC=${CC}
6335 CFLAGS="${CFLAGS} -mp1"
6336 ac_save_c_werror_flag=$ac_c_werror_flag
6337 ac_c_werror_flag=yes
6338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6339 /* end confdefs.h. */
6342 main ()
6346 return 0;
6348 _ACEOF
6349 if ac_fn_c_try_compile "$LINENO"; then :
6350 pgac_cv_prog_CC_cflags__mp1=yes
6351 else
6352 pgac_cv_prog_CC_cflags__mp1=no
6354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6355 ac_c_werror_flag=$ac_save_c_werror_flag
6356 CFLAGS="$pgac_save_CFLAGS"
6357 CC="$pgac_save_CC"
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6360 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6361 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6362 CFLAGS="${CFLAGS} -mp1"
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6367 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6368 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6369 $as_echo_n "(cached) " >&6
6370 else
6371 pgac_save_CXXFLAGS=$CXXFLAGS
6372 pgac_save_CXX=$CXX
6373 CXX=${CXX}
6374 CXXFLAGS="${CXXFLAGS} -mp1"
6375 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6376 ac_cxx_werror_flag=yes
6377 ac_ext=cpp
6378 ac_cpp='$CXXCPP $CPPFLAGS'
6379 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6380 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6381 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6384 /* end confdefs.h. */
6387 main ()
6391 return 0;
6393 _ACEOF
6394 if ac_fn_cxx_try_compile "$LINENO"; then :
6395 pgac_cv_prog_CXX_cxxflags__mp1=yes
6396 else
6397 pgac_cv_prog_CXX_cxxflags__mp1=no
6399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6400 ac_ext=c
6401 ac_cpp='$CPP $CPPFLAGS'
6402 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6403 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6404 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6406 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6407 CXXFLAGS="$pgac_save_CXXFLAGS"
6408 CXX="$pgac_save_CXX"
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6411 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6412 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6413 CXXFLAGS="${CXXFLAGS} -mp1"
6417 # Make sure strict aliasing is off (though this is said to be the default)
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6420 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6421 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6422 $as_echo_n "(cached) " >&6
6423 else
6424 pgac_save_CFLAGS=$CFLAGS
6425 pgac_save_CC=$CC
6426 CC=${CC}
6427 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6428 ac_save_c_werror_flag=$ac_c_werror_flag
6429 ac_c_werror_flag=yes
6430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6431 /* end confdefs.h. */
6434 main ()
6438 return 0;
6440 _ACEOF
6441 if ac_fn_c_try_compile "$LINENO"; then :
6442 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6443 else
6444 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6447 ac_c_werror_flag=$ac_save_c_werror_flag
6448 CFLAGS="$pgac_save_CFLAGS"
6449 CC="$pgac_save_CC"
6451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6452 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6453 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6454 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6459 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6460 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6461 $as_echo_n "(cached) " >&6
6462 else
6463 pgac_save_CXXFLAGS=$CXXFLAGS
6464 pgac_save_CXX=$CXX
6465 CXX=${CXX}
6466 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6467 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6468 ac_cxx_werror_flag=yes
6469 ac_ext=cpp
6470 ac_cpp='$CXXCPP $CPPFLAGS'
6471 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6472 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6473 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6476 /* end confdefs.h. */
6479 main ()
6483 return 0;
6485 _ACEOF
6486 if ac_fn_cxx_try_compile "$LINENO"; then :
6487 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6488 else
6489 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6492 ac_ext=c
6493 ac_cpp='$CPP $CPPFLAGS'
6494 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6495 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6496 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6498 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6499 CXXFLAGS="$pgac_save_CXXFLAGS"
6500 CXX="$pgac_save_CXX"
6502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6503 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6504 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6505 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6509 elif test "$PORTNAME" = "aix"; then
6510 # AIX's xlc has to have strict aliasing turned off too
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6513 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6514 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6515 $as_echo_n "(cached) " >&6
6516 else
6517 pgac_save_CFLAGS=$CFLAGS
6518 pgac_save_CC=$CC
6519 CC=${CC}
6520 CFLAGS="${CFLAGS} -qnoansialias"
6521 ac_save_c_werror_flag=$ac_c_werror_flag
6522 ac_c_werror_flag=yes
6523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6524 /* end confdefs.h. */
6527 main ()
6531 return 0;
6533 _ACEOF
6534 if ac_fn_c_try_compile "$LINENO"; then :
6535 pgac_cv_prog_CC_cflags__qnoansialias=yes
6536 else
6537 pgac_cv_prog_CC_cflags__qnoansialias=no
6539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6540 ac_c_werror_flag=$ac_save_c_werror_flag
6541 CFLAGS="$pgac_save_CFLAGS"
6542 CC="$pgac_save_CC"
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6545 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6546 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6547 CFLAGS="${CFLAGS} -qnoansialias"
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6552 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6553 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6554 $as_echo_n "(cached) " >&6
6555 else
6556 pgac_save_CXXFLAGS=$CXXFLAGS
6557 pgac_save_CXX=$CXX
6558 CXX=${CXX}
6559 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6560 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6561 ac_cxx_werror_flag=yes
6562 ac_ext=cpp
6563 ac_cpp='$CXXCPP $CPPFLAGS'
6564 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6565 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6566 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6569 /* end confdefs.h. */
6572 main ()
6576 return 0;
6578 _ACEOF
6579 if ac_fn_cxx_try_compile "$LINENO"; then :
6580 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6581 else
6582 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6585 ac_ext=c
6586 ac_cpp='$CPP $CPPFLAGS'
6587 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6588 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6589 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6591 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6592 CXXFLAGS="$pgac_save_CXXFLAGS"
6593 CXX="$pgac_save_CXX"
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6596 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6597 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6598 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6604 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6605 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6606 $as_echo_n "(cached) " >&6
6607 else
6608 pgac_save_CFLAGS=$CFLAGS
6609 pgac_save_CC=$CC
6610 CC=${CC}
6611 CFLAGS="${CFLAGS} -qlonglong"
6612 ac_save_c_werror_flag=$ac_c_werror_flag
6613 ac_c_werror_flag=yes
6614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6615 /* end confdefs.h. */
6618 main ()
6622 return 0;
6624 _ACEOF
6625 if ac_fn_c_try_compile "$LINENO"; then :
6626 pgac_cv_prog_CC_cflags__qlonglong=yes
6627 else
6628 pgac_cv_prog_CC_cflags__qlonglong=no
6630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6631 ac_c_werror_flag=$ac_save_c_werror_flag
6632 CFLAGS="$pgac_save_CFLAGS"
6633 CC="$pgac_save_CC"
6635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6636 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6637 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6638 CFLAGS="${CFLAGS} -qlonglong"
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6643 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6644 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6645 $as_echo_n "(cached) " >&6
6646 else
6647 pgac_save_CXXFLAGS=$CXXFLAGS
6648 pgac_save_CXX=$CXX
6649 CXX=${CXX}
6650 CXXFLAGS="${CXXFLAGS} -qlonglong"
6651 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6652 ac_cxx_werror_flag=yes
6653 ac_ext=cpp
6654 ac_cpp='$CXXCPP $CPPFLAGS'
6655 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6656 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6657 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6660 /* end confdefs.h. */
6663 main ()
6667 return 0;
6669 _ACEOF
6670 if ac_fn_cxx_try_compile "$LINENO"; then :
6671 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6672 else
6673 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6676 ac_ext=c
6677 ac_cpp='$CPP $CPPFLAGS'
6678 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6679 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6680 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6682 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6683 CXXFLAGS="$pgac_save_CXXFLAGS"
6684 CXX="$pgac_save_CXX"
6686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6687 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6688 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6689 CXXFLAGS="${CXXFLAGS} -qlonglong"
6693 elif test "$PORTNAME" = "hpux"; then
6694 # On some versions of HP-UX, libm functions do not set errno by default.
6695 # Fix that by using +Olibmerrno if the compiler recognizes it.
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6698 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6699 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6700 $as_echo_n "(cached) " >&6
6701 else
6702 pgac_save_CFLAGS=$CFLAGS
6703 pgac_save_CC=$CC
6704 CC=${CC}
6705 CFLAGS="${CFLAGS} +Olibmerrno"
6706 ac_save_c_werror_flag=$ac_c_werror_flag
6707 ac_c_werror_flag=yes
6708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6709 /* end confdefs.h. */
6712 main ()
6716 return 0;
6718 _ACEOF
6719 if ac_fn_c_try_compile "$LINENO"; then :
6720 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6721 else
6722 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6725 ac_c_werror_flag=$ac_save_c_werror_flag
6726 CFLAGS="$pgac_save_CFLAGS"
6727 CC="$pgac_save_CC"
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6730 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6731 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6732 CFLAGS="${CFLAGS} +Olibmerrno"
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6737 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6738 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6739 $as_echo_n "(cached) " >&6
6740 else
6741 pgac_save_CXXFLAGS=$CXXFLAGS
6742 pgac_save_CXX=$CXX
6743 CXX=${CXX}
6744 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6745 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6746 ac_cxx_werror_flag=yes
6747 ac_ext=cpp
6748 ac_cpp='$CXXCPP $CPPFLAGS'
6749 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6750 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6751 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6754 /* end confdefs.h. */
6757 main ()
6761 return 0;
6763 _ACEOF
6764 if ac_fn_cxx_try_compile "$LINENO"; then :
6765 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6766 else
6767 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6770 ac_ext=c
6771 ac_cpp='$CPP $CPPFLAGS'
6772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6776 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6777 CXXFLAGS="$pgac_save_CXXFLAGS"
6778 CXX="$pgac_save_CXX"
6780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6781 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6782 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6783 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6791 # Determine flags used to emit bitcode for JIT inlining.
6792 # 1. We must duplicate any behaviour-changing compiler flags used above,
6793 # to keep compatibility with the compiler used for normal Postgres code.
6794 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
6795 # warning in the main build is enough.
6796 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
6797 if test "$with_llvm" = yes ; then
6798 CLANGXX="$CLANG -xc++"
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6801 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6802 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6803 $as_echo_n "(cached) " >&6
6804 else
6805 pgac_save_CFLAGS=$CFLAGS
6806 pgac_save_CC=$CC
6807 CC=${CLANG}
6808 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6809 ac_save_c_werror_flag=$ac_c_werror_flag
6810 ac_c_werror_flag=yes
6811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6812 /* end confdefs.h. */
6815 main ()
6819 return 0;
6821 _ACEOF
6822 if ac_fn_c_try_compile "$LINENO"; then :
6823 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6824 else
6825 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6828 ac_c_werror_flag=$ac_save_c_werror_flag
6829 CFLAGS="$pgac_save_CFLAGS"
6830 CC="$pgac_save_CC"
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6833 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6834 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6835 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6839 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6840 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6841 $as_echo_n "(cached) " >&6
6842 else
6843 pgac_save_CXXFLAGS=$CXXFLAGS
6844 pgac_save_CXX=$CXX
6845 CXX=${CLANGXX}
6846 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6847 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6848 ac_cxx_werror_flag=yes
6849 ac_ext=cpp
6850 ac_cpp='$CXXCPP $CPPFLAGS'
6851 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6852 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6853 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6856 /* end confdefs.h. */
6859 main ()
6863 return 0;
6865 _ACEOF
6866 if ac_fn_cxx_try_compile "$LINENO"; then :
6867 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6868 else
6869 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6872 ac_ext=c
6873 ac_cpp='$CPP $CPPFLAGS'
6874 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6875 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6876 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6878 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6879 CXXFLAGS="$pgac_save_CXXFLAGS"
6880 CXX="$pgac_save_CXX"
6882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6883 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6884 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6885 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6889 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6890 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6891 $as_echo_n "(cached) " >&6
6892 else
6893 pgac_save_CFLAGS=$CFLAGS
6894 pgac_save_CC=$CC
6895 CC=${CLANG}
6896 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6897 ac_save_c_werror_flag=$ac_c_werror_flag
6898 ac_c_werror_flag=yes
6899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6900 /* end confdefs.h. */
6903 main ()
6907 return 0;
6909 _ACEOF
6910 if ac_fn_c_try_compile "$LINENO"; then :
6911 pgac_cv_prog_CLANG_cflags__fwrapv=yes
6912 else
6913 pgac_cv_prog_CLANG_cflags__fwrapv=no
6915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6916 ac_c_werror_flag=$ac_save_c_werror_flag
6917 CFLAGS="$pgac_save_CFLAGS"
6918 CC="$pgac_save_CC"
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6921 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6922 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6923 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6927 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6928 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6929 $as_echo_n "(cached) " >&6
6930 else
6931 pgac_save_CXXFLAGS=$CXXFLAGS
6932 pgac_save_CXX=$CXX
6933 CXX=${CLANGXX}
6934 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6935 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6936 ac_cxx_werror_flag=yes
6937 ac_ext=cpp
6938 ac_cpp='$CXXCPP $CPPFLAGS'
6939 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6940 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6941 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6944 /* end confdefs.h. */
6947 main ()
6951 return 0;
6953 _ACEOF
6954 if ac_fn_cxx_try_compile "$LINENO"; then :
6955 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6956 else
6957 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6960 ac_ext=c
6961 ac_cpp='$CPP $CPPFLAGS'
6962 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6963 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6964 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6966 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6967 CXXFLAGS="$pgac_save_CXXFLAGS"
6968 CXX="$pgac_save_CXX"
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6971 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6972 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6973 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6977 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6978 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6979 $as_echo_n "(cached) " >&6
6980 else
6981 pgac_save_CFLAGS=$CFLAGS
6982 pgac_save_CC=$CC
6983 CC=${CLANG}
6984 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6985 ac_save_c_werror_flag=$ac_c_werror_flag
6986 ac_c_werror_flag=yes
6987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6988 /* end confdefs.h. */
6991 main ()
6995 return 0;
6997 _ACEOF
6998 if ac_fn_c_try_compile "$LINENO"; then :
6999 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7000 else
7001 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7004 ac_c_werror_flag=$ac_save_c_werror_flag
7005 CFLAGS="$pgac_save_CFLAGS"
7006 CC="$pgac_save_CC"
7008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7009 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7010 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7011 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7015 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7016 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7017 $as_echo_n "(cached) " >&6
7018 else
7019 pgac_save_CXXFLAGS=$CXXFLAGS
7020 pgac_save_CXX=$CXX
7021 CXX=${CLANGXX}
7022 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7023 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7024 ac_cxx_werror_flag=yes
7025 ac_ext=cpp
7026 ac_cpp='$CXXCPP $CPPFLAGS'
7027 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7028 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7029 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7032 /* end confdefs.h. */
7035 main ()
7039 return 0;
7041 _ACEOF
7042 if ac_fn_cxx_try_compile "$LINENO"; then :
7043 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7044 else
7045 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7048 ac_ext=c
7049 ac_cpp='$CPP $CPPFLAGS'
7050 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7051 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7052 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7054 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7055 CXXFLAGS="$pgac_save_CXXFLAGS"
7056 CXX="$pgac_save_CXX"
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7059 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7060 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7061 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
7066 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
7067 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
7068 $as_echo_n "(cached) " >&6
7069 else
7070 pgac_save_CFLAGS=$CFLAGS
7071 pgac_save_CC=$CC
7072 CC=${CLANG}
7073 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7074 ac_save_c_werror_flag=$ac_c_werror_flag
7075 ac_c_werror_flag=yes
7076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7077 /* end confdefs.h. */
7080 main ()
7084 return 0;
7086 _ACEOF
7087 if ac_fn_c_try_compile "$LINENO"; then :
7088 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
7089 else
7090 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
7092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7093 ac_c_werror_flag=$ac_save_c_werror_flag
7094 CFLAGS="$pgac_save_CFLAGS"
7095 CC="$pgac_save_CC"
7097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
7098 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
7099 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
7100 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7104 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7105 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7106 $as_echo_n "(cached) " >&6
7107 else
7108 pgac_save_CXXFLAGS=$CXXFLAGS
7109 pgac_save_CXX=$CXX
7110 CXX=${CLANGXX}
7111 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7112 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7113 ac_cxx_werror_flag=yes
7114 ac_ext=cpp
7115 ac_cpp='$CXXCPP $CPPFLAGS'
7116 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7117 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7118 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7121 /* end confdefs.h. */
7124 main ()
7128 return 0;
7130 _ACEOF
7131 if ac_fn_cxx_try_compile "$LINENO"; then :
7132 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7133 else
7134 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137 ac_ext=c
7138 ac_cpp='$CPP $CPPFLAGS'
7139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7143 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7144 CXXFLAGS="$pgac_save_CXXFLAGS"
7145 CXX="$pgac_save_CXX"
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7148 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7149 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7150 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7154 NOT_THE_CFLAGS=""
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7156 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7157 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7158 $as_echo_n "(cached) " >&6
7159 else
7160 pgac_save_CFLAGS=$CFLAGS
7161 pgac_save_CC=$CC
7162 CC=${CLANG}
7163 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7164 ac_save_c_werror_flag=$ac_c_werror_flag
7165 ac_c_werror_flag=yes
7166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7167 /* end confdefs.h. */
7170 main ()
7174 return 0;
7176 _ACEOF
7177 if ac_fn_c_try_compile "$LINENO"; then :
7178 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7179 else
7180 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7183 ac_c_werror_flag=$ac_save_c_werror_flag
7184 CFLAGS="$pgac_save_CFLAGS"
7185 CC="$pgac_save_CC"
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7188 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7189 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7190 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7193 if test -n "$NOT_THE_CFLAGS"; then
7194 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7196 NOT_THE_CFLAGS=""
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7198 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7199 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7200 $as_echo_n "(cached) " >&6
7201 else
7202 pgac_save_CFLAGS=$CFLAGS
7203 pgac_save_CC=$CC
7204 CC=${CLANG}
7205 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7206 ac_save_c_werror_flag=$ac_c_werror_flag
7207 ac_c_werror_flag=yes
7208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7209 /* end confdefs.h. */
7212 main ()
7216 return 0;
7218 _ACEOF
7219 if ac_fn_c_try_compile "$LINENO"; then :
7220 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7221 else
7222 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7225 ac_c_werror_flag=$ac_save_c_werror_flag
7226 CFLAGS="$pgac_save_CFLAGS"
7227 CC="$pgac_save_CC"
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7230 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7231 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7232 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7235 if test -n "$NOT_THE_CFLAGS"; then
7236 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7238 NOT_THE_CFLAGS=""
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS" >&5
7240 $as_echo_n "checking whether ${CLANG} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS... " >&6; }
7241 if ${pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype+:} false; then :
7242 $as_echo_n "(cached) " >&6
7243 else
7244 pgac_save_CFLAGS=$CFLAGS
7245 pgac_save_CC=$CC
7246 CC=${CLANG}
7247 CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
7248 ac_save_c_werror_flag=$ac_c_werror_flag
7249 ac_c_werror_flag=yes
7250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7251 /* end confdefs.h. */
7254 main ()
7258 return 0;
7260 _ACEOF
7261 if ac_fn_c_try_compile "$LINENO"; then :
7262 pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype=yes
7263 else
7264 pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype=no
7266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7267 ac_c_werror_flag=$ac_save_c_werror_flag
7268 CFLAGS="$pgac_save_CFLAGS"
7269 CC="$pgac_save_CC"
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" >&5
7272 $as_echo "$pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" >&6; }
7273 if test x"$pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" = x"yes"; then
7274 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
7277 if test -n "$NOT_THE_CFLAGS"; then
7278 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-deprecated-non-prototype"
7280 NOT_THE_CFLAGS=""
7281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7282 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7283 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7284 $as_echo_n "(cached) " >&6
7285 else
7286 pgac_save_CFLAGS=$CFLAGS
7287 pgac_save_CC=$CC
7288 CC=${CLANG}
7289 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7290 ac_save_c_werror_flag=$ac_c_werror_flag
7291 ac_c_werror_flag=yes
7292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7293 /* end confdefs.h. */
7296 main ()
7300 return 0;
7302 _ACEOF
7303 if ac_fn_c_try_compile "$LINENO"; then :
7304 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7305 else
7306 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7309 ac_c_werror_flag=$ac_save_c_werror_flag
7310 CFLAGS="$pgac_save_CFLAGS"
7311 CC="$pgac_save_CC"
7313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7314 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7315 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7316 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7319 if test -n "$NOT_THE_CFLAGS"; then
7320 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7322 NOT_THE_CFLAGS=""
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7324 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7325 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7326 $as_echo_n "(cached) " >&6
7327 else
7328 pgac_save_CFLAGS=$CFLAGS
7329 pgac_save_CC=$CC
7330 CC=${CLANG}
7331 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7332 ac_save_c_werror_flag=$ac_c_werror_flag
7333 ac_c_werror_flag=yes
7334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7335 /* end confdefs.h. */
7338 main ()
7342 return 0;
7344 _ACEOF
7345 if ac_fn_c_try_compile "$LINENO"; then :
7346 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7347 else
7348 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7351 ac_c_werror_flag=$ac_save_c_werror_flag
7352 CFLAGS="$pgac_save_CFLAGS"
7353 CC="$pgac_save_CC"
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7356 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7357 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7358 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7361 if test -n "$NOT_THE_CFLAGS"; then
7362 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7366 # supply -g if --enable-debug
7367 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7368 CFLAGS="$CFLAGS -g"
7371 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7372 CXXFLAGS="$CXXFLAGS -g"
7375 # enable code coverage if --enable-coverage
7376 if test "$enable_coverage" = yes; then
7377 if test "$GCC" = yes; then
7378 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7379 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7380 else
7381 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7385 # enable profiling if --enable-profiling
7386 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7387 if test "$GCC" = yes; then
7389 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7391 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7392 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7393 else
7394 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7398 # We already have this in Makefile.win32, but configure needs it too
7399 if test "$PORTNAME" = "win32"; then
7400 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7403 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7404 # user-specified flags (if any) at the end. This lets users override
7405 # the automatic additions.
7406 CFLAGS="$CFLAGS $user_CFLAGS"
7407 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7408 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7409 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7414 # The template file must set up CFLAGS_SL; we don't support user override
7417 # Check if the compiler still works with the final flag settings
7418 # (note, we're not checking that for CXX, which is optional)
7419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7420 $as_echo_n "checking whether the C compiler still works... " >&6; }
7421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7422 /* end confdefs.h. */
7425 main ()
7427 return 0;
7429 return 0;
7431 _ACEOF
7432 if ac_fn_c_try_link "$LINENO"; then :
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7434 $as_echo "yes" >&6; }
7435 else
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437 $as_echo "no" >&6; }
7438 as_fn_error $? "cannot proceed" "$LINENO" 5
7440 rm -f core conftest.err conftest.$ac_objext \
7441 conftest$ac_exeext conftest.$ac_ext
7443 # Defend against gcc -ffast-math
7444 if test "$GCC" = yes; then
7445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7446 /* end confdefs.h. */
7449 main ()
7451 #ifdef __FAST_MATH__
7452 choke me
7453 #endif
7455 return 0;
7457 _ACEOF
7458 if ac_fn_c_try_compile "$LINENO"; then :
7460 else
7461 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7466 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7467 # versions of clang do not understand -fexcess-precision=standard, the use of
7468 # x87 floating point operations leads to problems like isinf possibly returning
7469 # false for a value that is infinite when converted from the 80bit register to
7470 # the 8byte memory representation.
7472 # Only perform the test if the compiler doesn't understand
7473 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7474 # automatically.
7475 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7477 /* end confdefs.h. */
7480 main ()
7483 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7484 choke me
7485 #endif
7488 return 0;
7490 _ACEOF
7491 if ac_fn_c_try_compile "$LINENO"; then :
7493 else
7494 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7499 ac_ext=c
7500 ac_cpp='$CPP $CPPFLAGS'
7501 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7502 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7503 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7505 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7506 # On Suns, sometimes $CPP names a directory.
7507 if test -n "$CPP" && test -d "$CPP"; then
7508 CPP=
7510 if test -z "$CPP"; then
7511 if ${ac_cv_prog_CPP+:} false; then :
7512 $as_echo_n "(cached) " >&6
7513 else
7514 # Double quotes because CPP needs to be expanded
7515 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7517 ac_preproc_ok=false
7518 for ac_c_preproc_warn_flag in '' yes
7520 # Use a header file that comes with gcc, so configuring glibc
7521 # with a fresh cross-compiler works.
7522 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7523 # <limits.h> exists even on freestanding compilers.
7524 # On the NeXT, cc -E runs the code through the compiler's parser,
7525 # not just through cpp. "Syntax error" is here to catch this case.
7526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7527 /* end confdefs.h. */
7528 #ifdef __STDC__
7529 # include <limits.h>
7530 #else
7531 # include <assert.h>
7532 #endif
7533 Syntax error
7534 _ACEOF
7535 if ac_fn_c_try_cpp "$LINENO"; then :
7537 else
7538 # Broken: fails on valid input.
7539 continue
7541 rm -f conftest.err conftest.i conftest.$ac_ext
7543 # OK, works on sane cases. Now check whether nonexistent headers
7544 # can be detected and how.
7545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7546 /* end confdefs.h. */
7547 #include <ac_nonexistent.h>
7548 _ACEOF
7549 if ac_fn_c_try_cpp "$LINENO"; then :
7550 # Broken: success on invalid input.
7551 continue
7552 else
7553 # Passes both tests.
7554 ac_preproc_ok=:
7555 break
7557 rm -f conftest.err conftest.i conftest.$ac_ext
7559 done
7560 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7561 rm -f conftest.i conftest.err conftest.$ac_ext
7562 if $ac_preproc_ok; then :
7563 break
7566 done
7567 ac_cv_prog_CPP=$CPP
7570 CPP=$ac_cv_prog_CPP
7571 else
7572 ac_cv_prog_CPP=$CPP
7574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7575 $as_echo "$CPP" >&6; }
7576 ac_preproc_ok=false
7577 for ac_c_preproc_warn_flag in '' yes
7579 # Use a header file that comes with gcc, so configuring glibc
7580 # with a fresh cross-compiler works.
7581 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7582 # <limits.h> exists even on freestanding compilers.
7583 # On the NeXT, cc -E runs the code through the compiler's parser,
7584 # not just through cpp. "Syntax error" is here to catch this case.
7585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7586 /* end confdefs.h. */
7587 #ifdef __STDC__
7588 # include <limits.h>
7589 #else
7590 # include <assert.h>
7591 #endif
7592 Syntax error
7593 _ACEOF
7594 if ac_fn_c_try_cpp "$LINENO"; then :
7596 else
7597 # Broken: fails on valid input.
7598 continue
7600 rm -f conftest.err conftest.i conftest.$ac_ext
7602 # OK, works on sane cases. Now check whether nonexistent headers
7603 # can be detected and how.
7604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7605 /* end confdefs.h. */
7606 #include <ac_nonexistent.h>
7607 _ACEOF
7608 if ac_fn_c_try_cpp "$LINENO"; then :
7609 # Broken: success on invalid input.
7610 continue
7611 else
7612 # Passes both tests.
7613 ac_preproc_ok=:
7614 break
7616 rm -f conftest.err conftest.i conftest.$ac_ext
7618 done
7619 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7620 rm -f conftest.i conftest.err conftest.$ac_ext
7621 if $ac_preproc_ok; then :
7623 else
7624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7625 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7626 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7627 See \`config.log' for more details" "$LINENO" 5; }
7630 ac_ext=c
7631 ac_cpp='$CPP $CPPFLAGS'
7632 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7633 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7634 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7640 # Set up TAS assembly code if needed; the template file has now had its
7641 # chance to request this.
7643 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7646 if test "$need_tas" = yes ; then
7647 TAS=tas.o
7648 else
7649 TAS=""
7654 # Set up pkg_config in case we need it below
7663 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7664 if test -n "$ac_tool_prefix"; then
7665 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7666 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7668 $as_echo_n "checking for $ac_word... " >&6; }
7669 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7670 $as_echo_n "(cached) " >&6
7671 else
7672 case $PKG_CONFIG in
7673 [\\/]* | ?:[\\/]*)
7674 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7678 for as_dir in $PATH
7680 IFS=$as_save_IFS
7681 test -z "$as_dir" && as_dir=.
7682 for ac_exec_ext in '' $ac_executable_extensions; do
7683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7684 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7686 break 2
7688 done
7689 done
7690 IFS=$as_save_IFS
7693 esac
7695 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7696 if test -n "$PKG_CONFIG"; then
7697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7698 $as_echo "$PKG_CONFIG" >&6; }
7699 else
7700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7701 $as_echo "no" >&6; }
7706 if test -z "$ac_cv_path_PKG_CONFIG"; then
7707 ac_pt_PKG_CONFIG=$PKG_CONFIG
7708 # Extract the first word of "pkg-config", so it can be a program name with args.
7709 set dummy pkg-config; ac_word=$2
7710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7711 $as_echo_n "checking for $ac_word... " >&6; }
7712 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7713 $as_echo_n "(cached) " >&6
7714 else
7715 case $ac_pt_PKG_CONFIG in
7716 [\\/]* | ?:[\\/]*)
7717 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721 for as_dir in $PATH
7723 IFS=$as_save_IFS
7724 test -z "$as_dir" && as_dir=.
7725 for ac_exec_ext in '' $ac_executable_extensions; do
7726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7727 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7729 break 2
7731 done
7732 done
7733 IFS=$as_save_IFS
7736 esac
7738 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7739 if test -n "$ac_pt_PKG_CONFIG"; then
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7741 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7742 else
7743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7744 $as_echo "no" >&6; }
7747 if test "x$ac_pt_PKG_CONFIG" = x; then
7748 PKG_CONFIG=""
7749 else
7750 case $cross_compiling:$ac_tool_warned in
7751 yes:)
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7753 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7754 ac_tool_warned=yes ;;
7755 esac
7756 PKG_CONFIG=$ac_pt_PKG_CONFIG
7758 else
7759 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7763 if test -n "$PKG_CONFIG"; then
7764 _pkg_min_version=0.9.0
7765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7766 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7767 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7769 $as_echo "yes" >&6; }
7770 else
7771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7772 $as_echo "no" >&6; }
7773 PKG_CONFIG=""
7778 # Automatic dependency tracking
7782 # Check whether --enable-depend was given.
7783 if test "${enable_depend+set}" = set; then :
7784 enableval=$enable_depend;
7785 case $enableval in
7786 yes)
7787 autodepend=yes
7793 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7795 esac
7797 else
7798 enable_depend=no
7807 # Enable assert checks
7811 # Check whether --enable-cassert was given.
7812 if test "${enable_cassert+set}" = set; then :
7813 enableval=$enable_cassert;
7814 case $enableval in
7815 yes)
7817 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7824 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7826 esac
7828 else
7829 enable_cassert=no
7837 # Include directories
7839 ac_save_IFS=$IFS
7840 IFS="${IFS}${PATH_SEPARATOR}"
7841 # SRCH_INC comes from the template file
7842 for dir in $with_includes $SRCH_INC; do
7843 if test -d "$dir"; then
7844 INCLUDES="$INCLUDES -I$dir"
7845 else
7846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7847 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7849 done
7850 IFS=$ac_save_IFS
7855 # Library directories
7857 ac_save_IFS=$IFS
7858 IFS="${IFS}${PATH_SEPARATOR}"
7859 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7860 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7861 if test -d "$dir"; then
7862 LIBDIRS="$LIBDIRS -L$dir"
7863 else
7864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7865 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7867 done
7868 IFS=$ac_save_IFS
7871 # Enable thread-safe client libraries
7873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7874 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7877 # Check whether --enable-thread-safety was given.
7878 if test "${enable_thread_safety+set}" = set; then :
7879 enableval=$enable_thread_safety;
7880 case $enableval in
7881 yes)
7888 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7890 esac
7892 else
7893 enable_thread_safety=yes
7898 if test "$enable_thread_safety" = yes; then
7900 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7904 $as_echo "$enable_thread_safety" >&6; }
7908 # ICU
7910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7911 $as_echo_n "checking whether to build with ICU support... " >&6; }
7915 # Check whether --with-icu was given.
7916 if test "${with_icu+set}" = set; then :
7917 withval=$with_icu;
7918 case $withval in
7919 yes)
7921 $as_echo "#define USE_ICU 1" >>confdefs.h
7928 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7930 esac
7932 else
7933 with_icu=no
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7939 $as_echo "$with_icu" >&6; }
7942 if test "$with_icu" = yes; then
7944 pkg_failed=no
7945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7946 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7948 if test -n "$ICU_CFLAGS"; then
7949 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7950 elif test -n "$PKG_CONFIG"; then
7951 if test -n "$PKG_CONFIG" && \
7952 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7953 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7954 ac_status=$?
7955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7956 test $ac_status = 0; }; then
7957 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7958 test "x$?" != "x0" && pkg_failed=yes
7959 else
7960 pkg_failed=yes
7962 else
7963 pkg_failed=untried
7965 if test -n "$ICU_LIBS"; then
7966 pkg_cv_ICU_LIBS="$ICU_LIBS"
7967 elif test -n "$PKG_CONFIG"; then
7968 if test -n "$PKG_CONFIG" && \
7969 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7970 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7971 ac_status=$?
7972 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7973 test $ac_status = 0; }; then
7974 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7975 test "x$?" != "x0" && pkg_failed=yes
7976 else
7977 pkg_failed=yes
7979 else
7980 pkg_failed=untried
7985 if test $pkg_failed = yes; then
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7987 $as_echo "no" >&6; }
7989 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7990 _pkg_short_errors_supported=yes
7991 else
7992 _pkg_short_errors_supported=no
7994 if test $_pkg_short_errors_supported = yes; then
7995 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7996 else
7997 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7999 # Put the nasty error message in config.log where it belongs
8000 echo "$ICU_PKG_ERRORS" >&5
8002 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8004 $ICU_PKG_ERRORS
8006 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8007 installed software in a non-standard prefix.
8009 Alternatively, you may set the environment variables ICU_CFLAGS
8010 and ICU_LIBS to avoid the need to call pkg-config.
8011 See the pkg-config man page for more details." "$LINENO" 5
8012 elif test $pkg_failed = untried; then
8013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8014 $as_echo "no" >&6; }
8015 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8016 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8017 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8018 is in your PATH or set the PKG_CONFIG environment variable to the full
8019 path to pkg-config.
8021 Alternatively, you may set the environment variables ICU_CFLAGS
8022 and ICU_LIBS to avoid the need to call pkg-config.
8023 See the pkg-config man page for more details.
8025 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8026 See \`config.log' for more details" "$LINENO" 5; }
8027 else
8028 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8029 ICU_LIBS=$pkg_cv_ICU_LIBS
8030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8031 $as_echo "yes" >&6; }
8037 # Optionally build Tcl modules (PL/Tcl)
8039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8040 $as_echo_n "checking whether to build with Tcl... " >&6; }
8044 # Check whether --with-tcl was given.
8045 if test "${with_tcl+set}" = set; then :
8046 withval=$with_tcl;
8047 case $withval in
8048 yes)
8055 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8057 esac
8059 else
8060 with_tcl=no
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8066 $as_echo "$with_tcl" >&6; }
8069 # We see if the path to the Tcl/Tk configuration scripts is specified.
8070 # This will override the use of tclsh to find the paths to search.
8075 # Check whether --with-tclconfig was given.
8076 if test "${with_tclconfig+set}" = set; then :
8077 withval=$with_tclconfig;
8078 case $withval in
8079 yes)
8080 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8083 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8088 esac
8095 # Optionally build Perl modules (PL/Perl)
8097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8098 $as_echo_n "checking whether to build Perl modules... " >&6; }
8102 # Check whether --with-perl was given.
8103 if test "${with_perl+set}" = set; then :
8104 withval=$with_perl;
8105 case $withval in
8106 yes)
8113 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8115 esac
8117 else
8118 with_perl=no
8123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8124 $as_echo "$with_perl" >&6; }
8128 # Optionally build Python modules (PL/Python)
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8131 $as_echo_n "checking whether to build Python modules... " >&6; }
8135 # Check whether --with-python was given.
8136 if test "${with_python+set}" = set; then :
8137 withval=$with_python;
8138 case $withval in
8139 yes)
8146 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8148 esac
8150 else
8151 with_python=no
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8157 $as_echo "$with_python" >&6; }
8161 # GSSAPI
8163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8164 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8168 # Check whether --with-gssapi was given.
8169 if test "${with_gssapi+set}" = set; then :
8170 withval=$with_gssapi;
8171 case $withval in
8172 yes)
8175 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8177 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8184 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8186 esac
8188 else
8189 with_gssapi=no
8194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8195 $as_echo "$with_gssapi" >&6; }
8203 # Kerberos configuration parameters
8208 # Check whether --with-krb-srvnam was given.
8209 if test "${with_krb_srvnam+set}" = set; then :
8210 withval=$with_krb_srvnam;
8211 case $withval in
8212 yes)
8213 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8216 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8221 esac
8223 else
8224 with_krb_srvnam="postgres"
8230 cat >>confdefs.h <<_ACEOF
8231 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8232 _ACEOF
8237 # PAM
8239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8240 $as_echo_n "checking whether to build with PAM support... " >&6; }
8244 # Check whether --with-pam was given.
8245 if test "${with_pam+set}" = set; then :
8246 withval=$with_pam;
8247 case $withval in
8248 yes)
8250 $as_echo "#define USE_PAM 1" >>confdefs.h
8257 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8259 esac
8261 else
8262 with_pam=no
8267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8268 $as_echo "$with_pam" >&6; }
8272 # BSD AUTH
8274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8275 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8279 # Check whether --with-bsd-auth was given.
8280 if test "${with_bsd_auth+set}" = set; then :
8281 withval=$with_bsd_auth;
8282 case $withval in
8283 yes)
8285 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8292 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8294 esac
8296 else
8297 with_bsd_auth=no
8302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8303 $as_echo "$with_bsd_auth" >&6; }
8307 # LDAP
8309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8310 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8314 # Check whether --with-ldap was given.
8315 if test "${with_ldap+set}" = set; then :
8316 withval=$with_ldap;
8317 case $withval in
8318 yes)
8320 $as_echo "#define USE_LDAP 1" >>confdefs.h
8327 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8329 esac
8331 else
8332 with_ldap=no
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8338 $as_echo "$with_ldap" >&6; }
8343 # Bonjour
8345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8346 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8350 # Check whether --with-bonjour was given.
8351 if test "${with_bonjour+set}" = set; then :
8352 withval=$with_bonjour;
8353 case $withval in
8354 yes)
8356 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8363 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8365 esac
8367 else
8368 with_bonjour=no
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8374 $as_echo "$with_bonjour" >&6; }
8378 # OpenSSL
8380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
8381 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
8385 # Check whether --with-openssl was given.
8386 if test "${with_openssl+set}" = set; then :
8387 withval=$with_openssl;
8388 case $withval in
8389 yes)
8391 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
8398 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
8400 esac
8402 else
8403 with_openssl=no
8408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
8409 $as_echo "$with_openssl" >&6; }
8413 # SELinux
8415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8416 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8420 # Check whether --with-selinux was given.
8421 if test "${with_selinux+set}" = set; then :
8422 withval=$with_selinux;
8423 case $withval in
8424 yes)
8431 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8433 esac
8435 else
8436 with_selinux=no
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8443 $as_echo "$with_selinux" >&6; }
8446 # Systemd
8448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8449 $as_echo_n "checking whether to build with systemd support... " >&6; }
8453 # Check whether --with-systemd was given.
8454 if test "${with_systemd+set}" = set; then :
8455 withval=$with_systemd;
8456 case $withval in
8457 yes)
8459 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8466 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8468 esac
8470 else
8471 with_systemd=no
8477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8478 $as_echo "$with_systemd" >&6; }
8481 # Readline
8486 # Check whether --with-readline was given.
8487 if test "${with_readline+set}" = set; then :
8488 withval=$with_readline;
8489 case $withval in
8490 yes)
8497 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8499 esac
8501 else
8502 with_readline=yes
8507 # readline on MinGW has problems with backslashes in psql and other bugs.
8508 # This is particularly a problem with non-US code pages.
8509 # Therefore disable its use until we understand the cause. 2004-07-20
8510 if test "$PORTNAME" = "win32"; then
8511 if test "$with_readline" = yes; then
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8513 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8514 with_readline=no
8521 # Prefer libedit
8526 # Check whether --with-libedit-preferred was given.
8527 if test "${with_libedit_preferred+set}" = set; then :
8528 withval=$with_libedit_preferred;
8529 case $withval in
8530 yes)
8537 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8539 esac
8541 else
8542 with_libedit_preferred=no
8550 # UUID library
8552 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8553 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8554 # UUID library. More than one of these might be present on a given platform,
8555 # so we make the user say which one she wants.
8560 # Check whether --with-uuid was given.
8561 if test "${with_uuid+set}" = set; then :
8562 withval=$with_uuid;
8563 case $withval in
8564 yes)
8565 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8568 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8573 esac
8578 if test x"$with_uuid" = x"" ; then
8579 with_uuid=no
8584 # Check whether --with-ossp-uuid was given.
8585 if test "${with_ossp_uuid+set}" = set; then :
8586 withval=$with_ossp_uuid;
8587 case $withval in
8588 yes)
8595 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8597 esac
8599 else
8600 with_ossp_uuid=no
8605 if test "$with_ossp_uuid" = yes ; then
8606 with_uuid=ossp
8609 if test "$with_uuid" = bsd ; then
8611 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8613 UUID_EXTRA_OBJS="md5.o sha1.o"
8614 elif test "$with_uuid" = e2fs ; then
8616 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8618 UUID_EXTRA_OBJS="md5.o sha1.o"
8619 elif test "$with_uuid" = ossp ; then
8621 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8623 UUID_EXTRA_OBJS=""
8624 elif test "$with_uuid" = no ; then
8625 UUID_EXTRA_OBJS=""
8626 else
8627 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8634 # XML
8636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8637 $as_echo_n "checking whether to build with XML support... " >&6; }
8641 # Check whether --with-libxml was given.
8642 if test "${with_libxml+set}" = set; then :
8643 withval=$with_libxml;
8644 case $withval in
8645 yes)
8647 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8654 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8656 esac
8658 else
8659 with_libxml=no
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8665 $as_echo "$with_libxml" >&6; }
8668 if test "$with_libxml" = yes ; then
8669 # Check pkg-config, then xml2-config. But for backwards compatibility,
8670 # setting XML2_CONFIG overrides pkg-config.
8671 have_libxml2_pkg_config=no
8672 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8674 pkg_failed=no
8675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8676 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8678 if test -n "$XML2_CFLAGS"; then
8679 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8680 elif test -n "$PKG_CONFIG"; then
8681 if test -n "$PKG_CONFIG" && \
8682 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8683 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8684 ac_status=$?
8685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8686 test $ac_status = 0; }; then
8687 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8688 test "x$?" != "x0" && pkg_failed=yes
8689 else
8690 pkg_failed=yes
8692 else
8693 pkg_failed=untried
8695 if test -n "$XML2_LIBS"; then
8696 pkg_cv_XML2_LIBS="$XML2_LIBS"
8697 elif test -n "$PKG_CONFIG"; then
8698 if test -n "$PKG_CONFIG" && \
8699 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8700 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8701 ac_status=$?
8702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8703 test $ac_status = 0; }; then
8704 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8705 test "x$?" != "x0" && pkg_failed=yes
8706 else
8707 pkg_failed=yes
8709 else
8710 pkg_failed=untried
8715 if test $pkg_failed = yes; then
8716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8717 $as_echo "no" >&6; }
8719 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8720 _pkg_short_errors_supported=yes
8721 else
8722 _pkg_short_errors_supported=no
8724 if test $_pkg_short_errors_supported = yes; then
8725 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8726 else
8727 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8729 # Put the nasty error message in config.log where it belongs
8730 echo "$XML2_PKG_ERRORS" >&5
8732 # do nothing
8733 elif test $pkg_failed = untried; then
8734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8735 $as_echo "no" >&6; }
8736 # do nothing
8737 else
8738 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8739 XML2_LIBS=$pkg_cv_XML2_LIBS
8740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8741 $as_echo "yes" >&6; }
8742 have_libxml2_pkg_config=yes
8745 if test "$have_libxml2_pkg_config" = no ; then
8746 if test -z "$XML2_CONFIG"; then
8747 for ac_prog in xml2-config
8749 # Extract the first word of "$ac_prog", so it can be a program name with args.
8750 set dummy $ac_prog; ac_word=$2
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8752 $as_echo_n "checking for $ac_word... " >&6; }
8753 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8754 $as_echo_n "(cached) " >&6
8755 else
8756 case $XML2_CONFIG in
8757 [\\/]* | ?:[\\/]*)
8758 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8762 for as_dir in $PATH
8764 IFS=$as_save_IFS
8765 test -z "$as_dir" && as_dir=.
8766 for ac_exec_ext in '' $ac_executable_extensions; do
8767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8768 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8770 break 2
8772 done
8773 done
8774 IFS=$as_save_IFS
8777 esac
8779 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8780 if test -n "$XML2_CONFIG"; then
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8782 $as_echo "$XML2_CONFIG" >&6; }
8783 else
8784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8785 $as_echo "no" >&6; }
8789 test -n "$XML2_CONFIG" && break
8790 done
8792 else
8793 # Report the value of XML2_CONFIG in configure's output in all cases.
8794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8795 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8797 $as_echo "$XML2_CONFIG" >&6; }
8800 if test -n "$XML2_CONFIG"; then
8801 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8802 XML2_LIBS=`$XML2_CONFIG --libs`
8805 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8806 for pgac_option in $XML2_CFLAGS; do
8807 case $pgac_option in
8808 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8809 esac
8810 done
8811 for pgac_option in $XML2_LIBS; do
8812 case $pgac_option in
8813 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8814 esac
8815 done
8820 # XSLT
8825 # Check whether --with-libxslt was given.
8826 if test "${with_libxslt+set}" = set; then :
8827 withval=$with_libxslt;
8828 case $withval in
8829 yes)
8831 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8838 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8840 esac
8842 else
8843 with_libxslt=no
8853 # tzdata
8858 # Check whether --with-system-tzdata was given.
8859 if test "${with_system_tzdata+set}" = set; then :
8860 withval=$with_system_tzdata;
8861 case $withval in
8862 yes)
8863 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8866 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8871 esac
8879 # Zlib
8884 # Check whether --with-zlib was given.
8885 if test "${with_zlib+set}" = set; then :
8886 withval=$with_zlib;
8887 case $withval in
8888 yes)
8895 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8897 esac
8899 else
8900 with_zlib=yes
8908 # Assignments
8911 CPPFLAGS="$CPPFLAGS $INCLUDES"
8912 LDFLAGS="$LDFLAGS $LIBDIRS"
8918 # Check whether --with-gnu-ld was given.
8919 if test "${with_gnu_ld+set}" = set; then :
8920 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8921 else
8922 with_gnu_ld=no
8925 ac_prog=ld
8926 if test "$GCC" = yes; then
8927 # Check if gcc -print-prog-name=ld gives a path.
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8929 $as_echo_n "checking for ld used by GCC... " >&6; }
8930 case $host in
8931 *-*-mingw*)
8932 # gcc leaves a trailing carriage return which upsets mingw
8933 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8935 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8936 esac
8937 case "$ac_prog" in
8938 # Accept absolute paths.
8939 [\\/]* | [A-Za-z]:[\\/]*)
8940 re_direlt='/[^/][^/]*/\.\./'
8941 # Canonicalize the path of ld
8942 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8943 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8944 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8945 done
8946 test -z "$LD" && LD="$ac_prog"
8949 # If it fails, then pretend we aren't using GCC.
8950 ac_prog=ld
8953 # If it is relative, then search for the first ld in PATH.
8954 with_gnu_ld=unknown
8956 esac
8957 elif test "$with_gnu_ld" = yes; then
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8959 $as_echo_n "checking for GNU ld... " >&6; }
8960 else
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8962 $as_echo_n "checking for non-GNU ld... " >&6; }
8964 if ${ac_cv_path_LD+:} false; then :
8965 $as_echo_n "(cached) " >&6
8966 else
8967 if test -z "$LD"; then
8968 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8969 for ac_dir in $PATH; do
8970 test -z "$ac_dir" && ac_dir=.
8971 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8972 ac_cv_path_LD="$ac_dir/$ac_prog"
8973 # Check to see if the program is GNU ld. I'd rather use --version,
8974 # but apparently some GNU ld's only accept -v.
8975 # Break only if it was the GNU/non-GNU ld that we prefer.
8976 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8977 test "$with_gnu_ld" != no && break
8978 else
8979 test "$with_gnu_ld" != yes && break
8982 done
8983 IFS="$ac_save_ifs"
8984 else
8985 ac_cv_path_LD="$LD" # Let the user override the test with a path.
8989 LD="$ac_cv_path_LD"
8990 if test -n "$LD"; then
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8992 $as_echo "$LD" >&6; }
8993 else
8994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8995 $as_echo "no" >&6; }
8997 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8999 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9000 if ${ac_cv_prog_gnu_ld+:} false; then :
9001 $as_echo_n "(cached) " >&6
9002 else
9003 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9004 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9005 ac_cv_prog_gnu_ld=yes
9006 else
9007 ac_cv_prog_gnu_ld=no
9010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
9011 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
9012 with_gnu_ld=$ac_cv_prog_gnu_ld
9017 if test -n "$ac_tool_prefix"; then
9018 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9019 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9021 $as_echo_n "checking for $ac_word... " >&6; }
9022 if ${ac_cv_prog_RANLIB+:} false; then :
9023 $as_echo_n "(cached) " >&6
9024 else
9025 if test -n "$RANLIB"; then
9026 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9027 else
9028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9029 for as_dir in $PATH
9031 IFS=$as_save_IFS
9032 test -z "$as_dir" && as_dir=.
9033 for ac_exec_ext in '' $ac_executable_extensions; do
9034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9035 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9037 break 2
9039 done
9040 done
9041 IFS=$as_save_IFS
9045 RANLIB=$ac_cv_prog_RANLIB
9046 if test -n "$RANLIB"; then
9047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9048 $as_echo "$RANLIB" >&6; }
9049 else
9050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9051 $as_echo "no" >&6; }
9056 if test -z "$ac_cv_prog_RANLIB"; then
9057 ac_ct_RANLIB=$RANLIB
9058 # Extract the first word of "ranlib", so it can be a program name with args.
9059 set dummy ranlib; ac_word=$2
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9061 $as_echo_n "checking for $ac_word... " >&6; }
9062 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
9063 $as_echo_n "(cached) " >&6
9064 else
9065 if test -n "$ac_ct_RANLIB"; then
9066 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9067 else
9068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9069 for as_dir in $PATH
9071 IFS=$as_save_IFS
9072 test -z "$as_dir" && as_dir=.
9073 for ac_exec_ext in '' $ac_executable_extensions; do
9074 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9075 ac_cv_prog_ac_ct_RANLIB="ranlib"
9076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9077 break 2
9079 done
9080 done
9081 IFS=$as_save_IFS
9085 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9086 if test -n "$ac_ct_RANLIB"; then
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9088 $as_echo "$ac_ct_RANLIB" >&6; }
9089 else
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091 $as_echo "no" >&6; }
9094 if test "x$ac_ct_RANLIB" = x; then
9095 RANLIB=":"
9096 else
9097 case $cross_compiling:$ac_tool_warned in
9098 yes:)
9099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9100 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9101 ac_tool_warned=yes ;;
9102 esac
9103 RANLIB=$ac_ct_RANLIB
9105 else
9106 RANLIB="$ac_cv_prog_RANLIB"
9110 if test -n "$ac_tool_prefix"; then
9111 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9112 set dummy ${ac_tool_prefix}strip; ac_word=$2
9113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9114 $as_echo_n "checking for $ac_word... " >&6; }
9115 if ${ac_cv_prog_STRIP+:} false; then :
9116 $as_echo_n "(cached) " >&6
9117 else
9118 if test -n "$STRIP"; then
9119 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9120 else
9121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9122 for as_dir in $PATH
9124 IFS=$as_save_IFS
9125 test -z "$as_dir" && as_dir=.
9126 for ac_exec_ext in '' $ac_executable_extensions; do
9127 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9128 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9130 break 2
9132 done
9133 done
9134 IFS=$as_save_IFS
9138 STRIP=$ac_cv_prog_STRIP
9139 if test -n "$STRIP"; then
9140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9141 $as_echo "$STRIP" >&6; }
9142 else
9143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9144 $as_echo "no" >&6; }
9149 if test -z "$ac_cv_prog_STRIP"; then
9150 ac_ct_STRIP=$STRIP
9151 # Extract the first word of "strip", so it can be a program name with args.
9152 set dummy strip; ac_word=$2
9153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9154 $as_echo_n "checking for $ac_word... " >&6; }
9155 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9156 $as_echo_n "(cached) " >&6
9157 else
9158 if test -n "$ac_ct_STRIP"; then
9159 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9160 else
9161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9162 for as_dir in $PATH
9164 IFS=$as_save_IFS
9165 test -z "$as_dir" && as_dir=.
9166 for ac_exec_ext in '' $ac_executable_extensions; do
9167 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9168 ac_cv_prog_ac_ct_STRIP="strip"
9169 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9170 break 2
9172 done
9173 done
9174 IFS=$as_save_IFS
9178 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9179 if test -n "$ac_ct_STRIP"; then
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9181 $as_echo "$ac_ct_STRIP" >&6; }
9182 else
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9184 $as_echo "no" >&6; }
9187 if test "x$ac_ct_STRIP" = x; then
9188 STRIP=":"
9189 else
9190 case $cross_compiling:$ac_tool_warned in
9191 yes:)
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9193 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9194 ac_tool_warned=yes ;;
9195 esac
9196 STRIP=$ac_ct_STRIP
9198 else
9199 STRIP="$ac_cv_prog_STRIP"
9203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9204 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9205 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9206 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9207 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9209 $as_echo "yes" >&6; }
9210 else
9211 case $host_os in
9212 darwin*)
9213 STRIP="$STRIP -x"
9214 STRIP_STATIC_LIB=$STRIP
9215 STRIP_SHARED_LIB=$STRIP
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9217 $as_echo "yes" >&6; }
9220 STRIP_STATIC_LIB=:
9221 STRIP_SHARED_LIB=:
9222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9223 $as_echo "no" >&6; }
9225 esac
9230 if test -n "$ac_tool_prefix"; then
9231 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9232 set dummy ${ac_tool_prefix}ar; ac_word=$2
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9234 $as_echo_n "checking for $ac_word... " >&6; }
9235 if ${ac_cv_prog_AR+:} false; then :
9236 $as_echo_n "(cached) " >&6
9237 else
9238 if test -n "$AR"; then
9239 ac_cv_prog_AR="$AR" # Let the user override the test.
9240 else
9241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9242 for as_dir in $PATH
9244 IFS=$as_save_IFS
9245 test -z "$as_dir" && as_dir=.
9246 for ac_exec_ext in '' $ac_executable_extensions; do
9247 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9248 ac_cv_prog_AR="${ac_tool_prefix}ar"
9249 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9250 break 2
9252 done
9253 done
9254 IFS=$as_save_IFS
9258 AR=$ac_cv_prog_AR
9259 if test -n "$AR"; then
9260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9261 $as_echo "$AR" >&6; }
9262 else
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9264 $as_echo "no" >&6; }
9269 if test -z "$ac_cv_prog_AR"; then
9270 ac_ct_AR=$AR
9271 # Extract the first word of "ar", so it can be a program name with args.
9272 set dummy ar; ac_word=$2
9273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9274 $as_echo_n "checking for $ac_word... " >&6; }
9275 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9276 $as_echo_n "(cached) " >&6
9277 else
9278 if test -n "$ac_ct_AR"; then
9279 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9280 else
9281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9282 for as_dir in $PATH
9284 IFS=$as_save_IFS
9285 test -z "$as_dir" && as_dir=.
9286 for ac_exec_ext in '' $ac_executable_extensions; do
9287 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9288 ac_cv_prog_ac_ct_AR="ar"
9289 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9290 break 2
9292 done
9293 done
9294 IFS=$as_save_IFS
9298 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9299 if test -n "$ac_ct_AR"; then
9300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9301 $as_echo "$ac_ct_AR" >&6; }
9302 else
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9304 $as_echo "no" >&6; }
9307 if test "x$ac_ct_AR" = x; then
9308 AR="ar"
9309 else
9310 case $cross_compiling:$ac_tool_warned in
9311 yes:)
9312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9313 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9314 ac_tool_warned=yes ;;
9315 esac
9316 AR=$ac_ct_AR
9318 else
9319 AR="$ac_cv_prog_AR"
9322 if test "$PORTNAME" = "win32"; then
9323 if test -n "$ac_tool_prefix"; then
9324 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9325 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9327 $as_echo_n "checking for $ac_word... " >&6; }
9328 if ${ac_cv_prog_DLLTOOL+:} false; then :
9329 $as_echo_n "(cached) " >&6
9330 else
9331 if test -n "$DLLTOOL"; then
9332 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9333 else
9334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9335 for as_dir in $PATH
9337 IFS=$as_save_IFS
9338 test -z "$as_dir" && as_dir=.
9339 for ac_exec_ext in '' $ac_executable_extensions; do
9340 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9341 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9342 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9343 break 2
9345 done
9346 done
9347 IFS=$as_save_IFS
9351 DLLTOOL=$ac_cv_prog_DLLTOOL
9352 if test -n "$DLLTOOL"; then
9353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9354 $as_echo "$DLLTOOL" >&6; }
9355 else
9356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9357 $as_echo "no" >&6; }
9362 if test -z "$ac_cv_prog_DLLTOOL"; then
9363 ac_ct_DLLTOOL=$DLLTOOL
9364 # Extract the first word of "dlltool", so it can be a program name with args.
9365 set dummy dlltool; ac_word=$2
9366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9367 $as_echo_n "checking for $ac_word... " >&6; }
9368 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9369 $as_echo_n "(cached) " >&6
9370 else
9371 if test -n "$ac_ct_DLLTOOL"; then
9372 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9373 else
9374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9375 for as_dir in $PATH
9377 IFS=$as_save_IFS
9378 test -z "$as_dir" && as_dir=.
9379 for ac_exec_ext in '' $ac_executable_extensions; do
9380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9381 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9383 break 2
9385 done
9386 done
9387 IFS=$as_save_IFS
9391 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9392 if test -n "$ac_ct_DLLTOOL"; then
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9394 $as_echo "$ac_ct_DLLTOOL" >&6; }
9395 else
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9397 $as_echo "no" >&6; }
9400 if test "x$ac_ct_DLLTOOL" = x; then
9401 DLLTOOL="dlltool"
9402 else
9403 case $cross_compiling:$ac_tool_warned in
9404 yes:)
9405 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9406 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9407 ac_tool_warned=yes ;;
9408 esac
9409 DLLTOOL=$ac_ct_DLLTOOL
9411 else
9412 DLLTOOL="$ac_cv_prog_DLLTOOL"
9415 if test -n "$ac_tool_prefix"; then
9416 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9417 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9419 $as_echo_n "checking for $ac_word... " >&6; }
9420 if ${ac_cv_prog_DLLWRAP+:} false; then :
9421 $as_echo_n "(cached) " >&6
9422 else
9423 if test -n "$DLLWRAP"; then
9424 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9425 else
9426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9427 for as_dir in $PATH
9429 IFS=$as_save_IFS
9430 test -z "$as_dir" && as_dir=.
9431 for ac_exec_ext in '' $ac_executable_extensions; do
9432 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9433 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9434 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9435 break 2
9437 done
9438 done
9439 IFS=$as_save_IFS
9443 DLLWRAP=$ac_cv_prog_DLLWRAP
9444 if test -n "$DLLWRAP"; then
9445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9446 $as_echo "$DLLWRAP" >&6; }
9447 else
9448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9449 $as_echo "no" >&6; }
9454 if test -z "$ac_cv_prog_DLLWRAP"; then
9455 ac_ct_DLLWRAP=$DLLWRAP
9456 # Extract the first word of "dllwrap", so it can be a program name with args.
9457 set dummy dllwrap; ac_word=$2
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9459 $as_echo_n "checking for $ac_word... " >&6; }
9460 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9461 $as_echo_n "(cached) " >&6
9462 else
9463 if test -n "$ac_ct_DLLWRAP"; then
9464 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9465 else
9466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9467 for as_dir in $PATH
9469 IFS=$as_save_IFS
9470 test -z "$as_dir" && as_dir=.
9471 for ac_exec_ext in '' $ac_executable_extensions; do
9472 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9473 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9474 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9475 break 2
9477 done
9478 done
9479 IFS=$as_save_IFS
9483 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9484 if test -n "$ac_ct_DLLWRAP"; then
9485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9486 $as_echo "$ac_ct_DLLWRAP" >&6; }
9487 else
9488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9489 $as_echo "no" >&6; }
9492 if test "x$ac_ct_DLLWRAP" = x; then
9493 DLLWRAP="dllwrap"
9494 else
9495 case $cross_compiling:$ac_tool_warned in
9496 yes:)
9497 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9498 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9499 ac_tool_warned=yes ;;
9500 esac
9501 DLLWRAP=$ac_ct_DLLWRAP
9503 else
9504 DLLWRAP="$ac_cv_prog_DLLWRAP"
9507 if test -n "$ac_tool_prefix"; then
9508 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9509 set dummy ${ac_tool_prefix}windres; ac_word=$2
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9511 $as_echo_n "checking for $ac_word... " >&6; }
9512 if ${ac_cv_prog_WINDRES+:} false; then :
9513 $as_echo_n "(cached) " >&6
9514 else
9515 if test -n "$WINDRES"; then
9516 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9517 else
9518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519 for as_dir in $PATH
9521 IFS=$as_save_IFS
9522 test -z "$as_dir" && as_dir=.
9523 for ac_exec_ext in '' $ac_executable_extensions; do
9524 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9526 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527 break 2
9529 done
9530 done
9531 IFS=$as_save_IFS
9535 WINDRES=$ac_cv_prog_WINDRES
9536 if test -n "$WINDRES"; then
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9538 $as_echo "$WINDRES" >&6; }
9539 else
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541 $as_echo "no" >&6; }
9546 if test -z "$ac_cv_prog_WINDRES"; then
9547 ac_ct_WINDRES=$WINDRES
9548 # Extract the first word of "windres", so it can be a program name with args.
9549 set dummy windres; ac_word=$2
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9551 $as_echo_n "checking for $ac_word... " >&6; }
9552 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9553 $as_echo_n "(cached) " >&6
9554 else
9555 if test -n "$ac_ct_WINDRES"; then
9556 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9557 else
9558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9559 for as_dir in $PATH
9561 IFS=$as_save_IFS
9562 test -z "$as_dir" && as_dir=.
9563 for ac_exec_ext in '' $ac_executable_extensions; do
9564 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9565 ac_cv_prog_ac_ct_WINDRES="windres"
9566 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9567 break 2
9569 done
9570 done
9571 IFS=$as_save_IFS
9575 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9576 if test -n "$ac_ct_WINDRES"; then
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9578 $as_echo "$ac_ct_WINDRES" >&6; }
9579 else
9580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9581 $as_echo "no" >&6; }
9584 if test "x$ac_ct_WINDRES" = x; then
9585 WINDRES="windres"
9586 else
9587 case $cross_compiling:$ac_tool_warned in
9588 yes:)
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9590 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9591 ac_tool_warned=yes ;;
9592 esac
9593 WINDRES=$ac_ct_WINDRES
9595 else
9596 WINDRES="$ac_cv_prog_WINDRES"
9601 # Find a good install program. We prefer a C program (faster),
9602 # so one script is as good as another. But avoid the broken or
9603 # incompatible versions:
9604 # SysV /etc/install, /usr/sbin/install
9605 # SunOS /usr/etc/install
9606 # IRIX /sbin/install
9607 # AIX /bin/install
9608 # AmigaOS /C/install, which installs bootblocks on floppy discs
9609 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9610 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9611 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9612 # OS/2's system install, which has a completely different semantic
9613 # ./install, which can be erroneously created by make from ./install.sh.
9614 # Reject install programs that cannot install multiple files.
9615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9616 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9617 if test -z "$INSTALL"; then
9618 if ${ac_cv_path_install+:} false; then :
9619 $as_echo_n "(cached) " >&6
9620 else
9621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9622 for as_dir in $PATH
9624 IFS=$as_save_IFS
9625 test -z "$as_dir" && as_dir=.
9626 # Account for people who put trailing slashes in PATH elements.
9627 case $as_dir/ in #((
9628 ./ | .// | /[cC]/* | \
9629 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9630 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9631 /usr/ucb/* ) ;;
9633 # OSF1 and SCO ODT 3.0 have their own names for install.
9634 # Don't use installbsd from OSF since it installs stuff as root
9635 # by default.
9636 for ac_prog in ginstall scoinst install; do
9637 for ac_exec_ext in '' $ac_executable_extensions; do
9638 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9639 if test $ac_prog = install &&
9640 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9641 # AIX install. It has an incompatible calling convention.
9643 elif test $ac_prog = install &&
9644 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9645 # program-specific install script used by HP pwplus--don't use.
9647 else
9648 rm -rf conftest.one conftest.two conftest.dir
9649 echo one > conftest.one
9650 echo two > conftest.two
9651 mkdir conftest.dir
9652 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9653 test -s conftest.one && test -s conftest.two &&
9654 test -s conftest.dir/conftest.one &&
9655 test -s conftest.dir/conftest.two
9656 then
9657 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9658 break 3
9662 done
9663 done
9665 esac
9667 done
9668 IFS=$as_save_IFS
9670 rm -rf conftest.one conftest.two conftest.dir
9673 if test "${ac_cv_path_install+set}" = set; then
9674 INSTALL=$ac_cv_path_install
9675 else
9676 # As a last resort, use the slow shell script. Don't cache a
9677 # value for INSTALL within a source directory, because that will
9678 # break other packages using the cache if that directory is
9679 # removed, or if the value is a relative name.
9680 INSTALL=$ac_install_sh
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9684 $as_echo "$INSTALL" >&6; }
9686 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9687 # It thinks the first close brace ends the variable substitution.
9688 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9690 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9692 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9694 # When Autoconf chooses install-sh as install program it tries to generate
9695 # a relative path to it in each makefile where it substitutes it. This clashes
9696 # with our Makefile.global concept. This workaround helps.
9697 case $INSTALL in
9698 *install-sh*) install_bin='';;
9699 *) install_bin=$INSTALL;;
9700 esac
9703 if test -z "$TAR"; then
9704 for ac_prog in tar
9706 # Extract the first word of "$ac_prog", so it can be a program name with args.
9707 set dummy $ac_prog; 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_path_TAR+:} false; then :
9711 $as_echo_n "(cached) " >&6
9712 else
9713 case $TAR in
9714 [\\/]* | ?:[\\/]*)
9715 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9719 for as_dir in $PATH
9721 IFS=$as_save_IFS
9722 test -z "$as_dir" && as_dir=.
9723 for ac_exec_ext in '' $ac_executable_extensions; do
9724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9725 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9727 break 2
9729 done
9730 done
9731 IFS=$as_save_IFS
9734 esac
9736 TAR=$ac_cv_path_TAR
9737 if test -n "$TAR"; then
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9739 $as_echo "$TAR" >&6; }
9740 else
9741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9742 $as_echo "no" >&6; }
9746 test -n "$TAR" && break
9747 done
9749 else
9750 # Report the value of TAR in configure's output in all cases.
9751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9752 $as_echo_n "checking for TAR... " >&6; }
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9754 $as_echo "$TAR" >&6; }
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9758 $as_echo_n "checking whether ln -s works... " >&6; }
9759 LN_S=$as_ln_s
9760 if test "$LN_S" = "ln -s"; then
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9762 $as_echo "yes" >&6; }
9763 else
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9765 $as_echo "no, using $LN_S" >&6; }
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9769 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9770 if test -z "$MKDIR_P"; then
9771 if ${ac_cv_path_mkdir+:} false; then :
9772 $as_echo_n "(cached) " >&6
9773 else
9774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9775 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9777 IFS=$as_save_IFS
9778 test -z "$as_dir" && as_dir=.
9779 for ac_prog in mkdir gmkdir; do
9780 for ac_exec_ext in '' $ac_executable_extensions; do
9781 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9782 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9783 'mkdir (GNU coreutils) '* | \
9784 'mkdir (coreutils) '* | \
9785 'mkdir (fileutils) '4.1*)
9786 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9787 break 3;;
9788 esac
9789 done
9790 done
9791 done
9792 IFS=$as_save_IFS
9796 test -d ./--version && rmdir ./--version
9797 if test "${ac_cv_path_mkdir+set}" = set; then
9798 MKDIR_P="$ac_cv_path_mkdir -p"
9799 else
9800 # As a last resort, use the slow shell script. Don't cache a
9801 # value for MKDIR_P within a source directory, because that will
9802 # break other packages using the cache if that directory is
9803 # removed, or if the value is a relative name.
9804 MKDIR_P="$ac_install_sh -d"
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9808 $as_echo "$MKDIR_P" >&6; }
9810 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9811 # a relative path to it in each makefile where it substitutes it. This clashes
9812 # with our Makefile.global concept. This workaround helps.
9813 case $MKDIR_P in
9814 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9815 esac
9817 if test -z "$BISON"; then
9818 for ac_prog in bison
9820 # Extract the first word of "$ac_prog", so it can be a program name with args.
9821 set dummy $ac_prog; ac_word=$2
9822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9823 $as_echo_n "checking for $ac_word... " >&6; }
9824 if ${ac_cv_path_BISON+:} false; then :
9825 $as_echo_n "(cached) " >&6
9826 else
9827 case $BISON in
9828 [\\/]* | ?:[\\/]*)
9829 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9833 for as_dir in $PATH
9835 IFS=$as_save_IFS
9836 test -z "$as_dir" && as_dir=.
9837 for ac_exec_ext in '' $ac_executable_extensions; do
9838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9839 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9841 break 2
9843 done
9844 done
9845 IFS=$as_save_IFS
9848 esac
9850 BISON=$ac_cv_path_BISON
9851 if test -n "$BISON"; then
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9853 $as_echo "$BISON" >&6; }
9854 else
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9856 $as_echo "no" >&6; }
9860 test -n "$BISON" && break
9861 done
9863 else
9864 # Report the value of BISON in configure's output in all cases.
9865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9866 $as_echo_n "checking for BISON... " >&6; }
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9868 $as_echo "$BISON" >&6; }
9872 if test "$BISON"; then
9873 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9874 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9875 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9876 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9877 then
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9879 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9880 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9881 $as_echo "$as_me: WARNING:
9882 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9883 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9884 BISON=""
9886 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9887 # of the now preferred %name-prefix "base_yy", but the latter
9888 # doesn't work with Bison 2.3 or less. So for now we silence the
9889 # deprecation warnings.
9890 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9891 then
9892 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9896 if test -z "$BISON"; then
9897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9898 *** Without Bison you will not be able to build PostgreSQL from Git nor
9899 *** change any of the parser definition files. You can obtain Bison from
9900 *** a GNU mirror site. (If you are using the official distribution of
9901 *** PostgreSQL then you do not need to worry about this, because the Bison
9902 *** output is pre-generated.)" >&5
9903 $as_echo "$as_me: WARNING:
9904 *** Without Bison you will not be able to build PostgreSQL from Git nor
9905 *** change any of the parser definition files. You can obtain Bison from
9906 *** a GNU mirror site. (If you are using the official distribution of
9907 *** PostgreSQL then you do not need to worry about this, because the Bison
9908 *** output is pre-generated.)" >&2;}
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9913 $as_echo_n "checking for flex... " >&6; }
9914 if ${pgac_cv_path_flex+:} false; then :
9915 $as_echo_n "(cached) " >&6
9916 else
9917 # Let the user override the test
9918 if test -n "$FLEX"; then
9919 pgac_cv_path_flex=$FLEX
9920 else
9921 pgac_save_IFS=$IFS
9922 IFS=$PATH_SEPARATOR
9923 for pgac_dir in $PATH; do
9924 IFS=$pgac_save_IFS
9925 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9926 pgac_dir=`pwd`
9928 for pgac_prog in flex lex; do
9929 pgac_candidate="$pgac_dir/$pgac_prog"
9930 if test -f "$pgac_candidate" \
9931 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9932 then
9933 echo '%%' > conftest.l
9934 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9935 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9936 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;}'
9937 then
9938 pgac_cv_path_flex=$pgac_candidate
9939 break 2
9940 else
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9942 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9943 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9944 $as_echo "$as_me: WARNING:
9945 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9946 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9950 done
9951 done
9952 rm -f conftest.l lex.yy.c
9953 : ${pgac_cv_path_flex=no}
9957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9958 $as_echo "$pgac_cv_path_flex" >&6; }
9959 if test x"$pgac_cv_path_flex" = x"no"; then
9960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9961 *** Without Flex you will not be able to build PostgreSQL from Git nor
9962 *** change any of the scanner definition files. You can obtain Flex from
9963 *** a GNU mirror site. (If you are using the official distribution of
9964 *** PostgreSQL then you do not need to worry about this because the Flex
9965 *** output is pre-generated.)" >&5
9966 $as_echo "$as_me: WARNING:
9967 *** Without Flex you will not be able to build PostgreSQL from Git nor
9968 *** change any of the scanner definition files. You can obtain Flex from
9969 *** a GNU mirror site. (If you are using the official distribution of
9970 *** PostgreSQL then you do not need to worry about this because the Flex
9971 *** output is pre-generated.)" >&2;}
9973 FLEX=
9974 else
9975 FLEX=$pgac_cv_path_flex
9976 pgac_flex_version=`$FLEX --version 2>/dev/null`
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9978 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9985 if test -z "$PERL"; then
9986 for ac_prog in perl
9988 # Extract the first word of "$ac_prog", so it can be a program name with args.
9989 set dummy $ac_prog; ac_word=$2
9990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9991 $as_echo_n "checking for $ac_word... " >&6; }
9992 if ${ac_cv_path_PERL+:} false; then :
9993 $as_echo_n "(cached) " >&6
9994 else
9995 case $PERL in
9996 [\\/]* | ?:[\\/]*)
9997 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10001 for as_dir in $PATH
10003 IFS=$as_save_IFS
10004 test -z "$as_dir" && as_dir=.
10005 for ac_exec_ext in '' $ac_executable_extensions; do
10006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10007 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10009 break 2
10011 done
10012 done
10013 IFS=$as_save_IFS
10016 esac
10018 PERL=$ac_cv_path_PERL
10019 if test -n "$PERL"; then
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10021 $as_echo "$PERL" >&6; }
10022 else
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024 $as_echo "no" >&6; }
10028 test -n "$PERL" && break
10029 done
10031 else
10032 # Report the value of PERL in configure's output in all cases.
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10034 $as_echo_n "checking for PERL... " >&6; }
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10036 $as_echo "$PERL" >&6; }
10040 if test "$PERL"; then
10041 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'`
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10043 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10044 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10045 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
10046 then
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10048 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10049 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
10050 $as_echo "$as_me: WARNING:
10051 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10052 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
10053 PERL=""
10057 if test -z "$PERL"; then
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10059 *** Without Perl you will not be able to build PostgreSQL from Git.
10060 *** You can obtain Perl from any CPAN mirror site.
10061 *** (If you are using the official distribution of PostgreSQL then you do not
10062 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10063 $as_echo "$as_me: WARNING:
10064 *** Without Perl you will not be able to build PostgreSQL from Git.
10065 *** You can obtain Perl from any CPAN mirror site.
10066 *** (If you are using the official distribution of PostgreSQL then you do not
10067 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10070 if test "$with_perl" = yes; then
10071 if test -z "$PERL"; then
10072 as_fn_error $? "Perl not found" "$LINENO" 5
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10076 $as_echo_n "checking for Perl archlibexp... " >&6; }
10077 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10078 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10080 $as_echo "$perl_archlibexp" >&6; }
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10082 $as_echo_n "checking for Perl privlibexp... " >&6; }
10083 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10084 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10086 $as_echo "$perl_privlibexp" >&6; }
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10088 $as_echo_n "checking for Perl useshrplib... " >&6; }
10089 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10090 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10092 $as_echo "$perl_useshrplib" >&6; }
10093 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10094 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10095 You might have to rebuild your Perl installation. Refer to the
10096 documentation for details. Use --without-perl to disable building
10097 PL/Perl." "$LINENO" 5
10099 # On most platforms, archlibexp is also where the Perl include files live ...
10100 perl_includespec="-I$perl_archlibexp/CORE"
10101 # ... but on newer macOS versions, we must use -iwithsysroot to look
10102 # under $PG_SYSROOT
10103 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10104 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10105 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10110 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10111 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10113 $as_echo "$perl_ccflags" >&6; }
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10115 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10116 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10118 $as_echo "$perl_embed_ccflags" >&6; }
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10122 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10123 if test "$PORTNAME" = "win32" ; then
10124 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10125 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10126 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10127 else
10128 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10129 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10130 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10133 else
10134 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10135 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
10136 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
10138 if test -z "$perl_embed_ldflags" ; then
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140 $as_echo "no" >&6; }
10141 as_fn_error $? "could not determine flags for linking embedded Perl.
10142 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10143 installed." "$LINENO" 5
10144 else
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10146 $as_echo "$perl_embed_ldflags" >&6; }
10151 if test "$with_python" = yes; then
10152 if test -z "$PYTHON"; then
10153 for ac_prog in python python3 python2
10155 # Extract the first word of "$ac_prog", so it can be a program name with args.
10156 set dummy $ac_prog; ac_word=$2
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10158 $as_echo_n "checking for $ac_word... " >&6; }
10159 if ${ac_cv_path_PYTHON+:} false; then :
10160 $as_echo_n "(cached) " >&6
10161 else
10162 case $PYTHON in
10163 [\\/]* | ?:[\\/]*)
10164 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10168 for as_dir in $PATH
10170 IFS=$as_save_IFS
10171 test -z "$as_dir" && as_dir=.
10172 for ac_exec_ext in '' $ac_executable_extensions; do
10173 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10174 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10175 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10176 break 2
10178 done
10179 done
10180 IFS=$as_save_IFS
10183 esac
10185 PYTHON=$ac_cv_path_PYTHON
10186 if test -n "$PYTHON"; then
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10188 $as_echo "$PYTHON" >&6; }
10189 else
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191 $as_echo "no" >&6; }
10195 test -n "$PYTHON" && break
10196 done
10198 else
10199 # Report the value of PYTHON in configure's output in all cases.
10200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10201 $as_echo_n "checking for PYTHON... " >&6; }
10202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10203 $as_echo "$PYTHON" >&6; }
10206 if test x"$PYTHON" = x""; then
10207 as_fn_error $? "Python not found" "$LINENO" 5
10211 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10213 $as_echo "$as_me: using python $python_fullversion" >&6;}
10214 # python_fullversion is typically n.n.n plus some trailing junk
10215 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10216 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10217 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10218 # Reject unsupported Python versions as soon as practical.
10219 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 7; then
10220 as_fn_error $? "Python version $python_version is too old (version 2.7 or later is required)" "$LINENO" 5
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10224 $as_echo_n "checking for Python sysconfig module... " >&6; }
10225 if "${PYTHON}" -c 'import sysconfig' 2>&5
10226 then
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10228 $as_echo "yes" >&6; }
10229 else
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231 $as_echo "no" >&6; }
10232 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10236 $as_echo_n "checking Python configuration directory... " >&6; }
10237 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10239 $as_echo "$python_configdir" >&6; }
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10242 $as_echo_n "checking Python include directory... " >&6; }
10243 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10244 if test "$PORTNAME" = win32 ; then
10245 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10248 $as_echo "$python_includespec" >&6; }
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10253 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10255 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10256 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10258 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10259 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10260 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10261 then
10262 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10263 found_shlib=1
10264 else
10265 # Otherwise, guess the base name of the shlib.
10266 # LDVERSION was added in Python 3.2, before that use VERSION,
10267 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10268 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10269 if test x"${python_ldversion}" != x""; then
10270 ldlibrary="python${python_ldversion}"
10271 else
10272 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10273 if test x"${python_version_var}" != x""; then
10274 ldlibrary="python${python_version_var}"
10275 else
10276 ldlibrary="python${python_version}"
10279 # Search for a likely-looking file.
10280 found_shlib=0
10281 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10283 # We don't know the platform DLSUFFIX here, so check 'em all.
10284 for e in .so .dll .dylib .sl; do
10285 if test -e "$d/lib${ldlibrary}$e"; then
10286 python_libdir="$d"
10287 found_shlib=1
10288 break 2
10290 done
10291 done
10292 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10293 # (".so.n.n") as well. However, check this only after failing to find
10294 # ".so" anywhere, because yet other platforms (Debian) put the .so
10295 # symlink in a different directory from the underlying versioned shlib.
10296 if test "$found_shlib" != 1; then
10297 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10299 for f in "$d/lib${ldlibrary}.so."* ; do
10300 if test -e "$f"; then
10301 python_libdir="$d"
10302 found_shlib=1
10303 break 2
10305 done
10306 done
10308 # As usual, Windows has its own ideas. Possible default library
10309 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10310 # and the "lib" prefix might not be there.
10311 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10312 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10314 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10315 if test -e "$f"; then
10316 python_libdir="$d"
10317 found_shlib=1
10318 break 2
10320 done
10321 done
10324 if test "$found_shlib" != 1; then
10325 as_fn_error $? "could not find shared library for Python
10326 You might have to rebuild your Python installation. Refer to the
10327 documentation for details. Use --without-python to disable building
10328 PL/Python." "$LINENO" 5
10330 python_libspec="-L${python_libdir} -l${ldlibrary}"
10332 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10335 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10341 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10342 if test -z "$ZIC"; then
10343 for ac_prog in zic
10345 # Extract the first word of "$ac_prog", so it can be a program name with args.
10346 set dummy $ac_prog; ac_word=$2
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10348 $as_echo_n "checking for $ac_word... " >&6; }
10349 if ${ac_cv_path_ZIC+:} false; then :
10350 $as_echo_n "(cached) " >&6
10351 else
10352 case $ZIC in
10353 [\\/]* | ?:[\\/]*)
10354 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10358 for as_dir in $PATH
10360 IFS=$as_save_IFS
10361 test -z "$as_dir" && as_dir=.
10362 for ac_exec_ext in '' $ac_executable_extensions; do
10363 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10364 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10366 break 2
10368 done
10369 done
10370 IFS=$as_save_IFS
10373 esac
10375 ZIC=$ac_cv_path_ZIC
10376 if test -n "$ZIC"; then
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10378 $as_echo "$ZIC" >&6; }
10379 else
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381 $as_echo "no" >&6; }
10385 test -n "$ZIC" && break
10386 done
10388 else
10389 # Report the value of ZIC in configure's output in all cases.
10390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10391 $as_echo_n "checking for ZIC... " >&6; }
10392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10393 $as_echo "$ZIC" >&6; }
10396 if test -z "$ZIC"; then
10397 as_fn_error $? "
10398 When cross-compiling, either use the option --with-system-tzdata to use
10399 existing time-zone data, or set the environment variable ZIC to a zic
10400 program to use during the build." "$LINENO" 5
10405 # Pthreads
10407 # For each platform, we need to know about any special compile and link
10408 # libraries, and whether the normal C function names are thread-safe.
10409 # See the comment at the top of src/port/thread.c for more information.
10410 # WIN32 doesn't need the pthread tests; it always uses threads
10412 # These tests are run before the library-tests, because linking with the
10413 # other libraries can pull in the pthread functions as a side-effect. We
10414 # want to use the -pthread or similar flags directly, and not rely on
10415 # the side-effects of linking with some other library.
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10418 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10419 if ${ac_cv_path_SED+:} false; then :
10420 $as_echo_n "(cached) " >&6
10421 else
10422 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10423 for ac_i in 1 2 3 4 5 6 7; do
10424 ac_script="$ac_script$as_nl$ac_script"
10425 done
10426 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10427 { ac_script=; unset ac_script;}
10428 if test -z "$SED"; then
10429 ac_path_SED_found=false
10430 # Loop through the user's path and test for each of PROGNAME-LIST
10431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10432 for as_dir in $PATH
10434 IFS=$as_save_IFS
10435 test -z "$as_dir" && as_dir=.
10436 for ac_prog in sed gsed; do
10437 for ac_exec_ext in '' $ac_executable_extensions; do
10438 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10439 as_fn_executable_p "$ac_path_SED" || continue
10440 # Check for GNU ac_path_SED and select it if it is found.
10441 # Check for GNU $ac_path_SED
10442 case `"$ac_path_SED" --version 2>&1` in
10443 *GNU*)
10444 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10446 ac_count=0
10447 $as_echo_n 0123456789 >"conftest.in"
10448 while :
10450 cat "conftest.in" "conftest.in" >"conftest.tmp"
10451 mv "conftest.tmp" "conftest.in"
10452 cp "conftest.in" "conftest.nl"
10453 $as_echo '' >> "conftest.nl"
10454 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10455 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10456 as_fn_arith $ac_count + 1 && ac_count=$as_val
10457 if test $ac_count -gt ${ac_path_SED_max-0}; then
10458 # Best one so far, save it but keep looking for a better one
10459 ac_cv_path_SED="$ac_path_SED"
10460 ac_path_SED_max=$ac_count
10462 # 10*(2^10) chars as input seems more than enough
10463 test $ac_count -gt 10 && break
10464 done
10465 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10466 esac
10468 $ac_path_SED_found && break 3
10469 done
10470 done
10471 done
10472 IFS=$as_save_IFS
10473 if test -z "$ac_cv_path_SED"; then
10474 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10476 else
10477 ac_cv_path_SED=$SED
10481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10482 $as_echo "$ac_cv_path_SED" >&6; }
10483 SED="$ac_cv_path_SED"
10484 rm -f conftest.sed
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10488 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10489 if ${ac_cv_path_GREP+:} false; then :
10490 $as_echo_n "(cached) " >&6
10491 else
10492 if test -z "$GREP"; then
10493 ac_path_GREP_found=false
10494 # Loop through the user's path and test for each of PROGNAME-LIST
10495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10496 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10498 IFS=$as_save_IFS
10499 test -z "$as_dir" && as_dir=.
10500 for ac_prog in grep ggrep; do
10501 for ac_exec_ext in '' $ac_executable_extensions; do
10502 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10503 as_fn_executable_p "$ac_path_GREP" || continue
10504 # Check for GNU ac_path_GREP and select it if it is found.
10505 # Check for GNU $ac_path_GREP
10506 case `"$ac_path_GREP" --version 2>&1` in
10507 *GNU*)
10508 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10510 ac_count=0
10511 $as_echo_n 0123456789 >"conftest.in"
10512 while :
10514 cat "conftest.in" "conftest.in" >"conftest.tmp"
10515 mv "conftest.tmp" "conftest.in"
10516 cp "conftest.in" "conftest.nl"
10517 $as_echo 'GREP' >> "conftest.nl"
10518 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10519 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10520 as_fn_arith $ac_count + 1 && ac_count=$as_val
10521 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10522 # Best one so far, save it but keep looking for a better one
10523 ac_cv_path_GREP="$ac_path_GREP"
10524 ac_path_GREP_max=$ac_count
10526 # 10*(2^10) chars as input seems more than enough
10527 test $ac_count -gt 10 && break
10528 done
10529 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10530 esac
10532 $ac_path_GREP_found && break 3
10533 done
10534 done
10535 done
10536 IFS=$as_save_IFS
10537 if test -z "$ac_cv_path_GREP"; then
10538 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10540 else
10541 ac_cv_path_GREP=$GREP
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10546 $as_echo "$ac_cv_path_GREP" >&6; }
10547 GREP="$ac_cv_path_GREP"
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10551 $as_echo_n "checking for egrep... " >&6; }
10552 if ${ac_cv_path_EGREP+:} false; then :
10553 $as_echo_n "(cached) " >&6
10554 else
10555 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10556 then ac_cv_path_EGREP="$GREP -E"
10557 else
10558 if test -z "$EGREP"; then
10559 ac_path_EGREP_found=false
10560 # Loop through the user's path and test for each of PROGNAME-LIST
10561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10562 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10564 IFS=$as_save_IFS
10565 test -z "$as_dir" && as_dir=.
10566 for ac_prog in egrep; do
10567 for ac_exec_ext in '' $ac_executable_extensions; do
10568 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10569 as_fn_executable_p "$ac_path_EGREP" || continue
10570 # Check for GNU ac_path_EGREP and select it if it is found.
10571 # Check for GNU $ac_path_EGREP
10572 case `"$ac_path_EGREP" --version 2>&1` in
10573 *GNU*)
10574 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10576 ac_count=0
10577 $as_echo_n 0123456789 >"conftest.in"
10578 while :
10580 cat "conftest.in" "conftest.in" >"conftest.tmp"
10581 mv "conftest.tmp" "conftest.in"
10582 cp "conftest.in" "conftest.nl"
10583 $as_echo 'EGREP' >> "conftest.nl"
10584 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10585 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10586 as_fn_arith $ac_count + 1 && ac_count=$as_val
10587 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10588 # Best one so far, save it but keep looking for a better one
10589 ac_cv_path_EGREP="$ac_path_EGREP"
10590 ac_path_EGREP_max=$ac_count
10592 # 10*(2^10) chars as input seems more than enough
10593 test $ac_count -gt 10 && break
10594 done
10595 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10596 esac
10598 $ac_path_EGREP_found && break 3
10599 done
10600 done
10601 done
10602 IFS=$as_save_IFS
10603 if test -z "$ac_cv_path_EGREP"; then
10604 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10606 else
10607 ac_cv_path_EGREP=$EGREP
10612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10613 $as_echo "$ac_cv_path_EGREP" >&6; }
10614 EGREP="$ac_cv_path_EGREP"
10617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10618 $as_echo_n "checking for ANSI C header files... " >&6; }
10619 if ${ac_cv_header_stdc+:} false; then :
10620 $as_echo_n "(cached) " >&6
10621 else
10622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10623 /* end confdefs.h. */
10624 #include <stdlib.h>
10625 #include <stdarg.h>
10626 #include <string.h>
10627 #include <float.h>
10630 main ()
10634 return 0;
10636 _ACEOF
10637 if ac_fn_c_try_compile "$LINENO"; then :
10638 ac_cv_header_stdc=yes
10639 else
10640 ac_cv_header_stdc=no
10642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10644 if test $ac_cv_header_stdc = yes; then
10645 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10647 /* end confdefs.h. */
10648 #include <string.h>
10650 _ACEOF
10651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10652 $EGREP "memchr" >/dev/null 2>&1; then :
10654 else
10655 ac_cv_header_stdc=no
10657 rm -f conftest*
10661 if test $ac_cv_header_stdc = yes; then
10662 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10664 /* end confdefs.h. */
10665 #include <stdlib.h>
10667 _ACEOF
10668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10669 $EGREP "free" >/dev/null 2>&1; then :
10671 else
10672 ac_cv_header_stdc=no
10674 rm -f conftest*
10678 if test $ac_cv_header_stdc = yes; then
10679 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10680 if test "$cross_compiling" = yes; then :
10682 else
10683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10684 /* end confdefs.h. */
10685 #include <ctype.h>
10686 #include <stdlib.h>
10687 #if ((' ' & 0x0FF) == 0x020)
10688 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10689 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10690 #else
10691 # define ISLOWER(c) \
10692 (('a' <= (c) && (c) <= 'i') \
10693 || ('j' <= (c) && (c) <= 'r') \
10694 || ('s' <= (c) && (c) <= 'z'))
10695 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10696 #endif
10698 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10700 main ()
10702 int i;
10703 for (i = 0; i < 256; i++)
10704 if (XOR (islower (i), ISLOWER (i))
10705 || toupper (i) != TOUPPER (i))
10706 return 2;
10707 return 0;
10709 _ACEOF
10710 if ac_fn_c_try_run "$LINENO"; then :
10712 else
10713 ac_cv_header_stdc=no
10715 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10716 conftest.$ac_objext conftest.beam conftest.$ac_ext
10721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10722 $as_echo "$ac_cv_header_stdc" >&6; }
10723 if test $ac_cv_header_stdc = yes; then
10725 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10729 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10730 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10731 inttypes.h stdint.h unistd.h
10732 do :
10733 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10734 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10736 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10737 cat >>confdefs.h <<_ACEOF
10738 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10739 _ACEOF
10743 done
10746 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10747 # then
10752 ac_ext=c
10753 ac_cpp='$CPP $CPPFLAGS'
10754 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10755 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10756 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10758 ax_pthread_ok=no
10760 # We used to check for pthread.h first, but this fails if pthread.h
10761 # requires special compiler flags (e.g. on Tru64 or Sequent).
10762 # It gets checked for in the link test anyway.
10764 # First of all, check if the user has set any of the PTHREAD_LIBS,
10765 # etcetera environment variables, and if threads linking works using
10766 # them:
10767 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10768 ax_pthread_save_CC="$CC"
10769 ax_pthread_save_CFLAGS="$CFLAGS"
10770 ax_pthread_save_LIBS="$LIBS"
10771 if test "x$PTHREAD_CC" != "x"; then :
10772 CC="$PTHREAD_CC"
10774 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10775 LIBS="$PTHREAD_LIBS $LIBS"
10776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10777 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10779 /* end confdefs.h. */
10781 /* Override any GCC internal prototype to avoid an error.
10782 Use char because int might match the return type of a GCC
10783 builtin and then its argument prototype would still apply. */
10784 #ifdef __cplusplus
10785 extern "C"
10786 #endif
10787 char pthread_join ();
10789 main ()
10791 return pthread_join ();
10793 return 0;
10795 _ACEOF
10796 if ac_fn_c_try_link "$LINENO"; then :
10797 ax_pthread_ok=yes
10799 rm -f core conftest.err conftest.$ac_objext \
10800 conftest$ac_exeext conftest.$ac_ext
10801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10802 $as_echo "$ax_pthread_ok" >&6; }
10803 if test "x$ax_pthread_ok" = "xno"; then
10804 PTHREAD_LIBS=""
10805 PTHREAD_CFLAGS=""
10807 CC="$ax_pthread_save_CC"
10808 CFLAGS="$ax_pthread_save_CFLAGS"
10809 LIBS="$ax_pthread_save_LIBS"
10812 # We must check for the threads library under a number of different
10813 # names; the ordering is very important because some systems
10814 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10815 # libraries is broken (non-POSIX).
10817 # Create a list of thread flags to try. Items starting with a "-" are
10818 # C compiler flags, and other items are library names, except for "none"
10819 # which indicates that we try without any flags at all, and "pthread-config"
10820 # which is a program returning the flags for the Pth emulation library.
10822 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10824 # The ordering *is* (sometimes) important. Some notes on the
10825 # individual items follow:
10827 # pthreads: AIX (must check this before -lpthread)
10828 # none: in case threads are in libc; should be tried before -Kthread and
10829 # other compiler flags to prevent continual compiler warnings
10830 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10831 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10832 # (Note: HP C rejects this with "bad form for `-t' option")
10833 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10834 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10835 # doesn't hurt to check since this sometimes defines pthreads and
10836 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10837 # is present but should not be used directly; and before -mthreads,
10838 # because the compiler interprets this as "-mt" + "-hreads")
10839 # -mthreads: Mingw32/gcc, Lynx/gcc
10840 # pthread: Linux, etcetera
10841 # --thread-safe: KAI C++
10842 # pthread-config: use pthread-config program (for GNU Pth library)
10844 case $host_os in
10846 freebsd*)
10848 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10849 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10851 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10854 hpux*)
10856 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10857 # multi-threading and also sets -lpthread."
10859 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10862 openedition*)
10864 # IBM z/OS requires a feature-test macro to be defined in order to
10865 # enable POSIX threads at all, so give the user a hint if this is
10866 # not set. (We don't define these ourselves, as they can affect
10867 # other portions of the system API in unpredictable ways.)
10869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10870 /* end confdefs.h. */
10872 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10873 AX_PTHREAD_ZOS_MISSING
10874 # endif
10876 _ACEOF
10877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10878 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10880 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10882 rm -f conftest*
10886 solaris*)
10888 # On Solaris (at least, for some versions), libc contains stubbed
10889 # (non-functional) versions of the pthreads routines, so link-based
10890 # tests will erroneously succeed. (N.B.: The stubs are missing
10891 # pthread_cleanup_push, or rather a function called by this macro,
10892 # so we could check for that, but who knows whether they'll stub
10893 # that too in a future libc.) So we'll check first for the
10894 # standard Solaris way of linking pthreads (-mt -lpthread).
10896 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10898 esac
10900 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10902 if test "x$GCC" = "xyes"; then :
10903 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10906 # The presence of a feature test macro requesting re-entrant function
10907 # definitions is, on some systems, a strong hint that pthreads support is
10908 # correctly enabled
10910 case $host_os in
10911 darwin* | hpux* | linux* | osf* | solaris*)
10912 ax_pthread_check_macro="_REENTRANT"
10915 aix*)
10916 ax_pthread_check_macro="_THREAD_SAFE"
10920 ax_pthread_check_macro="--"
10922 esac
10923 if test "x$ax_pthread_check_macro" = "x--"; then :
10924 ax_pthread_check_cond=0
10925 else
10926 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10929 # Are we compiling with Clang?
10931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10932 $as_echo_n "checking whether $CC is Clang... " >&6; }
10933 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10934 $as_echo_n "(cached) " >&6
10935 else
10936 ax_cv_PTHREAD_CLANG=no
10937 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10938 if test "x$GCC" = "xyes"; then
10939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10940 /* end confdefs.h. */
10941 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10942 # if defined(__clang__) && defined(__llvm__)
10943 AX_PTHREAD_CC_IS_CLANG
10944 # endif
10946 _ACEOF
10947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10948 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10949 ax_cv_PTHREAD_CLANG=yes
10951 rm -f conftest*
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10957 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10958 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10960 ax_pthread_clang_warning=no
10962 # Clang needs special handling, because older versions handle the -pthread
10963 # option in a rather... idiosyncratic way
10965 if test "x$ax_pthread_clang" = "xyes"; then
10967 # Clang takes -pthread; it has never supported any other flag
10969 # (Note 1: This will need to be revisited if a system that Clang
10970 # supports has POSIX threads in a separate library. This tends not
10971 # to be the way of modern systems, but it's conceivable.)
10973 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10974 # to get POSIX threads support; the API is always present and
10975 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10976 # -pthread does define _REENTRANT, and while the Darwin headers
10977 # ignore this macro, third-party headers might not.)
10979 PTHREAD_CFLAGS="-pthread"
10980 PTHREAD_LIBS=
10982 ax_pthread_ok=yes
10984 # However, older versions of Clang make a point of warning the user
10985 # that, in an invocation where only linking and no compilation is
10986 # taking place, the -pthread option has no effect ("argument unused
10987 # during compilation"). They expect -pthread to be passed in only
10988 # when source code is being compiled.
10990 # Problem is, this is at odds with the way Automake and most other
10991 # C build frameworks function, which is that the same flags used in
10992 # compilation (CFLAGS) are also used in linking. Many systems
10993 # supported by AX_PTHREAD require exactly this for POSIX threads
10994 # support, and in fact it is often not straightforward to specify a
10995 # flag that is used only in the compilation phase and not in
10996 # linking. Such a scenario is extremely rare in practice.
10998 # Even though use of the -pthread flag in linking would only print
10999 # a warning, this can be a nuisance for well-run software projects
11000 # that build with -Werror. So if the active version of Clang has
11001 # this misfeature, we search for an option to squash it.
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11004 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11005 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11006 $as_echo_n "(cached) " >&6
11007 else
11008 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11009 # Create an alternate version of $ac_link that compiles and
11010 # links in two steps (.c -> .o, .o -> exe) instead of one
11011 # (.c -> exe), because the warning occurs only in the second
11012 # step
11013 ax_pthread_save_ac_link="$ac_link"
11014 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11015 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11016 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11017 ax_pthread_save_CFLAGS="$CFLAGS"
11018 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11019 if test "x$ax_pthread_try" = "xunknown"; then :
11020 break
11022 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11023 ac_link="$ax_pthread_save_ac_link"
11024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11025 /* end confdefs.h. */
11026 int main(void){return 0;}
11027 _ACEOF
11028 if ac_fn_c_try_link "$LINENO"; then :
11029 ac_link="$ax_pthread_2step_ac_link"
11030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11031 /* end confdefs.h. */
11032 int main(void){return 0;}
11033 _ACEOF
11034 if ac_fn_c_try_link "$LINENO"; then :
11035 break
11037 rm -f core conftest.err conftest.$ac_objext \
11038 conftest$ac_exeext conftest.$ac_ext
11041 rm -f core conftest.err conftest.$ac_objext \
11042 conftest$ac_exeext conftest.$ac_ext
11043 done
11044 ac_link="$ax_pthread_save_ac_link"
11045 CFLAGS="$ax_pthread_save_CFLAGS"
11046 if test "x$ax_pthread_try" = "x"; then :
11047 ax_pthread_try=no
11049 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11053 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11055 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11056 no | unknown) ;;
11057 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11058 esac
11060 fi # $ax_pthread_clang = yes
11062 if test "x$ax_pthread_ok" = "xno"; then
11063 for ax_pthread_try_flag in $ax_pthread_flags; do
11065 case $ax_pthread_try_flag in
11066 none)
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11068 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11071 -mt,pthread)
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11073 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11074 PTHREAD_CFLAGS="-mt"
11075 PTHREAD_LIBS="-lpthread"
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11080 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11081 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11084 pthread-config)
11085 # Extract the first word of "pthread-config", so it can be a program name with args.
11086 set dummy pthread-config; ac_word=$2
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11088 $as_echo_n "checking for $ac_word... " >&6; }
11089 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11090 $as_echo_n "(cached) " >&6
11091 else
11092 if test -n "$ax_pthread_config"; then
11093 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11094 else
11095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11096 for as_dir in $PATH
11098 IFS=$as_save_IFS
11099 test -z "$as_dir" && as_dir=.
11100 for ac_exec_ext in '' $ac_executable_extensions; do
11101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11102 ac_cv_prog_ax_pthread_config="yes"
11103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11104 break 2
11106 done
11107 done
11108 IFS=$as_save_IFS
11110 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11113 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11114 if test -n "$ax_pthread_config"; then
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11116 $as_echo "$ax_pthread_config" >&6; }
11117 else
11118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11119 $as_echo "no" >&6; }
11123 if test "x$ax_pthread_config" = "xno"; then :
11124 continue
11126 PTHREAD_CFLAGS="`pthread-config --cflags`"
11127 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11132 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11133 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11135 esac
11137 ax_pthread_save_CFLAGS="$CFLAGS"
11138 ax_pthread_save_LIBS="$LIBS"
11139 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11140 LIBS="$PTHREAD_LIBS $LIBS"
11142 # Check for various functions. We must include pthread.h,
11143 # since some functions may be macros. (On the Sequent, we
11144 # need a special flag -Kthread to make this header compile.)
11145 # We check for pthread_join because it is in -lpthread on IRIX
11146 # while pthread_create is in libc. We check for pthread_attr_init
11147 # due to DEC craziness with -lpthreads. We check for
11148 # pthread_cleanup_push because it is one of the few pthread
11149 # functions on Solaris that doesn't have a non-functional libc stub.
11150 # We try pthread_create on general principles.
11152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11153 /* end confdefs.h. */
11154 #include <pthread.h>
11155 # if $ax_pthread_check_cond
11156 # error "$ax_pthread_check_macro must be defined"
11157 # endif
11158 static void routine(void *a) { a = 0; }
11159 static void *start_routine(void *a) { return a; }
11161 main ()
11163 pthread_t th; pthread_attr_t attr;
11164 pthread_create(&th, 0, start_routine, 0);
11165 pthread_join(th, 0);
11166 pthread_attr_init(&attr);
11167 pthread_cleanup_push(routine, 0);
11168 pthread_cleanup_pop(0) /* ; */
11170 return 0;
11172 _ACEOF
11173 if ac_fn_c_try_link "$LINENO"; then :
11174 ax_pthread_ok=yes
11176 rm -f core conftest.err conftest.$ac_objext \
11177 conftest$ac_exeext conftest.$ac_ext
11179 CFLAGS="$ax_pthread_save_CFLAGS"
11180 LIBS="$ax_pthread_save_LIBS"
11182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11183 $as_echo "$ax_pthread_ok" >&6; }
11184 if test "x$ax_pthread_ok" = "xyes"; then :
11185 break
11188 PTHREAD_LIBS=""
11189 PTHREAD_CFLAGS=""
11190 done
11193 # Various other checks:
11194 if test "x$ax_pthread_ok" = "xyes"; then
11195 ax_pthread_save_CFLAGS="$CFLAGS"
11196 ax_pthread_save_LIBS="$LIBS"
11197 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11198 LIBS="$PTHREAD_LIBS $LIBS"
11200 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11202 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11203 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11204 $as_echo_n "(cached) " >&6
11205 else
11206 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11207 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11209 /* end confdefs.h. */
11210 #include <pthread.h>
11212 main ()
11214 int attr = $ax_pthread_attr; return attr /* ; */
11216 return 0;
11218 _ACEOF
11219 if ac_fn_c_try_link "$LINENO"; then :
11220 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11222 rm -f core conftest.err conftest.$ac_objext \
11223 conftest$ac_exeext conftest.$ac_ext
11224 done
11227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11228 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11229 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11230 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11231 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11233 cat >>confdefs.h <<_ACEOF
11234 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11235 _ACEOF
11237 ax_pthread_joinable_attr_defined=yes
11241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11242 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11243 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11244 $as_echo_n "(cached) " >&6
11245 else
11246 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11247 case $host_os in
11248 solaris*)
11249 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11251 esac
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11255 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11256 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11257 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11258 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11259 ax_pthread_special_flags_added=yes
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11263 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11264 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11265 $as_echo_n "(cached) " >&6
11266 else
11267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11268 /* end confdefs.h. */
11269 #include <pthread.h>
11271 main ()
11273 int i = PTHREAD_PRIO_INHERIT;
11275 return 0;
11277 _ACEOF
11278 if ac_fn_c_try_link "$LINENO"; then :
11279 ax_cv_PTHREAD_PRIO_INHERIT=yes
11280 else
11281 ax_cv_PTHREAD_PRIO_INHERIT=no
11283 rm -f core conftest.err conftest.$ac_objext \
11284 conftest$ac_exeext conftest.$ac_ext
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11288 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11289 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11290 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11292 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11294 ax_pthread_prio_inherit_defined=yes
11298 CFLAGS="$ax_pthread_save_CFLAGS"
11299 LIBS="$ax_pthread_save_LIBS"
11301 # More AIX lossage: compile with *_r variant
11302 if test "x$GCC" != "xyes"; then
11303 case $host_os in
11304 aix*)
11305 case "x/$CC" in #(
11306 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11307 #handle absolute path differently from PATH based program lookup
11308 case "x$CC" in #(
11309 x/*) :
11310 if as_fn_executable_p ${CC}_r; then :
11311 PTHREAD_CC="${CC}_r"
11312 fi ;; #(
11313 *) :
11314 for ac_prog in ${CC}_r
11316 # Extract the first word of "$ac_prog", so it can be a program name with args.
11317 set dummy $ac_prog; ac_word=$2
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11319 $as_echo_n "checking for $ac_word... " >&6; }
11320 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11321 $as_echo_n "(cached) " >&6
11322 else
11323 if test -n "$PTHREAD_CC"; then
11324 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11325 else
11326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11327 for as_dir in $PATH
11329 IFS=$as_save_IFS
11330 test -z "$as_dir" && as_dir=.
11331 for ac_exec_ext in '' $ac_executable_extensions; do
11332 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11333 ac_cv_prog_PTHREAD_CC="$ac_prog"
11334 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11335 break 2
11337 done
11338 done
11339 IFS=$as_save_IFS
11343 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11344 if test -n "$PTHREAD_CC"; then
11345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11346 $as_echo "$PTHREAD_CC" >&6; }
11347 else
11348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349 $as_echo "no" >&6; }
11353 test -n "$PTHREAD_CC" && break
11354 done
11355 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11357 esac ;; #(
11358 *) :
11360 esac
11362 esac
11366 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11372 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11373 if test "x$ax_pthread_ok" = "xyes"; then
11375 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11378 else
11379 ax_pthread_ok=no
11382 ac_ext=c
11383 ac_cpp='$CPP $CPPFLAGS'
11384 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11385 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11386 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11388 # set thread flags
11390 # Some platforms use these, so just define them. They can't hurt if they
11391 # are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
11392 # enables 5-arg getpwuid_r, among other things.
11393 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
11395 # Check for *_r functions
11396 _CFLAGS="$CFLAGS"
11397 _LIBS="$LIBS"
11398 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11399 LIBS="$LIBS $PTHREAD_LIBS"
11401 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11402 if test "x$ac_cv_header_pthread_h" = xyes; then :
11404 else
11405 as_fn_error $? "
11406 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11411 for ac_func in strerror_r getpwuid_r gethostbyname_r
11412 do :
11413 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11414 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11415 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11416 cat >>confdefs.h <<_ACEOF
11417 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11418 _ACEOF
11421 done
11424 # Do test here with the proper thread flags
11425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11426 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11427 if ${pgac_cv_func_strerror_r_int+:} false; then :
11428 $as_echo_n "(cached) " >&6
11429 else
11430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11431 /* end confdefs.h. */
11432 #include <string.h>
11434 main ()
11436 char buf[100];
11437 switch (strerror_r(1, buf, sizeof(buf)))
11438 { case 0: break; default: break; }
11441 return 0;
11443 _ACEOF
11444 if ac_fn_c_try_compile "$LINENO"; then :
11445 pgac_cv_func_strerror_r_int=yes
11446 else
11447 pgac_cv_func_strerror_r_int=no
11449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11452 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11453 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11455 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11460 CFLAGS="$_CFLAGS"
11461 LIBS="$_LIBS"
11464 else
11465 # else
11466 # do not use values from template file
11467 PTHREAD_CFLAGS=
11468 PTHREAD_LIBS=
11470 fi # fi
11477 ## Libraries
11479 ## Most libraries are included only if they demonstrably provide a function
11480 ## we need, but libm is an exception: always include it, because there are
11481 ## too many compilers that play cute optimization games that will break
11482 ## probes for standard functions such as pow().
11485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11486 $as_echo_n "checking for main in -lm... " >&6; }
11487 if ${ac_cv_lib_m_main+:} false; then :
11488 $as_echo_n "(cached) " >&6
11489 else
11490 ac_check_lib_save_LIBS=$LIBS
11491 LIBS="-lm $LIBS"
11492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11493 /* end confdefs.h. */
11497 main ()
11499 return main ();
11501 return 0;
11503 _ACEOF
11504 if ac_fn_c_try_link "$LINENO"; then :
11505 ac_cv_lib_m_main=yes
11506 else
11507 ac_cv_lib_m_main=no
11509 rm -f core conftest.err conftest.$ac_objext \
11510 conftest$ac_exeext conftest.$ac_ext
11511 LIBS=$ac_check_lib_save_LIBS
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11514 $as_echo "$ac_cv_lib_m_main" >&6; }
11515 if test "x$ac_cv_lib_m_main" = xyes; then :
11516 cat >>confdefs.h <<_ACEOF
11517 #define HAVE_LIBM 1
11518 _ACEOF
11520 LIBS="-lm $LIBS"
11524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11525 $as_echo_n "checking for library containing setproctitle... " >&6; }
11526 if ${ac_cv_search_setproctitle+:} false; then :
11527 $as_echo_n "(cached) " >&6
11528 else
11529 ac_func_search_save_LIBS=$LIBS
11530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11531 /* end confdefs.h. */
11533 /* Override any GCC internal prototype to avoid an error.
11534 Use char because int might match the return type of a GCC
11535 builtin and then its argument prototype would still apply. */
11536 #ifdef __cplusplus
11537 extern "C"
11538 #endif
11539 char setproctitle ();
11541 main ()
11543 return setproctitle ();
11545 return 0;
11547 _ACEOF
11548 for ac_lib in '' util; do
11549 if test -z "$ac_lib"; then
11550 ac_res="none required"
11551 else
11552 ac_res=-l$ac_lib
11553 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11555 if ac_fn_c_try_link "$LINENO"; then :
11556 ac_cv_search_setproctitle=$ac_res
11558 rm -f core conftest.err conftest.$ac_objext \
11559 conftest$ac_exeext
11560 if ${ac_cv_search_setproctitle+:} false; then :
11561 break
11563 done
11564 if ${ac_cv_search_setproctitle+:} false; then :
11566 else
11567 ac_cv_search_setproctitle=no
11569 rm conftest.$ac_ext
11570 LIBS=$ac_func_search_save_LIBS
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11573 $as_echo "$ac_cv_search_setproctitle" >&6; }
11574 ac_res=$ac_cv_search_setproctitle
11575 if test "$ac_res" != no; then :
11576 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11580 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11581 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11582 # required. Just checking for dlsym() ought to suffice.
11583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11584 $as_echo_n "checking for library containing dlsym... " >&6; }
11585 if ${ac_cv_search_dlsym+:} false; then :
11586 $as_echo_n "(cached) " >&6
11587 else
11588 ac_func_search_save_LIBS=$LIBS
11589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11590 /* end confdefs.h. */
11592 /* Override any GCC internal prototype to avoid an error.
11593 Use char because int might match the return type of a GCC
11594 builtin and then its argument prototype would still apply. */
11595 #ifdef __cplusplus
11596 extern "C"
11597 #endif
11598 char dlsym ();
11600 main ()
11602 return dlsym ();
11604 return 0;
11606 _ACEOF
11607 for ac_lib in '' dl; do
11608 if test -z "$ac_lib"; then
11609 ac_res="none required"
11610 else
11611 ac_res=-l$ac_lib
11612 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11614 if ac_fn_c_try_link "$LINENO"; then :
11615 ac_cv_search_dlsym=$ac_res
11617 rm -f core conftest.err conftest.$ac_objext \
11618 conftest$ac_exeext
11619 if ${ac_cv_search_dlsym+:} false; then :
11620 break
11622 done
11623 if ${ac_cv_search_dlsym+:} false; then :
11625 else
11626 ac_cv_search_dlsym=no
11628 rm conftest.$ac_ext
11629 LIBS=$ac_func_search_save_LIBS
11631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11632 $as_echo "$ac_cv_search_dlsym" >&6; }
11633 ac_res=$ac_cv_search_dlsym
11634 if test "$ac_res" != no; then :
11635 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11640 $as_echo_n "checking for library containing socket... " >&6; }
11641 if ${ac_cv_search_socket+:} false; then :
11642 $as_echo_n "(cached) " >&6
11643 else
11644 ac_func_search_save_LIBS=$LIBS
11645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11646 /* end confdefs.h. */
11648 /* Override any GCC internal prototype to avoid an error.
11649 Use char because int might match the return type of a GCC
11650 builtin and then its argument prototype would still apply. */
11651 #ifdef __cplusplus
11652 extern "C"
11653 #endif
11654 char socket ();
11656 main ()
11658 return socket ();
11660 return 0;
11662 _ACEOF
11663 for ac_lib in '' socket ws2_32; do
11664 if test -z "$ac_lib"; then
11665 ac_res="none required"
11666 else
11667 ac_res=-l$ac_lib
11668 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11670 if ac_fn_c_try_link "$LINENO"; then :
11671 ac_cv_search_socket=$ac_res
11673 rm -f core conftest.err conftest.$ac_objext \
11674 conftest$ac_exeext
11675 if ${ac_cv_search_socket+:} false; then :
11676 break
11678 done
11679 if ${ac_cv_search_socket+:} false; then :
11681 else
11682 ac_cv_search_socket=no
11684 rm conftest.$ac_ext
11685 LIBS=$ac_func_search_save_LIBS
11687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11688 $as_echo "$ac_cv_search_socket" >&6; }
11689 ac_res=$ac_cv_search_socket
11690 if test "$ac_res" != no; then :
11691 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11696 $as_echo_n "checking for library containing shl_load... " >&6; }
11697 if ${ac_cv_search_shl_load+:} false; then :
11698 $as_echo_n "(cached) " >&6
11699 else
11700 ac_func_search_save_LIBS=$LIBS
11701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11702 /* end confdefs.h. */
11704 /* Override any GCC internal prototype to avoid an error.
11705 Use char because int might match the return type of a GCC
11706 builtin and then its argument prototype would still apply. */
11707 #ifdef __cplusplus
11708 extern "C"
11709 #endif
11710 char shl_load ();
11712 main ()
11714 return shl_load ();
11716 return 0;
11718 _ACEOF
11719 for ac_lib in '' dld; do
11720 if test -z "$ac_lib"; then
11721 ac_res="none required"
11722 else
11723 ac_res=-l$ac_lib
11724 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11726 if ac_fn_c_try_link "$LINENO"; then :
11727 ac_cv_search_shl_load=$ac_res
11729 rm -f core conftest.err conftest.$ac_objext \
11730 conftest$ac_exeext
11731 if ${ac_cv_search_shl_load+:} false; then :
11732 break
11734 done
11735 if ${ac_cv_search_shl_load+:} false; then :
11737 else
11738 ac_cv_search_shl_load=no
11740 rm conftest.$ac_ext
11741 LIBS=$ac_func_search_save_LIBS
11743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11744 $as_echo "$ac_cv_search_shl_load" >&6; }
11745 ac_res=$ac_cv_search_shl_load
11746 if test "$ac_res" != no; then :
11747 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11752 $as_echo_n "checking for library containing getopt_long... " >&6; }
11753 if ${ac_cv_search_getopt_long+:} false; then :
11754 $as_echo_n "(cached) " >&6
11755 else
11756 ac_func_search_save_LIBS=$LIBS
11757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11758 /* end confdefs.h. */
11760 /* Override any GCC internal prototype to avoid an error.
11761 Use char because int might match the return type of a GCC
11762 builtin and then its argument prototype would still apply. */
11763 #ifdef __cplusplus
11764 extern "C"
11765 #endif
11766 char getopt_long ();
11768 main ()
11770 return getopt_long ();
11772 return 0;
11774 _ACEOF
11775 for ac_lib in '' getopt gnugetopt; do
11776 if test -z "$ac_lib"; then
11777 ac_res="none required"
11778 else
11779 ac_res=-l$ac_lib
11780 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11782 if ac_fn_c_try_link "$LINENO"; then :
11783 ac_cv_search_getopt_long=$ac_res
11785 rm -f core conftest.err conftest.$ac_objext \
11786 conftest$ac_exeext
11787 if ${ac_cv_search_getopt_long+:} false; then :
11788 break
11790 done
11791 if ${ac_cv_search_getopt_long+:} false; then :
11793 else
11794 ac_cv_search_getopt_long=no
11796 rm conftest.$ac_ext
11797 LIBS=$ac_func_search_save_LIBS
11799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11800 $as_echo "$ac_cv_search_getopt_long" >&6; }
11801 ac_res=$ac_cv_search_getopt_long
11802 if test "$ac_res" != no; then :
11803 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11808 $as_echo_n "checking for library containing shm_open... " >&6; }
11809 if ${ac_cv_search_shm_open+:} false; then :
11810 $as_echo_n "(cached) " >&6
11811 else
11812 ac_func_search_save_LIBS=$LIBS
11813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11814 /* end confdefs.h. */
11816 /* Override any GCC internal prototype to avoid an error.
11817 Use char because int might match the return type of a GCC
11818 builtin and then its argument prototype would still apply. */
11819 #ifdef __cplusplus
11820 extern "C"
11821 #endif
11822 char shm_open ();
11824 main ()
11826 return shm_open ();
11828 return 0;
11830 _ACEOF
11831 for ac_lib in '' rt; do
11832 if test -z "$ac_lib"; then
11833 ac_res="none required"
11834 else
11835 ac_res=-l$ac_lib
11836 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11838 if ac_fn_c_try_link "$LINENO"; then :
11839 ac_cv_search_shm_open=$ac_res
11841 rm -f core conftest.err conftest.$ac_objext \
11842 conftest$ac_exeext
11843 if ${ac_cv_search_shm_open+:} false; then :
11844 break
11846 done
11847 if ${ac_cv_search_shm_open+:} false; then :
11849 else
11850 ac_cv_search_shm_open=no
11852 rm conftest.$ac_ext
11853 LIBS=$ac_func_search_save_LIBS
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11856 $as_echo "$ac_cv_search_shm_open" >&6; }
11857 ac_res=$ac_cv_search_shm_open
11858 if test "$ac_res" != no; then :
11859 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11864 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11865 if ${ac_cv_search_shm_unlink+:} false; then :
11866 $as_echo_n "(cached) " >&6
11867 else
11868 ac_func_search_save_LIBS=$LIBS
11869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11870 /* end confdefs.h. */
11872 /* Override any GCC internal prototype to avoid an error.
11873 Use char because int might match the return type of a GCC
11874 builtin and then its argument prototype would still apply. */
11875 #ifdef __cplusplus
11876 extern "C"
11877 #endif
11878 char shm_unlink ();
11880 main ()
11882 return shm_unlink ();
11884 return 0;
11886 _ACEOF
11887 for ac_lib in '' rt; do
11888 if test -z "$ac_lib"; then
11889 ac_res="none required"
11890 else
11891 ac_res=-l$ac_lib
11892 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11894 if ac_fn_c_try_link "$LINENO"; then :
11895 ac_cv_search_shm_unlink=$ac_res
11897 rm -f core conftest.err conftest.$ac_objext \
11898 conftest$ac_exeext
11899 if ${ac_cv_search_shm_unlink+:} false; then :
11900 break
11902 done
11903 if ${ac_cv_search_shm_unlink+:} false; then :
11905 else
11906 ac_cv_search_shm_unlink=no
11908 rm conftest.$ac_ext
11909 LIBS=$ac_func_search_save_LIBS
11911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11912 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11913 ac_res=$ac_cv_search_shm_unlink
11914 if test "$ac_res" != no; then :
11915 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11920 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11921 if ${ac_cv_search_clock_gettime+:} false; then :
11922 $as_echo_n "(cached) " >&6
11923 else
11924 ac_func_search_save_LIBS=$LIBS
11925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11926 /* end confdefs.h. */
11928 /* Override any GCC internal prototype to avoid an error.
11929 Use char because int might match the return type of a GCC
11930 builtin and then its argument prototype would still apply. */
11931 #ifdef __cplusplus
11932 extern "C"
11933 #endif
11934 char clock_gettime ();
11936 main ()
11938 return clock_gettime ();
11940 return 0;
11942 _ACEOF
11943 for ac_lib in '' rt posix4; do
11944 if test -z "$ac_lib"; then
11945 ac_res="none required"
11946 else
11947 ac_res=-l$ac_lib
11948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11950 if ac_fn_c_try_link "$LINENO"; then :
11951 ac_cv_search_clock_gettime=$ac_res
11953 rm -f core conftest.err conftest.$ac_objext \
11954 conftest$ac_exeext
11955 if ${ac_cv_search_clock_gettime+:} false; then :
11956 break
11958 done
11959 if ${ac_cv_search_clock_gettime+:} false; then :
11961 else
11962 ac_cv_search_clock_gettime=no
11964 rm conftest.$ac_ext
11965 LIBS=$ac_func_search_save_LIBS
11967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11968 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11969 ac_res=$ac_cv_search_clock_gettime
11970 if test "$ac_res" != no; then :
11971 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11975 # Solaris:
11976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11977 $as_echo_n "checking for library containing fdatasync... " >&6; }
11978 if ${ac_cv_search_fdatasync+:} false; then :
11979 $as_echo_n "(cached) " >&6
11980 else
11981 ac_func_search_save_LIBS=$LIBS
11982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11983 /* end confdefs.h. */
11985 /* Override any GCC internal prototype to avoid an error.
11986 Use char because int might match the return type of a GCC
11987 builtin and then its argument prototype would still apply. */
11988 #ifdef __cplusplus
11989 extern "C"
11990 #endif
11991 char fdatasync ();
11993 main ()
11995 return fdatasync ();
11997 return 0;
11999 _ACEOF
12000 for ac_lib in '' rt posix4; do
12001 if test -z "$ac_lib"; then
12002 ac_res="none required"
12003 else
12004 ac_res=-l$ac_lib
12005 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12007 if ac_fn_c_try_link "$LINENO"; then :
12008 ac_cv_search_fdatasync=$ac_res
12010 rm -f core conftest.err conftest.$ac_objext \
12011 conftest$ac_exeext
12012 if ${ac_cv_search_fdatasync+:} false; then :
12013 break
12015 done
12016 if ${ac_cv_search_fdatasync+:} false; then :
12018 else
12019 ac_cv_search_fdatasync=no
12021 rm conftest.$ac_ext
12022 LIBS=$ac_func_search_save_LIBS
12024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
12025 $as_echo "$ac_cv_search_fdatasync" >&6; }
12026 ac_res=$ac_cv_search_fdatasync
12027 if test "$ac_res" != no; then :
12028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12032 # Required for thread_test.c on Solaris
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
12034 $as_echo_n "checking for library containing sched_yield... " >&6; }
12035 if ${ac_cv_search_sched_yield+:} false; then :
12036 $as_echo_n "(cached) " >&6
12037 else
12038 ac_func_search_save_LIBS=$LIBS
12039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12040 /* end confdefs.h. */
12042 /* Override any GCC internal prototype to avoid an error.
12043 Use char because int might match the return type of a GCC
12044 builtin and then its argument prototype would still apply. */
12045 #ifdef __cplusplus
12046 extern "C"
12047 #endif
12048 char sched_yield ();
12050 main ()
12052 return sched_yield ();
12054 return 0;
12056 _ACEOF
12057 for ac_lib in '' rt; do
12058 if test -z "$ac_lib"; then
12059 ac_res="none required"
12060 else
12061 ac_res=-l$ac_lib
12062 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12064 if ac_fn_c_try_link "$LINENO"; then :
12065 ac_cv_search_sched_yield=$ac_res
12067 rm -f core conftest.err conftest.$ac_objext \
12068 conftest$ac_exeext
12069 if ${ac_cv_search_sched_yield+:} false; then :
12070 break
12072 done
12073 if ${ac_cv_search_sched_yield+:} false; then :
12075 else
12076 ac_cv_search_sched_yield=no
12078 rm conftest.$ac_ext
12079 LIBS=$ac_func_search_save_LIBS
12081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
12082 $as_echo "$ac_cv_search_sched_yield" >&6; }
12083 ac_res=$ac_cv_search_sched_yield
12084 if test "$ac_res" != no; then :
12085 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12089 # Required for thread_test.c on Solaris 2.5:
12090 # Other ports use it too (HP-UX) so test unconditionally
12091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
12092 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
12093 if ${ac_cv_search_gethostbyname_r+:} false; then :
12094 $as_echo_n "(cached) " >&6
12095 else
12096 ac_func_search_save_LIBS=$LIBS
12097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12098 /* end confdefs.h. */
12100 /* Override any GCC internal prototype to avoid an error.
12101 Use char because int might match the return type of a GCC
12102 builtin and then its argument prototype would still apply. */
12103 #ifdef __cplusplus
12104 extern "C"
12105 #endif
12106 char gethostbyname_r ();
12108 main ()
12110 return gethostbyname_r ();
12112 return 0;
12114 _ACEOF
12115 for ac_lib in '' nsl; do
12116 if test -z "$ac_lib"; then
12117 ac_res="none required"
12118 else
12119 ac_res=-l$ac_lib
12120 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12122 if ac_fn_c_try_link "$LINENO"; then :
12123 ac_cv_search_gethostbyname_r=$ac_res
12125 rm -f core conftest.err conftest.$ac_objext \
12126 conftest$ac_exeext
12127 if ${ac_cv_search_gethostbyname_r+:} false; then :
12128 break
12130 done
12131 if ${ac_cv_search_gethostbyname_r+:} false; then :
12133 else
12134 ac_cv_search_gethostbyname_r=no
12136 rm conftest.$ac_ext
12137 LIBS=$ac_func_search_save_LIBS
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
12140 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
12141 ac_res=$ac_cv_search_gethostbyname_r
12142 if test "$ac_res" != no; then :
12143 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12147 # Cygwin:
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12149 $as_echo_n "checking for library containing shmget... " >&6; }
12150 if ${ac_cv_search_shmget+:} false; then :
12151 $as_echo_n "(cached) " >&6
12152 else
12153 ac_func_search_save_LIBS=$LIBS
12154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12155 /* end confdefs.h. */
12157 /* Override any GCC internal prototype to avoid an error.
12158 Use char because int might match the return type of a GCC
12159 builtin and then its argument prototype would still apply. */
12160 #ifdef __cplusplus
12161 extern "C"
12162 #endif
12163 char shmget ();
12165 main ()
12167 return shmget ();
12169 return 0;
12171 _ACEOF
12172 for ac_lib in '' cygipc; do
12173 if test -z "$ac_lib"; then
12174 ac_res="none required"
12175 else
12176 ac_res=-l$ac_lib
12177 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12179 if ac_fn_c_try_link "$LINENO"; then :
12180 ac_cv_search_shmget=$ac_res
12182 rm -f core conftest.err conftest.$ac_objext \
12183 conftest$ac_exeext
12184 if ${ac_cv_search_shmget+:} false; then :
12185 break
12187 done
12188 if ${ac_cv_search_shmget+:} false; then :
12190 else
12191 ac_cv_search_shmget=no
12193 rm conftest.$ac_ext
12194 LIBS=$ac_func_search_save_LIBS
12196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12197 $as_echo "$ac_cv_search_shmget" >&6; }
12198 ac_res=$ac_cv_search_shmget
12199 if test "$ac_res" != no; then :
12200 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12204 # *BSD:
12205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12206 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12207 if ${ac_cv_search_backtrace_symbols+:} false; then :
12208 $as_echo_n "(cached) " >&6
12209 else
12210 ac_func_search_save_LIBS=$LIBS
12211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12212 /* end confdefs.h. */
12214 /* Override any GCC internal prototype to avoid an error.
12215 Use char because int might match the return type of a GCC
12216 builtin and then its argument prototype would still apply. */
12217 #ifdef __cplusplus
12218 extern "C"
12219 #endif
12220 char backtrace_symbols ();
12222 main ()
12224 return backtrace_symbols ();
12226 return 0;
12228 _ACEOF
12229 for ac_lib in '' execinfo; do
12230 if test -z "$ac_lib"; then
12231 ac_res="none required"
12232 else
12233 ac_res=-l$ac_lib
12234 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12236 if ac_fn_c_try_link "$LINENO"; then :
12237 ac_cv_search_backtrace_symbols=$ac_res
12239 rm -f core conftest.err conftest.$ac_objext \
12240 conftest$ac_exeext
12241 if ${ac_cv_search_backtrace_symbols+:} false; then :
12242 break
12244 done
12245 if ${ac_cv_search_backtrace_symbols+:} false; then :
12247 else
12248 ac_cv_search_backtrace_symbols=no
12250 rm conftest.$ac_ext
12251 LIBS=$ac_func_search_save_LIBS
12253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12254 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12255 ac_res=$ac_cv_search_backtrace_symbols
12256 if test "$ac_res" != no; then :
12257 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12262 if test "$with_readline" = yes; then
12265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12266 $as_echo_n "checking for library containing readline... " >&6; }
12267 if ${pgac_cv_check_readline+:} false; then :
12268 $as_echo_n "(cached) " >&6
12269 else
12270 pgac_cv_check_readline=no
12271 pgac_save_LIBS=$LIBS
12272 if test x"$with_libedit_preferred" != x"yes"
12273 then READLINE_ORDER="-lreadline -ledit"
12274 else READLINE_ORDER="-ledit -lreadline"
12276 for pgac_rllib in $READLINE_ORDER ; do
12277 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12278 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12280 /* end confdefs.h. */
12282 /* Override any GCC internal prototype to avoid an error.
12283 Use char because int might match the return type of a GCC
12284 builtin and then its argument prototype would still apply. */
12285 #ifdef __cplusplus
12286 extern "C"
12287 #endif
12288 char readline ();
12290 main ()
12292 return readline ();
12294 return 0;
12296 _ACEOF
12297 if ac_fn_c_try_link "$LINENO"; then :
12299 # Older NetBSD and OpenBSD have a broken linker that does not
12300 # recognize dependent libraries; assume curses is needed if we didn't
12301 # find any dependency.
12302 case $host_os in
12303 netbsd* | openbsd*)
12304 if test x"$pgac_lib" = x"" ; then
12305 pgac_lib=" -lcurses"
12306 fi ;;
12307 esac
12309 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12310 break
12313 rm -f core conftest.err conftest.$ac_objext \
12314 conftest$ac_exeext conftest.$ac_ext
12315 done
12316 if test "$pgac_cv_check_readline" != no ; then
12317 break
12319 done
12320 LIBS=$pgac_save_LIBS
12323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12324 $as_echo "$pgac_cv_check_readline" >&6; }
12325 if test "$pgac_cv_check_readline" != no ; then
12326 LIBS="$pgac_cv_check_readline $LIBS"
12328 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12333 if test x"$pgac_cv_check_readline" = x"no"; then
12334 as_fn_error $? "readline library not found
12335 If you have readline already installed, see config.log for details on the
12336 failure. It is possible the compiler isn't looking in the proper directory.
12337 Use --without-readline to disable readline support." "$LINENO" 5
12341 if test "$with_zlib" = yes; then
12342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12343 $as_echo_n "checking for inflate in -lz... " >&6; }
12344 if ${ac_cv_lib_z_inflate+:} false; then :
12345 $as_echo_n "(cached) " >&6
12346 else
12347 ac_check_lib_save_LIBS=$LIBS
12348 LIBS="-lz $LIBS"
12349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12350 /* end confdefs.h. */
12352 /* Override any GCC internal prototype to avoid an error.
12353 Use char because int might match the return type of a GCC
12354 builtin and then its argument prototype would still apply. */
12355 #ifdef __cplusplus
12356 extern "C"
12357 #endif
12358 char inflate ();
12360 main ()
12362 return inflate ();
12364 return 0;
12366 _ACEOF
12367 if ac_fn_c_try_link "$LINENO"; then :
12368 ac_cv_lib_z_inflate=yes
12369 else
12370 ac_cv_lib_z_inflate=no
12372 rm -f core conftest.err conftest.$ac_objext \
12373 conftest$ac_exeext conftest.$ac_ext
12374 LIBS=$ac_check_lib_save_LIBS
12376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12377 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12378 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12379 cat >>confdefs.h <<_ACEOF
12380 #define HAVE_LIBZ 1
12381 _ACEOF
12383 LIBS="-lz $LIBS"
12385 else
12386 as_fn_error $? "zlib library not found
12387 If you have zlib already installed, see config.log for details on the
12388 failure. It is possible the compiler isn't looking in the proper directory.
12389 Use --without-zlib to disable zlib support." "$LINENO" 5
12394 if test "$enable_spinlocks" = yes; then
12396 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12398 else
12399 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12400 *** Not using spinlocks will cause poor performance." >&5
12401 $as_echo "$as_me: WARNING:
12402 *** Not using spinlocks will cause poor performance." >&2;}
12405 if test "$enable_atomics" = yes; then
12407 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12409 else
12410 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12411 *** Not using atomic operations will cause poor performance." >&5
12412 $as_echo "$as_me: WARNING:
12413 *** Not using atomic operations will cause poor performance." >&2;}
12416 if test "$with_gssapi" = yes ; then
12417 if test "$PORTNAME" != "win32"; then
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12419 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12420 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12421 $as_echo_n "(cached) " >&6
12422 else
12423 ac_func_search_save_LIBS=$LIBS
12424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12425 /* end confdefs.h. */
12427 /* Override any GCC internal prototype to avoid an error.
12428 Use char because int might match the return type of a GCC
12429 builtin and then its argument prototype would still apply. */
12430 #ifdef __cplusplus
12431 extern "C"
12432 #endif
12433 char gss_init_sec_context ();
12435 main ()
12437 return gss_init_sec_context ();
12439 return 0;
12441 _ACEOF
12442 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12443 if test -z "$ac_lib"; then
12444 ac_res="none required"
12445 else
12446 ac_res=-l$ac_lib
12447 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12449 if ac_fn_c_try_link "$LINENO"; then :
12450 ac_cv_search_gss_init_sec_context=$ac_res
12452 rm -f core conftest.err conftest.$ac_objext \
12453 conftest$ac_exeext
12454 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12455 break
12457 done
12458 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12460 else
12461 ac_cv_search_gss_init_sec_context=no
12463 rm conftest.$ac_ext
12464 LIBS=$ac_func_search_save_LIBS
12466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12467 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12468 ac_res=$ac_cv_search_gss_init_sec_context
12469 if test "$ac_res" != no; then :
12470 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12472 else
12473 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12476 else
12477 LIBS="$LIBS -lgssapi32"
12481 if test "$with_openssl" = yes ; then
12482 # Minimum required OpenSSL version is 1.0.1
12484 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12486 if test "$PORTNAME" != "win32"; then
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12488 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12489 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12490 $as_echo_n "(cached) " >&6
12491 else
12492 ac_check_lib_save_LIBS=$LIBS
12493 LIBS="-lcrypto $LIBS"
12494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12495 /* end confdefs.h. */
12497 /* Override any GCC internal prototype to avoid an error.
12498 Use char because int might match the return type of a GCC
12499 builtin and then its argument prototype would still apply. */
12500 #ifdef __cplusplus
12501 extern "C"
12502 #endif
12503 char CRYPTO_new_ex_data ();
12505 main ()
12507 return CRYPTO_new_ex_data ();
12509 return 0;
12511 _ACEOF
12512 if ac_fn_c_try_link "$LINENO"; then :
12513 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12514 else
12515 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12517 rm -f core conftest.err conftest.$ac_objext \
12518 conftest$ac_exeext conftest.$ac_ext
12519 LIBS=$ac_check_lib_save_LIBS
12521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12522 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12523 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12524 cat >>confdefs.h <<_ACEOF
12525 #define HAVE_LIBCRYPTO 1
12526 _ACEOF
12528 LIBS="-lcrypto $LIBS"
12530 else
12531 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12535 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12536 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12537 $as_echo_n "(cached) " >&6
12538 else
12539 ac_check_lib_save_LIBS=$LIBS
12540 LIBS="-lssl $LIBS"
12541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12542 /* end confdefs.h. */
12544 /* Override any GCC internal prototype to avoid an error.
12545 Use char because int might match the return type of a GCC
12546 builtin and then its argument prototype would still apply. */
12547 #ifdef __cplusplus
12548 extern "C"
12549 #endif
12550 char SSL_new ();
12552 main ()
12554 return SSL_new ();
12556 return 0;
12558 _ACEOF
12559 if ac_fn_c_try_link "$LINENO"; then :
12560 ac_cv_lib_ssl_SSL_new=yes
12561 else
12562 ac_cv_lib_ssl_SSL_new=no
12564 rm -f core conftest.err conftest.$ac_objext \
12565 conftest$ac_exeext conftest.$ac_ext
12566 LIBS=$ac_check_lib_save_LIBS
12568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12569 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12570 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12571 cat >>confdefs.h <<_ACEOF
12572 #define HAVE_LIBSSL 1
12573 _ACEOF
12575 LIBS="-lssl $LIBS"
12577 else
12578 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12581 else
12582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12583 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12584 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12585 $as_echo_n "(cached) " >&6
12586 else
12587 ac_func_search_save_LIBS=$LIBS
12588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12589 /* end confdefs.h. */
12591 /* Override any GCC internal prototype to avoid an error.
12592 Use char because int might match the return type of a GCC
12593 builtin and then its argument prototype would still apply. */
12594 #ifdef __cplusplus
12595 extern "C"
12596 #endif
12597 char CRYPTO_new_ex_data ();
12599 main ()
12601 return CRYPTO_new_ex_data ();
12603 return 0;
12605 _ACEOF
12606 for ac_lib in '' eay32 crypto; do
12607 if test -z "$ac_lib"; then
12608 ac_res="none required"
12609 else
12610 ac_res=-l$ac_lib
12611 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12613 if ac_fn_c_try_link "$LINENO"; then :
12614 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12616 rm -f core conftest.err conftest.$ac_objext \
12617 conftest$ac_exeext
12618 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12619 break
12621 done
12622 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12624 else
12625 ac_cv_search_CRYPTO_new_ex_data=no
12627 rm conftest.$ac_ext
12628 LIBS=$ac_func_search_save_LIBS
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12631 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12632 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12633 if test "$ac_res" != no; then :
12634 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12636 else
12637 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12641 $as_echo_n "checking for library containing SSL_new... " >&6; }
12642 if ${ac_cv_search_SSL_new+:} false; then :
12643 $as_echo_n "(cached) " >&6
12644 else
12645 ac_func_search_save_LIBS=$LIBS
12646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12647 /* end confdefs.h. */
12649 /* Override any GCC internal prototype to avoid an error.
12650 Use char because int might match the return type of a GCC
12651 builtin and then its argument prototype would still apply. */
12652 #ifdef __cplusplus
12653 extern "C"
12654 #endif
12655 char SSL_new ();
12657 main ()
12659 return SSL_new ();
12661 return 0;
12663 _ACEOF
12664 for ac_lib in '' ssleay32 ssl; do
12665 if test -z "$ac_lib"; then
12666 ac_res="none required"
12667 else
12668 ac_res=-l$ac_lib
12669 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12671 if ac_fn_c_try_link "$LINENO"; then :
12672 ac_cv_search_SSL_new=$ac_res
12674 rm -f core conftest.err conftest.$ac_objext \
12675 conftest$ac_exeext
12676 if ${ac_cv_search_SSL_new+:} false; then :
12677 break
12679 done
12680 if ${ac_cv_search_SSL_new+:} false; then :
12682 else
12683 ac_cv_search_SSL_new=no
12685 rm conftest.$ac_ext
12686 LIBS=$ac_func_search_save_LIBS
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12689 $as_echo "$ac_cv_search_SSL_new" >&6; }
12690 ac_res=$ac_cv_search_SSL_new
12691 if test "$ac_res" != no; then :
12692 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12694 else
12695 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12699 # Function introduced in OpenSSL 1.0.2.
12700 for ac_func in X509_get_signature_nid
12701 do :
12702 ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
12703 if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
12704 cat >>confdefs.h <<_ACEOF
12705 #define HAVE_X509_GET_SIGNATURE_NID 1
12706 _ACEOF
12709 done
12711 # Functions introduced in OpenSSL 1.1.0. We used to check for
12712 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12713 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12714 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12715 # functions.
12716 for ac_func in OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data
12717 do :
12718 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12719 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12720 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12721 cat >>confdefs.h <<_ACEOF
12722 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12723 _ACEOF
12726 done
12728 # OpenSSL versions before 1.1.0 required setting callback functions, for
12729 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12730 # function was removed.
12731 for ac_func in CRYPTO_lock
12732 do :
12733 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12734 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12735 cat >>confdefs.h <<_ACEOF
12736 #define HAVE_CRYPTO_LOCK 1
12737 _ACEOF
12740 done
12742 # Function introduced in OpenSSL 1.1.1.
12743 for ac_func in X509_get_signature_info SSL_CTX_set_num_tickets
12744 do :
12745 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12746 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12747 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12748 cat >>confdefs.h <<_ACEOF
12749 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12750 _ACEOF
12753 done
12757 if test "$with_pam" = yes ; then
12758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12759 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12760 if ${ac_cv_lib_pam_pam_start+:} false; then :
12761 $as_echo_n "(cached) " >&6
12762 else
12763 ac_check_lib_save_LIBS=$LIBS
12764 LIBS="-lpam $LIBS"
12765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12766 /* end confdefs.h. */
12768 /* Override any GCC internal prototype to avoid an error.
12769 Use char because int might match the return type of a GCC
12770 builtin and then its argument prototype would still apply. */
12771 #ifdef __cplusplus
12772 extern "C"
12773 #endif
12774 char pam_start ();
12776 main ()
12778 return pam_start ();
12780 return 0;
12782 _ACEOF
12783 if ac_fn_c_try_link "$LINENO"; then :
12784 ac_cv_lib_pam_pam_start=yes
12785 else
12786 ac_cv_lib_pam_pam_start=no
12788 rm -f core conftest.err conftest.$ac_objext \
12789 conftest$ac_exeext conftest.$ac_ext
12790 LIBS=$ac_check_lib_save_LIBS
12792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12793 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12794 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12795 cat >>confdefs.h <<_ACEOF
12796 #define HAVE_LIBPAM 1
12797 _ACEOF
12799 LIBS="-lpam $LIBS"
12801 else
12802 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12807 if test "$with_libxml" = yes ; then
12808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12809 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12810 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12811 $as_echo_n "(cached) " >&6
12812 else
12813 ac_check_lib_save_LIBS=$LIBS
12814 LIBS="-lxml2 $LIBS"
12815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12816 /* end confdefs.h. */
12818 /* Override any GCC internal prototype to avoid an error.
12819 Use char because int might match the return type of a GCC
12820 builtin and then its argument prototype would still apply. */
12821 #ifdef __cplusplus
12822 extern "C"
12823 #endif
12824 char xmlSaveToBuffer ();
12826 main ()
12828 return xmlSaveToBuffer ();
12830 return 0;
12832 _ACEOF
12833 if ac_fn_c_try_link "$LINENO"; then :
12834 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12835 else
12836 ac_cv_lib_xml2_xmlSaveToBuffer=no
12838 rm -f core conftest.err conftest.$ac_objext \
12839 conftest$ac_exeext conftest.$ac_ext
12840 LIBS=$ac_check_lib_save_LIBS
12842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12843 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12844 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12845 cat >>confdefs.h <<_ACEOF
12846 #define HAVE_LIBXML2 1
12847 _ACEOF
12849 LIBS="-lxml2 $LIBS"
12851 else
12852 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12857 if test "$with_libxslt" = yes ; then
12858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12859 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12860 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12861 $as_echo_n "(cached) " >&6
12862 else
12863 ac_check_lib_save_LIBS=$LIBS
12864 LIBS="-lxslt $LIBS"
12865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12866 /* end confdefs.h. */
12868 /* Override any GCC internal prototype to avoid an error.
12869 Use char because int might match the return type of a GCC
12870 builtin and then its argument prototype would still apply. */
12871 #ifdef __cplusplus
12872 extern "C"
12873 #endif
12874 char xsltCleanupGlobals ();
12876 main ()
12878 return xsltCleanupGlobals ();
12880 return 0;
12882 _ACEOF
12883 if ac_fn_c_try_link "$LINENO"; then :
12884 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12885 else
12886 ac_cv_lib_xslt_xsltCleanupGlobals=no
12888 rm -f core conftest.err conftest.$ac_objext \
12889 conftest$ac_exeext conftest.$ac_ext
12890 LIBS=$ac_check_lib_save_LIBS
12892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12893 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12894 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12895 cat >>confdefs.h <<_ACEOF
12896 #define HAVE_LIBXSLT 1
12897 _ACEOF
12899 LIBS="-lxslt $LIBS"
12901 else
12902 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12907 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
12908 # also, on AIX, we may need to have openssl in LIBS for this step.
12909 if test "$with_ldap" = yes ; then
12910 _LIBS="$LIBS"
12911 if test "$PORTNAME" != "win32"; then
12912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12913 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12914 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12915 $as_echo_n "(cached) " >&6
12916 else
12917 ac_check_lib_save_LIBS=$LIBS
12918 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12920 /* end confdefs.h. */
12922 /* Override any GCC internal prototype to avoid an error.
12923 Use char because int might match the return type of a GCC
12924 builtin and then its argument prototype would still apply. */
12925 #ifdef __cplusplus
12926 extern "C"
12927 #endif
12928 char ldap_bind ();
12930 main ()
12932 return ldap_bind ();
12934 return 0;
12936 _ACEOF
12937 if ac_fn_c_try_link "$LINENO"; then :
12938 ac_cv_lib_ldap_ldap_bind=yes
12939 else
12940 ac_cv_lib_ldap_ldap_bind=no
12942 rm -f core conftest.err conftest.$ac_objext \
12943 conftest$ac_exeext conftest.$ac_ext
12944 LIBS=$ac_check_lib_save_LIBS
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12947 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12948 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12949 cat >>confdefs.h <<_ACEOF
12950 #define HAVE_LIBLDAP 1
12951 _ACEOF
12953 LIBS="-lldap $LIBS"
12955 else
12956 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12959 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12960 # This test is carried out against libldap.
12961 for ac_func in ldap_initialize
12962 do :
12963 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12964 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12965 cat >>confdefs.h <<_ACEOF
12966 #define HAVE_LDAP_INITIALIZE 1
12967 _ACEOF
12970 done
12972 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
12973 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
12974 # library from a separate OpenLDAP installation). The most reliable
12975 # way to check that is to check for a function introduced in 2.5.
12976 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
12977 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
12978 thread_safe_libldap=yes
12979 else
12980 thread_safe_libldap=no
12983 if test "$enable_thread_safety" = yes -a "$thread_safe_libldap" = no; then
12984 # Use ldap_r for FE if available, else assume ldap is thread-safe.
12985 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12986 LIBS="$_LIBS"
12987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12988 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12989 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12990 $as_echo_n "(cached) " >&6
12991 else
12992 ac_check_lib_save_LIBS=$LIBS
12993 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_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 ldap_bind ();
13005 main ()
13007 return ldap_bind ();
13009 return 0;
13011 _ACEOF
13012 if ac_fn_c_try_link "$LINENO"; then :
13013 ac_cv_lib_ldap_r_ldap_bind=yes
13014 else
13015 ac_cv_lib_ldap_r_ldap_bind=no
13017 rm -f core conftest.err conftest.$ac_objext \
13018 conftest$ac_exeext conftest.$ac_ext
13019 LIBS=$ac_check_lib_save_LIBS
13021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13022 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13023 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13024 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13025 else
13026 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13029 else
13030 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13032 else
13033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13034 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13035 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13036 $as_echo_n "(cached) " >&6
13037 else
13038 ac_check_lib_save_LIBS=$LIBS
13039 LIBS="-lwldap32 $LIBS"
13040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13041 /* end confdefs.h. */
13043 /* Override any GCC internal prototype to avoid an error.
13044 Use char because int might match the return type of a GCC
13045 builtin and then its argument prototype would still apply. */
13046 #ifdef __cplusplus
13047 extern "C"
13048 #endif
13049 char ldap_bind ();
13051 main ()
13053 return ldap_bind ();
13055 return 0;
13057 _ACEOF
13058 if ac_fn_c_try_link "$LINENO"; then :
13059 ac_cv_lib_wldap32_ldap_bind=yes
13060 else
13061 ac_cv_lib_wldap32_ldap_bind=no
13063 rm -f core conftest.err conftest.$ac_objext \
13064 conftest$ac_exeext conftest.$ac_ext
13065 LIBS=$ac_check_lib_save_LIBS
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13068 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13069 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13070 cat >>confdefs.h <<_ACEOF
13071 #define HAVE_LIBWLDAP32 1
13072 _ACEOF
13074 LIBS="-lwldap32 $LIBS"
13076 else
13077 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13080 LDAP_LIBS_FE="-lwldap32"
13081 LDAP_LIBS_BE="-lwldap32"
13083 LIBS="$_LIBS"
13088 # for contrib/sepgsql
13089 if test "$with_selinux" = yes; then
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13091 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13092 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13093 $as_echo_n "(cached) " >&6
13094 else
13095 ac_check_lib_save_LIBS=$LIBS
13096 LIBS="-lselinux $LIBS"
13097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13098 /* end confdefs.h. */
13100 /* Override any GCC internal prototype to avoid an error.
13101 Use char because int might match the return type of a GCC
13102 builtin and then its argument prototype would still apply. */
13103 #ifdef __cplusplus
13104 extern "C"
13105 #endif
13106 char security_compute_create_name ();
13108 main ()
13110 return security_compute_create_name ();
13112 return 0;
13114 _ACEOF
13115 if ac_fn_c_try_link "$LINENO"; then :
13116 ac_cv_lib_selinux_security_compute_create_name=yes
13117 else
13118 ac_cv_lib_selinux_security_compute_create_name=no
13120 rm -f core conftest.err conftest.$ac_objext \
13121 conftest$ac_exeext conftest.$ac_ext
13122 LIBS=$ac_check_lib_save_LIBS
13124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13125 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13126 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13127 cat >>confdefs.h <<_ACEOF
13128 #define HAVE_LIBSELINUX 1
13129 _ACEOF
13131 LIBS="-lselinux $LIBS"
13133 else
13134 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13139 # for contrib/uuid-ossp
13140 if test "$with_uuid" = bsd ; then
13141 # On BSD, the UUID functions are in libc
13142 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13143 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13144 UUID_LIBS=""
13145 else
13146 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13149 elif test "$with_uuid" = e2fs ; then
13150 # On macOS, the UUID functions are in libc
13151 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13152 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13153 UUID_LIBS=""
13154 else
13155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13156 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13157 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13158 $as_echo_n "(cached) " >&6
13159 else
13160 ac_check_lib_save_LIBS=$LIBS
13161 LIBS="-luuid $LIBS"
13162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13163 /* end confdefs.h. */
13165 /* Override any GCC internal prototype to avoid an error.
13166 Use char because int might match the return type of a GCC
13167 builtin and then its argument prototype would still apply. */
13168 #ifdef __cplusplus
13169 extern "C"
13170 #endif
13171 char uuid_generate ();
13173 main ()
13175 return uuid_generate ();
13177 return 0;
13179 _ACEOF
13180 if ac_fn_c_try_link "$LINENO"; then :
13181 ac_cv_lib_uuid_uuid_generate=yes
13182 else
13183 ac_cv_lib_uuid_uuid_generate=no
13185 rm -f core conftest.err conftest.$ac_objext \
13186 conftest$ac_exeext conftest.$ac_ext
13187 LIBS=$ac_check_lib_save_LIBS
13189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13190 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13191 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13192 UUID_LIBS="-luuid"
13193 else
13194 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13199 elif test "$with_uuid" = ossp ; then
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13201 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13202 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13203 $as_echo_n "(cached) " >&6
13204 else
13205 ac_check_lib_save_LIBS=$LIBS
13206 LIBS="-lossp-uuid $LIBS"
13207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13208 /* end confdefs.h. */
13210 /* Override any GCC internal prototype to avoid an error.
13211 Use char because int might match the return type of a GCC
13212 builtin and then its argument prototype would still apply. */
13213 #ifdef __cplusplus
13214 extern "C"
13215 #endif
13216 char uuid_export ();
13218 main ()
13220 return uuid_export ();
13222 return 0;
13224 _ACEOF
13225 if ac_fn_c_try_link "$LINENO"; then :
13226 ac_cv_lib_ossp_uuid_uuid_export=yes
13227 else
13228 ac_cv_lib_ossp_uuid_uuid_export=no
13230 rm -f core conftest.err conftest.$ac_objext \
13231 conftest$ac_exeext conftest.$ac_ext
13232 LIBS=$ac_check_lib_save_LIBS
13234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13235 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13236 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13237 UUID_LIBS="-lossp-uuid"
13238 else
13239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13240 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13241 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13242 $as_echo_n "(cached) " >&6
13243 else
13244 ac_check_lib_save_LIBS=$LIBS
13245 LIBS="-luuid $LIBS"
13246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247 /* end confdefs.h. */
13249 /* Override any GCC internal prototype to avoid an error.
13250 Use char because int might match the return type of a GCC
13251 builtin and then its argument prototype would still apply. */
13252 #ifdef __cplusplus
13253 extern "C"
13254 #endif
13255 char uuid_export ();
13257 main ()
13259 return uuid_export ();
13261 return 0;
13263 _ACEOF
13264 if ac_fn_c_try_link "$LINENO"; then :
13265 ac_cv_lib_uuid_uuid_export=yes
13266 else
13267 ac_cv_lib_uuid_uuid_export=no
13269 rm -f core conftest.err conftest.$ac_objext \
13270 conftest$ac_exeext conftest.$ac_ext
13271 LIBS=$ac_check_lib_save_LIBS
13273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13274 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13275 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13276 UUID_LIBS="-luuid"
13277 else
13278 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13288 ## Header files
13291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13292 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13293 if ${ac_cv_header_stdbool_h+:} false; then :
13294 $as_echo_n "(cached) " >&6
13295 else
13296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13297 /* end confdefs.h. */
13299 #include <stdbool.h>
13300 #ifndef bool
13301 "error: bool is not defined"
13302 #endif
13303 #ifndef false
13304 "error: false is not defined"
13305 #endif
13306 #if false
13307 "error: false is not 0"
13308 #endif
13309 #ifndef true
13310 "error: true is not defined"
13311 #endif
13312 #if true != 1
13313 "error: true is not 1"
13314 #endif
13315 #ifndef __bool_true_false_are_defined
13316 "error: __bool_true_false_are_defined is not defined"
13317 #endif
13319 struct s { _Bool s: 1; _Bool t; } s;
13321 char a[true == 1 ? 1 : -1];
13322 char b[false == 0 ? 1 : -1];
13323 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13324 char d[(bool) 0.5 == true ? 1 : -1];
13325 /* See body of main program for 'e'. */
13326 char f[(_Bool) 0.0 == false ? 1 : -1];
13327 char g[true];
13328 char h[sizeof (_Bool)];
13329 char i[sizeof s.t];
13330 enum { j = false, k = true, l = false * true, m = true * 256 };
13331 /* The following fails for
13332 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13333 _Bool n[m];
13334 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13335 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13336 /* Catch a bug in an HP-UX C compiler. See
13337 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13338 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13340 _Bool q = true;
13341 _Bool *pq = &q;
13344 main ()
13347 bool e = &s;
13348 *pq |= q;
13349 *pq |= ! q;
13350 /* Refer to every declared value, to avoid compiler optimizations. */
13351 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13352 + !m + !n + !o + !p + !q + !pq);
13355 return 0;
13357 _ACEOF
13358 if ac_fn_c_try_compile "$LINENO"; then :
13359 ac_cv_header_stdbool_h=yes
13360 else
13361 ac_cv_header_stdbool_h=no
13363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13366 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13367 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13368 if test "x$ac_cv_type__Bool" = xyes; then :
13370 cat >>confdefs.h <<_ACEOF
13371 #define HAVE__BOOL 1
13372 _ACEOF
13378 if test $ac_cv_header_stdbool_h = yes; then
13380 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13385 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/sockio.h sys/tas.h sys/un.h termios.h ucred.h wctype.h
13386 do :
13387 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13388 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13389 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13390 cat >>confdefs.h <<_ACEOF
13391 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13392 _ACEOF
13396 done
13399 # On BSD, test for net/if.h will fail unless sys/socket.h
13400 # is included first.
13401 for ac_header in net/if.h
13402 do :
13403 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
13404 #include <sys/socket.h>
13407 if test "x$ac_cv_header_net_if_h" = xyes; then :
13408 cat >>confdefs.h <<_ACEOF
13409 #define HAVE_NET_IF_H 1
13410 _ACEOF
13414 done
13417 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
13418 # is included first.
13419 for ac_header in sys/ucred.h
13420 do :
13421 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13422 #include <sys/param.h>
13425 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13426 cat >>confdefs.h <<_ACEOF
13427 #define HAVE_SYS_UCRED_H 1
13428 _ACEOF
13432 done
13435 # At least on IRIX, test for netinet/tcp.h will fail unless
13436 # netinet/in.h is included first.
13437 for ac_header in netinet/tcp.h
13438 do :
13439 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13440 #include <netinet/in.h>
13443 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13444 cat >>confdefs.h <<_ACEOF
13445 #define HAVE_NETINET_TCP_H 1
13446 _ACEOF
13450 done
13453 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13454 for ac_header in readline/readline.h
13455 do :
13456 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13457 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13458 cat >>confdefs.h <<_ACEOF
13459 #define HAVE_READLINE_READLINE_H 1
13460 _ACEOF
13462 else
13463 for ac_header in readline.h
13464 do :
13465 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13466 if test "x$ac_cv_header_readline_h" = xyes; then :
13467 cat >>confdefs.h <<_ACEOF
13468 #define HAVE_READLINE_H 1
13469 _ACEOF
13471 else
13472 as_fn_error $? "readline header not found
13473 If you have readline already installed, see config.log for details on the
13474 failure. It is possible the compiler isn't looking in the proper directory.
13475 Use --without-readline to disable readline support." "$LINENO" 5
13478 done
13482 done
13484 for ac_header in readline/history.h
13485 do :
13486 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13487 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13488 cat >>confdefs.h <<_ACEOF
13489 #define HAVE_READLINE_HISTORY_H 1
13490 _ACEOF
13492 else
13493 for ac_header in history.h
13494 do :
13495 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13496 if test "x$ac_cv_header_history_h" = xyes; then :
13497 cat >>confdefs.h <<_ACEOF
13498 #define HAVE_HISTORY_H 1
13499 _ACEOF
13501 else
13502 as_fn_error $? "history header not found
13503 If you have readline already installed, see config.log for details on the
13504 failure. It is possible the compiler isn't looking in the proper directory.
13505 Use --without-readline to disable readline support." "$LINENO" 5
13508 done
13512 done
13516 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13517 # Some installations of libedit usurp /usr/include/readline/, which seems
13518 # bad practice, since in combined installations readline will have its headers
13519 # there. We might have to resort to AC_EGREP checks to make sure we found
13520 # the proper header...
13521 for ac_header in editline/readline.h
13522 do :
13523 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13524 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13525 cat >>confdefs.h <<_ACEOF
13526 #define HAVE_EDITLINE_READLINE_H 1
13527 _ACEOF
13529 else
13530 for ac_header in readline.h
13531 do :
13532 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13533 if test "x$ac_cv_header_readline_h" = xyes; then :
13534 cat >>confdefs.h <<_ACEOF
13535 #define HAVE_READLINE_H 1
13536 _ACEOF
13538 else
13539 for ac_header in readline/readline.h
13540 do :
13541 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13542 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13543 cat >>confdefs.h <<_ACEOF
13544 #define HAVE_READLINE_READLINE_H 1
13545 _ACEOF
13547 else
13548 as_fn_error $? "readline header not found
13549 If you have libedit already installed, see config.log for details on the
13550 failure. It is possible the compiler isn't looking in the proper directory.
13551 Use --without-readline to disable libedit support." "$LINENO" 5
13554 done
13558 done
13562 done
13564 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13565 # not be there at all. Hence, don't complain if not found. We must check
13566 # though, since in yet other versions it is an independent header.
13567 for ac_header in editline/history.h
13568 do :
13569 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13570 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13571 cat >>confdefs.h <<_ACEOF
13572 #define HAVE_EDITLINE_HISTORY_H 1
13573 _ACEOF
13575 else
13576 for ac_header in history.h
13577 do :
13578 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13579 if test "x$ac_cv_header_history_h" = xyes; then :
13580 cat >>confdefs.h <<_ACEOF
13581 #define HAVE_HISTORY_H 1
13582 _ACEOF
13584 else
13585 for ac_header in readline/history.h
13586 do :
13587 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13588 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13589 cat >>confdefs.h <<_ACEOF
13590 #define HAVE_READLINE_HISTORY_H 1
13591 _ACEOF
13595 done
13599 done
13603 done
13607 if test "$with_zlib" = yes; then
13608 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13609 if test "x$ac_cv_header_zlib_h" = xyes; then :
13611 else
13612 as_fn_error $? "zlib header not found
13613 If you have zlib already installed, see config.log for details on the
13614 failure. It is possible the compiler isn't looking in the proper directory.
13615 Use --without-zlib to disable zlib support." "$LINENO" 5
13621 if test "$with_gssapi" = yes ; then
13622 for ac_header in gssapi/gssapi.h
13623 do :
13624 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13625 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13626 cat >>confdefs.h <<_ACEOF
13627 #define HAVE_GSSAPI_GSSAPI_H 1
13628 _ACEOF
13630 else
13631 for ac_header in gssapi.h
13632 do :
13633 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13634 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13635 cat >>confdefs.h <<_ACEOF
13636 #define HAVE_GSSAPI_H 1
13637 _ACEOF
13639 else
13640 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13643 done
13647 done
13651 if test "$with_openssl" = yes ; then
13652 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13653 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13655 else
13656 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13660 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13661 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13663 else
13664 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13670 if test "$with_pam" = yes ; then
13671 for ac_header in security/pam_appl.h
13672 do :
13673 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13674 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13675 cat >>confdefs.h <<_ACEOF
13676 #define HAVE_SECURITY_PAM_APPL_H 1
13677 _ACEOF
13679 else
13680 for ac_header in pam/pam_appl.h
13681 do :
13682 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13683 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13684 cat >>confdefs.h <<_ACEOF
13685 #define HAVE_PAM_PAM_APPL_H 1
13686 _ACEOF
13688 else
13689 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13692 done
13696 done
13700 if test "$with_bsd_auth" = yes ; then
13701 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13702 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13704 else
13705 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13711 if test "$with_systemd" = yes ; then
13712 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13713 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13715 else
13716 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13722 if test "$with_libxml" = yes ; then
13723 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13724 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13726 else
13727 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13733 if test "$with_libxslt" = yes ; then
13734 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13735 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13737 else
13738 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13744 if test "$with_ldap" = yes ; then
13745 if test "$PORTNAME" != "win32"; then
13746 for ac_header in ldap.h
13747 do :
13748 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13749 if test "x$ac_cv_header_ldap_h" = xyes; then :
13750 cat >>confdefs.h <<_ACEOF
13751 #define HAVE_LDAP_H 1
13752 _ACEOF
13754 else
13755 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13758 done
13760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13761 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13762 if ${pgac_cv_ldap_safe+:} false; then :
13763 $as_echo_n "(cached) " >&6
13764 else
13765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13766 /* end confdefs.h. */
13767 #include <ldap.h>
13768 #if !defined(LDAP_VENDOR_VERSION) || \
13769 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13770 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13771 choke me
13772 #endif
13774 main ()
13778 return 0;
13780 _ACEOF
13781 if ac_fn_c_try_compile "$LINENO"; then :
13782 pgac_cv_ldap_safe=yes
13783 else
13784 pgac_cv_ldap_safe=no
13786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13789 $as_echo "$pgac_cv_ldap_safe" >&6; }
13791 if test "$pgac_cv_ldap_safe" != yes; then
13792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13793 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13794 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13795 *** also uses LDAP will crash on exit." >&5
13796 $as_echo "$as_me: WARNING:
13797 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13798 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13799 *** also uses LDAP will crash on exit." >&2;}
13801 else
13802 for ac_header in winldap.h
13803 do :
13804 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13805 #include <windows.h>
13808 if test "x$ac_cv_header_winldap_h" = xyes; then :
13809 cat >>confdefs.h <<_ACEOF
13810 #define HAVE_WINLDAP_H 1
13811 _ACEOF
13813 else
13814 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13817 done
13822 if test "$with_bonjour" = yes ; then
13823 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13824 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13826 else
13827 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13833 # for contrib/uuid-ossp
13834 if test "$with_uuid" = bsd ; then
13835 for ac_header in uuid.h
13836 do :
13837 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13838 if test "x$ac_cv_header_uuid_h" = xyes; then :
13839 cat >>confdefs.h <<_ACEOF
13840 #define HAVE_UUID_H 1
13841 _ACEOF
13842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13843 /* end confdefs.h. */
13844 #include <uuid.h>
13846 _ACEOF
13847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13848 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13850 else
13851 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13853 rm -f conftest*
13855 else
13856 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13859 done
13861 elif test "$with_uuid" = e2fs ; then
13862 for ac_header in uuid/uuid.h
13863 do :
13864 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13865 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13866 cat >>confdefs.h <<_ACEOF
13867 #define HAVE_UUID_UUID_H 1
13868 _ACEOF
13869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13870 /* end confdefs.h. */
13871 #include <uuid/uuid.h>
13873 _ACEOF
13874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13875 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13877 else
13878 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13880 rm -f conftest*
13882 else
13883 for ac_header in uuid.h
13884 do :
13885 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13886 if test "x$ac_cv_header_uuid_h" = xyes; then :
13887 cat >>confdefs.h <<_ACEOF
13888 #define HAVE_UUID_H 1
13889 _ACEOF
13890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13891 /* end confdefs.h. */
13892 #include <uuid.h>
13894 _ACEOF
13895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13896 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13898 else
13899 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13901 rm -f conftest*
13903 else
13904 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13907 done
13911 done
13913 elif test "$with_uuid" = ossp ; then
13914 for ac_header in ossp/uuid.h
13915 do :
13916 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13917 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13918 cat >>confdefs.h <<_ACEOF
13919 #define HAVE_OSSP_UUID_H 1
13920 _ACEOF
13921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13922 /* end confdefs.h. */
13923 #include <ossp/uuid.h>
13925 _ACEOF
13926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13927 $EGREP "uuid_export" >/dev/null 2>&1; then :
13929 else
13930 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13932 rm -f conftest*
13934 else
13935 for ac_header in uuid.h
13936 do :
13937 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13938 if test "x$ac_cv_header_uuid_h" = xyes; then :
13939 cat >>confdefs.h <<_ACEOF
13940 #define HAVE_UUID_H 1
13941 _ACEOF
13942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13943 /* end confdefs.h. */
13944 #include <uuid.h>
13946 _ACEOF
13947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13948 $EGREP "uuid_export" >/dev/null 2>&1; then :
13950 else
13951 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13953 rm -f conftest*
13955 else
13956 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13959 done
13963 done
13967 if test "$PORTNAME" = "win32" ; then
13968 for ac_header in crtdefs.h
13969 do :
13970 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13971 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13972 cat >>confdefs.h <<_ACEOF
13973 #define HAVE_CRTDEFS_H 1
13974 _ACEOF
13978 done
13983 ## Types, structures, compiler characteristics
13986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13987 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13988 if ${ac_cv_c_bigendian+:} false; then :
13989 $as_echo_n "(cached) " >&6
13990 else
13991 ac_cv_c_bigendian=unknown
13992 # See if we're dealing with a universal compiler.
13993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994 /* end confdefs.h. */
13995 #ifndef __APPLE_CC__
13996 not a universal capable compiler
13997 #endif
13998 typedef int dummy;
14000 _ACEOF
14001 if ac_fn_c_try_compile "$LINENO"; then :
14003 # Check for potential -arch flags. It is not universal unless
14004 # there are at least two -arch flags with different values.
14005 ac_arch=
14006 ac_prev=
14007 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14008 if test -n "$ac_prev"; then
14009 case $ac_word in
14010 i?86 | x86_64 | ppc | ppc64)
14011 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14012 ac_arch=$ac_word
14013 else
14014 ac_cv_c_bigendian=universal
14015 break
14018 esac
14019 ac_prev=
14020 elif test "x$ac_word" = "x-arch"; then
14021 ac_prev=arch
14023 done
14025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14026 if test $ac_cv_c_bigendian = unknown; then
14027 # See if sys/param.h defines the BYTE_ORDER macro.
14028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14029 /* end confdefs.h. */
14030 #include <sys/types.h>
14031 #include <sys/param.h>
14034 main ()
14036 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14037 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14038 && LITTLE_ENDIAN)
14039 bogus endian macros
14040 #endif
14043 return 0;
14045 _ACEOF
14046 if ac_fn_c_try_compile "$LINENO"; then :
14047 # It does; now see whether it defined to BIG_ENDIAN or not.
14048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14049 /* end confdefs.h. */
14050 #include <sys/types.h>
14051 #include <sys/param.h>
14054 main ()
14056 #if BYTE_ORDER != BIG_ENDIAN
14057 not big endian
14058 #endif
14061 return 0;
14063 _ACEOF
14064 if ac_fn_c_try_compile "$LINENO"; then :
14065 ac_cv_c_bigendian=yes
14066 else
14067 ac_cv_c_bigendian=no
14069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14073 if test $ac_cv_c_bigendian = unknown; then
14074 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14076 /* end confdefs.h. */
14077 #include <limits.h>
14080 main ()
14082 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14083 bogus endian macros
14084 #endif
14087 return 0;
14089 _ACEOF
14090 if ac_fn_c_try_compile "$LINENO"; then :
14091 # It does; now see whether it defined to _BIG_ENDIAN or not.
14092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14093 /* end confdefs.h. */
14094 #include <limits.h>
14097 main ()
14099 #ifndef _BIG_ENDIAN
14100 not big endian
14101 #endif
14104 return 0;
14106 _ACEOF
14107 if ac_fn_c_try_compile "$LINENO"; then :
14108 ac_cv_c_bigendian=yes
14109 else
14110 ac_cv_c_bigendian=no
14112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14116 if test $ac_cv_c_bigendian = unknown; then
14117 # Compile a test program.
14118 if test "$cross_compiling" = yes; then :
14119 # Try to guess by grepping values from an object file.
14120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14121 /* end confdefs.h. */
14122 short int ascii_mm[] =
14123 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14124 short int ascii_ii[] =
14125 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14126 int use_ascii (int i) {
14127 return ascii_mm[i] + ascii_ii[i];
14129 short int ebcdic_ii[] =
14130 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14131 short int ebcdic_mm[] =
14132 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14133 int use_ebcdic (int i) {
14134 return ebcdic_mm[i] + ebcdic_ii[i];
14136 extern int foo;
14139 main ()
14141 return use_ascii (foo) == use_ebcdic (foo);
14143 return 0;
14145 _ACEOF
14146 if ac_fn_c_try_compile "$LINENO"; then :
14147 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14148 ac_cv_c_bigendian=yes
14150 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14151 if test "$ac_cv_c_bigendian" = unknown; then
14152 ac_cv_c_bigendian=no
14153 else
14154 # finding both strings is unlikely to happen, but who knows?
14155 ac_cv_c_bigendian=unknown
14159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14160 else
14161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14162 /* end confdefs.h. */
14163 $ac_includes_default
14165 main ()
14168 /* Are we little or big endian? From Harbison&Steele. */
14169 union
14171 long int l;
14172 char c[sizeof (long int)];
14173 } u;
14174 u.l = 1;
14175 return u.c[sizeof (long int) - 1] == 1;
14178 return 0;
14180 _ACEOF
14181 if ac_fn_c_try_run "$LINENO"; then :
14182 ac_cv_c_bigendian=no
14183 else
14184 ac_cv_c_bigendian=yes
14186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14187 conftest.$ac_objext conftest.beam conftest.$ac_ext
14192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14193 $as_echo "$ac_cv_c_bigendian" >&6; }
14194 case $ac_cv_c_bigendian in #(
14195 yes)
14196 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14197 ;; #(
14199 ;; #(
14200 universal)
14202 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14204 ;; #(
14206 as_fn_error $? "unknown endianness
14207 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14208 esac
14210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14211 $as_echo_n "checking for inline... " >&6; }
14212 if ${ac_cv_c_inline+:} false; then :
14213 $as_echo_n "(cached) " >&6
14214 else
14215 ac_cv_c_inline=no
14216 for ac_kw in inline __inline__ __inline; do
14217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14218 /* end confdefs.h. */
14219 #ifndef __cplusplus
14220 typedef int foo_t;
14221 static $ac_kw foo_t static_foo () {return 0; }
14222 $ac_kw foo_t foo () {return 0; }
14223 #endif
14225 _ACEOF
14226 if ac_fn_c_try_compile "$LINENO"; then :
14227 ac_cv_c_inline=$ac_kw
14229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14230 test "$ac_cv_c_inline" != no && break
14231 done
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14235 $as_echo "$ac_cv_c_inline" >&6; }
14237 case $ac_cv_c_inline in
14238 inline | yes) ;;
14240 case $ac_cv_c_inline in
14241 no) ac_val=;;
14242 *) ac_val=$ac_cv_c_inline;;
14243 esac
14244 cat >>confdefs.h <<_ACEOF
14245 #ifndef __cplusplus
14246 #define inline $ac_val
14247 #endif
14248 _ACEOF
14250 esac
14252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14253 $as_echo_n "checking for printf format archetype... " >&6; }
14254 if ${pgac_cv_printf_archetype+:} false; then :
14255 $as_echo_n "(cached) " >&6
14256 else
14257 pgac_cv_printf_archetype=gnu_printf
14258 ac_save_c_werror_flag=$ac_c_werror_flag
14259 ac_c_werror_flag=yes
14260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14261 /* end confdefs.h. */
14262 extern void pgac_write(int ignore, const char *fmt,...)
14263 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14265 main ()
14267 pgac_write(0, "error %s: %m", "foo");
14269 return 0;
14271 _ACEOF
14272 if ac_fn_c_try_compile "$LINENO"; then :
14273 ac_archetype_ok=yes
14274 else
14275 ac_archetype_ok=no
14277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14278 ac_c_werror_flag=$ac_save_c_werror_flag
14280 if [ "$ac_archetype_ok" = no ]; then
14281 pgac_cv_printf_archetype=__syslog__
14282 ac_save_c_werror_flag=$ac_c_werror_flag
14283 ac_c_werror_flag=yes
14284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14285 /* end confdefs.h. */
14286 extern void pgac_write(int ignore, const char *fmt,...)
14287 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14289 main ()
14291 pgac_write(0, "error %s: %m", "foo");
14293 return 0;
14295 _ACEOF
14296 if ac_fn_c_try_compile "$LINENO"; then :
14297 ac_archetype_ok=yes
14298 else
14299 ac_archetype_ok=no
14301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14302 ac_c_werror_flag=$ac_save_c_werror_flag
14304 if [ "$ac_archetype_ok" = no ]; then
14305 pgac_cv_printf_archetype=printf
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14310 $as_echo "$pgac_cv_printf_archetype" >&6; }
14312 cat >>confdefs.h <<_ACEOF
14313 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14314 _ACEOF
14317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
14318 $as_echo_n "checking for __func__... " >&6; }
14319 if ${pgac_cv_funcname_func_support+:} false; then :
14320 $as_echo_n "(cached) " >&6
14321 else
14322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14323 /* end confdefs.h. */
14324 #include <stdio.h>
14326 main ()
14328 printf("%s\n", __func__);
14330 return 0;
14332 _ACEOF
14333 if ac_fn_c_try_compile "$LINENO"; then :
14334 pgac_cv_funcname_func_support=yes
14335 else
14336 pgac_cv_funcname_func_support=no
14338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
14341 $as_echo "$pgac_cv_funcname_func_support" >&6; }
14342 if test x"$pgac_cv_funcname_func_support" = xyes ; then
14344 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
14346 else
14347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
14348 $as_echo_n "checking for __FUNCTION__... " >&6; }
14349 if ${pgac_cv_funcname_function_support+:} false; then :
14350 $as_echo_n "(cached) " >&6
14351 else
14352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14353 /* end confdefs.h. */
14354 #include <stdio.h>
14356 main ()
14358 printf("%s\n", __FUNCTION__);
14360 return 0;
14362 _ACEOF
14363 if ac_fn_c_try_compile "$LINENO"; then :
14364 pgac_cv_funcname_function_support=yes
14365 else
14366 pgac_cv_funcname_function_support=no
14368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
14371 $as_echo "$pgac_cv_funcname_function_support" >&6; }
14372 if test x"$pgac_cv_funcname_function_support" = xyes ; then
14374 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
14378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14379 $as_echo_n "checking for _Static_assert... " >&6; }
14380 if ${pgac_cv__static_assert+:} false; then :
14381 $as_echo_n "(cached) " >&6
14382 else
14383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14384 /* end confdefs.h. */
14387 main ()
14389 ({ _Static_assert(1, "foo"); })
14391 return 0;
14393 _ACEOF
14394 if ac_fn_c_try_link "$LINENO"; then :
14395 pgac_cv__static_assert=yes
14396 else
14397 pgac_cv__static_assert=no
14399 rm -f core conftest.err conftest.$ac_objext \
14400 conftest$ac_exeext conftest.$ac_ext
14402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14403 $as_echo "$pgac_cv__static_assert" >&6; }
14404 if test x"$pgac_cv__static_assert" = xyes ; then
14406 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14410 $as_echo_n "checking for typeof... " >&6; }
14411 if ${pgac_cv_c_typeof+:} false; then :
14412 $as_echo_n "(cached) " >&6
14413 else
14414 pgac_cv_c_typeof=no
14415 for pgac_kw in typeof __typeof__ decltype; do
14416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14417 /* end confdefs.h. */
14420 main ()
14422 int x = 0;
14423 $pgac_kw(x) y;
14424 y = x;
14425 return y;
14427 return 0;
14429 _ACEOF
14430 if ac_fn_c_try_compile "$LINENO"; then :
14431 pgac_cv_c_typeof=$pgac_kw
14433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14434 test "$pgac_cv_c_typeof" != no && break
14435 done
14437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14438 $as_echo "$pgac_cv_c_typeof" >&6; }
14439 if test "$pgac_cv_c_typeof" != no; then
14441 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14443 if test "$pgac_cv_c_typeof" != typeof; then
14445 cat >>confdefs.h <<_ACEOF
14446 #define typeof $pgac_cv_c_typeof
14447 _ACEOF
14451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14452 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14453 if ${pgac_cv__types_compatible+:} false; then :
14454 $as_echo_n "(cached) " >&6
14455 else
14456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14457 /* end confdefs.h. */
14460 main ()
14462 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14464 return 0;
14466 _ACEOF
14467 if ac_fn_c_try_compile "$LINENO"; then :
14468 pgac_cv__types_compatible=yes
14469 else
14470 pgac_cv__types_compatible=no
14472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14475 $as_echo "$pgac_cv__types_compatible" >&6; }
14476 if test x"$pgac_cv__types_compatible" = xyes ; then
14478 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14482 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14483 if ${pgac_cv__builtin_constant_p+:} false; then :
14484 $as_echo_n "(cached) " >&6
14485 else
14486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14487 /* end confdefs.h. */
14488 static int x;
14489 static int y[__builtin_constant_p(x) ? x : 1];
14490 static int z[__builtin_constant_p("string literal") ? 1 : x];
14493 _ACEOF
14494 if ac_fn_c_try_compile "$LINENO"; then :
14495 pgac_cv__builtin_constant_p=yes
14496 else
14497 pgac_cv__builtin_constant_p=no
14499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14502 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14503 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14505 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14509 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14510 if ${pgac_cv__builtin_unreachable+:} false; then :
14511 $as_echo_n "(cached) " >&6
14512 else
14513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14514 /* end confdefs.h. */
14517 main ()
14519 __builtin_unreachable();
14521 return 0;
14523 _ACEOF
14524 if ac_fn_c_try_link "$LINENO"; then :
14525 pgac_cv__builtin_unreachable=yes
14526 else
14527 pgac_cv__builtin_unreachable=no
14529 rm -f core conftest.err conftest.$ac_objext \
14530 conftest$ac_exeext conftest.$ac_ext
14532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14533 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14534 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14536 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14540 $as_echo_n "checking for computed goto support... " >&6; }
14541 if ${pgac_cv_computed_goto+:} false; then :
14542 $as_echo_n "(cached) " >&6
14543 else
14544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14545 /* end confdefs.h. */
14548 main ()
14550 void *labeladdrs[] = {&&my_label};
14551 goto *labeladdrs[0];
14552 my_label:
14553 return 1;
14556 return 0;
14558 _ACEOF
14559 if ac_fn_c_try_compile "$LINENO"; then :
14560 pgac_cv_computed_goto=yes
14561 else
14562 pgac_cv_computed_goto=no
14564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14567 $as_echo "$pgac_cv_computed_goto" >&6; }
14568 if test x"$pgac_cv_computed_goto" = xyes ; then
14570 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14573 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14574 #include <time.h>
14577 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14579 cat >>confdefs.h <<_ACEOF
14580 #define HAVE_STRUCT_TM_TM_ZONE 1
14581 _ACEOF
14587 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14588 #ifdef HAVE_SYS_IPC_H
14589 #include <sys/ipc.h>
14590 #endif
14591 #ifdef HAVE_SYS_SEM_H
14592 #include <sys/sem.h>
14593 #endif
14595 if test "x$ac_cv_type_union_semun" = xyes; then :
14597 cat >>confdefs.h <<_ACEOF
14598 #define HAVE_UNION_SEMUN 1
14599 _ACEOF
14604 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14605 #ifdef HAVE_SYS_UN_H
14606 #include <sys/un.h>
14607 #endif
14610 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14612 cat >>confdefs.h <<_ACEOF
14613 #define HAVE_STRUCT_SOCKADDR_UN 1
14614 _ACEOF
14619 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14620 #include <sys/socket.h>
14623 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14625 cat >>confdefs.h <<_ACEOF
14626 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14627 _ACEOF
14632 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14633 #include <sys/socket.h>
14636 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14638 cat >>confdefs.h <<_ACEOF
14639 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14640 _ACEOF
14644 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14645 #include <sys/socket.h>
14648 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14650 cat >>confdefs.h <<_ACEOF
14651 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14652 _ACEOF
14656 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14657 #include <sys/socket.h>
14660 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14662 cat >>confdefs.h <<_ACEOF
14663 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14664 _ACEOF
14668 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14669 #include <sys/socket.h>
14672 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14674 cat >>confdefs.h <<_ACEOF
14675 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14676 _ACEOF
14680 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14681 #include <sys/socket.h>
14684 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14686 cat >>confdefs.h <<_ACEOF
14687 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14688 _ACEOF
14693 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14694 #include <sys/socket.h>
14695 #include <netdb.h>
14698 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14700 cat >>confdefs.h <<_ACEOF
14701 #define HAVE_STRUCT_ADDRINFO 1
14702 _ACEOF
14708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14709 $as_echo_n "checking for locale_t... " >&6; }
14710 if ${pgac_cv_type_locale_t+:} false; then :
14711 $as_echo_n "(cached) " >&6
14712 else
14713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14714 /* end confdefs.h. */
14715 #include <locale.h>
14716 locale_t x;
14718 main ()
14722 return 0;
14724 _ACEOF
14725 if ac_fn_c_try_compile "$LINENO"; then :
14726 pgac_cv_type_locale_t=yes
14727 else
14728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14729 /* end confdefs.h. */
14730 #include <xlocale.h>
14731 locale_t x;
14733 main ()
14737 return 0;
14739 _ACEOF
14740 if ac_fn_c_try_compile "$LINENO"; then :
14741 pgac_cv_type_locale_t='yes (in xlocale.h)'
14742 else
14743 pgac_cv_type_locale_t=no
14745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14750 $as_echo "$pgac_cv_type_locale_t" >&6; }
14751 if test "$pgac_cv_type_locale_t" != no; then
14753 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14756 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14758 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14762 # MSVC doesn't cope well with defining restrict to __restrict, the
14763 # spelling it understands, because it conflicts with
14764 # __declspec(restrict). Therefore we define pg_restrict to the
14765 # appropriate definition, which presumably won't conflict.
14767 # Allow platforms with buggy compilers to force restrict to not be
14768 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14769 # template.
14770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14771 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14772 if ${ac_cv_c_restrict+:} false; then :
14773 $as_echo_n "(cached) " >&6
14774 else
14775 ac_cv_c_restrict=no
14776 # The order here caters to the fact that C++ does not require restrict.
14777 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14779 /* end confdefs.h. */
14780 typedef int * int_ptr;
14781 int foo (int_ptr $ac_kw ip) {
14782 return ip[0];
14785 main ()
14787 int s[1];
14788 int * $ac_kw t = s;
14789 t[0] = 0;
14790 return foo(t)
14792 return 0;
14794 _ACEOF
14795 if ac_fn_c_try_compile "$LINENO"; then :
14796 ac_cv_c_restrict=$ac_kw
14798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14799 test "$ac_cv_c_restrict" != no && break
14800 done
14803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14804 $as_echo "$ac_cv_c_restrict" >&6; }
14806 case $ac_cv_c_restrict in
14807 restrict) ;;
14808 no) $as_echo "#define restrict /**/" >>confdefs.h
14810 *) cat >>confdefs.h <<_ACEOF
14811 #define restrict $ac_cv_c_restrict
14812 _ACEOF
14814 esac
14816 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14817 pg_restrict=""
14818 else
14819 pg_restrict="$ac_cv_c_restrict"
14822 cat >>confdefs.h <<_ACEOF
14823 #define pg_restrict $pg_restrict
14824 _ACEOF
14827 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14828 #include <sys/param.h>
14829 #ifdef HAVE_SYS_UCRED_H
14830 #include <sys/ucred.h>
14831 #endif
14833 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14835 cat >>confdefs.h <<_ACEOF
14836 #define HAVE_STRUCT_CMSGCRED 1
14837 _ACEOF
14843 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14844 #include <getopt.h>
14845 #endif
14847 if test "x$ac_cv_type_struct_option" = xyes; then :
14849 cat >>confdefs.h <<_ACEOF
14850 #define HAVE_STRUCT_OPTION 1
14851 _ACEOF
14857 if test "$with_zlib" = yes; then
14858 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14859 # did not). While we could work around the lack of z_streamp, it
14860 # seems unwise to encourage people to use such old zlib versions...
14861 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14863 if test "x$ac_cv_type_z_streamp" = xyes; then :
14865 else
14866 as_fn_error $? "zlib version is too old
14867 Use --without-zlib to disable zlib support." "$LINENO" 5
14872 case $host_cpu in
14873 x86_64)
14874 # On x86_64, check if we can compile a popcntq instruction
14875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14876 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14877 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14878 $as_echo_n "(cached) " >&6
14879 else
14880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14881 /* end confdefs.h. */
14884 main ()
14886 long long x = 1; long long r;
14887 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14889 return 0;
14891 _ACEOF
14892 if ac_fn_c_try_compile "$LINENO"; then :
14893 pgac_cv_have_x86_64_popcntq=yes
14894 else
14895 pgac_cv_have_x86_64_popcntq=no
14897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14900 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14901 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14903 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14907 ppc*|powerpc*)
14908 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14910 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14911 if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
14912 $as_echo_n "(cached) " >&6
14913 else
14914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14915 /* end confdefs.h. */
14918 main ()
14920 int a = 0; int *p = &a; int r;
14921 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14923 return 0;
14925 _ACEOF
14926 if ac_fn_c_try_compile "$LINENO"; then :
14927 pgac_cv_have_ppc_mutex_hint=yes
14928 else
14929 pgac_cv_have_ppc_mutex_hint=no
14931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14934 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14935 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14937 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14940 # Check if compiler accepts "i"(x) when __builtin_constant_p(x).
14941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14942 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14943 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14944 $as_echo_n "(cached) " >&6
14945 else
14946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14947 /* end confdefs.h. */
14948 static inline int
14949 addi(int ra, int si)
14951 int res = 0;
14952 if (__builtin_constant_p(si))
14953 __asm__ __volatile__(
14954 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14955 return res;
14957 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14959 main ()
14963 return 0;
14965 _ACEOF
14966 if ac_fn_c_try_compile "$LINENO"; then :
14967 pgac_cv_have_i_constraint__builtin_constant_p=yes
14968 else
14969 pgac_cv_have_i_constraint__builtin_constant_p=no
14971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14974 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14975 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14977 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14981 esac
14983 # Check largefile support. You might think this is a system service not a
14984 # compiler characteristic, but you'd be wrong. We must check this before
14985 # probing existence of related functions such as fseeko, since the largefile
14986 # defines can affect what is generated for that.
14987 if test "$PORTNAME" != "win32"; then
14988 # Check whether --enable-largefile was given.
14989 if test "${enable_largefile+set}" = set; then :
14990 enableval=$enable_largefile;
14993 if test "$enable_largefile" != no; then
14995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14996 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14997 if ${ac_cv_sys_largefile_CC+:} false; then :
14998 $as_echo_n "(cached) " >&6
14999 else
15000 ac_cv_sys_largefile_CC=no
15001 if test "$GCC" != yes; then
15002 ac_save_CC=$CC
15003 while :; do
15004 # IRIX 6.2 and later do not support large files by default,
15005 # so use the C compiler's -n32 option if that helps.
15006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15007 /* end confdefs.h. */
15008 #include <sys/types.h>
15009 /* Check that off_t can represent 2**63 - 1 correctly.
15010 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15011 since some C++ compilers masquerading as C compilers
15012 incorrectly reject 9223372036854775807. */
15013 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15014 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15015 && LARGE_OFF_T % 2147483647 == 1)
15016 ? 1 : -1];
15018 main ()
15022 return 0;
15024 _ACEOF
15025 if ac_fn_c_try_compile "$LINENO"; then :
15026 break
15028 rm -f core conftest.err conftest.$ac_objext
15029 CC="$CC -n32"
15030 if ac_fn_c_try_compile "$LINENO"; then :
15031 ac_cv_sys_largefile_CC=' -n32'; break
15033 rm -f core conftest.err conftest.$ac_objext
15034 break
15035 done
15036 CC=$ac_save_CC
15037 rm -f conftest.$ac_ext
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15041 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15042 if test "$ac_cv_sys_largefile_CC" != no; then
15043 CC=$CC$ac_cv_sys_largefile_CC
15046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15047 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15048 if ${ac_cv_sys_file_offset_bits+:} false; then :
15049 $as_echo_n "(cached) " >&6
15050 else
15051 while :; do
15052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15053 /* end confdefs.h. */
15054 #include <sys/types.h>
15055 /* Check that off_t can represent 2**63 - 1 correctly.
15056 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15057 since some C++ compilers masquerading as C compilers
15058 incorrectly reject 9223372036854775807. */
15059 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15060 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15061 && LARGE_OFF_T % 2147483647 == 1)
15062 ? 1 : -1];
15064 main ()
15068 return 0;
15070 _ACEOF
15071 if ac_fn_c_try_compile "$LINENO"; then :
15072 ac_cv_sys_file_offset_bits=no; break
15074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15076 /* end confdefs.h. */
15077 #define _FILE_OFFSET_BITS 64
15078 #include <sys/types.h>
15079 /* Check that off_t can represent 2**63 - 1 correctly.
15080 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15081 since some C++ compilers masquerading as C compilers
15082 incorrectly reject 9223372036854775807. */
15083 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15084 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15085 && LARGE_OFF_T % 2147483647 == 1)
15086 ? 1 : -1];
15088 main ()
15092 return 0;
15094 _ACEOF
15095 if ac_fn_c_try_compile "$LINENO"; then :
15096 ac_cv_sys_file_offset_bits=64; break
15098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15099 ac_cv_sys_file_offset_bits=unknown
15100 break
15101 done
15103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15104 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15105 case $ac_cv_sys_file_offset_bits in #(
15106 no | unknown) ;;
15108 cat >>confdefs.h <<_ACEOF
15109 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15110 _ACEOF
15112 esac
15113 rm -rf conftest*
15114 if test $ac_cv_sys_file_offset_bits = unknown; then
15115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15116 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15117 if ${ac_cv_sys_large_files+:} false; then :
15118 $as_echo_n "(cached) " >&6
15119 else
15120 while :; do
15121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15122 /* end confdefs.h. */
15123 #include <sys/types.h>
15124 /* Check that off_t can represent 2**63 - 1 correctly.
15125 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15126 since some C++ compilers masquerading as C compilers
15127 incorrectly reject 9223372036854775807. */
15128 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15129 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15130 && LARGE_OFF_T % 2147483647 == 1)
15131 ? 1 : -1];
15133 main ()
15137 return 0;
15139 _ACEOF
15140 if ac_fn_c_try_compile "$LINENO"; then :
15141 ac_cv_sys_large_files=no; break
15143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15145 /* end confdefs.h. */
15146 #define _LARGE_FILES 1
15147 #include <sys/types.h>
15148 /* Check that off_t can represent 2**63 - 1 correctly.
15149 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15150 since some C++ compilers masquerading as C compilers
15151 incorrectly reject 9223372036854775807. */
15152 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15153 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15154 && LARGE_OFF_T % 2147483647 == 1)
15155 ? 1 : -1];
15157 main ()
15161 return 0;
15163 _ACEOF
15164 if ac_fn_c_try_compile "$LINENO"; then :
15165 ac_cv_sys_large_files=1; break
15167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15168 ac_cv_sys_large_files=unknown
15169 break
15170 done
15172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15173 $as_echo "$ac_cv_sys_large_files" >&6; }
15174 case $ac_cv_sys_large_files in #(
15175 no | unknown) ;;
15177 cat >>confdefs.h <<_ACEOF
15178 #define _LARGE_FILES $ac_cv_sys_large_files
15179 _ACEOF
15181 esac
15182 rm -rf conftest*
15191 # The cast to long int works around a bug in the HP C Compiler
15192 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15193 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15194 # This bug is HP SR number 8606223364.
15195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15196 $as_echo_n "checking size of off_t... " >&6; }
15197 if ${ac_cv_sizeof_off_t+:} false; then :
15198 $as_echo_n "(cached) " >&6
15199 else
15200 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15202 else
15203 if test "$ac_cv_type_off_t" = yes; then
15204 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15205 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15206 as_fn_error 77 "cannot compute sizeof (off_t)
15207 See \`config.log' for more details" "$LINENO" 5; }
15208 else
15209 ac_cv_sizeof_off_t=0
15214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15215 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15219 cat >>confdefs.h <<_ACEOF
15220 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15221 _ACEOF
15225 # If we don't have largefile support, can't handle segsize >= 2GB.
15226 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15227 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15230 # The cast to long int works around a bug in the HP C Compiler
15231 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15232 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15233 # This bug is HP SR number 8606223364.
15234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15235 $as_echo_n "checking size of bool... " >&6; }
15236 if ${ac_cv_sizeof_bool+:} false; then :
15237 $as_echo_n "(cached) " >&6
15238 else
15239 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15240 #include <stdbool.h>
15241 #endif
15242 "; then :
15244 else
15245 if test "$ac_cv_type_bool" = yes; then
15246 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15247 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15248 as_fn_error 77 "cannot compute sizeof (bool)
15249 See \`config.log' for more details" "$LINENO" 5; }
15250 else
15251 ac_cv_sizeof_bool=0
15256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15257 $as_echo "$ac_cv_sizeof_bool" >&6; }
15261 cat >>confdefs.h <<_ACEOF
15262 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15263 _ACEOF
15267 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15269 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15275 ## Functions, global variables
15278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15279 $as_echo_n "checking for int timezone... " >&6; }
15280 if ${pgac_cv_var_int_timezone+:} false; then :
15281 $as_echo_n "(cached) " >&6
15282 else
15283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15284 /* end confdefs.h. */
15285 #include <time.h>
15286 int res;
15288 main ()
15290 #ifndef __CYGWIN__
15291 res = timezone / 60;
15292 #else
15293 res = _timezone / 60;
15294 #endif
15296 return 0;
15298 _ACEOF
15299 if ac_fn_c_try_link "$LINENO"; then :
15300 pgac_cv_var_int_timezone=yes
15301 else
15302 pgac_cv_var_int_timezone=no
15304 rm -f core conftest.err conftest.$ac_objext \
15305 conftest$ac_exeext conftest.$ac_ext
15307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15308 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15309 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15311 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15315 $as_echo_n "checking types of arguments for accept()... " >&6; }
15316 if ${ac_cv_func_accept_return+:} false; then :
15317 $as_echo_n "(cached) " >&6
15318 else
15319 if ${ac_cv_func_accept_arg1+:} false; then :
15320 $as_echo_n "(cached) " >&6
15321 else
15322 if ${ac_cv_func_accept_arg2+:} false; then :
15323 $as_echo_n "(cached) " >&6
15324 else
15325 if ${ac_cv_func_accept_arg3+:} false; then :
15326 $as_echo_n "(cached) " >&6
15327 else
15328 for ac_cv_func_accept_return in 'int' 'SOCKET WSAAPI' 'unsigned int PASCAL'; do
15329 for ac_cv_func_accept_arg1 in 'int' 'SOCKET' 'unsigned int'; do
15330 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15331 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15333 /* end confdefs.h. */
15334 #include <sys/types.h>
15335 #include <sys/socket.h>
15336 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15337 _ACEOF
15338 if ac_fn_c_try_compile "$LINENO"; then :
15339 ac_not_found=no; break 4
15340 else
15341 ac_not_found=yes
15343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15344 done
15345 done
15346 done
15347 done
15348 if test "$ac_not_found" = yes; then
15349 as_fn_error $? "could not determine argument types" "$LINENO" 5
15351 if test "$ac_cv_func_accept_arg3" = "void"; then
15352 ac_cv_func_accept_arg3=int
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
15363 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15365 cat >>confdefs.h <<_ACEOF
15366 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15367 _ACEOF
15370 cat >>confdefs.h <<_ACEOF
15371 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15372 _ACEOF
15375 cat >>confdefs.h <<_ACEOF
15376 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15377 _ACEOF
15380 cat >>confdefs.h <<_ACEOF
15381 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15382 _ACEOF
15385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15386 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15387 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15388 $as_echo_n "(cached) " >&6
15389 else
15390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15391 /* end confdefs.h. */
15392 #include <sys/time.h>
15394 main ()
15396 struct timeval *tp;
15397 struct timezone *tzp;
15398 gettimeofday(tp,tzp);
15400 return 0;
15402 _ACEOF
15403 if ac_fn_c_try_compile "$LINENO"; then :
15404 pgac_cv_func_gettimeofday_1arg=no
15405 else
15406 pgac_cv_func_gettimeofday_1arg=yes
15408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15411 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15412 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15414 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15419 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15420 if ${pgac_cv_func_wcstombs_l+:} false; then :
15421 $as_echo_n "(cached) " >&6
15422 else
15423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15424 /* end confdefs.h. */
15425 #include <stdlib.h>
15426 #include <locale.h>
15428 main ()
15430 #ifndef wcstombs_l
15431 (void) wcstombs_l;
15432 #endif
15434 return 0;
15436 _ACEOF
15437 if ac_fn_c_try_compile "$LINENO"; then :
15438 pgac_cv_func_wcstombs_l='yes'
15439 else
15440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15441 /* end confdefs.h. */
15442 #include <stdlib.h>
15443 #include <locale.h>
15444 #include <xlocale.h>
15446 main ()
15448 #ifndef wcstombs_l
15449 (void) wcstombs_l;
15450 #endif
15452 return 0;
15454 _ACEOF
15455 if ac_fn_c_try_compile "$LINENO"; then :
15456 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15457 else
15458 pgac_cv_func_wcstombs_l='no'
15460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15465 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15466 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15468 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15472 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15473 # symbols that that library has no business exposing to the world. Pending
15474 # acquisition of a clue by those developers, ignore libedit (including its
15475 # possible alias of libreadline) while checking for everything else.
15476 LIBS_including_readline="$LIBS"
15477 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15479 for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale wcstombs_l
15480 do :
15481 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15482 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15483 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15484 cat >>confdefs.h <<_ACEOF
15485 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15486 _ACEOF
15489 done
15492 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15494 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15495 if ${pgac_cv__builtin_bswap16+:} false; then :
15496 $as_echo_n "(cached) " >&6
15497 else
15498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15499 /* end confdefs.h. */
15502 call__builtin_bswap16(int x)
15504 return __builtin_bswap16(x);
15507 main ()
15511 return 0;
15513 _ACEOF
15514 if ac_fn_c_try_link "$LINENO"; then :
15515 pgac_cv__builtin_bswap16=yes
15516 else
15517 pgac_cv__builtin_bswap16=no
15519 rm -f core conftest.err conftest.$ac_objext \
15520 conftest$ac_exeext conftest.$ac_ext
15522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15523 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15524 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15526 cat >>confdefs.h <<_ACEOF
15527 #define HAVE__BUILTIN_BSWAP16 1
15528 _ACEOF
15531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15532 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15533 if ${pgac_cv__builtin_bswap32+:} false; then :
15534 $as_echo_n "(cached) " >&6
15535 else
15536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15537 /* end confdefs.h. */
15540 call__builtin_bswap32(int x)
15542 return __builtin_bswap32(x);
15545 main ()
15549 return 0;
15551 _ACEOF
15552 if ac_fn_c_try_link "$LINENO"; then :
15553 pgac_cv__builtin_bswap32=yes
15554 else
15555 pgac_cv__builtin_bswap32=no
15557 rm -f core conftest.err conftest.$ac_objext \
15558 conftest$ac_exeext conftest.$ac_ext
15560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15561 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15562 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15564 cat >>confdefs.h <<_ACEOF
15565 #define HAVE__BUILTIN_BSWAP32 1
15566 _ACEOF
15569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15570 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15571 if ${pgac_cv__builtin_bswap64+:} false; then :
15572 $as_echo_n "(cached) " >&6
15573 else
15574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15575 /* end confdefs.h. */
15578 call__builtin_bswap64(long int x)
15580 return __builtin_bswap64(x);
15583 main ()
15587 return 0;
15589 _ACEOF
15590 if ac_fn_c_try_link "$LINENO"; then :
15591 pgac_cv__builtin_bswap64=yes
15592 else
15593 pgac_cv__builtin_bswap64=no
15595 rm -f core conftest.err conftest.$ac_objext \
15596 conftest$ac_exeext conftest.$ac_ext
15598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15599 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15600 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15602 cat >>confdefs.h <<_ACEOF
15603 #define HAVE__BUILTIN_BSWAP64 1
15604 _ACEOF
15607 # We assume that we needn't test all widths of these explicitly:
15608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15609 $as_echo_n "checking for __builtin_clz... " >&6; }
15610 if ${pgac_cv__builtin_clz+:} false; then :
15611 $as_echo_n "(cached) " >&6
15612 else
15613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15614 /* end confdefs.h. */
15617 call__builtin_clz(unsigned int x)
15619 return __builtin_clz(x);
15622 main ()
15626 return 0;
15628 _ACEOF
15629 if ac_fn_c_try_link "$LINENO"; then :
15630 pgac_cv__builtin_clz=yes
15631 else
15632 pgac_cv__builtin_clz=no
15634 rm -f core conftest.err conftest.$ac_objext \
15635 conftest$ac_exeext conftest.$ac_ext
15637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15638 $as_echo "$pgac_cv__builtin_clz" >&6; }
15639 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15641 cat >>confdefs.h <<_ACEOF
15642 #define HAVE__BUILTIN_CLZ 1
15643 _ACEOF
15646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15647 $as_echo_n "checking for __builtin_ctz... " >&6; }
15648 if ${pgac_cv__builtin_ctz+:} false; then :
15649 $as_echo_n "(cached) " >&6
15650 else
15651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15652 /* end confdefs.h. */
15655 call__builtin_ctz(unsigned int x)
15657 return __builtin_ctz(x);
15660 main ()
15664 return 0;
15666 _ACEOF
15667 if ac_fn_c_try_link "$LINENO"; then :
15668 pgac_cv__builtin_ctz=yes
15669 else
15670 pgac_cv__builtin_ctz=no
15672 rm -f core conftest.err conftest.$ac_objext \
15673 conftest$ac_exeext conftest.$ac_ext
15675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15676 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15677 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15679 cat >>confdefs.h <<_ACEOF
15680 #define HAVE__BUILTIN_CTZ 1
15681 _ACEOF
15684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15685 $as_echo_n "checking for __builtin_popcount... " >&6; }
15686 if ${pgac_cv__builtin_popcount+:} false; then :
15687 $as_echo_n "(cached) " >&6
15688 else
15689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15690 /* end confdefs.h. */
15693 call__builtin_popcount(unsigned int x)
15695 return __builtin_popcount(x);
15698 main ()
15702 return 0;
15704 _ACEOF
15705 if ac_fn_c_try_link "$LINENO"; then :
15706 pgac_cv__builtin_popcount=yes
15707 else
15708 pgac_cv__builtin_popcount=no
15710 rm -f core conftest.err conftest.$ac_objext \
15711 conftest$ac_exeext conftest.$ac_ext
15713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15714 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15715 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15717 cat >>confdefs.h <<_ACEOF
15718 #define HAVE__BUILTIN_POPCOUNT 1
15719 _ACEOF
15722 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15723 # so it needs a different test function.
15724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15725 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15726 if ${pgac_cv__builtin_frame_address+:} false; then :
15727 $as_echo_n "(cached) " >&6
15728 else
15729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15730 /* end confdefs.h. */
15732 void *
15733 call__builtin_frame_address(void)
15735 return __builtin_frame_address(0);
15738 main ()
15742 return 0;
15744 _ACEOF
15745 if ac_fn_c_try_link "$LINENO"; then :
15746 pgac_cv__builtin_frame_address=yes
15747 else
15748 pgac_cv__builtin_frame_address=no
15750 rm -f core conftest.err conftest.$ac_objext \
15751 conftest$ac_exeext conftest.$ac_ext
15753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15754 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15755 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15757 cat >>confdefs.h <<_ACEOF
15758 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15759 _ACEOF
15763 # We require 64-bit fseeko() to be available, but run this check anyway
15764 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15766 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15767 if ${ac_cv_sys_largefile_source+:} false; then :
15768 $as_echo_n "(cached) " >&6
15769 else
15770 while :; do
15771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15772 /* end confdefs.h. */
15773 #include <sys/types.h> /* for off_t */
15774 #include <stdio.h>
15776 main ()
15778 int (*fp) (FILE *, off_t, int) = fseeko;
15779 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15781 return 0;
15783 _ACEOF
15784 if ac_fn_c_try_link "$LINENO"; then :
15785 ac_cv_sys_largefile_source=no; break
15787 rm -f core conftest.err conftest.$ac_objext \
15788 conftest$ac_exeext conftest.$ac_ext
15789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15790 /* end confdefs.h. */
15791 #define _LARGEFILE_SOURCE 1
15792 #include <sys/types.h> /* for off_t */
15793 #include <stdio.h>
15795 main ()
15797 int (*fp) (FILE *, off_t, int) = fseeko;
15798 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15800 return 0;
15802 _ACEOF
15803 if ac_fn_c_try_link "$LINENO"; then :
15804 ac_cv_sys_largefile_source=1; break
15806 rm -f core conftest.err conftest.$ac_objext \
15807 conftest$ac_exeext conftest.$ac_ext
15808 ac_cv_sys_largefile_source=unknown
15809 break
15810 done
15812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15813 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15814 case $ac_cv_sys_largefile_source in #(
15815 no | unknown) ;;
15817 cat >>confdefs.h <<_ACEOF
15818 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15819 _ACEOF
15821 esac
15822 rm -rf conftest*
15824 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15825 # in glibc 2.1.3, but that breaks too many other things.
15826 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15827 if test $ac_cv_sys_largefile_source != unknown; then
15829 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15834 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15835 # by calling it, 2009-04-02
15836 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15837 # The Clang compiler raises a warning for an undeclared identifier that matches
15838 # a compiler builtin function. All extant Clang versions are affected, as of
15839 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15840 # C and Objective C languages, but Clang does report an error under C++ and
15841 # Objective C++.
15843 # Passing -fno-builtin to the compiler would suppress this problem. That
15844 # strategy would have the advantage of being insensitive to stray warnings, but
15845 # it would make tests less realistic.
15846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15847 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15848 if ${ac_cv_c_decl_report+:} false; then :
15849 $as_echo_n "(cached) " >&6
15850 else
15851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15852 /* end confdefs.h. */
15855 main ()
15857 (void) strchr;
15859 return 0;
15861 _ACEOF
15862 if ac_fn_c_try_compile "$LINENO"; then :
15863 if test -s conftest.err; then :
15864 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15865 # valid AC_CHECK_DECL input. No library function is consistently available
15866 # on freestanding implementations, so test against a dummy declaration.
15867 # Include always-available headers on the off chance that they somehow
15868 # elicit warnings.
15869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15870 /* end confdefs.h. */
15871 #include <float.h>
15872 #include <limits.h>
15873 #include <stdarg.h>
15874 #include <stddef.h>
15875 extern void ac_decl (int, char *);
15877 main ()
15879 #ifdef __cplusplus
15880 (void) ac_decl ((int) 0, (char *) 0);
15881 (void) ac_decl;
15882 #else
15883 (void) ac_decl;
15884 #endif
15887 return 0;
15889 _ACEOF
15890 if ac_fn_c_try_compile "$LINENO"; then :
15891 if test -s conftest.err; then :
15892 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15893 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15894 as_fn_error $? "cannot detect from compiler exit status or warnings
15895 See \`config.log' for more details" "$LINENO" 5; }
15896 else
15897 ac_cv_c_decl_report=warning
15899 else
15900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15901 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15902 as_fn_error $? "cannot compile a simple declaration test
15903 See \`config.log' for more details" "$LINENO" 5; }
15905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15906 else
15907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15908 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15909 as_fn_error $? "compiler does not report undeclared identifiers
15910 See \`config.log' for more details" "$LINENO" 5; }
15912 else
15913 ac_cv_c_decl_report=error
15915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15918 $as_echo "$ac_cv_c_decl_report" >&6; }
15920 case $ac_cv_c_decl_report in
15921 warning) ac_c_decl_warn_flag=yes ;;
15922 *) ac_c_decl_warn_flag= ;;
15923 esac
15925 if test "$PORTNAME" != "solaris"; then :
15927 for ac_func in posix_fadvise
15928 do :
15929 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15930 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15931 cat >>confdefs.h <<_ACEOF
15932 #define HAVE_POSIX_FADVISE 1
15933 _ACEOF
15936 done
15938 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15940 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15941 ac_have_decl=1
15942 else
15943 ac_have_decl=0
15946 cat >>confdefs.h <<_ACEOF
15947 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15948 _ACEOF
15951 fi # fi
15953 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15955 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15956 ac_have_decl=1
15957 else
15958 ac_have_decl=0
15961 cat >>confdefs.h <<_ACEOF
15962 #define HAVE_DECL_FDATASYNC $ac_have_decl
15963 _ACEOF
15965 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15966 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15967 ac_have_decl=1
15968 else
15969 ac_have_decl=0
15972 cat >>confdefs.h <<_ACEOF
15973 #define HAVE_DECL_STRLCAT $ac_have_decl
15974 _ACEOF
15975 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15976 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15977 ac_have_decl=1
15978 else
15979 ac_have_decl=0
15982 cat >>confdefs.h <<_ACEOF
15983 #define HAVE_DECL_STRLCPY $ac_have_decl
15984 _ACEOF
15985 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15986 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15987 ac_have_decl=1
15988 else
15989 ac_have_decl=0
15992 cat >>confdefs.h <<_ACEOF
15993 #define HAVE_DECL_STRNLEN $ac_have_decl
15994 _ACEOF
15996 # This is probably only present on macOS, but may as well check always
15997 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15999 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16000 ac_have_decl=1
16001 else
16002 ac_have_decl=0
16005 cat >>confdefs.h <<_ACEOF
16006 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16007 _ACEOF
16010 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
16012 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
16013 ac_have_decl=1
16014 else
16015 ac_have_decl=0
16018 cat >>confdefs.h <<_ACEOF
16019 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
16020 _ACEOF
16021 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
16023 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
16024 ac_have_decl=1
16025 else
16026 ac_have_decl=0
16029 cat >>confdefs.h <<_ACEOF
16030 #define HAVE_DECL_RTLD_NOW $ac_have_decl
16031 _ACEOF
16034 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
16035 #include <netinet/in.h>
16037 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
16039 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
16045 $as_echo_n "checking for PS_STRINGS... " >&6; }
16046 if ${pgac_cv_var_PS_STRINGS+:} false; then :
16047 $as_echo_n "(cached) " >&6
16048 else
16049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16050 /* end confdefs.h. */
16051 #include <machine/vmparam.h>
16052 #include <sys/exec.h>
16055 main ()
16057 PS_STRINGS->ps_nargvstr = 1;
16058 PS_STRINGS->ps_argvstr = "foo";
16060 return 0;
16062 _ACEOF
16063 if ac_fn_c_try_link "$LINENO"; then :
16064 pgac_cv_var_PS_STRINGS=yes
16065 else
16066 pgac_cv_var_PS_STRINGS=no
16068 rm -f core conftest.err conftest.$ac_objext \
16069 conftest$ac_exeext conftest.$ac_ext
16071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16072 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16073 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16075 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16079 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16080 if test "x$ac_cv_func_dlopen" = xyes; then :
16081 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
16083 else
16084 case " $LIBOBJS " in
16085 *" dlopen.$ac_objext "* ) ;;
16086 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
16088 esac
16092 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16093 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16094 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16096 else
16097 case " $LIBOBJS " in
16098 *" explicit_bzero.$ac_objext "* ) ;;
16099 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16101 esac
16105 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
16106 if test "x$ac_cv_func_fls" = xyes; then :
16107 $as_echo "#define HAVE_FLS 1" >>confdefs.h
16109 else
16110 case " $LIBOBJS " in
16111 *" fls.$ac_objext "* ) ;;
16112 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
16114 esac
16118 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16119 if test "x$ac_cv_func_getopt" = xyes; then :
16120 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16122 else
16123 case " $LIBOBJS " in
16124 *" getopt.$ac_objext "* ) ;;
16125 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16127 esac
16131 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16132 if test "x$ac_cv_func_getpeereid" = xyes; then :
16133 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16135 else
16136 case " $LIBOBJS " in
16137 *" getpeereid.$ac_objext "* ) ;;
16138 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16140 esac
16144 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
16145 if test "x$ac_cv_func_getrusage" = xyes; then :
16146 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
16148 else
16149 case " $LIBOBJS " in
16150 *" getrusage.$ac_objext "* ) ;;
16151 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16153 esac
16157 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16158 if test "x$ac_cv_func_inet_aton" = xyes; then :
16159 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16161 else
16162 case " $LIBOBJS " in
16163 *" inet_aton.$ac_objext "* ) ;;
16164 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16166 esac
16170 ac_fn_c_check_func "$LINENO" "link" "ac_cv_func_link"
16171 if test "x$ac_cv_func_link" = xyes; then :
16172 $as_echo "#define HAVE_LINK 1" >>confdefs.h
16174 else
16175 case " $LIBOBJS " in
16176 *" link.$ac_objext "* ) ;;
16177 *) LIBOBJS="$LIBOBJS link.$ac_objext"
16179 esac
16183 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16184 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16185 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16187 else
16188 case " $LIBOBJS " in
16189 *" mkdtemp.$ac_objext "* ) ;;
16190 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16192 esac
16196 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
16197 if test "x$ac_cv_func_pread" = xyes; then :
16198 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
16200 else
16201 case " $LIBOBJS " in
16202 *" pread.$ac_objext "* ) ;;
16203 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
16205 esac
16209 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
16210 if test "x$ac_cv_func_pwrite" = xyes; then :
16211 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
16213 else
16214 case " $LIBOBJS " in
16215 *" pwrite.$ac_objext "* ) ;;
16216 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
16218 esac
16222 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
16223 if test "x$ac_cv_func_random" = xyes; then :
16224 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
16226 else
16227 case " $LIBOBJS " in
16228 *" random.$ac_objext "* ) ;;
16229 *) LIBOBJS="$LIBOBJS random.$ac_objext"
16231 esac
16235 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
16236 if test "x$ac_cv_func_srandom" = xyes; then :
16237 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
16239 else
16240 case " $LIBOBJS " in
16241 *" srandom.$ac_objext "* ) ;;
16242 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
16244 esac
16248 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16249 if test "x$ac_cv_func_strlcat" = xyes; then :
16250 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16252 else
16253 case " $LIBOBJS " in
16254 *" strlcat.$ac_objext "* ) ;;
16255 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16257 esac
16261 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16262 if test "x$ac_cv_func_strlcpy" = xyes; then :
16263 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16265 else
16266 case " $LIBOBJS " in
16267 *" strlcpy.$ac_objext "* ) ;;
16268 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16270 esac
16274 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16275 if test "x$ac_cv_func_strnlen" = xyes; then :
16276 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16278 else
16279 case " $LIBOBJS " in
16280 *" strnlen.$ac_objext "* ) ;;
16281 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16283 esac
16287 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
16288 if test "x$ac_cv_func_strtof" = xyes; then :
16289 $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
16291 else
16292 case " $LIBOBJS " in
16293 *" strtof.$ac_objext "* ) ;;
16294 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16296 esac
16302 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16303 # Cygwin and (apparently, based on test results) Mingw both
16304 # have a broken strtof(), so substitute the same replacement
16305 # code we use with VS2013. That's not a perfect fix, since
16306 # (unlike with VS2013) it doesn't avoid double-rounding, but
16307 # we have no better options. To get that, though, we have to
16308 # force the file to be compiled despite HAVE_STRTOF.
16309 case " $LIBOBJS " in
16310 *" strtof.$ac_objext "* ) ;;
16311 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16313 esac
16315 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16316 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16319 case $host_os in
16320 # Windows uses a specialised env handler
16321 mingw*)
16323 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16326 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16328 ac_cv_func_setenv=yes
16329 ac_cv_func_unsetenv=yes
16332 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
16333 if test "x$ac_cv_func_setenv" = xyes; then :
16334 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16336 else
16337 case " $LIBOBJS " in
16338 *" setenv.$ac_objext "* ) ;;
16339 *) LIBOBJS="$LIBOBJS setenv.$ac_objext"
16341 esac
16345 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16346 if test "x$ac_cv_func_unsetenv" = xyes; then :
16347 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16349 else
16350 case " $LIBOBJS " in
16351 *" unsetenv.$ac_objext "* ) ;;
16352 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16354 esac
16360 esac
16362 # System's version of getaddrinfo(), if any, may be used only if we found
16363 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16364 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16365 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16366 test "$PORTNAME" != "win32"; then
16367 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16368 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16369 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16371 else
16372 case " $LIBOBJS " in
16373 *" getaddrinfo.$ac_objext "* ) ;;
16374 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16376 esac
16381 else
16382 case " $LIBOBJS " in
16383 *" getaddrinfo.$ac_objext "* ) ;;
16384 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16386 esac
16390 # Similarly, use system's getopt_long() only if system provides struct option.
16391 if test x"$ac_cv_type_struct_option" = xyes ; then
16392 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16393 if test "x$ac_cv_func_getopt_long" = xyes; then :
16394 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16396 else
16397 case " $LIBOBJS " in
16398 *" getopt_long.$ac_objext "* ) ;;
16399 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16401 esac
16406 else
16407 case " $LIBOBJS " in
16408 *" getopt_long.$ac_objext "* ) ;;
16409 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16411 esac
16415 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16416 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16417 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16418 case " $LIBOBJS " in
16419 *" getopt.$ac_objext "* ) ;;
16420 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16422 esac
16426 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16427 # so always use our version on Windows.
16428 if test "$PORTNAME" = "win32"; then
16429 case " $LIBOBJS " in
16430 *" getopt.$ac_objext "* ) ;;
16431 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16433 esac
16435 case " $LIBOBJS " in
16436 *" getopt_long.$ac_objext "* ) ;;
16437 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16439 esac
16443 # Win32 (really MinGW) support
16444 if test "$PORTNAME" = "win32"; then
16445 for ac_func in _configthreadlocale
16446 do :
16447 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16448 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16449 cat >>confdefs.h <<_ACEOF
16450 #define HAVE__CONFIGTHREADLOCALE 1
16451 _ACEOF
16454 done
16456 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16457 if test "x$ac_cv_func_gettimeofday" = xyes; then :
16458 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16460 else
16461 case " $LIBOBJS " in
16462 *" gettimeofday.$ac_objext "* ) ;;
16463 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16465 esac
16470 case " $LIBOBJS " in
16471 *" dirmod.$ac_objext "* ) ;;
16472 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16474 esac
16476 case " $LIBOBJS " in
16477 *" kill.$ac_objext "* ) ;;
16478 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16480 esac
16482 case " $LIBOBJS " in
16483 *" open.$ac_objext "* ) ;;
16484 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16486 esac
16488 case " $LIBOBJS " in
16489 *" system.$ac_objext "* ) ;;
16490 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16492 esac
16494 case " $LIBOBJS " in
16495 *" win32env.$ac_objext "* ) ;;
16496 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16498 esac
16500 case " $LIBOBJS " in
16501 *" win32error.$ac_objext "* ) ;;
16502 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16504 esac
16506 case " $LIBOBJS " in
16507 *" win32security.$ac_objext "* ) ;;
16508 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16510 esac
16512 case " $LIBOBJS " in
16513 *" win32setlocale.$ac_objext "* ) ;;
16514 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16516 esac
16519 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16521 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16522 #define WIN32_LEAN_AND_MEAN
16523 #include <windows.h>
16524 #include <string.h>
16525 #include <dbghelp.h>
16527 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16529 cat >>confdefs.h <<_ACEOF
16530 #define HAVE_MINIDUMP_TYPE 1
16531 _ACEOF
16533 pgac_minidump_type=yes
16534 else
16535 pgac_minidump_type=no
16539 if test x"$pgac_minidump_type" = x"yes" ; then
16540 have_win32_dbghelp=yes
16542 else
16543 have_win32_dbghelp=no
16547 # Cygwin needs only a bit of that
16548 if test "$PORTNAME" = "cygwin"; then
16549 case " $LIBOBJS " in
16550 *" dirmod.$ac_objext "* ) ;;
16551 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16553 esac
16557 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16558 if test "x$ac_cv_func_syslog" = xyes; then :
16559 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16560 if test "x$ac_cv_header_syslog_h" = xyes; then :
16562 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16571 $as_echo_n "checking for opterr... " >&6; }
16572 if ${pgac_cv_var_int_opterr+:} false; then :
16573 $as_echo_n "(cached) " >&6
16574 else
16575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16576 /* end confdefs.h. */
16577 #include <unistd.h>
16579 main ()
16581 extern int opterr; opterr = 1;
16583 return 0;
16585 _ACEOF
16586 if ac_fn_c_try_link "$LINENO"; then :
16587 pgac_cv_var_int_opterr=yes
16588 else
16589 pgac_cv_var_int_opterr=no
16591 rm -f core conftest.err conftest.$ac_objext \
16592 conftest$ac_exeext conftest.$ac_ext
16594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16595 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16596 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16598 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16603 $as_echo_n "checking for optreset... " >&6; }
16604 if ${pgac_cv_var_int_optreset+:} false; then :
16605 $as_echo_n "(cached) " >&6
16606 else
16607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16608 /* end confdefs.h. */
16609 #include <unistd.h>
16611 main ()
16613 extern int optreset; optreset = 1;
16615 return 0;
16617 _ACEOF
16618 if ac_fn_c_try_link "$LINENO"; then :
16619 pgac_cv_var_int_optreset=yes
16620 else
16621 pgac_cv_var_int_optreset=no
16623 rm -f core conftest.err conftest.$ac_objext \
16624 conftest$ac_exeext conftest.$ac_ext
16626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16627 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16628 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16630 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16634 for ac_func in strtoll __strtoll strtoq
16635 do :
16636 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16637 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16638 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16639 cat >>confdefs.h <<_ACEOF
16640 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16641 _ACEOF
16642 break
16644 done
16646 for ac_func in strtoull __strtoull strtouq
16647 do :
16648 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16649 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16650 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16651 cat >>confdefs.h <<_ACEOF
16652 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16653 _ACEOF
16654 break
16656 done
16658 # strto[u]ll may exist but not be declared
16659 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16660 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16661 ac_have_decl=1
16662 else
16663 ac_have_decl=0
16666 cat >>confdefs.h <<_ACEOF
16667 #define HAVE_DECL_STRTOLL $ac_have_decl
16668 _ACEOF
16669 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16670 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16671 ac_have_decl=1
16672 else
16673 ac_have_decl=0
16676 cat >>confdefs.h <<_ACEOF
16677 #define HAVE_DECL_STRTOULL $ac_have_decl
16678 _ACEOF
16681 if test "$with_icu" = yes; then
16682 ac_save_CPPFLAGS=$CPPFLAGS
16683 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16685 # Verify we have ICU's header files
16686 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16687 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16689 else
16690 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16695 CPPFLAGS=$ac_save_CPPFLAGS
16698 if test "$with_llvm" = yes; then
16700 # Check which functionality is present
16701 SAVE_CPPFLAGS="$CPPFLAGS"
16702 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16703 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16705 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16706 ac_have_decl=1
16707 else
16708 ac_have_decl=0
16711 cat >>confdefs.h <<_ACEOF
16712 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16713 _ACEOF
16715 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16717 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16718 ac_have_decl=1
16719 else
16720 ac_have_decl=0
16723 cat >>confdefs.h <<_ACEOF
16724 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16725 _ACEOF
16726 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16728 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16729 ac_have_decl=1
16730 else
16731 ac_have_decl=0
16734 cat >>confdefs.h <<_ACEOF
16735 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16736 _ACEOF
16738 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16740 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16741 ac_have_decl=1
16742 else
16743 ac_have_decl=0
16746 cat >>confdefs.h <<_ACEOF
16747 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16748 _ACEOF
16749 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16751 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16752 ac_have_decl=1
16753 else
16754 ac_have_decl=0
16757 cat >>confdefs.h <<_ACEOF
16758 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16759 _ACEOF
16761 CPPFLAGS="$SAVE_CPPFLAGS"
16765 # Lastly, restore full LIBS list and check for readline/libedit symbols
16766 LIBS="$LIBS_including_readline"
16768 if test "$with_readline" = yes; then
16769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16770 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16771 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16772 $as_echo_n "(cached) " >&6
16773 else
16774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16775 /* end confdefs.h. */
16776 #include <stdio.h>
16777 #if defined(HAVE_READLINE_READLINE_H)
16778 #include <readline/readline.h>
16779 #elif defined(HAVE_EDITLINE_READLINE_H)
16780 #include <editline/readline.h>
16781 #elif defined(HAVE_READLINE_H)
16782 #include <readline.h>
16783 #endif
16786 main ()
16788 rl_completion_append_character = 'x';
16790 return 0;
16792 _ACEOF
16793 if ac_fn_c_try_link "$LINENO"; then :
16794 pgac_cv_var_rl_completion_append_character=yes
16795 else
16796 pgac_cv_var_rl_completion_append_character=no
16798 rm -f core conftest.err conftest.$ac_objext \
16799 conftest$ac_exeext conftest.$ac_ext
16801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16802 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16803 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16805 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16809 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16810 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16811 $as_echo_n "(cached) " >&6
16812 else
16813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16814 /* end confdefs.h. */
16815 #include <stdio.h>
16816 #if defined(HAVE_READLINE_READLINE_H)
16817 #include <readline/readline.h>
16818 #elif defined(HAVE_EDITLINE_READLINE_H)
16819 #include <editline/readline.h>
16820 #elif defined(HAVE_READLINE_H)
16821 #include <readline.h>
16822 #endif
16825 main ()
16827 rl_completion_suppress_quote = 1;
16829 return 0;
16831 _ACEOF
16832 if ac_fn_c_try_link "$LINENO"; then :
16833 pgac_cv_var_rl_completion_suppress_quote=yes
16834 else
16835 pgac_cv_var_rl_completion_suppress_quote=no
16837 rm -f core conftest.err conftest.$ac_objext \
16838 conftest$ac_exeext conftest.$ac_ext
16840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16841 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16842 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16844 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16848 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16849 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16850 $as_echo_n "(cached) " >&6
16851 else
16852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16853 /* end confdefs.h. */
16854 #include <stdio.h>
16855 #if defined(HAVE_READLINE_READLINE_H)
16856 #include <readline/readline.h>
16857 #elif defined(HAVE_EDITLINE_READLINE_H)
16858 #include <editline/readline.h>
16859 #elif defined(HAVE_READLINE_H)
16860 #include <readline.h>
16861 #endif
16864 main ()
16866 rl_filename_quote_characters = "x";
16868 return 0;
16870 _ACEOF
16871 if ac_fn_c_try_link "$LINENO"; then :
16872 pgac_cv_var_rl_filename_quote_characters=yes
16873 else
16874 pgac_cv_var_rl_filename_quote_characters=no
16876 rm -f core conftest.err conftest.$ac_objext \
16877 conftest$ac_exeext conftest.$ac_ext
16879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16880 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16881 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16883 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16887 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16888 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16889 $as_echo_n "(cached) " >&6
16890 else
16891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16892 /* end confdefs.h. */
16893 #include <stdio.h>
16894 #if defined(HAVE_READLINE_READLINE_H)
16895 #include <readline/readline.h>
16896 #elif defined(HAVE_EDITLINE_READLINE_H)
16897 #include <editline/readline.h>
16898 #elif defined(HAVE_READLINE_H)
16899 #include <readline.h>
16900 #endif
16903 main ()
16905 rl_filename_quoting_function = 0;
16907 return 0;
16909 _ACEOF
16910 if ac_fn_c_try_link "$LINENO"; then :
16911 pgac_cv_var_rl_filename_quoting_function=yes
16912 else
16913 pgac_cv_var_rl_filename_quoting_function=no
16915 rm -f core conftest.err conftest.$ac_objext \
16916 conftest$ac_exeext conftest.$ac_ext
16918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16919 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16920 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16922 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16926 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16927 do :
16928 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16929 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16930 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16931 cat >>confdefs.h <<_ACEOF
16932 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16933 _ACEOF
16936 done
16938 for ac_func in append_history history_truncate_file
16939 do :
16940 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16941 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16942 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16943 cat >>confdefs.h <<_ACEOF
16944 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16945 _ACEOF
16948 done
16953 # This test makes sure that run tests work at all. Sometimes a shared
16954 # library is found by the linker, but the runtime linker can't find it.
16955 # This check should come after all modifications of compiler or linker
16956 # variables, and before any other run tests.
16957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16958 $as_echo_n "checking test program... " >&6; }
16959 if test "$cross_compiling" = yes; then :
16960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16961 $as_echo "cross-compiling" >&6; }
16962 else
16963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16964 /* end confdefs.h. */
16965 int main() { return 0; }
16966 _ACEOF
16967 if ac_fn_c_try_run "$LINENO"; then :
16968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16969 $as_echo "ok" >&6; }
16970 else
16971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16972 $as_echo "failed" >&6; }
16973 as_fn_error $? "
16974 Could not execute a simple test program. This may be a problem
16975 related to locating shared libraries. Check the file 'config.log'
16976 for the exact reason." "$LINENO" 5
16978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16979 conftest.$ac_objext conftest.beam conftest.$ac_ext
16983 # --------------------
16984 # Run tests below here
16985 # --------------------
16988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16989 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16990 if ${pgac_cv_type_long_int_64+:} false; then :
16991 $as_echo_n "(cached) " >&6
16992 else
16993 if test "$cross_compiling" = yes; then :
16994 # If cross-compiling, check the size reported by the compiler and
16995 # trust that the arithmetic works.
16996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16997 /* end confdefs.h. */
17000 main ()
17002 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17003 test_array [0] = 0;
17004 return test_array [0];
17007 return 0;
17009 _ACEOF
17010 if ac_fn_c_try_compile "$LINENO"; then :
17011 pgac_cv_type_long_int_64=yes
17012 else
17013 pgac_cv_type_long_int_64=no
17015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17016 else
17017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17018 /* end confdefs.h. */
17019 typedef long int ac_int64;
17022 * These are globals to discourage the compiler from folding all the
17023 * arithmetic tests down to compile-time constants.
17025 ac_int64 a = 20000001;
17026 ac_int64 b = 40000005;
17028 int does_int64_work()
17030 ac_int64 c,d;
17032 if (sizeof(ac_int64) != 8)
17033 return 0; /* definitely not the right size */
17035 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17036 c = a * b;
17037 d = (c + b) / b;
17038 if (d != a+1)
17039 return 0;
17040 return 1;
17044 main() {
17045 return (! does_int64_work());
17047 _ACEOF
17048 if ac_fn_c_try_run "$LINENO"; then :
17049 pgac_cv_type_long_int_64=yes
17050 else
17051 pgac_cv_type_long_int_64=no
17053 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17054 conftest.$ac_objext conftest.beam conftest.$ac_ext
17058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
17059 $as_echo "$pgac_cv_type_long_int_64" >&6; }
17061 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17062 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17064 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
17069 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
17070 pg_int64_type="long int"
17071 else
17072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
17073 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
17074 if ${pgac_cv_type_long_long_int_64+:} false; then :
17075 $as_echo_n "(cached) " >&6
17076 else
17077 if test "$cross_compiling" = yes; then :
17078 # If cross-compiling, check the size reported by the compiler and
17079 # trust that the arithmetic works.
17080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17081 /* end confdefs.h. */
17084 main ()
17086 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17087 test_array [0] = 0;
17088 return test_array [0];
17091 return 0;
17093 _ACEOF
17094 if ac_fn_c_try_compile "$LINENO"; then :
17095 pgac_cv_type_long_long_int_64=yes
17096 else
17097 pgac_cv_type_long_long_int_64=no
17099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17100 else
17101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17102 /* end confdefs.h. */
17103 typedef long long int ac_int64;
17106 * These are globals to discourage the compiler from folding all the
17107 * arithmetic tests down to compile-time constants.
17109 ac_int64 a = 20000001;
17110 ac_int64 b = 40000005;
17112 int does_int64_work()
17114 ac_int64 c,d;
17116 if (sizeof(ac_int64) != 8)
17117 return 0; /* definitely not the right size */
17119 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17120 c = a * b;
17121 d = (c + b) / b;
17122 if (d != a+1)
17123 return 0;
17124 return 1;
17128 main() {
17129 return (! does_int64_work());
17131 _ACEOF
17132 if ac_fn_c_try_run "$LINENO"; then :
17133 pgac_cv_type_long_long_int_64=yes
17134 else
17135 pgac_cv_type_long_long_int_64=no
17137 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17138 conftest.$ac_objext conftest.beam conftest.$ac_ext
17142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17143 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17145 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17146 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17148 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17152 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17153 pg_int64_type="long long int"
17154 else
17155 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17160 cat >>confdefs.h <<_ACEOF
17161 #define PG_INT64_TYPE $pg_int64_type
17162 _ACEOF
17165 # Select the printf length modifier that goes with that, too.
17166 if test x"$pg_int64_type" = x"long long int" ; then
17167 INT64_MODIFIER='"ll"'
17168 else
17169 INT64_MODIFIER='"l"'
17173 cat >>confdefs.h <<_ACEOF
17174 #define INT64_MODIFIER $INT64_MODIFIER
17175 _ACEOF
17178 # has to be down here, rather than with the other builtins, because
17179 # the test uses PG_INT64_TYPE.
17180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17181 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17182 if ${pgac_cv__builtin_op_overflow+:} false; then :
17183 $as_echo_n "(cached) " >&6
17184 else
17185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17186 /* end confdefs.h. */
17188 PG_INT64_TYPE a = 1;
17189 PG_INT64_TYPE b = 1;
17190 PG_INT64_TYPE result;
17191 int oflo;
17194 main ()
17196 oflo = __builtin_mul_overflow(a, b, &result);
17198 return 0;
17200 _ACEOF
17201 if ac_fn_c_try_link "$LINENO"; then :
17202 pgac_cv__builtin_op_overflow=yes
17203 else
17204 pgac_cv__builtin_op_overflow=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__builtin_op_overflow" >&5
17210 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17211 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17213 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17217 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17218 # The cast to long int works around a bug in the HP C Compiler
17219 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17220 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17221 # This bug is HP SR number 8606223364.
17222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17223 $as_echo_n "checking size of void *... " >&6; }
17224 if ${ac_cv_sizeof_void_p+:} false; then :
17225 $as_echo_n "(cached) " >&6
17226 else
17227 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17229 else
17230 if test "$ac_cv_type_void_p" = yes; then
17231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17232 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17233 as_fn_error 77 "cannot compute sizeof (void *)
17234 See \`config.log' for more details" "$LINENO" 5; }
17235 else
17236 ac_cv_sizeof_void_p=0
17241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17242 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17246 cat >>confdefs.h <<_ACEOF
17247 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17248 _ACEOF
17251 # The cast to long int works around a bug in the HP C Compiler
17252 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17253 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17254 # This bug is HP SR number 8606223364.
17255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17256 $as_echo_n "checking size of size_t... " >&6; }
17257 if ${ac_cv_sizeof_size_t+:} false; then :
17258 $as_echo_n "(cached) " >&6
17259 else
17260 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17262 else
17263 if test "$ac_cv_type_size_t" = yes; then
17264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17265 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17266 as_fn_error 77 "cannot compute sizeof (size_t)
17267 See \`config.log' for more details" "$LINENO" 5; }
17268 else
17269 ac_cv_sizeof_size_t=0
17274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17275 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17279 cat >>confdefs.h <<_ACEOF
17280 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17281 _ACEOF
17284 # The cast to long int works around a bug in the HP C Compiler
17285 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17286 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17287 # This bug is HP SR number 8606223364.
17288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17289 $as_echo_n "checking size of long... " >&6; }
17290 if ${ac_cv_sizeof_long+:} false; then :
17291 $as_echo_n "(cached) " >&6
17292 else
17293 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17295 else
17296 if test "$ac_cv_type_long" = yes; then
17297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17298 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17299 as_fn_error 77 "cannot compute sizeof (long)
17300 See \`config.log' for more details" "$LINENO" 5; }
17301 else
17302 ac_cv_sizeof_long=0
17307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17308 $as_echo "$ac_cv_sizeof_long" >&6; }
17312 cat >>confdefs.h <<_ACEOF
17313 #define SIZEOF_LONG $ac_cv_sizeof_long
17314 _ACEOF
17318 # Determine memory alignment requirements for the basic C data types.
17320 # The cast to long int works around a bug in the HP C Compiler,
17321 # see AC_CHECK_SIZEOF for more information.
17322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17323 $as_echo_n "checking alignment of short... " >&6; }
17324 if ${ac_cv_alignof_short+:} false; then :
17325 $as_echo_n "(cached) " >&6
17326 else
17327 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17328 #ifndef offsetof
17329 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17330 #endif
17331 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17333 else
17334 if test "$ac_cv_type_short" = yes; then
17335 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17336 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17337 as_fn_error 77 "cannot compute alignment of short
17338 See \`config.log' for more details" "$LINENO" 5; }
17339 else
17340 ac_cv_alignof_short=0
17345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17346 $as_echo "$ac_cv_alignof_short" >&6; }
17350 cat >>confdefs.h <<_ACEOF
17351 #define ALIGNOF_SHORT $ac_cv_alignof_short
17352 _ACEOF
17355 # The cast to long int works around a bug in the HP C Compiler,
17356 # see AC_CHECK_SIZEOF for more information.
17357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17358 $as_echo_n "checking alignment of int... " >&6; }
17359 if ${ac_cv_alignof_int+:} false; then :
17360 $as_echo_n "(cached) " >&6
17361 else
17362 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17363 #ifndef offsetof
17364 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17365 #endif
17366 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17368 else
17369 if test "$ac_cv_type_int" = yes; then
17370 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17371 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17372 as_fn_error 77 "cannot compute alignment of int
17373 See \`config.log' for more details" "$LINENO" 5; }
17374 else
17375 ac_cv_alignof_int=0
17380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17381 $as_echo "$ac_cv_alignof_int" >&6; }
17385 cat >>confdefs.h <<_ACEOF
17386 #define ALIGNOF_INT $ac_cv_alignof_int
17387 _ACEOF
17390 # The cast to long int works around a bug in the HP C Compiler,
17391 # see AC_CHECK_SIZEOF for more information.
17392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17393 $as_echo_n "checking alignment of long... " >&6; }
17394 if ${ac_cv_alignof_long+:} false; then :
17395 $as_echo_n "(cached) " >&6
17396 else
17397 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17398 #ifndef offsetof
17399 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17400 #endif
17401 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17403 else
17404 if test "$ac_cv_type_long" = yes; then
17405 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17407 as_fn_error 77 "cannot compute alignment of long
17408 See \`config.log' for more details" "$LINENO" 5; }
17409 else
17410 ac_cv_alignof_long=0
17415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17416 $as_echo "$ac_cv_alignof_long" >&6; }
17420 cat >>confdefs.h <<_ACEOF
17421 #define ALIGNOF_LONG $ac_cv_alignof_long
17422 _ACEOF
17425 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17426 # The cast to long int works around a bug in the HP C Compiler,
17427 # see AC_CHECK_SIZEOF for more information.
17428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17429 $as_echo_n "checking alignment of long long int... " >&6; }
17430 if ${ac_cv_alignof_long_long_int+:} false; then :
17431 $as_echo_n "(cached) " >&6
17432 else
17433 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17434 #ifndef offsetof
17435 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17436 #endif
17437 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17439 else
17440 if test "$ac_cv_type_long_long_int" = yes; then
17441 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17442 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17443 as_fn_error 77 "cannot compute alignment of long long int
17444 See \`config.log' for more details" "$LINENO" 5; }
17445 else
17446 ac_cv_alignof_long_long_int=0
17451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17452 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17456 cat >>confdefs.h <<_ACEOF
17457 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17458 _ACEOF
17462 # The cast to long int works around a bug in the HP C Compiler,
17463 # see AC_CHECK_SIZEOF for more information.
17464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17465 $as_echo_n "checking alignment of double... " >&6; }
17466 if ${ac_cv_alignof_double+:} false; then :
17467 $as_echo_n "(cached) " >&6
17468 else
17469 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17470 #ifndef offsetof
17471 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17472 #endif
17473 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17475 else
17476 if test "$ac_cv_type_double" = yes; then
17477 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17478 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17479 as_fn_error 77 "cannot compute alignment of double
17480 See \`config.log' for more details" "$LINENO" 5; }
17481 else
17482 ac_cv_alignof_double=0
17487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17488 $as_echo "$ac_cv_alignof_double" >&6; }
17492 cat >>confdefs.h <<_ACEOF
17493 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17494 _ACEOF
17498 # Compute maximum alignment of any basic type.
17499 # We assume long's alignment is at least as strong as char, short, or int;
17500 # but we must check long long (if it is being used for int64) and double.
17501 # Note that we intentionally do not consider any types wider than 64 bits,
17502 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17503 # for disk and memory space.
17505 MAX_ALIGNOF=$ac_cv_alignof_long
17506 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17507 MAX_ALIGNOF=$ac_cv_alignof_double
17509 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17510 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17513 cat >>confdefs.h <<_ACEOF
17514 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17515 _ACEOF
17519 # Some platforms predefine the types int8, int16, etc. Only check
17520 # a (hopefully) representative subset.
17521 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17523 if test "x$ac_cv_type_int8" = xyes; then :
17525 cat >>confdefs.h <<_ACEOF
17526 #define HAVE_INT8 1
17527 _ACEOF
17531 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17533 if test "x$ac_cv_type_uint8" = xyes; then :
17535 cat >>confdefs.h <<_ACEOF
17536 #define HAVE_UINT8 1
17537 _ACEOF
17541 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17543 if test "x$ac_cv_type_int64" = xyes; then :
17545 cat >>confdefs.h <<_ACEOF
17546 #define HAVE_INT64 1
17547 _ACEOF
17551 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17553 if test "x$ac_cv_type_uint64" = xyes; then :
17555 cat >>confdefs.h <<_ACEOF
17556 #define HAVE_UINT64 1
17557 _ACEOF
17563 # Some compilers offer a 128-bit integer scalar type.
17564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17565 $as_echo_n "checking for __int128... " >&6; }
17566 if ${pgac_cv__128bit_int+:} false; then :
17567 $as_echo_n "(cached) " >&6
17568 else
17569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17570 /* end confdefs.h. */
17573 * We don't actually run this test, just link it to verify that any support
17574 * functions needed for __int128 are present.
17576 * These are globals to discourage the compiler from folding all the
17577 * arithmetic tests down to compile-time constants. We do not have
17578 * convenient support for 128bit literals at this point...
17580 __int128 a = 48828125;
17581 __int128 b = 97656250;
17584 main ()
17587 __int128 c,d;
17588 a = (a << 12) + 1; /* 200000000001 */
17589 b = (b << 12) + 5; /* 400000000005 */
17590 /* try the most relevant arithmetic ops */
17591 c = a * b;
17592 d = (c + b) / b;
17593 /* must use the results, else compiler may optimize arithmetic away */
17594 if (d != a+1)
17595 return 1;
17598 return 0;
17600 _ACEOF
17601 if ac_fn_c_try_link "$LINENO"; then :
17602 pgac_cv__128bit_int=yes
17603 else
17604 pgac_cv__128bit_int=no
17606 rm -f core conftest.err conftest.$ac_objext \
17607 conftest$ac_exeext conftest.$ac_ext
17609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17610 $as_echo "$pgac_cv__128bit_int" >&6; }
17611 if test x"$pgac_cv__128bit_int" = xyes ; then
17612 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17613 # If not cross-compiling, we can test for bugs and disable use of __int128
17614 # with buggy compilers. If cross-compiling, hope for the best.
17615 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17617 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17618 if ${pgac_cv__128bit_int_bug+:} false; then :
17619 $as_echo_n "(cached) " >&6
17620 else
17621 if test "$cross_compiling" = yes; then :
17622 pgac_cv__128bit_int_bug="assuming ok"
17623 else
17624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17625 /* end confdefs.h. */
17627 /* This must match the corresponding code in c.h: */
17628 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17629 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17630 #endif
17631 typedef __int128 int128a
17632 #if defined(pg_attribute_aligned)
17633 pg_attribute_aligned(8)
17634 #endif
17636 int128a holder;
17637 void pass_by_val(void *buffer, int128a par) { holder = par; }
17640 main ()
17643 long int i64 = 97656225L << 12;
17644 int128a q;
17645 pass_by_val(main, (int128a) i64);
17646 q = (int128a) i64;
17647 if (q != holder)
17648 return 1;
17651 return 0;
17653 _ACEOF
17654 if ac_fn_c_try_run "$LINENO"; then :
17655 pgac_cv__128bit_int_bug=ok
17656 else
17657 pgac_cv__128bit_int_bug=broken
17659 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17660 conftest.$ac_objext conftest.beam conftest.$ac_ext
17664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17665 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17666 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17668 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17670 # The cast to long int works around a bug in the HP C Compiler,
17671 # see AC_CHECK_SIZEOF for more information.
17672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17673 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17674 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17675 $as_echo_n "(cached) " >&6
17676 else
17677 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17678 #ifndef offsetof
17679 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17680 #endif
17681 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17683 else
17684 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17685 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17686 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17687 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17688 See \`config.log' for more details" "$LINENO" 5; }
17689 else
17690 ac_cv_alignof_PG_INT128_TYPE=0
17695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17696 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17700 cat >>confdefs.h <<_ACEOF
17701 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17702 _ACEOF
17708 # Check for various atomic operations now that we have checked how to declare
17709 # 64bit integers.
17710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17711 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17712 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17713 $as_echo_n "(cached) " >&6
17714 else
17715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17716 /* end confdefs.h. */
17719 main ()
17721 char lock = 0;
17722 __sync_lock_test_and_set(&lock, 1);
17723 __sync_lock_release(&lock);
17725 return 0;
17727 _ACEOF
17728 if ac_fn_c_try_link "$LINENO"; then :
17729 pgac_cv_gcc_sync_char_tas="yes"
17730 else
17731 pgac_cv_gcc_sync_char_tas="no"
17733 rm -f core conftest.err conftest.$ac_objext \
17734 conftest$ac_exeext conftest.$ac_ext
17736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17737 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17738 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17740 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17744 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17745 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17746 $as_echo_n "(cached) " >&6
17747 else
17748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17749 /* end confdefs.h. */
17752 main ()
17754 int lock = 0;
17755 __sync_lock_test_and_set(&lock, 1);
17756 __sync_lock_release(&lock);
17758 return 0;
17760 _ACEOF
17761 if ac_fn_c_try_link "$LINENO"; then :
17762 pgac_cv_gcc_sync_int32_tas="yes"
17763 else
17764 pgac_cv_gcc_sync_int32_tas="no"
17766 rm -f core conftest.err conftest.$ac_objext \
17767 conftest$ac_exeext conftest.$ac_ext
17769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17770 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17771 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17773 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17777 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17778 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17779 $as_echo_n "(cached) " >&6
17780 else
17781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17782 /* end confdefs.h. */
17785 main ()
17787 int val = 0;
17788 __sync_val_compare_and_swap(&val, 0, 37);
17790 return 0;
17792 _ACEOF
17793 if ac_fn_c_try_link "$LINENO"; then :
17794 pgac_cv_gcc_sync_int32_cas="yes"
17795 else
17796 pgac_cv_gcc_sync_int32_cas="no"
17798 rm -f core conftest.err conftest.$ac_objext \
17799 conftest$ac_exeext conftest.$ac_ext
17801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17802 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17803 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17805 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17809 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17810 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17811 $as_echo_n "(cached) " >&6
17812 else
17813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17814 /* end confdefs.h. */
17817 main ()
17819 PG_INT64_TYPE lock = 0;
17820 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17822 return 0;
17824 _ACEOF
17825 if ac_fn_c_try_link "$LINENO"; then :
17826 pgac_cv_gcc_sync_int64_cas="yes"
17827 else
17828 pgac_cv_gcc_sync_int64_cas="no"
17830 rm -f core conftest.err conftest.$ac_objext \
17831 conftest$ac_exeext conftest.$ac_ext
17833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17834 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17835 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17837 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17841 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17842 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17843 $as_echo_n "(cached) " >&6
17844 else
17845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17846 /* end confdefs.h. */
17849 main ()
17851 int val = 0;
17852 int expect = 0;
17853 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17855 return 0;
17857 _ACEOF
17858 if ac_fn_c_try_link "$LINENO"; then :
17859 pgac_cv_gcc_atomic_int32_cas="yes"
17860 else
17861 pgac_cv_gcc_atomic_int32_cas="no"
17863 rm -f core conftest.err conftest.$ac_objext \
17864 conftest$ac_exeext conftest.$ac_ext
17866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17867 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17868 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17870 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17874 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17875 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17876 $as_echo_n "(cached) " >&6
17877 else
17878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17879 /* end confdefs.h. */
17882 main ()
17884 PG_INT64_TYPE val = 0;
17885 PG_INT64_TYPE expect = 0;
17886 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17888 return 0;
17890 _ACEOF
17891 if ac_fn_c_try_link "$LINENO"; then :
17892 pgac_cv_gcc_atomic_int64_cas="yes"
17893 else
17894 pgac_cv_gcc_atomic_int64_cas="no"
17896 rm -f core conftest.err conftest.$ac_objext \
17897 conftest$ac_exeext conftest.$ac_ext
17899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17900 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17901 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17903 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17908 # Check for x86 cpuid instruction
17909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17910 $as_echo_n "checking for __get_cpuid... " >&6; }
17911 if ${pgac_cv__get_cpuid+:} false; then :
17912 $as_echo_n "(cached) " >&6
17913 else
17914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17915 /* end confdefs.h. */
17916 #include <cpuid.h>
17918 main ()
17920 unsigned int exx[4] = {0, 0, 0, 0};
17921 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17924 return 0;
17926 _ACEOF
17927 if ac_fn_c_try_link "$LINENO"; then :
17928 pgac_cv__get_cpuid="yes"
17929 else
17930 pgac_cv__get_cpuid="no"
17932 rm -f core conftest.err conftest.$ac_objext \
17933 conftest$ac_exeext conftest.$ac_ext
17935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17936 $as_echo "$pgac_cv__get_cpuid" >&6; }
17937 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17939 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17944 $as_echo_n "checking for __cpuid... " >&6; }
17945 if ${pgac_cv__cpuid+:} false; then :
17946 $as_echo_n "(cached) " >&6
17947 else
17948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17949 /* end confdefs.h. */
17950 #include <intrin.h>
17952 main ()
17954 unsigned int exx[4] = {0, 0, 0, 0};
17955 __get_cpuid(exx[0], 1);
17958 return 0;
17960 _ACEOF
17961 if ac_fn_c_try_link "$LINENO"; then :
17962 pgac_cv__cpuid="yes"
17963 else
17964 pgac_cv__cpuid="no"
17966 rm -f core conftest.err conftest.$ac_objext \
17967 conftest$ac_exeext conftest.$ac_ext
17969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17970 $as_echo "$pgac_cv__cpuid" >&6; }
17971 if test x"$pgac_cv__cpuid" = x"yes"; then
17973 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17977 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17979 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17980 # with the default compiler flags. If not, check if adding the -msse4.2
17981 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17983 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17984 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17985 $as_echo_n "(cached) " >&6
17986 else
17987 pgac_save_CFLAGS=$CFLAGS
17988 CFLAGS="$pgac_save_CFLAGS "
17989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17990 /* end confdefs.h. */
17991 #include <nmmintrin.h>
17993 main ()
17995 unsigned int crc = 0;
17996 crc = _mm_crc32_u8(crc, 0);
17997 crc = _mm_crc32_u32(crc, 0);
17998 /* return computed value, to prevent the above being optimized away */
17999 return crc == 0;
18001 return 0;
18003 _ACEOF
18004 if ac_fn_c_try_link "$LINENO"; then :
18005 pgac_cv_sse42_crc32_intrinsics_=yes
18006 else
18007 pgac_cv_sse42_crc32_intrinsics_=no
18009 rm -f core conftest.err conftest.$ac_objext \
18010 conftest$ac_exeext conftest.$ac_ext
18011 CFLAGS="$pgac_save_CFLAGS"
18013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
18014 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
18015 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
18016 CFLAGS_SSE42=""
18017 pgac_sse42_crc32_intrinsics=yes
18020 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
18021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
18022 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
18023 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
18024 $as_echo_n "(cached) " >&6
18025 else
18026 pgac_save_CFLAGS=$CFLAGS
18027 CFLAGS="$pgac_save_CFLAGS -msse4.2"
18028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18029 /* end confdefs.h. */
18030 #include <nmmintrin.h>
18032 main ()
18034 unsigned int crc = 0;
18035 crc = _mm_crc32_u8(crc, 0);
18036 crc = _mm_crc32_u32(crc, 0);
18037 /* return computed value, to prevent the above being optimized away */
18038 return crc == 0;
18040 return 0;
18042 _ACEOF
18043 if ac_fn_c_try_link "$LINENO"; then :
18044 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
18045 else
18046 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
18048 rm -f core conftest.err conftest.$ac_objext \
18049 conftest$ac_exeext conftest.$ac_ext
18050 CFLAGS="$pgac_save_CFLAGS"
18052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
18053 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
18054 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
18055 CFLAGS_SSE42="-msse4.2"
18056 pgac_sse42_crc32_intrinsics=yes
18062 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18063 # define __SSE4_2__ in that case.
18064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18065 /* end confdefs.h. */
18068 main ()
18071 #ifndef __SSE4_2__
18072 #error __SSE4_2__ not defined
18073 #endif
18076 return 0;
18078 _ACEOF
18079 if ac_fn_c_try_compile "$LINENO"; then :
18080 SSE4_2_TARGETED=1
18082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18084 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18086 # First check if __crc32c* intrinsics can be used with the default compiler
18087 # flags. If not, check if adding -march=armv8-a+crc flag helps.
18088 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
18089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18090 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18091 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18092 $as_echo_n "(cached) " >&6
18093 else
18094 pgac_save_CFLAGS=$CFLAGS
18095 CFLAGS="$pgac_save_CFLAGS "
18096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18097 /* end confdefs.h. */
18098 #include <arm_acle.h>
18100 main ()
18102 unsigned int crc = 0;
18103 crc = __crc32cb(crc, 0);
18104 crc = __crc32ch(crc, 0);
18105 crc = __crc32cw(crc, 0);
18106 crc = __crc32cd(crc, 0);
18107 /* return computed value, to prevent the above being optimized away */
18108 return crc == 0;
18110 return 0;
18112 _ACEOF
18113 if ac_fn_c_try_link "$LINENO"; then :
18114 pgac_cv_armv8_crc32c_intrinsics_=yes
18115 else
18116 pgac_cv_armv8_crc32c_intrinsics_=no
18118 rm -f core conftest.err conftest.$ac_objext \
18119 conftest$ac_exeext conftest.$ac_ext
18120 CFLAGS="$pgac_save_CFLAGS"
18122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18123 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18124 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18125 CFLAGS_ARMV8_CRC32C=""
18126 pgac_armv8_crc32c_intrinsics=yes
18129 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18131 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18132 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18133 $as_echo_n "(cached) " >&6
18134 else
18135 pgac_save_CFLAGS=$CFLAGS
18136 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18138 /* end confdefs.h. */
18139 #include <arm_acle.h>
18141 main ()
18143 unsigned int crc = 0;
18144 crc = __crc32cb(crc, 0);
18145 crc = __crc32ch(crc, 0);
18146 crc = __crc32cw(crc, 0);
18147 crc = __crc32cd(crc, 0);
18148 /* return computed value, to prevent the above being optimized away */
18149 return crc == 0;
18151 return 0;
18153 _ACEOF
18154 if ac_fn_c_try_link "$LINENO"; then :
18155 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18156 else
18157 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18159 rm -f core conftest.err conftest.$ac_objext \
18160 conftest$ac_exeext conftest.$ac_ext
18161 CFLAGS="$pgac_save_CFLAGS"
18163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18164 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18165 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18166 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18167 pgac_armv8_crc32c_intrinsics=yes
18173 # Select CRC-32C implementation.
18175 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18176 # use the special CRC instructions for calculating CRC-32C. If we're not
18177 # targeting such a processor, but we can nevertheless produce code that uses
18178 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18179 # implementations and select which one to use at runtime, depending on whether
18180 # SSE 4.2 is supported by the processor we're running on.
18182 # Similarly, if we are targeting an ARM processor that has the CRC
18183 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18184 # we're not targeting such a processor, but can nevertheless produce code that
18185 # uses the CRC instructions, compile both, and select at runtime.
18187 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18188 # in the template or configure command line.
18189 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
18190 # Use Intel SSE 4.2 if available.
18191 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18192 USE_SSE42_CRC32C=1
18193 else
18194 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18195 # the runtime check.
18196 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
18197 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18198 else
18199 # Use ARM CRC Extension if available.
18200 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18201 USE_ARMV8_CRC32C=1
18202 else
18203 # ARM CRC Extension, with runtime check?
18204 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18205 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18206 else
18207 # fall back to slicing-by-8 algorithm, which doesn't require any
18208 # special CPU support.
18209 USE_SLICING_BY_8_CRC32C=1
18216 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18218 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18219 if test x"$USE_SSE42_CRC32C" = x"1"; then
18221 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18223 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18225 $as_echo "SSE 4.2" >&6; }
18226 else
18227 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18229 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18231 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18233 $as_echo "SSE 4.2 with runtime check" >&6; }
18234 else
18235 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18237 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18239 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18241 $as_echo "ARMv8 CRC instructions" >&6; }
18242 else
18243 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18245 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18247 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18249 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18250 else
18252 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18254 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18256 $as_echo "slicing-by-8" >&6; }
18264 # Select semaphore implementation type.
18265 if test "$PORTNAME" != "win32"; then
18266 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18267 # Need sem_open for this
18268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18269 $as_echo_n "checking for library containing sem_open... " >&6; }
18270 if ${ac_cv_search_sem_open+:} false; then :
18271 $as_echo_n "(cached) " >&6
18272 else
18273 ac_func_search_save_LIBS=$LIBS
18274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18275 /* end confdefs.h. */
18277 /* Override any GCC internal prototype to avoid an error.
18278 Use char because int might match the return type of a GCC
18279 builtin and then its argument prototype would still apply. */
18280 #ifdef __cplusplus
18281 extern "C"
18282 #endif
18283 char sem_open ();
18285 main ()
18287 return sem_open ();
18289 return 0;
18291 _ACEOF
18292 for ac_lib in '' rt pthread; do
18293 if test -z "$ac_lib"; then
18294 ac_res="none required"
18295 else
18296 ac_res=-l$ac_lib
18297 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18299 if ac_fn_c_try_link "$LINENO"; then :
18300 ac_cv_search_sem_open=$ac_res
18302 rm -f core conftest.err conftest.$ac_objext \
18303 conftest$ac_exeext
18304 if ${ac_cv_search_sem_open+:} false; then :
18305 break
18307 done
18308 if ${ac_cv_search_sem_open+:} false; then :
18310 else
18311 ac_cv_search_sem_open=no
18313 rm conftest.$ac_ext
18314 LIBS=$ac_func_search_save_LIBS
18316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18317 $as_echo "$ac_cv_search_sem_open" >&6; }
18318 ac_res=$ac_cv_search_sem_open
18319 if test "$ac_res" != no; then :
18320 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18321 USE_NAMED_POSIX_SEMAPHORES=1
18325 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18326 # Need sem_init for this
18327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18328 $as_echo_n "checking for library containing sem_init... " >&6; }
18329 if ${ac_cv_search_sem_init+:} false; then :
18330 $as_echo_n "(cached) " >&6
18331 else
18332 ac_func_search_save_LIBS=$LIBS
18333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18334 /* end confdefs.h. */
18336 /* Override any GCC internal prototype to avoid an error.
18337 Use char because int might match the return type of a GCC
18338 builtin and then its argument prototype would still apply. */
18339 #ifdef __cplusplus
18340 extern "C"
18341 #endif
18342 char sem_init ();
18344 main ()
18346 return sem_init ();
18348 return 0;
18350 _ACEOF
18351 for ac_lib in '' rt pthread; do
18352 if test -z "$ac_lib"; then
18353 ac_res="none required"
18354 else
18355 ac_res=-l$ac_lib
18356 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18358 if ac_fn_c_try_link "$LINENO"; then :
18359 ac_cv_search_sem_init=$ac_res
18361 rm -f core conftest.err conftest.$ac_objext \
18362 conftest$ac_exeext
18363 if ${ac_cv_search_sem_init+:} false; then :
18364 break
18366 done
18367 if ${ac_cv_search_sem_init+:} false; then :
18369 else
18370 ac_cv_search_sem_init=no
18372 rm conftest.$ac_ext
18373 LIBS=$ac_func_search_save_LIBS
18375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18376 $as_echo "$ac_cv_search_sem_init" >&6; }
18377 ac_res=$ac_cv_search_sem_init
18378 if test "$ac_res" != no; then :
18379 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18380 USE_UNNAMED_POSIX_SEMAPHORES=1
18384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18385 $as_echo_n "checking which semaphore API to use... " >&6; }
18386 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18388 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18390 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18391 sematype="named POSIX"
18392 else
18393 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18395 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18397 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18398 sematype="unnamed POSIX"
18399 else
18401 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18403 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18404 sematype="System V"
18407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18408 $as_echo "$sematype" >&6; }
18409 else
18411 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18413 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18417 # Select shared-memory implementation type.
18418 if test "$PORTNAME" != "win32"; then
18420 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18422 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18423 else
18425 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18427 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18430 # Select random number source
18432 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
18433 # in the template or configure command line.
18435 # If not selected manually, try to select a source automatically.
18436 if test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
18437 if test x"$with_openssl" = x"yes" ; then
18438 USE_OPENSSL_RANDOM=1
18439 elif test "$PORTNAME" = "win32" ; then
18440 USE_WIN32_RANDOM=1
18441 else
18442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18443 $as_echo_n "checking for /dev/urandom... " >&6; }
18444 if ${ac_cv_file__dev_urandom+:} false; then :
18445 $as_echo_n "(cached) " >&6
18446 else
18447 test "$cross_compiling" = yes &&
18448 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18449 if test -r "/dev/urandom"; then
18450 ac_cv_file__dev_urandom=yes
18451 else
18452 ac_cv_file__dev_urandom=no
18455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18456 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18457 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18462 if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
18463 USE_DEV_URANDOM=1
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18469 $as_echo_n "checking which random number source to use... " >&6; }
18470 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
18472 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
18474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18475 $as_echo "OpenSSL" >&6; }
18476 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
18478 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
18480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18481 $as_echo "Windows native" >&6; }
18482 elif test x"$USE_DEV_URANDOM" = x"1" ; then
18484 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
18486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18487 $as_echo "/dev/urandom" >&6; }
18488 else
18489 as_fn_error $? "
18490 no source of strong random numbers was found
18491 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers." "$LINENO" 5
18494 # If not set in template file, set bytes to use libc memset()
18495 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18496 MEMSET_LOOP_LIMIT=1024
18499 cat >>confdefs.h <<_ACEOF
18500 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18501 _ACEOF
18505 if test "$enable_nls" = yes ; then
18507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18508 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18509 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18510 $as_echo_n "(cached) " >&6
18511 else
18512 ac_func_search_save_LIBS=$LIBS
18513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18514 /* end confdefs.h. */
18516 /* Override any GCC internal prototype to avoid an error.
18517 Use char because int might match the return type of a GCC
18518 builtin and then its argument prototype would still apply. */
18519 #ifdef __cplusplus
18520 extern "C"
18521 #endif
18522 char bind_textdomain_codeset ();
18524 main ()
18526 return bind_textdomain_codeset ();
18528 return 0;
18530 _ACEOF
18531 for ac_lib in '' intl; do
18532 if test -z "$ac_lib"; then
18533 ac_res="none required"
18534 else
18535 ac_res=-l$ac_lib
18536 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18538 if ac_fn_c_try_link "$LINENO"; then :
18539 ac_cv_search_bind_textdomain_codeset=$ac_res
18541 rm -f core conftest.err conftest.$ac_objext \
18542 conftest$ac_exeext
18543 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18544 break
18546 done
18547 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18549 else
18550 ac_cv_search_bind_textdomain_codeset=no
18552 rm conftest.$ac_ext
18553 LIBS=$ac_func_search_save_LIBS
18555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18556 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18557 ac_res=$ac_cv_search_bind_textdomain_codeset
18558 if test "$ac_res" != no; then :
18559 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18561 else
18562 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18565 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18566 if test "x$ac_cv_header_libintl_h" = xyes; then :
18568 else
18569 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18573 if test -z "$MSGFMT"; then
18574 for ac_prog in msgfmt
18576 # Extract the first word of "$ac_prog", so it can be a program name with args.
18577 set dummy $ac_prog; ac_word=$2
18578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18579 $as_echo_n "checking for $ac_word... " >&6; }
18580 if ${ac_cv_path_MSGFMT+:} false; then :
18581 $as_echo_n "(cached) " >&6
18582 else
18583 case $MSGFMT in
18584 [\\/]* | ?:[\\/]*)
18585 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18589 for as_dir in $PATH
18591 IFS=$as_save_IFS
18592 test -z "$as_dir" && as_dir=.
18593 for ac_exec_ext in '' $ac_executable_extensions; do
18594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18595 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18597 break 2
18599 done
18600 done
18601 IFS=$as_save_IFS
18604 esac
18606 MSGFMT=$ac_cv_path_MSGFMT
18607 if test -n "$MSGFMT"; then
18608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18609 $as_echo "$MSGFMT" >&6; }
18610 else
18611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18612 $as_echo "no" >&6; }
18616 test -n "$MSGFMT" && break
18617 done
18619 else
18620 # Report the value of MSGFMT in configure's output in all cases.
18621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18622 $as_echo_n "checking for MSGFMT... " >&6; }
18623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18624 $as_echo "$MSGFMT" >&6; }
18627 if test -z "$MSGFMT"; then
18628 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18631 $as_echo_n "checking for msgfmt flags... " >&6; }
18632 if ${pgac_cv_msgfmt_flags+:} false; then :
18633 $as_echo_n "(cached) " >&6
18634 else
18635 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18636 pgac_cv_msgfmt_flags=-c
18639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18640 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18641 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18643 if test -z "$MSGMERGE"; then
18644 for ac_prog in msgmerge
18646 # Extract the first word of "$ac_prog", so it can be a program name with args.
18647 set dummy $ac_prog; ac_word=$2
18648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18649 $as_echo_n "checking for $ac_word... " >&6; }
18650 if ${ac_cv_path_MSGMERGE+:} false; then :
18651 $as_echo_n "(cached) " >&6
18652 else
18653 case $MSGMERGE in
18654 [\\/]* | ?:[\\/]*)
18655 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18659 for as_dir in $PATH
18661 IFS=$as_save_IFS
18662 test -z "$as_dir" && as_dir=.
18663 for ac_exec_ext in '' $ac_executable_extensions; do
18664 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18665 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18667 break 2
18669 done
18670 done
18671 IFS=$as_save_IFS
18674 esac
18676 MSGMERGE=$ac_cv_path_MSGMERGE
18677 if test -n "$MSGMERGE"; then
18678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18679 $as_echo "$MSGMERGE" >&6; }
18680 else
18681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18682 $as_echo "no" >&6; }
18686 test -n "$MSGMERGE" && break
18687 done
18689 else
18690 # Report the value of MSGMERGE in configure's output in all cases.
18691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18692 $as_echo_n "checking for MSGMERGE... " >&6; }
18693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18694 $as_echo "$MSGMERGE" >&6; }
18697 if test -z "$XGETTEXT"; then
18698 for ac_prog in xgettext
18700 # Extract the first word of "$ac_prog", so it can be a program name with args.
18701 set dummy $ac_prog; ac_word=$2
18702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18703 $as_echo_n "checking for $ac_word... " >&6; }
18704 if ${ac_cv_path_XGETTEXT+:} false; then :
18705 $as_echo_n "(cached) " >&6
18706 else
18707 case $XGETTEXT in
18708 [\\/]* | ?:[\\/]*)
18709 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18713 for as_dir in $PATH
18715 IFS=$as_save_IFS
18716 test -z "$as_dir" && as_dir=.
18717 for ac_exec_ext in '' $ac_executable_extensions; do
18718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18719 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18721 break 2
18723 done
18724 done
18725 IFS=$as_save_IFS
18728 esac
18730 XGETTEXT=$ac_cv_path_XGETTEXT
18731 if test -n "$XGETTEXT"; then
18732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18733 $as_echo "$XGETTEXT" >&6; }
18734 else
18735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18736 $as_echo "no" >&6; }
18740 test -n "$XGETTEXT" && break
18741 done
18743 else
18744 # Report the value of XGETTEXT in configure's output in all cases.
18745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18746 $as_echo_n "checking for XGETTEXT... " >&6; }
18747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18748 $as_echo "$XGETTEXT" >&6; }
18754 # Check for Tcl configuration script tclConfig.sh
18755 if test "$with_tcl" = yes; then
18756 if test -z "$TCLSH"; then
18757 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18759 # Extract the first word of "$ac_prog", so it can be a program name with args.
18760 set dummy $ac_prog; ac_word=$2
18761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18762 $as_echo_n "checking for $ac_word... " >&6; }
18763 if ${ac_cv_path_TCLSH+:} false; then :
18764 $as_echo_n "(cached) " >&6
18765 else
18766 case $TCLSH in
18767 [\\/]* | ?:[\\/]*)
18768 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18772 for as_dir in $PATH
18774 IFS=$as_save_IFS
18775 test -z "$as_dir" && as_dir=.
18776 for ac_exec_ext in '' $ac_executable_extensions; do
18777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18778 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18780 break 2
18782 done
18783 done
18784 IFS=$as_save_IFS
18787 esac
18789 TCLSH=$ac_cv_path_TCLSH
18790 if test -n "$TCLSH"; then
18791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18792 $as_echo "$TCLSH" >&6; }
18793 else
18794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18795 $as_echo "no" >&6; }
18799 test -n "$TCLSH" && break
18800 done
18802 else
18803 # Report the value of TCLSH in configure's output in all cases.
18804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18805 $as_echo_n "checking for TCLSH... " >&6; }
18806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18807 $as_echo "$TCLSH" >&6; }
18810 if test x"$TCLSH" = x""; then
18811 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18815 $as_echo_n "checking for tclConfig.sh... " >&6; }
18816 # Let user override test
18817 if test -z "$TCL_CONFIG_SH"; then
18818 pgac_test_dirs="$with_tclconfig"
18820 set X $pgac_test_dirs; shift
18821 if test $# -eq 0; then
18822 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18823 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18824 # On newer macOS, $auto_path frequently doesn't include the place
18825 # where tclConfig.sh actually lives. Append that to the end, so as not
18826 # to break cases where a non-default Tcl installation is being used.
18827 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18828 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18830 set X $pgac_test_dirs; shift
18833 for pgac_dir do
18834 if test -r "$pgac_dir/tclConfig.sh"; then
18835 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18836 break
18838 done
18841 if test -z "$TCL_CONFIG_SH"; then
18842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18843 $as_echo "no" >&6; }
18844 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18845 else
18846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18847 $as_echo "$TCL_CONFIG_SH" >&6; }
18852 . "$TCL_CONFIG_SH"
18853 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18854 eval TCL_LIBS=\"$TCL_LIBS\"
18855 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18856 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18858 if test "$TCL_SHARED_BUILD" != 1; then
18859 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18860 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18862 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18863 ac_save_CPPFLAGS=$CPPFLAGS
18864 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18865 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18866 if test "x$ac_cv_header_tcl_h" = xyes; then :
18868 else
18869 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18873 CPPFLAGS=$ac_save_CPPFLAGS
18876 # check for <perl.h>
18877 if test "$with_perl" = yes; then
18878 ac_save_CPPFLAGS=$CPPFLAGS
18879 CPPFLAGS="$CPPFLAGS $perl_includespec"
18880 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18882 if test "x$ac_cv_header_perl_h" = xyes; then :
18884 else
18885 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18889 # While we're at it, check that we can link to libperl.
18890 # On most platforms, if perl.h is there then libperl.so will be too, but at
18891 # this writing Debian packages them separately. There is no known reason to
18892 # waste cycles on separate probes for the Tcl or Python libraries, though.
18893 # On some Red Hat platforms, the link attempt can fail if we don't use
18894 # CFLAGS_SL while building the test program.
18895 ac_save_CFLAGS=$CFLAGS
18896 CFLAGS="$CFLAGS $CFLAGS_SL"
18897 pgac_save_LIBS=$LIBS
18898 LIBS="$perl_embed_ldflags"
18899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18900 $as_echo_n "checking for libperl... " >&6; }
18901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18902 /* end confdefs.h. */
18904 #include <EXTERN.h>
18905 #include <perl.h>
18908 main ()
18910 perl_alloc();
18912 return 0;
18914 _ACEOF
18915 if ac_fn_c_try_link "$LINENO"; then :
18916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18917 $as_echo "yes" >&6; }
18918 else
18919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18920 $as_echo "no" >&6; }
18921 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18923 rm -f core conftest.err conftest.$ac_objext \
18924 conftest$ac_exeext conftest.$ac_ext
18925 LIBS=$pgac_save_LIBS
18926 CFLAGS=$ac_save_CFLAGS
18927 CPPFLAGS=$ac_save_CPPFLAGS
18930 # check for <Python.h>
18931 if test "$with_python" = yes; then
18932 ac_save_CPPFLAGS=$CPPFLAGS
18933 CPPFLAGS="$python_includespec $CPPFLAGS"
18934 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18935 if test "x$ac_cv_header_Python_h" = xyes; then :
18937 else
18938 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18942 CPPFLAGS=$ac_save_CPPFLAGS
18946 # Check for documentation-building tools
18948 if test -z "$XMLLINT"; then
18949 for ac_prog in xmllint
18951 # Extract the first word of "$ac_prog", so it can be a program name with args.
18952 set dummy $ac_prog; ac_word=$2
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18954 $as_echo_n "checking for $ac_word... " >&6; }
18955 if ${ac_cv_path_XMLLINT+:} false; then :
18956 $as_echo_n "(cached) " >&6
18957 else
18958 case $XMLLINT in
18959 [\\/]* | ?:[\\/]*)
18960 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18964 for as_dir in $PATH
18966 IFS=$as_save_IFS
18967 test -z "$as_dir" && as_dir=.
18968 for ac_exec_ext in '' $ac_executable_extensions; do
18969 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18970 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18972 break 2
18974 done
18975 done
18976 IFS=$as_save_IFS
18979 esac
18981 XMLLINT=$ac_cv_path_XMLLINT
18982 if test -n "$XMLLINT"; then
18983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18984 $as_echo "$XMLLINT" >&6; }
18985 else
18986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18987 $as_echo "no" >&6; }
18991 test -n "$XMLLINT" && break
18992 done
18994 else
18995 # Report the value of XMLLINT in configure's output in all cases.
18996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18997 $as_echo_n "checking for XMLLINT... " >&6; }
18998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18999 $as_echo "$XMLLINT" >&6; }
19002 if test -z "$XSLTPROC"; then
19003 for ac_prog in xsltproc
19005 # Extract the first word of "$ac_prog", so it can be a program name with args.
19006 set dummy $ac_prog; ac_word=$2
19007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19008 $as_echo_n "checking for $ac_word... " >&6; }
19009 if ${ac_cv_path_XSLTPROC+:} false; then :
19010 $as_echo_n "(cached) " >&6
19011 else
19012 case $XSLTPROC in
19013 [\\/]* | ?:[\\/]*)
19014 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19018 for as_dir in $PATH
19020 IFS=$as_save_IFS
19021 test -z "$as_dir" && as_dir=.
19022 for ac_exec_ext in '' $ac_executable_extensions; do
19023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19024 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19026 break 2
19028 done
19029 done
19030 IFS=$as_save_IFS
19033 esac
19035 XSLTPROC=$ac_cv_path_XSLTPROC
19036 if test -n "$XSLTPROC"; then
19037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19038 $as_echo "$XSLTPROC" >&6; }
19039 else
19040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19041 $as_echo "no" >&6; }
19045 test -n "$XSLTPROC" && break
19046 done
19048 else
19049 # Report the value of XSLTPROC in configure's output in all cases.
19050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
19051 $as_echo_n "checking for XSLTPROC... " >&6; }
19052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19053 $as_echo "$XSLTPROC" >&6; }
19056 if test -z "$FOP"; then
19057 for ac_prog in fop
19059 # Extract the first word of "$ac_prog", so it can be a program name with args.
19060 set dummy $ac_prog; ac_word=$2
19061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19062 $as_echo_n "checking for $ac_word... " >&6; }
19063 if ${ac_cv_path_FOP+:} false; then :
19064 $as_echo_n "(cached) " >&6
19065 else
19066 case $FOP in
19067 [\\/]* | ?:[\\/]*)
19068 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19072 for as_dir in $PATH
19074 IFS=$as_save_IFS
19075 test -z "$as_dir" && as_dir=.
19076 for ac_exec_ext in '' $ac_executable_extensions; do
19077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19078 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19080 break 2
19082 done
19083 done
19084 IFS=$as_save_IFS
19087 esac
19089 FOP=$ac_cv_path_FOP
19090 if test -n "$FOP"; then
19091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19092 $as_echo "$FOP" >&6; }
19093 else
19094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19095 $as_echo "no" >&6; }
19099 test -n "$FOP" && break
19100 done
19102 else
19103 # Report the value of FOP in configure's output in all cases.
19104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19105 $as_echo_n "checking for FOP... " >&6; }
19106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19107 $as_echo "$FOP" >&6; }
19110 if test -z "$DBTOEPUB"; then
19111 for ac_prog in dbtoepub
19113 # Extract the first word of "$ac_prog", so it can be a program name with args.
19114 set dummy $ac_prog; ac_word=$2
19115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19116 $as_echo_n "checking for $ac_word... " >&6; }
19117 if ${ac_cv_path_DBTOEPUB+:} false; then :
19118 $as_echo_n "(cached) " >&6
19119 else
19120 case $DBTOEPUB in
19121 [\\/]* | ?:[\\/]*)
19122 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19126 for as_dir in $PATH
19128 IFS=$as_save_IFS
19129 test -z "$as_dir" && as_dir=.
19130 for ac_exec_ext in '' $ac_executable_extensions; do
19131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19132 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19134 break 2
19136 done
19137 done
19138 IFS=$as_save_IFS
19141 esac
19143 DBTOEPUB=$ac_cv_path_DBTOEPUB
19144 if test -n "$DBTOEPUB"; then
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19146 $as_echo "$DBTOEPUB" >&6; }
19147 else
19148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19149 $as_echo "no" >&6; }
19153 test -n "$DBTOEPUB" && break
19154 done
19156 else
19157 # Report the value of DBTOEPUB in configure's output in all cases.
19158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19159 $as_echo_n "checking for DBTOEPUB... " >&6; }
19160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19161 $as_echo "$DBTOEPUB" >&6; }
19166 # Check for test tools
19168 if test "$enable_tap_tests" = yes; then
19169 # Make sure we know where prove is.
19170 if test -z "$PROVE"; then
19171 for ac_prog in prove
19173 # Extract the first word of "$ac_prog", so it can be a program name with args.
19174 set dummy $ac_prog; ac_word=$2
19175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19176 $as_echo_n "checking for $ac_word... " >&6; }
19177 if ${ac_cv_path_PROVE+:} false; then :
19178 $as_echo_n "(cached) " >&6
19179 else
19180 case $PROVE in
19181 [\\/]* | ?:[\\/]*)
19182 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19186 for as_dir in $PATH
19188 IFS=$as_save_IFS
19189 test -z "$as_dir" && as_dir=.
19190 for ac_exec_ext in '' $ac_executable_extensions; do
19191 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19192 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19193 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19194 break 2
19196 done
19197 done
19198 IFS=$as_save_IFS
19201 esac
19203 PROVE=$ac_cv_path_PROVE
19204 if test -n "$PROVE"; then
19205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19206 $as_echo "$PROVE" >&6; }
19207 else
19208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19209 $as_echo "no" >&6; }
19213 test -n "$PROVE" && break
19214 done
19216 else
19217 # Report the value of PROVE in configure's output in all cases.
19218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19219 $as_echo_n "checking for PROVE... " >&6; }
19220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19221 $as_echo "$PROVE" >&6; }
19224 if test -z "$PROVE"; then
19225 as_fn_error $? "prove not found" "$LINENO" 5
19227 # Check for necessary Perl modules. You might think we should use
19228 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19229 # installation than perl, eg on MSys, so we have to check using prove.
19230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19231 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19232 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19233 if test $? -eq 0; then
19234 # log the module version details, but don't show them interactively
19235 echo "$modulestderr" >&5
19236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19237 $as_echo "yes" >&6; }
19238 else
19239 # on failure, though, show the results to the user
19240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19241 $as_echo "$modulestderr" >&6; }
19242 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19246 # Thread testing
19248 # We have to run the thread test near the end so we have all our symbols
19249 # defined. Cross compiling throws a warning.
19251 if test "$enable_thread_safety" = yes; then
19252 if test "$PORTNAME" != "win32"
19253 then
19254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
19255 $as_echo_n "checking thread safety of required library functions... " >&6; }
19257 _CFLAGS="$CFLAGS"
19258 _LIBS="$LIBS"
19259 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
19260 LIBS="$LIBS $PTHREAD_LIBS"
19261 if test "$cross_compiling" = yes; then :
19262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
19263 $as_echo "maybe" >&6; }
19264 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19265 *** Skipping thread test program because of cross-compile build.
19266 *** Run the program in src/test/thread on the target machine.
19267 " >&5
19268 $as_echo "$as_me: WARNING:
19269 *** Skipping thread test program because of cross-compile build.
19270 *** Run the program in src/test/thread on the target machine.
19271 " >&2;}
19272 else
19273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19274 /* end confdefs.h. */
19275 #include "$srcdir/src/test/thread/thread_test.c"
19276 _ACEOF
19277 if ac_fn_c_try_run "$LINENO"; then :
19278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19279 $as_echo "yes" >&6; }
19280 else
19281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19282 $as_echo "no" >&6; }
19283 as_fn_error $? "thread test program failed
19284 This platform is not thread-safe. Check the file 'config.log' or compile
19285 and run src/test/thread/thread_test for the exact reason.
19286 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
19288 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19289 conftest.$ac_objext conftest.beam conftest.$ac_ext
19292 CFLAGS="$_CFLAGS"
19293 LIBS="$_LIBS"
19294 else
19295 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
19296 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
19300 # If compiler will take -Wl,--as-needed (or various platform-specific
19301 # spellings thereof) then add that to LDFLAGS. This is much easier than
19302 # trying to filter LIBS to the minimum for each executable.
19303 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19304 # libreadline; therefore we postpone testing it until we know what library
19305 # dependencies readline has. The test code will try to link with $LIBS.
19306 if test "$with_readline" = yes; then
19307 link_test_func=readline
19308 else
19309 link_test_func=exit
19312 if test "$PORTNAME" = "darwin"; then
19313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19314 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19315 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19316 $as_echo_n "(cached) " >&6
19317 else
19318 pgac_save_LDFLAGS=$LDFLAGS
19319 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19320 if test "$cross_compiling" = yes; then :
19321 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19322 else
19323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19324 /* end confdefs.h. */
19325 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19327 main ()
19331 return 0;
19333 _ACEOF
19334 if ac_fn_c_try_run "$LINENO"; then :
19335 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19336 else
19337 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19340 conftest.$ac_objext conftest.beam conftest.$ac_ext
19343 LDFLAGS="$pgac_save_LDFLAGS"
19345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19346 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19347 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19348 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19351 elif test "$PORTNAME" = "openbsd"; then
19352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19353 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19354 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19355 $as_echo_n "(cached) " >&6
19356 else
19357 pgac_save_LDFLAGS=$LDFLAGS
19358 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19359 if test "$cross_compiling" = yes; then :
19360 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19361 else
19362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19363 /* end confdefs.h. */
19364 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19366 main ()
19370 return 0;
19372 _ACEOF
19373 if ac_fn_c_try_run "$LINENO"; then :
19374 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19375 else
19376 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19379 conftest.$ac_objext conftest.beam conftest.$ac_ext
19382 LDFLAGS="$pgac_save_LDFLAGS"
19384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19385 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19386 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19387 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19390 else
19391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19392 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19393 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19394 $as_echo_n "(cached) " >&6
19395 else
19396 pgac_save_LDFLAGS=$LDFLAGS
19397 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19398 if test "$cross_compiling" = yes; then :
19399 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19400 else
19401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19402 /* end confdefs.h. */
19403 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19405 main ()
19409 return 0;
19411 _ACEOF
19412 if ac_fn_c_try_run "$LINENO"; then :
19413 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19414 else
19415 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19418 conftest.$ac_objext conftest.beam conftest.$ac_ext
19421 LDFLAGS="$pgac_save_LDFLAGS"
19423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19424 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19425 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19426 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19431 # Create compiler version string
19432 if test x"$GCC" = x"yes" ; then
19433 cc_string=`${CC} --version | sed q`
19434 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19435 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19436 cc_string=`${CC} -V 2>&1 | sed q`
19437 else
19438 cc_string=$CC
19442 cat >>confdefs.h <<_ACEOF
19443 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19444 _ACEOF
19447 # Supply a numeric version string for use by 3rd party add-ons
19448 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19449 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19450 $AWK '{printf "%d%04d", $1, $2}'`"
19452 cat >>confdefs.h <<_ACEOF
19453 #define PG_VERSION_NUM $PG_VERSION_NUM
19454 _ACEOF
19458 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19459 # literally, so that it's possible to override it at build time using
19460 # a command like "make ... PG_SYSROOT=path". This has to be done after
19461 # we've finished all configure checks that depend on CPPFLAGS.
19462 # The same for LDFLAGS, too.
19463 if test x"$PG_SYSROOT" != x; then
19464 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19465 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19470 # Begin output steps
19472 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19473 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19474 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19475 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19476 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19477 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19478 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19479 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19480 # Currently only used when LLVM is used
19481 if test "$with_llvm" = yes ; then
19482 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19483 $as_echo "$as_me: using CXX=$CXX" >&6;}
19484 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19485 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19486 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19487 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19488 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19489 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19490 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19491 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19494 # prepare build tree if outside source tree
19495 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19496 # Note 2: /bin/pwd might be better than shell's built-in at getting
19497 # a symlink-free name.
19498 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19499 vpath_build=no
19500 else
19501 vpath_build=yes
19502 if test "$no_create" != yes; then
19503 $as_echo_n "preparing build tree... " >&6
19504 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19505 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19506 || as_fn_error $? "failed" "$LINENO" 5
19507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19508 $as_echo "done" >&6; }
19514 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19517 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}"
19520 if test "$PORTNAME" = "win32"; then
19521 ac_config_commands="$ac_config_commands check_win32_symlinks"
19525 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19528 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19531 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19534 cat >confcache <<\_ACEOF
19535 # This file is a shell script that caches the results of configure
19536 # tests run on this system so they can be shared between configure
19537 # scripts and configure runs, see configure's option --config-cache.
19538 # It is not useful on other systems. If it contains results you don't
19539 # want to keep, you may remove or edit it.
19541 # config.status only pays attention to the cache file if you give it
19542 # the --recheck option to rerun configure.
19544 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19545 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19546 # following values.
19548 _ACEOF
19550 # The following way of writing the cache mishandles newlines in values,
19551 # but we know of no workaround that is simple, portable, and efficient.
19552 # So, we kill variables containing newlines.
19553 # Ultrix sh set writes to stderr and can't be redirected directly,
19554 # and sets the high bit in the cache file unless we assign to the vars.
19556 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19557 eval ac_val=\$$ac_var
19558 case $ac_val in #(
19559 *${as_nl}*)
19560 case $ac_var in #(
19561 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19562 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19563 esac
19564 case $ac_var in #(
19565 _ | IFS | as_nl) ;; #(
19566 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19567 *) { eval $ac_var=; unset $ac_var;} ;;
19568 esac ;;
19569 esac
19570 done
19572 (set) 2>&1 |
19573 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19574 *${as_nl}ac_space=\ *)
19575 # `set' does not quote correctly, so add quotes: double-quote
19576 # substitution turns \\\\ into \\, and sed turns \\ into \.
19577 sed -n \
19578 "s/'/'\\\\''/g;
19579 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19580 ;; #(
19582 # `set' quotes correctly as required by POSIX, so do not add quotes.
19583 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19585 esac |
19586 sort
19588 sed '
19589 /^ac_cv_env_/b end
19590 t clear
19591 :clear
19592 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19593 t end
19594 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19595 :end' >>confcache
19596 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19597 if test -w "$cache_file"; then
19598 if test "x$cache_file" != "x/dev/null"; then
19599 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19600 $as_echo "$as_me: updating cache $cache_file" >&6;}
19601 if test ! -f "$cache_file" || test -h "$cache_file"; then
19602 cat confcache >"$cache_file"
19603 else
19604 case $cache_file in #(
19605 */* | ?:*)
19606 mv -f confcache "$cache_file"$$ &&
19607 mv -f "$cache_file"$$ "$cache_file" ;; #(
19609 mv -f confcache "$cache_file" ;;
19610 esac
19613 else
19614 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19615 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19618 rm -f confcache
19620 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19621 # Let make expand exec_prefix.
19622 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19624 DEFS=-DHAVE_CONFIG_H
19626 ac_libobjs=
19627 ac_ltlibobjs=
19629 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19630 # 1. Remove the extension, and $U if already installed.
19631 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19632 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19633 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19634 # will be set to the directory where LIBOBJS objects are built.
19635 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19636 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19637 done
19638 LIBOBJS=$ac_libobjs
19640 LTLIBOBJS=$ac_ltlibobjs
19645 : "${CONFIG_STATUS=./config.status}"
19646 ac_write_fail=0
19647 ac_clean_files_save=$ac_clean_files
19648 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19649 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19650 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19651 as_write_fail=0
19652 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19653 #! $SHELL
19654 # Generated by $as_me.
19655 # Run this file to recreate the current configuration.
19656 # Compiler output produced by configure, useful for debugging
19657 # configure, is in config.log if it exists.
19659 debug=false
19660 ac_cs_recheck=false
19661 ac_cs_silent=false
19663 SHELL=\${CONFIG_SHELL-$SHELL}
19664 export SHELL
19665 _ASEOF
19666 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19667 ## -------------------- ##
19668 ## M4sh Initialization. ##
19669 ## -------------------- ##
19671 # Be more Bourne compatible
19672 DUALCASE=1; export DUALCASE # for MKS sh
19673 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19674 emulate sh
19675 NULLCMD=:
19676 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19677 # is contrary to our usage. Disable this feature.
19678 alias -g '${1+"$@"}'='"$@"'
19679 setopt NO_GLOB_SUBST
19680 else
19681 case `(set -o) 2>/dev/null` in #(
19682 *posix*) :
19683 set -o posix ;; #(
19684 *) :
19686 esac
19690 as_nl='
19692 export as_nl
19693 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19694 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19695 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19696 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19697 # Prefer a ksh shell builtin over an external printf program on Solaris,
19698 # but without wasting forks for bash or zsh.
19699 if test -z "$BASH_VERSION$ZSH_VERSION" \
19700 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19701 as_echo='print -r --'
19702 as_echo_n='print -rn --'
19703 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19704 as_echo='printf %s\n'
19705 as_echo_n='printf %s'
19706 else
19707 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19708 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19709 as_echo_n='/usr/ucb/echo -n'
19710 else
19711 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19712 as_echo_n_body='eval
19713 arg=$1;
19714 case $arg in #(
19715 *"$as_nl"*)
19716 expr "X$arg" : "X\\(.*\\)$as_nl";
19717 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19718 esac;
19719 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19721 export as_echo_n_body
19722 as_echo_n='sh -c $as_echo_n_body as_echo'
19724 export as_echo_body
19725 as_echo='sh -c $as_echo_body as_echo'
19728 # The user is always right.
19729 if test "${PATH_SEPARATOR+set}" != set; then
19730 PATH_SEPARATOR=:
19731 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19732 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19733 PATH_SEPARATOR=';'
19738 # IFS
19739 # We need space, tab and new line, in precisely that order. Quoting is
19740 # there to prevent editors from complaining about space-tab.
19741 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19742 # splitting by setting IFS to empty value.)
19743 IFS=" "" $as_nl"
19745 # Find who we are. Look in the path if we contain no directory separator.
19746 as_myself=
19747 case $0 in #((
19748 *[\\/]* ) as_myself=$0 ;;
19749 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19750 for as_dir in $PATH
19752 IFS=$as_save_IFS
19753 test -z "$as_dir" && as_dir=.
19754 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19755 done
19756 IFS=$as_save_IFS
19759 esac
19760 # We did not find ourselves, most probably we were run as `sh COMMAND'
19761 # in which case we are not to be found in the path.
19762 if test "x$as_myself" = x; then
19763 as_myself=$0
19765 if test ! -f "$as_myself"; then
19766 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19767 exit 1
19770 # Unset variables that we do not need and which cause bugs (e.g. in
19771 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19772 # suppresses any "Segmentation fault" message there. '((' could
19773 # trigger a bug in pdksh 5.2.14.
19774 for as_var in BASH_ENV ENV MAIL MAILPATH
19775 do eval test x\${$as_var+set} = xset \
19776 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19777 done
19778 PS1='$ '
19779 PS2='> '
19780 PS4='+ '
19782 # NLS nuisances.
19783 LC_ALL=C
19784 export LC_ALL
19785 LANGUAGE=C
19786 export LANGUAGE
19788 # CDPATH.
19789 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19792 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19793 # ----------------------------------------
19794 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19795 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19796 # script with STATUS, using 1 if that was 0.
19797 as_fn_error ()
19799 as_status=$1; test $as_status -eq 0 && as_status=1
19800 if test "$4"; then
19801 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19802 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19804 $as_echo "$as_me: error: $2" >&2
19805 as_fn_exit $as_status
19806 } # as_fn_error
19809 # as_fn_set_status STATUS
19810 # -----------------------
19811 # Set $? to STATUS, without forking.
19812 as_fn_set_status ()
19814 return $1
19815 } # as_fn_set_status
19817 # as_fn_exit STATUS
19818 # -----------------
19819 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19820 as_fn_exit ()
19822 set +e
19823 as_fn_set_status $1
19824 exit $1
19825 } # as_fn_exit
19827 # as_fn_unset VAR
19828 # ---------------
19829 # Portably unset VAR.
19830 as_fn_unset ()
19832 { eval $1=; unset $1;}
19834 as_unset=as_fn_unset
19835 # as_fn_append VAR VALUE
19836 # ----------------------
19837 # Append the text in VALUE to the end of the definition contained in VAR. Take
19838 # advantage of any shell optimizations that allow amortized linear growth over
19839 # repeated appends, instead of the typical quadratic growth present in naive
19840 # implementations.
19841 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19842 eval 'as_fn_append ()
19844 eval $1+=\$2
19846 else
19847 as_fn_append ()
19849 eval $1=\$$1\$2
19851 fi # as_fn_append
19853 # as_fn_arith ARG...
19854 # ------------------
19855 # Perform arithmetic evaluation on the ARGs, and store the result in the
19856 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19857 # must be portable across $(()) and expr.
19858 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19859 eval 'as_fn_arith ()
19861 as_val=$(( $* ))
19863 else
19864 as_fn_arith ()
19866 as_val=`expr "$@" || test $? -eq 1`
19868 fi # as_fn_arith
19871 if expr a : '\(a\)' >/dev/null 2>&1 &&
19872 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19873 as_expr=expr
19874 else
19875 as_expr=false
19878 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19879 as_basename=basename
19880 else
19881 as_basename=false
19884 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19885 as_dirname=dirname
19886 else
19887 as_dirname=false
19890 as_me=`$as_basename -- "$0" ||
19891 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19892 X"$0" : 'X\(//\)$' \| \
19893 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19894 $as_echo X/"$0" |
19895 sed '/^.*\/\([^/][^/]*\)\/*$/{
19896 s//\1/
19899 /^X\/\(\/\/\)$/{
19900 s//\1/
19903 /^X\/\(\/\).*/{
19904 s//\1/
19907 s/.*/./; q'`
19909 # Avoid depending upon Character Ranges.
19910 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19911 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19912 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19913 as_cr_digits='0123456789'
19914 as_cr_alnum=$as_cr_Letters$as_cr_digits
19916 ECHO_C= ECHO_N= ECHO_T=
19917 case `echo -n x` in #(((((
19918 -n*)
19919 case `echo 'xy\c'` in
19920 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19921 xy) ECHO_C='\c';;
19922 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19923 ECHO_T=' ';;
19924 esac;;
19926 ECHO_N='-n';;
19927 esac
19929 rm -f conf$$ conf$$.exe conf$$.file
19930 if test -d conf$$.dir; then
19931 rm -f conf$$.dir/conf$$.file
19932 else
19933 rm -f conf$$.dir
19934 mkdir conf$$.dir 2>/dev/null
19936 if (echo >conf$$.file) 2>/dev/null; then
19937 if ln -s conf$$.file conf$$ 2>/dev/null; then
19938 as_ln_s='ln -s'
19939 # ... but there are two gotchas:
19940 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19941 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19942 # In both cases, we have to default to `cp -pR'.
19943 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19944 as_ln_s='cp -pR'
19945 elif ln conf$$.file conf$$ 2>/dev/null; then
19946 as_ln_s=ln
19947 else
19948 as_ln_s='cp -pR'
19950 else
19951 as_ln_s='cp -pR'
19953 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19954 rmdir conf$$.dir 2>/dev/null
19957 # as_fn_mkdir_p
19958 # -------------
19959 # Create "$as_dir" as a directory, including parents if necessary.
19960 as_fn_mkdir_p ()
19963 case $as_dir in #(
19964 -*) as_dir=./$as_dir;;
19965 esac
19966 test -d "$as_dir" || eval $as_mkdir_p || {
19967 as_dirs=
19968 while :; do
19969 case $as_dir in #(
19970 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19971 *) as_qdir=$as_dir;;
19972 esac
19973 as_dirs="'$as_qdir' $as_dirs"
19974 as_dir=`$as_dirname -- "$as_dir" ||
19975 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19976 X"$as_dir" : 'X\(//\)[^/]' \| \
19977 X"$as_dir" : 'X\(//\)$' \| \
19978 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19979 $as_echo X"$as_dir" |
19980 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19981 s//\1/
19984 /^X\(\/\/\)[^/].*/{
19985 s//\1/
19988 /^X\(\/\/\)$/{
19989 s//\1/
19992 /^X\(\/\).*/{
19993 s//\1/
19996 s/.*/./; q'`
19997 test -d "$as_dir" && break
19998 done
19999 test -z "$as_dirs" || eval "mkdir $as_dirs"
20000 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20003 } # as_fn_mkdir_p
20004 if mkdir -p . 2>/dev/null; then
20005 as_mkdir_p='mkdir -p "$as_dir"'
20006 else
20007 test -d ./-p && rmdir ./-p
20008 as_mkdir_p=false
20012 # as_fn_executable_p FILE
20013 # -----------------------
20014 # Test if FILE is an executable regular file.
20015 as_fn_executable_p ()
20017 test -f "$1" && test -x "$1"
20018 } # as_fn_executable_p
20019 as_test_x='test -x'
20020 as_executable_p=as_fn_executable_p
20022 # Sed expression to map a string onto a valid CPP name.
20023 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20025 # Sed expression to map a string onto a valid variable name.
20026 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20029 exec 6>&1
20030 ## ----------------------------------- ##
20031 ## Main body of $CONFIG_STATUS script. ##
20032 ## ----------------------------------- ##
20033 _ASEOF
20034 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20036 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20037 # Save the log message, to keep $0 and so on meaningful, and to
20038 # report actual input values of CONFIG_FILES etc. instead of their
20039 # values after options handling.
20040 ac_log="
20041 This file was extended by PostgreSQL $as_me 13.16, which was
20042 generated by GNU Autoconf 2.69. Invocation command line was
20044 CONFIG_FILES = $CONFIG_FILES
20045 CONFIG_HEADERS = $CONFIG_HEADERS
20046 CONFIG_LINKS = $CONFIG_LINKS
20047 CONFIG_COMMANDS = $CONFIG_COMMANDS
20048 $ $0 $@
20050 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20053 _ACEOF
20055 case $ac_config_files in *"
20056 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20057 esac
20059 case $ac_config_headers in *"
20060 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20061 esac
20064 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20065 # Files that config.status was made for.
20066 config_files="$ac_config_files"
20067 config_headers="$ac_config_headers"
20068 config_links="$ac_config_links"
20069 config_commands="$ac_config_commands"
20071 _ACEOF
20073 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20074 ac_cs_usage="\
20075 \`$as_me' instantiates files and other configuration actions
20076 from templates according to the current configuration. Unless the files
20077 and actions are specified as TAGs, all are instantiated by default.
20079 Usage: $0 [OPTION]... [TAG]...
20081 -h, --help print this help, then exit
20082 -V, --version print version number and configuration settings, then exit
20083 --config print configuration, then exit
20084 -q, --quiet, --silent
20085 do not print progress messages
20086 -d, --debug don't remove temporary files
20087 --recheck update $as_me by reconfiguring in the same conditions
20088 --file=FILE[:TEMPLATE]
20089 instantiate the configuration file FILE
20090 --header=FILE[:TEMPLATE]
20091 instantiate the configuration header FILE
20093 Configuration files:
20094 $config_files
20096 Configuration headers:
20097 $config_headers
20099 Configuration links:
20100 $config_links
20102 Configuration commands:
20103 $config_commands
20105 Report bugs to <pgsql-bugs@lists.postgresql.org>.
20106 PostgreSQL home page: <https://www.postgresql.org/>."
20108 _ACEOF
20109 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20110 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20111 ac_cs_version="\\
20112 PostgreSQL config.status 13.16
20113 configured by $0, generated by GNU Autoconf 2.69,
20114 with options \\"\$ac_cs_config\\"
20116 Copyright (C) 2012 Free Software Foundation, Inc.
20117 This config.status script is free software; the Free Software Foundation
20118 gives unlimited permission to copy, distribute and modify it."
20120 ac_pwd='$ac_pwd'
20121 srcdir='$srcdir'
20122 INSTALL='$INSTALL'
20123 MKDIR_P='$MKDIR_P'
20124 AWK='$AWK'
20125 test -n "\$AWK" || AWK=awk
20126 _ACEOF
20128 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20129 # The default lists apply if the user does not specify any file.
20130 ac_need_defaults=:
20131 while test $# != 0
20133 case $1 in
20134 --*=?*)
20135 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20136 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20137 ac_shift=:
20139 --*=)
20140 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20141 ac_optarg=
20142 ac_shift=:
20145 ac_option=$1
20146 ac_optarg=$2
20147 ac_shift=shift
20149 esac
20151 case $ac_option in
20152 # Handling of the options.
20153 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20154 ac_cs_recheck=: ;;
20155 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20156 $as_echo "$ac_cs_version"; exit ;;
20157 --config | --confi | --conf | --con | --co | --c )
20158 $as_echo "$ac_cs_config"; exit ;;
20159 --debug | --debu | --deb | --de | --d | -d )
20160 debug=: ;;
20161 --file | --fil | --fi | --f )
20162 $ac_shift
20163 case $ac_optarg in
20164 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20165 '') as_fn_error $? "missing file argument" ;;
20166 esac
20167 as_fn_append CONFIG_FILES " '$ac_optarg'"
20168 ac_need_defaults=false;;
20169 --header | --heade | --head | --hea )
20170 $ac_shift
20171 case $ac_optarg in
20172 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20173 esac
20174 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20175 ac_need_defaults=false;;
20176 --he | --h)
20177 # Conflict between --help and --header
20178 as_fn_error $? "ambiguous option: \`$1'
20179 Try \`$0 --help' for more information.";;
20180 --help | --hel | -h )
20181 $as_echo "$ac_cs_usage"; exit ;;
20182 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20183 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20184 ac_cs_silent=: ;;
20186 # This is an error.
20187 -*) as_fn_error $? "unrecognized option: \`$1'
20188 Try \`$0 --help' for more information." ;;
20190 *) as_fn_append ac_config_targets " $1"
20191 ac_need_defaults=false ;;
20193 esac
20194 shift
20195 done
20197 ac_configure_extra_args=
20199 if $ac_cs_silent; then
20200 exec 6>/dev/null
20201 ac_configure_extra_args="$ac_configure_extra_args --silent"
20204 _ACEOF
20205 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20206 if \$ac_cs_recheck; then
20207 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20208 shift
20209 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20210 CONFIG_SHELL='$SHELL'
20211 export CONFIG_SHELL
20212 exec "\$@"
20215 _ACEOF
20216 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20217 exec 5>>config.log
20219 echo
20220 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20221 ## Running $as_me. ##
20222 _ASBOX
20223 $as_echo "$ac_log"
20224 } >&5
20226 _ACEOF
20227 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20228 _ACEOF
20230 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20232 # Handling of arguments.
20233 for ac_config_target in $ac_config_targets
20235 case $ac_config_target in
20236 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20237 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20238 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20239 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20240 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20241 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20242 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20243 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20244 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20245 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20246 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20248 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20249 esac
20250 done
20253 # If the user did not use the arguments to specify the items to instantiate,
20254 # then the envvar interface is used. Set only those that are not.
20255 # We use the long form for the default assignment because of an extremely
20256 # bizarre bug on SunOS 4.1.3.
20257 if $ac_need_defaults; then
20258 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20259 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20260 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20261 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20264 # Have a temporary directory for convenience. Make it in the build tree
20265 # simply because there is no reason against having it here, and in addition,
20266 # creating and moving files from /tmp can sometimes cause problems.
20267 # Hook for its removal unless debugging.
20268 # Note that there is a small window in which the directory will not be cleaned:
20269 # after its creation but before its name has been assigned to `$tmp'.
20270 $debug ||
20272 tmp= ac_tmp=
20273 trap 'exit_status=$?
20274 : "${ac_tmp:=$tmp}"
20275 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20277 trap 'as_fn_exit 1' 1 2 13 15
20279 # Create a (secure) tmp directory for tmp files.
20282 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20283 test -d "$tmp"
20284 } ||
20286 tmp=./conf$$-$RANDOM
20287 (umask 077 && mkdir "$tmp")
20288 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20289 ac_tmp=$tmp
20291 # Set up the scripts for CONFIG_FILES section.
20292 # No need to generate them if there are no CONFIG_FILES.
20293 # This happens for instance with `./config.status config.h'.
20294 if test -n "$CONFIG_FILES"; then
20297 ac_cr=`echo X | tr X '\015'`
20298 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20299 # But we know of no other shell where ac_cr would be empty at this
20300 # point, so we can use a bashism as a fallback.
20301 if test "x$ac_cr" = x; then
20302 eval ac_cr=\$\'\\r\'
20304 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20305 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20306 ac_cs_awk_cr='\\r'
20307 else
20308 ac_cs_awk_cr=$ac_cr
20311 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20312 _ACEOF
20316 echo "cat >conf$$subs.awk <<_ACEOF" &&
20317 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20318 echo "_ACEOF"
20319 } >conf$$subs.sh ||
20320 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20321 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20322 ac_delim='%!_!# '
20323 for ac_last_try in false false false false false :; do
20324 . ./conf$$subs.sh ||
20325 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20327 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20328 if test $ac_delim_n = $ac_delim_num; then
20329 break
20330 elif $ac_last_try; then
20331 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20332 else
20333 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20335 done
20336 rm -f conf$$subs.sh
20338 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20339 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20340 _ACEOF
20341 sed -n '
20343 s/^/S["/; s/!.*/"]=/
20346 s/^[^!]*!//
20347 :repl
20348 t repl
20349 s/'"$ac_delim"'$//
20350 t delim
20353 s/\(.\{148\}\)..*/\1/
20354 t more1
20355 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20358 b repl
20359 :more1
20360 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20363 s/.\{148\}//
20364 t nl
20365 :delim
20367 s/\(.\{148\}\)..*/\1/
20368 t more2
20369 s/["\\]/\\&/g; s/^/"/; s/$/"/
20372 :more2
20373 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20376 s/.\{148\}//
20377 t delim
20378 ' <conf$$subs.awk | sed '
20379 /^[^""]/{
20381 s/\n//
20383 ' >>$CONFIG_STATUS || ac_write_fail=1
20384 rm -f conf$$subs.awk
20385 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20386 _ACAWK
20387 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20388 for (key in S) S_is_set[key] = 1
20389 FS = "\a"
20393 line = $ 0
20394 nfields = split(line, field, "@")
20395 substed = 0
20396 len = length(field[1])
20397 for (i = 2; i < nfields; i++) {
20398 key = field[i]
20399 keylen = length(key)
20400 if (S_is_set[key]) {
20401 value = S[key]
20402 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20403 len += length(value) + length(field[++i])
20404 substed = 1
20405 } else
20406 len += 1 + keylen
20409 print line
20412 _ACAWK
20413 _ACEOF
20414 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20415 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20416 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20417 else
20419 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20420 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20421 _ACEOF
20423 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20424 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20425 # trailing colons and then remove the whole line if VPATH becomes empty
20426 # (actually we leave an empty line to preserve line numbers).
20427 if test "x$srcdir" = x.; then
20428 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20430 s///
20431 s/^/:/
20432 s/[ ]*$/:/
20433 s/:\$(srcdir):/:/g
20434 s/:\${srcdir}:/:/g
20435 s/:@srcdir@:/:/g
20436 s/^:*//
20437 s/:*$//
20439 s/\(=[ ]*\).*/\1/
20441 s/\n//
20442 s/^[^=]*=[ ]*$//
20446 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20447 fi # test -n "$CONFIG_FILES"
20449 # Set up the scripts for CONFIG_HEADERS section.
20450 # No need to generate them if there are no CONFIG_HEADERS.
20451 # This happens for instance with `./config.status Makefile'.
20452 if test -n "$CONFIG_HEADERS"; then
20453 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20454 BEGIN {
20455 _ACEOF
20457 # Transform confdefs.h into an awk script `defines.awk', embedded as
20458 # here-document in config.status, that substitutes the proper values into
20459 # config.h.in to produce config.h.
20461 # Create a delimiter string that does not exist in confdefs.h, to ease
20462 # handling of long lines.
20463 ac_delim='%!_!# '
20464 for ac_last_try in false false :; do
20465 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20466 if test -z "$ac_tt"; then
20467 break
20468 elif $ac_last_try; then
20469 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20470 else
20471 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20473 done
20475 # For the awk script, D is an array of macro values keyed by name,
20476 # likewise P contains macro parameters if any. Preserve backslash
20477 # newline sequences.
20479 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20480 sed -n '
20481 s/.\{148\}/&'"$ac_delim"'/g
20482 t rset
20483 :rset
20484 s/^[ ]*#[ ]*define[ ][ ]*/ /
20485 t def
20487 :def
20488 s/\\$//
20489 t bsnl
20490 s/["\\]/\\&/g
20491 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20492 D["\1"]=" \3"/p
20493 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20495 :bsnl
20496 s/["\\]/\\&/g
20497 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20498 D["\1"]=" \3\\\\\\n"\\/p
20499 t cont
20500 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20501 t cont
20503 :cont
20505 s/.\{148\}/&'"$ac_delim"'/g
20506 t clear
20507 :clear
20508 s/\\$//
20509 t bsnlc
20510 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20512 :bsnlc
20513 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20514 b cont
20515 ' <confdefs.h | sed '
20516 s/'"$ac_delim"'/"\\\
20517 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20519 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20520 for (key in D) D_is_set[key] = 1
20521 FS = "\a"
20523 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20524 line = \$ 0
20525 split(line, arg, " ")
20526 if (arg[1] == "#") {
20527 defundef = arg[2]
20528 mac1 = arg[3]
20529 } else {
20530 defundef = substr(arg[1], 2)
20531 mac1 = arg[2]
20533 split(mac1, mac2, "(") #)
20534 macro = mac2[1]
20535 prefix = substr(line, 1, index(line, defundef) - 1)
20536 if (D_is_set[macro]) {
20537 # Preserve the white space surrounding the "#".
20538 print prefix "define", macro P[macro] D[macro]
20539 next
20540 } else {
20541 # Replace #undef with comments. This is necessary, for example,
20542 # in the case of _POSIX_SOURCE, which is predefined and required
20543 # on some systems where configure will not decide to define it.
20544 if (defundef == "undef") {
20545 print "/*", prefix defundef, macro, "*/"
20546 next
20550 { print }
20551 _ACAWK
20552 _ACEOF
20553 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20554 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20555 fi # test -n "$CONFIG_HEADERS"
20558 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20559 shift
20560 for ac_tag
20562 case $ac_tag in
20563 :[FHLC]) ac_mode=$ac_tag; continue;;
20564 esac
20565 case $ac_mode$ac_tag in
20566 :[FHL]*:*);;
20567 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20568 :[FH]-) ac_tag=-:-;;
20569 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20570 esac
20571 ac_save_IFS=$IFS
20572 IFS=:
20573 set x $ac_tag
20574 IFS=$ac_save_IFS
20575 shift
20576 ac_file=$1
20577 shift
20579 case $ac_mode in
20580 :L) ac_source=$1;;
20581 :[FH])
20582 ac_file_inputs=
20583 for ac_f
20585 case $ac_f in
20586 -) ac_f="$ac_tmp/stdin";;
20587 *) # Look for the file first in the build tree, then in the source tree
20588 # (if the path is not absolute). The absolute path cannot be DOS-style,
20589 # because $ac_f cannot contain `:'.
20590 test -f "$ac_f" ||
20591 case $ac_f in
20592 [\\/$]*) false;;
20593 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20594 esac ||
20595 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20596 esac
20597 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20598 as_fn_append ac_file_inputs " '$ac_f'"
20599 done
20601 # Let's still pretend it is `configure' which instantiates (i.e., don't
20602 # use $as_me), people would be surprised to read:
20603 # /* config.h. Generated by config.status. */
20604 configure_input='Generated from '`
20605 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20606 `' by configure.'
20607 if test x"$ac_file" != x-; then
20608 configure_input="$ac_file. $configure_input"
20609 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20610 $as_echo "$as_me: creating $ac_file" >&6;}
20612 # Neutralize special characters interpreted by sed in replacement strings.
20613 case $configure_input in #(
20614 *\&* | *\|* | *\\* )
20615 ac_sed_conf_input=`$as_echo "$configure_input" |
20616 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20617 *) ac_sed_conf_input=$configure_input;;
20618 esac
20620 case $ac_tag in
20621 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20622 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20623 esac
20625 esac
20627 ac_dir=`$as_dirname -- "$ac_file" ||
20628 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20629 X"$ac_file" : 'X\(//\)[^/]' \| \
20630 X"$ac_file" : 'X\(//\)$' \| \
20631 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20632 $as_echo X"$ac_file" |
20633 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20634 s//\1/
20637 /^X\(\/\/\)[^/].*/{
20638 s//\1/
20641 /^X\(\/\/\)$/{
20642 s//\1/
20645 /^X\(\/\).*/{
20646 s//\1/
20649 s/.*/./; q'`
20650 as_dir="$ac_dir"; as_fn_mkdir_p
20651 ac_builddir=.
20653 case "$ac_dir" in
20654 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20656 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20657 # A ".." for each directory in $ac_dir_suffix.
20658 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20659 case $ac_top_builddir_sub in
20660 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20661 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20662 esac ;;
20663 esac
20664 ac_abs_top_builddir=$ac_pwd
20665 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20666 # for backward compatibility:
20667 ac_top_builddir=$ac_top_build_prefix
20669 case $srcdir in
20670 .) # We are building in place.
20671 ac_srcdir=.
20672 ac_top_srcdir=$ac_top_builddir_sub
20673 ac_abs_top_srcdir=$ac_pwd ;;
20674 [\\/]* | ?:[\\/]* ) # Absolute name.
20675 ac_srcdir=$srcdir$ac_dir_suffix;
20676 ac_top_srcdir=$srcdir
20677 ac_abs_top_srcdir=$srcdir ;;
20678 *) # Relative name.
20679 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20680 ac_top_srcdir=$ac_top_build_prefix$srcdir
20681 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20682 esac
20683 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20686 case $ac_mode in
20689 # CONFIG_FILE
20692 case $INSTALL in
20693 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20694 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20695 esac
20696 ac_MKDIR_P=$MKDIR_P
20697 case $MKDIR_P in
20698 [\\/$]* | ?:[\\/]* ) ;;
20699 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20700 esac
20701 _ACEOF
20703 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20704 # If the template does not know about datarootdir, expand it.
20705 # FIXME: This hack should be removed a few years after 2.60.
20706 ac_datarootdir_hack=; ac_datarootdir_seen=
20707 ac_sed_dataroot='
20708 /datarootdir/ {
20712 /@datadir@/p
20713 /@docdir@/p
20714 /@infodir@/p
20715 /@localedir@/p
20716 /@mandir@/p'
20717 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20718 *datarootdir*) ac_datarootdir_seen=yes;;
20719 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20721 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20722 _ACEOF
20723 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20724 ac_datarootdir_hack='
20725 s&@datadir@&$datadir&g
20726 s&@docdir@&$docdir&g
20727 s&@infodir@&$infodir&g
20728 s&@localedir@&$localedir&g
20729 s&@mandir@&$mandir&g
20730 s&\\\${datarootdir}&$datarootdir&g' ;;
20731 esac
20732 _ACEOF
20734 # Neutralize VPATH when `$srcdir' = `.'.
20735 # Shell code in configure.ac might set extrasub.
20736 # FIXME: do we really want to maintain this feature?
20737 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20738 ac_sed_extra="$ac_vpsub
20739 $extrasub
20740 _ACEOF
20741 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20743 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20744 s|@configure_input@|$ac_sed_conf_input|;t t
20745 s&@top_builddir@&$ac_top_builddir_sub&;t t
20746 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20747 s&@srcdir@&$ac_srcdir&;t t
20748 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20749 s&@top_srcdir@&$ac_top_srcdir&;t t
20750 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20751 s&@builddir@&$ac_builddir&;t t
20752 s&@abs_builddir@&$ac_abs_builddir&;t t
20753 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20754 s&@INSTALL@&$ac_INSTALL&;t t
20755 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20756 $ac_datarootdir_hack
20758 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20759 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20761 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20762 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20763 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20764 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20766 which seems to be undefined. Please make sure it is defined" >&5
20767 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20768 which seems to be undefined. Please make sure it is defined" >&2;}
20770 rm -f "$ac_tmp/stdin"
20771 case $ac_file in
20772 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20773 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20774 esac \
20775 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20779 # CONFIG_HEADER
20781 if test x"$ac_file" != x-; then
20783 $as_echo "/* $configure_input */" \
20784 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20785 } >"$ac_tmp/config.h" \
20786 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20787 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20788 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20789 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20790 else
20791 rm -f "$ac_file"
20792 mv "$ac_tmp/config.h" "$ac_file" \
20793 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20795 else
20796 $as_echo "/* $configure_input */" \
20797 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20798 || as_fn_error $? "could not create -" "$LINENO" 5
20803 # CONFIG_LINK
20806 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20808 else
20809 # Prefer the file from the source tree if names are identical.
20810 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20811 ac_source=$srcdir/$ac_source
20814 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20815 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20817 if test ! -r "$ac_source"; then
20818 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20820 rm -f "$ac_file"
20822 # Try a relative symlink, then a hard link, then a copy.
20823 case $ac_source in
20824 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20825 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20826 esac
20827 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20828 ln "$ac_source" "$ac_file" 2>/dev/null ||
20829 cp -p "$ac_source" "$ac_file" ||
20830 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20833 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20834 $as_echo "$as_me: executing $ac_file commands" >&6;}
20836 esac
20839 case $ac_file$ac_mode in
20840 "check_win32_symlinks":C)
20841 # Links sometimes fail undetected on Mingw -
20842 # so here we detect it and warn the user
20843 for FILE in $CONFIG_LINKS
20845 # test -e works for symlinks in the MinGW console
20846 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20847 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20848 done
20850 "src/include/pg_config.h":H)
20851 # Update timestamp for pg_config.h (see Makefile.global)
20852 echo >src/include/stamp-h
20854 "src/include/pg_config_ext.h":H)
20855 # Update timestamp for pg_config_ext.h (see Makefile.global)
20856 echo >src/include/stamp-ext-h
20858 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20860 esac
20861 done # for ac_tag
20864 as_fn_exit 0
20865 _ACEOF
20866 ac_clean_files=$ac_clean_files_save
20868 test $ac_write_fail = 0 ||
20869 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20872 # configure is writing to config.log, and then calls config.status.
20873 # config.status does its own redirection, appending to config.log.
20874 # Unfortunately, on DOS this fails, as config.log is still kept open
20875 # by configure, so config.status won't be able to write to it; its
20876 # output is simply discarded. So we exec the FD to /dev/null,
20877 # effectively closing config.log, so it can be properly (re)opened and
20878 # appended to by config.status. When coming back to configure, we
20879 # need to make the FD available again.
20880 if test "$no_create" != yes; then
20881 ac_cs_success=:
20882 ac_config_status_args=
20883 test "$silent" = yes &&
20884 ac_config_status_args="$ac_config_status_args --quiet"
20885 exec 5>/dev/null
20886 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20887 exec 5>>config.log
20888 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20889 # would make configure fail if this is the last instruction.
20890 $ac_cs_success || as_fn_exit 1
20892 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20894 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}