Update copyright for 2022
[pgsql.git] / configure
blob8714420bef2032974c4b460249aa9f2edefd8e98
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 15devel.
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
14 # Copyright (c) 1996-2022, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
34 esac
38 as_nl='
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54 else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
86 # IFS
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" "" $as_nl"
93 # Find who we are. Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
104 IFS=$as_save_IFS
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111 as_myself=$0
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there. '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139 # Use a proper internal environment variable to ensure we don't fall
140 # into an infinite loop, continuously re-executing ourselves.
141 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142 _as_can_reexec=no; export _as_can_reexec;
143 # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151 *v*x* | *x*v* ) as_opts=-vx ;;
152 *v* ) as_opts=-v ;;
153 *x* ) as_opts=-x ;;
154 * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
162 # We don't want this to propagate to other subprocesses.
163 { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 emulate sh
167 NULLCMD=:
168 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169 # is contrary to our usage. Disable this feature.
170 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 setopt NO_GLOB_SUBST
172 else
173 case \`(set -o) 2>/dev/null\` in #(
174 *posix*) :
175 set -o posix ;; #(
176 *) :
178 esac
181 as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
194 else
195 exitcode=1; echo positional parameters were not saved.
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204 if (eval "$as_required") 2>/dev/null; then :
205 as_have_required=yes
206 else
207 as_have_required=no
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
211 else
212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
221 for as_base in sh bash ksh sh5; do
222 # Try only shells that exist, to save several forks.
223 as_shell=$as_dir/$as_base
224 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 CONFIG_SHELL=$as_shell as_have_required=yes
227 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228 break 2
231 done;;
232 esac
233 as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237 CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
242 if test "x$CONFIG_SHELL" != x; then :
243 export CONFIG_SHELL
244 # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252 *v*x* | *x*v* ) as_opts=-vx ;;
253 *v* ) as_opts=-v ;;
254 *x* ) as_opts=-x ;;
255 * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
264 if test x$as_have_required = xno; then :
265 $as_echo "$0: This script requires a shell more modern than all"
266 $as_echo "$0: the shells that I found on your system."
267 if test x${ZSH_VERSION+set} = xset ; then
268 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270 else
271 $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@lists.postgresql.org about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
277 exit 1
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
295 { eval $1=; unset $1;}
297 as_unset=as_fn_unset
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
304 return $1
305 } # as_fn_set_status
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
323 case $as_dir in #(
324 -*) as_dir=./$as_dir;;
325 esac
326 test -d "$as_dir" || eval $as_mkdir_p || {
327 as_dirs=
328 while :; do
329 case $as_dir in #(
330 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 *) as_qdir=$as_dir;;
332 esac
333 as_dirs="'$as_qdir' $as_dirs"
334 as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336 X"$as_dir" : 'X\(//\)[^/]' \| \
337 X"$as_dir" : 'X\(//\)$' \| \
338 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341 s//\1/
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
348 /^X\(\/\/\)$/{
349 s//\1/
352 /^X\(\/\).*/{
353 s//\1/
356 s/.*/./; q'`
357 test -d "$as_dir" && break
358 done
359 test -z "$as_dirs" || eval "mkdir $as_dirs"
360 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 } # as_fn_mkdir_p
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
370 test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379 eval 'as_fn_append ()
381 eval $1+=\$2
383 else
384 as_fn_append ()
386 eval $1=\$$1\$2
388 fi # as_fn_append
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396 eval 'as_fn_arith ()
398 as_val=$(( $* ))
400 else
401 as_fn_arith ()
403 as_val=`expr "$@" || test $? -eq 1`
405 fi # as_fn_arith
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
415 as_status=$1; test $as_status -eq 0 && as_status=1
416 if test "$4"; then
417 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422 } # as_fn_error
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425 test "X`expr 00001 : '.*\(...\)'`" = X001; then
426 as_expr=expr
427 else
428 as_expr=false
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 as_basename=basename
433 else
434 as_basename=false
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438 as_dirname=dirname
439 else
440 as_dirname=false
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445 X"$0" : 'X\(//\)$' \| \
446 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448 sed '/^.*\/\([^/][^/]*\)\/*$/{
449 s//\1/
452 /^X\/\(\/\/\)$/{
453 s//\1/
456 /^X\/\(\/\).*/{
457 s//\1/
460 s/.*/./; q'`
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
470 as_lineno_1=$LINENO as_lineno_1a=$LINENO
471 as_lineno_2=$LINENO as_lineno_2a=$LINENO
472 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
475 sed -n '
477 /[$]LINENO/=
478 ' <$as_myself |
479 sed '
480 s/[$]LINENO.*/&-/
481 t lineno
483 :lineno
485 :loop
486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487 t loop
488 s/-\n.*//
489 ' >$as_me.lineno &&
490 chmod +x "$as_me.lineno" ||
491 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
493 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494 # already done that, so ensure we don't try to do so again and fall
495 # in an infinite loop. This has already happened in practice.
496 _as_can_reexec=no; export _as_can_reexec
497 # Don't try to exec as it changes $[0], causing all sort of problems
498 # (the dirname of $[0] is not the place where we might find the
499 # original and so on. Autoconf is especially sensitive to this).
500 . "./$as_me.lineno"
501 # Exit status is that of the last command.
502 exit
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508 case `echo 'xy\c'` in
509 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
510 xy) ECHO_C='\c';;
511 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
512 ECHO_T=' ';;
513 esac;;
515 ECHO_N='-n';;
516 esac
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520 rm -f conf$$.dir/conf$$.file
521 else
522 rm -f conf$$.dir
523 mkdir conf$$.dir 2>/dev/null
525 if (echo >conf$$.file) 2>/dev/null; then
526 if ln -s conf$$.file conf$$ 2>/dev/null; then
527 as_ln_s='ln -s'
528 # ... but there are two gotchas:
529 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531 # In both cases, we have to default to `cp -pR'.
532 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533 as_ln_s='cp -pR'
534 elif ln conf$$.file conf$$ 2>/dev/null; then
535 as_ln_s=ln
536 else
537 as_ln_s='cp -pR'
539 else
540 as_ln_s='cp -pR'
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
545 if mkdir -p . 2>/dev/null; then
546 as_mkdir_p='mkdir -p "$as_dir"'
547 else
548 test -d ./-p && rmdir ./-p
549 as_mkdir_p=false
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 # Initializations.
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='15devel'
586 PACKAGE_STRING='PostgreSQL 15devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 DBTOEPUB
635 XSLTPROC
636 XMLLINT
637 TCL_SHLIB_LD_LIBS
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_ARMV8_CRC32C
650 CFLAGS_SSE42
651 have_win32_dbghelp
652 LIBOBJS
653 UUID_LIBS
654 LDAP_LIBS_BE
655 LDAP_LIBS_FE
656 with_ssl
657 PTHREAD_CFLAGS
658 PTHREAD_LIBS
659 PTHREAD_CC
660 ax_pthread_config
661 EGREP
662 GREP
665 python_additional_libs
666 python_libspec
667 python_libdir
668 python_includespec
669 python_version
670 python_majorversion
671 PYTHON
672 perl_embed_ldflags
673 perl_embed_ccflags
674 perl_includespec
675 perl_useshrplib
676 perl_privlibexp
677 perl_archlibexp
678 PERL
679 FLEXFLAGS
680 FLEX
681 BISONFLAGS
682 BISON
683 MKDIR_P
684 LN_S
686 install_bin
687 INSTALL_DATA
688 INSTALL_SCRIPT
689 INSTALL_PROGRAM
690 WINDRES
691 DLLWRAP
692 DLLTOOL
694 STRIP_SHARED_LIB
695 STRIP_STATIC_LIB
696 STRIP
697 RANLIB
698 with_gnu_ld
700 LDFLAGS_SL
701 LDFLAGS_EX
702 LZ4_LIBS
703 LZ4_CFLAGS
704 with_lz4
705 with_zlib
706 with_system_tzdata
707 with_libxslt
708 XML2_LIBS
709 XML2_CFLAGS
710 XML2_CONFIG
711 with_libxml
712 with_uuid
713 with_readline
714 with_systemd
715 with_selinux
716 with_ldap
717 with_krb_srvnam
718 krb_srvtab
719 with_gssapi
720 with_python
721 with_perl
722 with_tcl
723 ICU_LIBS
724 ICU_CFLAGS
725 with_icu
726 enable_thread_safety
727 INCLUDES
728 autodepend
729 PKG_CONFIG_LIBDIR
730 PKG_CONFIG_PATH
731 PKG_CONFIG
735 CFLAGS_SL
736 BITCODE_CXXFLAGS
737 BITCODE_CFLAGS
738 CFLAGS_VECTORIZE
739 CFLAGS_UNROLL_LOOPS
740 PERMIT_DECLARATION_AFTER_STATEMENT
741 LLVM_BINPATH
742 LLVM_CXXFLAGS
743 LLVM_CFLAGS
744 LLVM_CPPFLAGS
745 LLVM_LIBS
746 CLANG
747 LLVM_CONFIG
749 with_llvm
750 SUN_STUDIO_CC
751 ac_ct_CXX
752 CXXFLAGS
754 OBJEXT
755 EXEEXT
756 ac_ct_CC
757 CPPFLAGS
758 LDFLAGS
759 CFLAGS
761 enable_tap_tests
762 enable_dtrace
763 DTRACEFLAGS
764 DTRACE
765 enable_coverage
766 GENHTML
767 LCOV
768 GCOV
769 enable_debug
770 enable_rpath
771 default_port
772 WANTED_LANGUAGES
773 enable_nls
774 PORTNAME
775 host_os
776 host_vendor
777 host_cpu
778 host
779 build_os
780 build_vendor
781 build_cpu
782 build
783 PG_MAJORVERSION
784 target_alias
785 host_alias
786 build_alias
787 LIBS
788 ECHO_T
789 ECHO_N
790 ECHO_C
791 DEFS
792 mandir
793 localedir
794 libdir
795 psdir
796 pdfdir
797 dvidir
798 htmldir
799 infodir
800 docdir
801 oldincludedir
802 includedir
803 localstatedir
804 sharedstatedir
805 sysconfdir
806 datadir
807 datarootdir
808 libexecdir
809 sbindir
810 bindir
811 program_transform_name
812 prefix
813 exec_prefix
814 PACKAGE_URL
815 PACKAGE_BUGREPORT
816 PACKAGE_STRING
817 PACKAGE_VERSION
818 PACKAGE_TARNAME
819 PACKAGE_NAME
820 PATH_SEPARATOR
821 SHELL'
822 ac_subst_files=''
823 ac_user_opts='
824 enable_option_checking
825 with_extra_version
826 with_template
827 with_includes
828 with_libraries
829 with_libs
830 enable_integer_datetimes
831 enable_nls
832 with_pgport
833 enable_rpath
834 enable_spinlocks
835 enable_atomics
836 enable_debug
837 enable_profiling
838 enable_coverage
839 enable_dtrace
840 enable_tap_tests
841 with_blocksize
842 with_segsize
843 with_wal_blocksize
844 with_CC
845 with_llvm
846 enable_depend
847 enable_cassert
848 enable_thread_safety
849 with_icu
850 with_tcl
851 with_tclconfig
852 with_perl
853 with_python
854 with_gssapi
855 with_krb_srvnam
856 with_pam
857 with_bsd_auth
858 with_ldap
859 with_bonjour
860 with_selinux
861 with_systemd
862 with_readline
863 with_libedit_preferred
864 with_uuid
865 with_ossp_uuid
866 with_libxml
867 with_libxslt
868 with_system_tzdata
869 with_zlib
870 with_lz4
871 with_gnu_ld
872 with_ssl
873 with_openssl
874 enable_largefile
876 ac_precious_vars='build_alias
877 host_alias
878 target_alias
880 CFLAGS
881 LDFLAGS
882 LIBS
883 CPPFLAGS
885 CXXFLAGS
887 LLVM_CONFIG
888 CLANG
890 PKG_CONFIG
891 PKG_CONFIG_PATH
892 PKG_CONFIG_LIBDIR
893 ICU_CFLAGS
894 ICU_LIBS
895 XML2_CONFIG
896 XML2_CFLAGS
897 XML2_LIBS
898 LZ4_CFLAGS
899 LZ4_LIBS
900 LDFLAGS_EX
901 LDFLAGS_SL
902 PERL
903 PYTHON
904 MSGFMT
905 TCLSH'
908 # Initialize some variables set by options.
909 ac_init_help=
910 ac_init_version=false
911 ac_unrecognized_opts=
912 ac_unrecognized_sep=
913 # The variables have the same names as the options, with
914 # dashes changed to underlines.
915 cache_file=/dev/null
916 exec_prefix=NONE
917 no_create=
918 no_recursion=
919 prefix=NONE
920 program_prefix=NONE
921 program_suffix=NONE
922 program_transform_name=s,x,x,
923 silent=
924 site=
925 srcdir=
926 verbose=
927 x_includes=NONE
928 x_libraries=NONE
930 # Installation directory options.
931 # These are left unexpanded so users can "make install exec_prefix=/foo"
932 # and all the variables that are supposed to be based on exec_prefix
933 # by default will actually change.
934 # Use braces instead of parens because sh, perl, etc. also accept them.
935 # (The list follows the same order as the GNU Coding Standards.)
936 bindir='${exec_prefix}/bin'
937 sbindir='${exec_prefix}/sbin'
938 libexecdir='${exec_prefix}/libexec'
939 datarootdir='${prefix}/share'
940 datadir='${datarootdir}'
941 sysconfdir='${prefix}/etc'
942 sharedstatedir='${prefix}/com'
943 localstatedir='${prefix}/var'
944 includedir='${prefix}/include'
945 oldincludedir='/usr/include'
946 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
947 infodir='${datarootdir}/info'
948 htmldir='${docdir}'
949 dvidir='${docdir}'
950 pdfdir='${docdir}'
951 psdir='${docdir}'
952 libdir='${exec_prefix}/lib'
953 localedir='${datarootdir}/locale'
954 mandir='${datarootdir}/man'
956 ac_prev=
957 ac_dashdash=
958 for ac_option
960 # If the previous option needs an argument, assign it.
961 if test -n "$ac_prev"; then
962 eval $ac_prev=\$ac_option
963 ac_prev=
964 continue
967 case $ac_option in
968 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
969 *=) ac_optarg= ;;
970 *) ac_optarg=yes ;;
971 esac
973 # Accept the important Cygnus configure options, so we can diagnose typos.
975 case $ac_dashdash$ac_option in
977 ac_dashdash=yes ;;
979 -bindir | --bindir | --bindi | --bind | --bin | --bi)
980 ac_prev=bindir ;;
981 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
982 bindir=$ac_optarg ;;
984 -build | --build | --buil | --bui | --bu)
985 ac_prev=build_alias ;;
986 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
987 build_alias=$ac_optarg ;;
989 -cache-file | --cache-file | --cache-fil | --cache-fi \
990 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
991 ac_prev=cache_file ;;
992 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
993 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
994 cache_file=$ac_optarg ;;
996 --config-cache | -C)
997 cache_file=config.cache ;;
999 -datadir | --datadir | --datadi | --datad)
1000 ac_prev=datadir ;;
1001 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1002 datadir=$ac_optarg ;;
1004 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1005 | --dataroo | --dataro | --datar)
1006 ac_prev=datarootdir ;;
1007 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1008 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1009 datarootdir=$ac_optarg ;;
1011 -disable-* | --disable-*)
1012 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1013 # Reject names that are not valid shell variable names.
1014 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1015 as_fn_error $? "invalid feature name: $ac_useropt"
1016 ac_useropt_orig=$ac_useropt
1017 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1018 case $ac_user_opts in
1020 "enable_$ac_useropt"
1021 "*) ;;
1022 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1023 ac_unrecognized_sep=', ';;
1024 esac
1025 eval enable_$ac_useropt=no ;;
1027 -docdir | --docdir | --docdi | --doc | --do)
1028 ac_prev=docdir ;;
1029 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1030 docdir=$ac_optarg ;;
1032 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1033 ac_prev=dvidir ;;
1034 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1035 dvidir=$ac_optarg ;;
1037 -enable-* | --enable-*)
1038 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1039 # Reject names that are not valid shell variable names.
1040 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1041 as_fn_error $? "invalid feature name: $ac_useropt"
1042 ac_useropt_orig=$ac_useropt
1043 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1044 case $ac_user_opts in
1046 "enable_$ac_useropt"
1047 "*) ;;
1048 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1049 ac_unrecognized_sep=', ';;
1050 esac
1051 eval enable_$ac_useropt=\$ac_optarg ;;
1053 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1054 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1055 | --exec | --exe | --ex)
1056 ac_prev=exec_prefix ;;
1057 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1058 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1059 | --exec=* | --exe=* | --ex=*)
1060 exec_prefix=$ac_optarg ;;
1062 -gas | --gas | --ga | --g)
1063 # Obsolete; use --with-gas.
1064 with_gas=yes ;;
1066 -help | --help | --hel | --he | -h)
1067 ac_init_help=long ;;
1068 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1069 ac_init_help=recursive ;;
1070 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1071 ac_init_help=short ;;
1073 -host | --host | --hos | --ho)
1074 ac_prev=host_alias ;;
1075 -host=* | --host=* | --hos=* | --ho=*)
1076 host_alias=$ac_optarg ;;
1078 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1079 ac_prev=htmldir ;;
1080 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1081 | --ht=*)
1082 htmldir=$ac_optarg ;;
1084 -includedir | --includedir | --includedi | --included | --include \
1085 | --includ | --inclu | --incl | --inc)
1086 ac_prev=includedir ;;
1087 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1088 | --includ=* | --inclu=* | --incl=* | --inc=*)
1089 includedir=$ac_optarg ;;
1091 -infodir | --infodir | --infodi | --infod | --info | --inf)
1092 ac_prev=infodir ;;
1093 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1094 infodir=$ac_optarg ;;
1096 -libdir | --libdir | --libdi | --libd)
1097 ac_prev=libdir ;;
1098 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1099 libdir=$ac_optarg ;;
1101 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1102 | --libexe | --libex | --libe)
1103 ac_prev=libexecdir ;;
1104 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1105 | --libexe=* | --libex=* | --libe=*)
1106 libexecdir=$ac_optarg ;;
1108 -localedir | --localedir | --localedi | --localed | --locale)
1109 ac_prev=localedir ;;
1110 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1111 localedir=$ac_optarg ;;
1113 -localstatedir | --localstatedir | --localstatedi | --localstated \
1114 | --localstate | --localstat | --localsta | --localst | --locals)
1115 ac_prev=localstatedir ;;
1116 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1117 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1118 localstatedir=$ac_optarg ;;
1120 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1121 ac_prev=mandir ;;
1122 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1123 mandir=$ac_optarg ;;
1125 -nfp | --nfp | --nf)
1126 # Obsolete; use --without-fp.
1127 with_fp=no ;;
1129 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1130 | --no-cr | --no-c | -n)
1131 no_create=yes ;;
1133 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1134 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1135 no_recursion=yes ;;
1137 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1138 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1139 | --oldin | --oldi | --old | --ol | --o)
1140 ac_prev=oldincludedir ;;
1141 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1142 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1143 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1144 oldincludedir=$ac_optarg ;;
1146 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1147 ac_prev=prefix ;;
1148 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1149 prefix=$ac_optarg ;;
1151 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1152 | --program-pre | --program-pr | --program-p)
1153 ac_prev=program_prefix ;;
1154 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1155 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1156 program_prefix=$ac_optarg ;;
1158 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1159 | --program-suf | --program-su | --program-s)
1160 ac_prev=program_suffix ;;
1161 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1162 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1163 program_suffix=$ac_optarg ;;
1165 -program-transform-name | --program-transform-name \
1166 | --program-transform-nam | --program-transform-na \
1167 | --program-transform-n | --program-transform- \
1168 | --program-transform | --program-transfor \
1169 | --program-transfo | --program-transf \
1170 | --program-trans | --program-tran \
1171 | --progr-tra | --program-tr | --program-t)
1172 ac_prev=program_transform_name ;;
1173 -program-transform-name=* | --program-transform-name=* \
1174 | --program-transform-nam=* | --program-transform-na=* \
1175 | --program-transform-n=* | --program-transform-=* \
1176 | --program-transform=* | --program-transfor=* \
1177 | --program-transfo=* | --program-transf=* \
1178 | --program-trans=* | --program-tran=* \
1179 | --progr-tra=* | --program-tr=* | --program-t=*)
1180 program_transform_name=$ac_optarg ;;
1182 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1183 ac_prev=pdfdir ;;
1184 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1185 pdfdir=$ac_optarg ;;
1187 -psdir | --psdir | --psdi | --psd | --ps)
1188 ac_prev=psdir ;;
1189 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1190 psdir=$ac_optarg ;;
1192 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1193 | -silent | --silent | --silen | --sile | --sil)
1194 silent=yes ;;
1196 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1197 ac_prev=sbindir ;;
1198 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1199 | --sbi=* | --sb=*)
1200 sbindir=$ac_optarg ;;
1202 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1203 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1204 | --sharedst | --shareds | --shared | --share | --shar \
1205 | --sha | --sh)
1206 ac_prev=sharedstatedir ;;
1207 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1208 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1209 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1210 | --sha=* | --sh=*)
1211 sharedstatedir=$ac_optarg ;;
1213 -site | --site | --sit)
1214 ac_prev=site ;;
1215 -site=* | --site=* | --sit=*)
1216 site=$ac_optarg ;;
1218 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1219 ac_prev=srcdir ;;
1220 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1221 srcdir=$ac_optarg ;;
1223 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1224 | --syscon | --sysco | --sysc | --sys | --sy)
1225 ac_prev=sysconfdir ;;
1226 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1227 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1228 sysconfdir=$ac_optarg ;;
1230 -target | --target | --targe | --targ | --tar | --ta | --t)
1231 ac_prev=target_alias ;;
1232 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1233 target_alias=$ac_optarg ;;
1235 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1236 verbose=yes ;;
1238 -version | --version | --versio | --versi | --vers | -V)
1239 ac_init_version=: ;;
1241 -with-* | --with-*)
1242 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1243 # Reject names that are not valid shell variable names.
1244 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1245 as_fn_error $? "invalid package name: $ac_useropt"
1246 ac_useropt_orig=$ac_useropt
1247 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1248 case $ac_user_opts in
1250 "with_$ac_useropt"
1251 "*) ;;
1252 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1253 ac_unrecognized_sep=', ';;
1254 esac
1255 eval with_$ac_useropt=\$ac_optarg ;;
1257 -without-* | --without-*)
1258 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1259 # Reject names that are not valid shell variable names.
1260 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1261 as_fn_error $? "invalid package name: $ac_useropt"
1262 ac_useropt_orig=$ac_useropt
1263 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1264 case $ac_user_opts in
1266 "with_$ac_useropt"
1267 "*) ;;
1268 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1269 ac_unrecognized_sep=', ';;
1270 esac
1271 eval with_$ac_useropt=no ;;
1273 --x)
1274 # Obsolete; use --with-x.
1275 with_x=yes ;;
1277 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1278 | --x-incl | --x-inc | --x-in | --x-i)
1279 ac_prev=x_includes ;;
1280 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1281 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1282 x_includes=$ac_optarg ;;
1284 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1285 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1286 ac_prev=x_libraries ;;
1287 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1288 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1289 x_libraries=$ac_optarg ;;
1291 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1292 Try \`$0 --help' for more information"
1295 *=*)
1296 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1297 # Reject names that are not valid shell variable names.
1298 case $ac_envvar in #(
1299 '' | [0-9]* | *[!_$as_cr_alnum]* )
1300 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1301 esac
1302 eval $ac_envvar=\$ac_optarg
1303 export $ac_envvar ;;
1306 # FIXME: should be removed in autoconf 3.0.
1307 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1308 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1309 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1310 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1313 esac
1314 done
1316 if test -n "$ac_prev"; then
1317 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1318 as_fn_error $? "missing argument to $ac_option"
1321 if test -n "$ac_unrecognized_opts"; then
1322 case $enable_option_checking in
1323 no) ;;
1324 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1325 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1326 esac
1329 # Check all directory arguments for consistency.
1330 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1331 datadir sysconfdir sharedstatedir localstatedir includedir \
1332 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1333 libdir localedir mandir
1335 eval ac_val=\$$ac_var
1336 # Remove trailing slashes.
1337 case $ac_val in
1338 */ )
1339 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1340 eval $ac_var=\$ac_val;;
1341 esac
1342 # Be sure to have absolute directory names.
1343 case $ac_val in
1344 [\\/$]* | ?:[\\/]* ) continue;;
1345 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1346 esac
1347 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1348 done
1350 # There might be people who depend on the old broken behavior: `$host'
1351 # used to hold the argument of --host etc.
1352 # FIXME: To remove some day.
1353 build=$build_alias
1354 host=$host_alias
1355 target=$target_alias
1357 # FIXME: To remove some day.
1358 if test "x$host_alias" != x; then
1359 if test "x$build_alias" = x; then
1360 cross_compiling=maybe
1361 elif test "x$build_alias" != "x$host_alias"; then
1362 cross_compiling=yes
1366 ac_tool_prefix=
1367 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1369 test "$silent" = yes && exec 6>/dev/null
1372 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1373 ac_ls_di=`ls -di .` &&
1374 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1375 as_fn_error $? "working directory cannot be determined"
1376 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1377 as_fn_error $? "pwd does not report name of working directory"
1380 # Find the source files, if location was not specified.
1381 if test -z "$srcdir"; then
1382 ac_srcdir_defaulted=yes
1383 # Try the directory containing this script, then the parent directory.
1384 ac_confdir=`$as_dirname -- "$as_myself" ||
1385 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1386 X"$as_myself" : 'X\(//\)[^/]' \| \
1387 X"$as_myself" : 'X\(//\)$' \| \
1388 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1389 $as_echo X"$as_myself" |
1390 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1391 s//\1/
1394 /^X\(\/\/\)[^/].*/{
1395 s//\1/
1398 /^X\(\/\/\)$/{
1399 s//\1/
1402 /^X\(\/\).*/{
1403 s//\1/
1406 s/.*/./; q'`
1407 srcdir=$ac_confdir
1408 if test ! -r "$srcdir/$ac_unique_file"; then
1409 srcdir=..
1411 else
1412 ac_srcdir_defaulted=no
1414 if test ! -r "$srcdir/$ac_unique_file"; then
1415 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1416 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1418 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1419 ac_abs_confdir=`(
1420 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1421 pwd)`
1422 # When building in place, set srcdir=.
1423 if test "$ac_abs_confdir" = "$ac_pwd"; then
1424 srcdir=.
1426 # Remove unnecessary trailing slashes from srcdir.
1427 # Double slashes in file names in object file debugging info
1428 # mess up M-x gdb in Emacs.
1429 case $srcdir in
1430 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1431 esac
1432 for ac_var in $ac_precious_vars; do
1433 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1434 eval ac_env_${ac_var}_value=\$${ac_var}
1435 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1436 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1437 done
1440 # Report the --help message.
1442 if test "$ac_init_help" = "long"; then
1443 # Omit some internal or obsolete options to make the list less imposing.
1444 # This message is too long to be a string in the A/UX 3.1 sh.
1445 cat <<_ACEOF
1446 \`configure' configures PostgreSQL 15devel to adapt to many kinds of systems.
1448 Usage: $0 [OPTION]... [VAR=VALUE]...
1450 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1451 VAR=VALUE. See below for descriptions of some of the useful variables.
1453 Defaults for the options are specified in brackets.
1455 Configuration:
1456 -h, --help display this help and exit
1457 --help=short display options specific to this package
1458 --help=recursive display the short help of all the included packages
1459 -V, --version display version information and exit
1460 -q, --quiet, --silent do not print \`checking ...' messages
1461 --cache-file=FILE cache test results in FILE [disabled]
1462 -C, --config-cache alias for \`--cache-file=config.cache'
1463 -n, --no-create do not create output files
1464 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1466 Installation directories:
1467 --prefix=PREFIX install architecture-independent files in PREFIX
1468 [$ac_default_prefix]
1469 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1470 [PREFIX]
1472 By default, \`make install' will install all the files in
1473 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1474 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1475 for instance \`--prefix=\$HOME'.
1477 For better control, use the options below.
1479 Fine tuning of the installation directories:
1480 --bindir=DIR user executables [EPREFIX/bin]
1481 --sbindir=DIR system admin executables [EPREFIX/sbin]
1482 --libexecdir=DIR program executables [EPREFIX/libexec]
1483 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1484 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1485 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1486 --libdir=DIR object code libraries [EPREFIX/lib]
1487 --includedir=DIR C header files [PREFIX/include]
1488 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1489 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1490 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1491 --infodir=DIR info documentation [DATAROOTDIR/info]
1492 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1493 --mandir=DIR man documentation [DATAROOTDIR/man]
1494 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1495 --htmldir=DIR html documentation [DOCDIR]
1496 --dvidir=DIR dvi documentation [DOCDIR]
1497 --pdfdir=DIR pdf documentation [DOCDIR]
1498 --psdir=DIR ps documentation [DOCDIR]
1499 _ACEOF
1501 cat <<\_ACEOF
1503 System types:
1504 --build=BUILD configure for building on BUILD [guessed]
1505 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1506 _ACEOF
1509 if test -n "$ac_init_help"; then
1510 case $ac_init_help in
1511 short | recursive ) echo "Configuration of PostgreSQL 15devel:";;
1512 esac
1513 cat <<\_ACEOF
1515 Optional Features:
1516 --disable-option-checking ignore unrecognized --enable/--with options
1517 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1518 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1519 --disable-integer-datetimes
1520 obsolete option, no longer supported
1521 --enable-nls[=LANGUAGES]
1522 enable Native Language Support
1523 --disable-rpath do not embed shared library search path in
1524 executables
1525 --disable-spinlocks do not use spinlocks
1526 --disable-atomics do not use atomic operations
1527 --enable-debug build with debugging symbols (-g)
1528 --enable-profiling build with profiling enabled
1529 --enable-coverage build with coverage testing instrumentation
1530 --enable-dtrace build with DTrace support
1531 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1532 --enable-depend turn on automatic dependency tracking
1533 --enable-cassert enable assertion checks (for debugging)
1534 --disable-thread-safety disable thread-safety in client libraries
1535 --disable-largefile omit support for large files
1537 Optional Packages:
1538 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1539 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1540 --with-extra-version=STRING
1541 append STRING to version
1542 --with-template=NAME override operating system template
1543 --with-includes=DIRS look for additional header files in DIRS
1544 --with-libraries=DIRS look for additional libraries in DIRS
1545 --with-libs=DIRS alternative spelling of --with-libraries
1546 --with-pgport=PORTNUM set default port number [5432]
1547 --with-blocksize=BLOCKSIZE
1548 set table block size in kB [8]
1549 --with-segsize=SEGSIZE set table segment size in GB [1]
1550 --with-wal-blocksize=BLOCKSIZE
1551 set WAL block size in kB [8]
1552 --with-CC=CMD set compiler (deprecated)
1553 --with-llvm build with LLVM based JIT support
1554 --with-icu build with ICU support
1555 --with-tcl build Tcl modules (PL/Tcl)
1556 --with-tclconfig=DIR tclConfig.sh is in DIR
1557 --with-perl build Perl modules (PL/Perl)
1558 --with-python build Python modules (PL/Python)
1559 --with-gssapi build with GSSAPI support
1560 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1561 [postgres]
1562 --with-pam build with PAM support
1563 --with-bsd-auth build with BSD Authentication support
1564 --with-ldap build with LDAP support
1565 --with-bonjour build with Bonjour support
1566 --with-selinux build with SELinux support
1567 --with-systemd build with systemd support
1568 --without-readline do not use GNU Readline nor BSD Libedit for editing
1569 --with-libedit-preferred
1570 prefer BSD Libedit over GNU Readline
1571 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1572 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1573 --with-libxml build with XML support
1574 --with-libxslt use XSLT support when building contrib/xml2
1575 --with-system-tzdata=DIR
1576 use system time zone data in DIR
1577 --without-zlib do not use Zlib
1578 --with-lz4 build with LZ4 support
1579 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1580 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1581 --with-openssl obsolete spelling of --with-ssl=openssl
1583 Some influential environment variables:
1584 CC C compiler command
1585 CFLAGS C compiler flags
1586 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1587 nonstandard directory <lib dir>
1588 LIBS libraries to pass to the linker, e.g. -l<library>
1589 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1590 you have headers in a nonstandard directory <include dir>
1591 CXX C++ compiler command
1592 CXXFLAGS C++ compiler flags
1593 LLVM_CONFIG path to llvm-config command
1594 CLANG path to clang compiler to generate bitcode
1595 CPP C preprocessor
1596 PKG_CONFIG path to pkg-config utility
1597 PKG_CONFIG_PATH
1598 directories to add to pkg-config's search path
1599 PKG_CONFIG_LIBDIR
1600 path overriding pkg-config's built-in search path
1601 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1602 ICU_LIBS linker flags for ICU, overriding pkg-config
1603 XML2_CONFIG path to xml2-config utility
1604 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1605 XML2_LIBS linker flags for XML2, overriding pkg-config
1606 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1607 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1608 LDFLAGS_EX extra linker flags for linking executables only
1609 LDFLAGS_SL extra linker flags for linking shared libraries only
1610 PERL Perl program
1611 PYTHON Python program
1612 MSGFMT msgfmt program for NLS
1613 TCLSH Tcl interpreter program (tclsh)
1615 Use these variables to override the choices made by `configure' or to help
1616 it to find libraries and programs with nonstandard names/locations.
1618 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1619 PostgreSQL home page: <https://www.postgresql.org/>.
1620 _ACEOF
1621 ac_status=$?
1624 if test "$ac_init_help" = "recursive"; then
1625 # If there are subdirs, report their specific --help.
1626 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1627 test -d "$ac_dir" ||
1628 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1629 continue
1630 ac_builddir=.
1632 case "$ac_dir" in
1633 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1635 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1636 # A ".." for each directory in $ac_dir_suffix.
1637 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1638 case $ac_top_builddir_sub in
1639 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1640 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1641 esac ;;
1642 esac
1643 ac_abs_top_builddir=$ac_pwd
1644 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1645 # for backward compatibility:
1646 ac_top_builddir=$ac_top_build_prefix
1648 case $srcdir in
1649 .) # We are building in place.
1650 ac_srcdir=.
1651 ac_top_srcdir=$ac_top_builddir_sub
1652 ac_abs_top_srcdir=$ac_pwd ;;
1653 [\\/]* | ?:[\\/]* ) # Absolute name.
1654 ac_srcdir=$srcdir$ac_dir_suffix;
1655 ac_top_srcdir=$srcdir
1656 ac_abs_top_srcdir=$srcdir ;;
1657 *) # Relative name.
1658 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1659 ac_top_srcdir=$ac_top_build_prefix$srcdir
1660 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1661 esac
1662 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1664 cd "$ac_dir" || { ac_status=$?; continue; }
1665 # Check for guested configure.
1666 if test -f "$ac_srcdir/configure.gnu"; then
1667 echo &&
1668 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1669 elif test -f "$ac_srcdir/configure"; then
1670 echo &&
1671 $SHELL "$ac_srcdir/configure" --help=recursive
1672 else
1673 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1674 fi || ac_status=$?
1675 cd "$ac_pwd" || { ac_status=$?; break; }
1676 done
1679 test -n "$ac_init_help" && exit $ac_status
1680 if $ac_init_version; then
1681 cat <<\_ACEOF
1682 PostgreSQL configure 15devel
1683 generated by GNU Autoconf 2.69
1685 Copyright (C) 2012 Free Software Foundation, Inc.
1686 This configure script is free software; the Free Software Foundation
1687 gives unlimited permission to copy, distribute and modify it.
1689 Copyright (c) 1996-2022, PostgreSQL Global Development Group
1690 _ACEOF
1691 exit
1694 ## ------------------------ ##
1695 ## Autoconf initialization. ##
1696 ## ------------------------ ##
1698 # ac_fn_c_try_compile LINENO
1699 # --------------------------
1700 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1701 ac_fn_c_try_compile ()
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1704 rm -f conftest.$ac_objext
1705 if { { ac_try="$ac_compile"
1706 case "(($ac_try" in
1707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708 *) ac_try_echo=$ac_try;;
1709 esac
1710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711 $as_echo "$ac_try_echo"; } >&5
1712 (eval "$ac_compile") 2>conftest.err
1713 ac_status=$?
1714 if test -s conftest.err; then
1715 grep -v '^ *+' conftest.err >conftest.er1
1716 cat conftest.er1 >&5
1717 mv -f conftest.er1 conftest.err
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } && {
1721 test -z "$ac_c_werror_flag" ||
1722 test ! -s conftest.err
1723 } && test -s conftest.$ac_objext; then :
1724 ac_retval=0
1725 else
1726 $as_echo "$as_me: failed program was:" >&5
1727 sed 's/^/| /' conftest.$ac_ext >&5
1729 ac_retval=1
1731 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1732 as_fn_set_status $ac_retval
1734 } # ac_fn_c_try_compile
1736 # ac_fn_cxx_try_compile LINENO
1737 # ----------------------------
1738 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1739 ac_fn_cxx_try_compile ()
1741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742 rm -f conftest.$ac_objext
1743 if { { ac_try="$ac_compile"
1744 case "(($ac_try" in
1745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1746 *) ac_try_echo=$ac_try;;
1747 esac
1748 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1749 $as_echo "$ac_try_echo"; } >&5
1750 (eval "$ac_compile") 2>conftest.err
1751 ac_status=$?
1752 if test -s conftest.err; then
1753 grep -v '^ *+' conftest.err >conftest.er1
1754 cat conftest.er1 >&5
1755 mv -f conftest.er1 conftest.err
1757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758 test $ac_status = 0; } && {
1759 test -z "$ac_cxx_werror_flag" ||
1760 test ! -s conftest.err
1761 } && test -s conftest.$ac_objext; then :
1762 ac_retval=0
1763 else
1764 $as_echo "$as_me: failed program was:" >&5
1765 sed 's/^/| /' conftest.$ac_ext >&5
1767 ac_retval=1
1769 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1770 as_fn_set_status $ac_retval
1772 } # ac_fn_cxx_try_compile
1774 # ac_fn_c_try_link LINENO
1775 # -----------------------
1776 # Try to link conftest.$ac_ext, and return whether this succeeded.
1777 ac_fn_c_try_link ()
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 rm -f conftest.$ac_objext conftest$ac_exeext
1781 if { { ac_try="$ac_link"
1782 case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785 esac
1786 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787 $as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_link") 2>conftest.err
1789 ac_status=$?
1790 if test -s conftest.err; then
1791 grep -v '^ *+' conftest.err >conftest.er1
1792 cat conftest.er1 >&5
1793 mv -f conftest.er1 conftest.err
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; } && {
1797 test -z "$ac_c_werror_flag" ||
1798 test ! -s conftest.err
1799 } && test -s conftest$ac_exeext && {
1800 test "$cross_compiling" = yes ||
1801 test -x conftest$ac_exeext
1802 }; then :
1803 ac_retval=0
1804 else
1805 $as_echo "$as_me: failed program was:" >&5
1806 sed 's/^/| /' conftest.$ac_ext >&5
1808 ac_retval=1
1810 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1811 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1812 # interfere with the next link command; also delete a directory that is
1813 # left behind by Apple's compiler. We do this before executing the actions.
1814 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1816 as_fn_set_status $ac_retval
1818 } # ac_fn_c_try_link
1820 # ac_fn_c_try_cpp LINENO
1821 # ----------------------
1822 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1823 ac_fn_c_try_cpp ()
1825 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826 if { { ac_try="$ac_cpp conftest.$ac_ext"
1827 case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830 esac
1831 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832 $as_echo "$ac_try_echo"; } >&5
1833 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1834 ac_status=$?
1835 if test -s conftest.err; then
1836 grep -v '^ *+' conftest.err >conftest.er1
1837 cat conftest.er1 >&5
1838 mv -f conftest.er1 conftest.err
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; } > conftest.i && {
1842 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1843 test ! -s conftest.err
1844 }; then :
1845 ac_retval=0
1846 else
1847 $as_echo "$as_me: failed program was:" >&5
1848 sed 's/^/| /' conftest.$ac_ext >&5
1850 ac_retval=1
1852 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1853 as_fn_set_status $ac_retval
1855 } # ac_fn_c_try_cpp
1857 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1858 # -------------------------------------------------------
1859 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1860 # the include files in INCLUDES and setting the cache variable VAR
1861 # accordingly.
1862 ac_fn_c_check_header_mongrel ()
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 if eval \${$3+:} false; then :
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1867 $as_echo_n "checking for $2... " >&6; }
1868 if eval \${$3+:} false; then :
1869 $as_echo_n "(cached) " >&6
1871 eval ac_res=\$$3
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1873 $as_echo "$ac_res" >&6; }
1874 else
1875 # Is the header compilable?
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1877 $as_echo_n "checking $2 usability... " >&6; }
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879 /* end confdefs.h. */
1881 #include <$2>
1882 _ACEOF
1883 if ac_fn_c_try_compile "$LINENO"; then :
1884 ac_header_compiler=yes
1885 else
1886 ac_header_compiler=no
1888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1890 $as_echo "$ac_header_compiler" >&6; }
1892 # Is the header present?
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1894 $as_echo_n "checking $2 presence... " >&6; }
1895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1896 /* end confdefs.h. */
1897 #include <$2>
1898 _ACEOF
1899 if ac_fn_c_try_cpp "$LINENO"; then :
1900 ac_header_preproc=yes
1901 else
1902 ac_header_preproc=no
1904 rm -f conftest.err conftest.i conftest.$ac_ext
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1906 $as_echo "$ac_header_preproc" >&6; }
1908 # So? What about this header?
1909 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1910 yes:no: )
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1912 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1914 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1916 no:yes:* )
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1918 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1920 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1922 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1924 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1926 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1927 ( $as_echo "## ---------------------------------------------- ##
1928 ## Report this to pgsql-bugs@lists.postgresql.org ##
1929 ## ---------------------------------------------- ##"
1930 ) | sed "s/^/$as_me: WARNING: /" >&2
1932 esac
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934 $as_echo_n "checking for $2... " >&6; }
1935 if eval \${$3+:} false; then :
1936 $as_echo_n "(cached) " >&6
1937 else
1938 eval "$3=\$ac_header_compiler"
1940 eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942 $as_echo "$ac_res" >&6; }
1944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1946 } # ac_fn_c_check_header_mongrel
1948 # ac_fn_c_try_run LINENO
1949 # ----------------------
1950 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1951 # that executables *can* be run.
1952 ac_fn_c_try_run ()
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 if { { ac_try="$ac_link"
1956 case "(($ac_try" in
1957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958 *) ac_try_echo=$ac_try;;
1959 esac
1960 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961 $as_echo "$ac_try_echo"; } >&5
1962 (eval "$ac_link") 2>&5
1963 ac_status=$?
1964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1965 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1966 { { case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969 esac
1970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971 $as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_try") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; }; }; then :
1976 ac_retval=0
1977 else
1978 $as_echo "$as_me: program exited with status $ac_status" >&5
1979 $as_echo "$as_me: failed program was:" >&5
1980 sed 's/^/| /' conftest.$ac_ext >&5
1982 ac_retval=$ac_status
1984 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1986 as_fn_set_status $ac_retval
1988 } # ac_fn_c_try_run
1990 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1991 # -------------------------------------------------------
1992 # Tests whether HEADER exists and can be compiled using the include files in
1993 # INCLUDES, setting the cache variable VAR accordingly.
1994 ac_fn_c_check_header_compile ()
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1998 $as_echo_n "checking for $2... " >&6; }
1999 if eval \${$3+:} false; then :
2000 $as_echo_n "(cached) " >&6
2001 else
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003 /* end confdefs.h. */
2005 #include <$2>
2006 _ACEOF
2007 if ac_fn_c_try_compile "$LINENO"; then :
2008 eval "$3=yes"
2009 else
2010 eval "$3=no"
2012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2014 eval ac_res=\$$3
2015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2016 $as_echo "$ac_res" >&6; }
2017 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2019 } # ac_fn_c_check_header_compile
2021 # ac_fn_c_check_func LINENO FUNC VAR
2022 # ----------------------------------
2023 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2024 ac_fn_c_check_func ()
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2028 $as_echo_n "checking for $2... " >&6; }
2029 if eval \${$3+:} false; then :
2030 $as_echo_n "(cached) " >&6
2031 else
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033 /* end confdefs.h. */
2034 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2035 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2036 #define $2 innocuous_$2
2038 /* System header to define __stub macros and hopefully few prototypes,
2039 which can conflict with char $2 (); below.
2040 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2041 <limits.h> exists even on freestanding compilers. */
2043 #ifdef __STDC__
2044 # include <limits.h>
2045 #else
2046 # include <assert.h>
2047 #endif
2049 #undef $2
2051 /* Override any GCC internal prototype to avoid an error.
2052 Use char because int might match the return type of a GCC
2053 builtin and then its argument prototype would still apply. */
2054 #ifdef __cplusplus
2055 extern "C"
2056 #endif
2057 char $2 ();
2058 /* The GNU C library defines this for functions which it implements
2059 to always fail with ENOSYS. Some functions are actually named
2060 something starting with __ and the normal name is an alias. */
2061 #if defined __stub_$2 || defined __stub___$2
2062 choke me
2063 #endif
2066 main ()
2068 return $2 ();
2070 return 0;
2072 _ACEOF
2073 if ac_fn_c_try_link "$LINENO"; then :
2074 eval "$3=yes"
2075 else
2076 eval "$3=no"
2078 rm -f core conftest.err conftest.$ac_objext \
2079 conftest$ac_exeext conftest.$ac_ext
2081 eval ac_res=\$$3
2082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2083 $as_echo "$ac_res" >&6; }
2084 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2086 } # ac_fn_c_check_func
2088 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2089 # -------------------------------------------
2090 # Tests whether TYPE exists after having included INCLUDES, setting cache
2091 # variable VAR accordingly.
2092 ac_fn_c_check_type ()
2094 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2096 $as_echo_n "checking for $2... " >&6; }
2097 if eval \${$3+:} false; then :
2098 $as_echo_n "(cached) " >&6
2099 else
2100 eval "$3=no"
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102 /* end confdefs.h. */
2105 main ()
2107 if (sizeof ($2))
2108 return 0;
2110 return 0;
2112 _ACEOF
2113 if ac_fn_c_try_compile "$LINENO"; then :
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115 /* end confdefs.h. */
2118 main ()
2120 if (sizeof (($2)))
2121 return 0;
2123 return 0;
2125 _ACEOF
2126 if ac_fn_c_try_compile "$LINENO"; then :
2128 else
2129 eval "$3=yes"
2131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135 eval ac_res=\$$3
2136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137 $as_echo "$ac_res" >&6; }
2138 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2140 } # ac_fn_c_check_type
2142 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2143 # ----------------------------------------------------
2144 # Tries to find if the field MEMBER exists in type AGGR, after including
2145 # INCLUDES, setting cache variable VAR accordingly.
2146 ac_fn_c_check_member ()
2148 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2150 $as_echo_n "checking for $2.$3... " >&6; }
2151 if eval \${$4+:} false; then :
2152 $as_echo_n "(cached) " >&6
2153 else
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155 /* end confdefs.h. */
2158 main ()
2160 static $2 ac_aggr;
2161 if (ac_aggr.$3)
2162 return 0;
2164 return 0;
2166 _ACEOF
2167 if ac_fn_c_try_compile "$LINENO"; then :
2168 eval "$4=yes"
2169 else
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171 /* end confdefs.h. */
2174 main ()
2176 static $2 ac_aggr;
2177 if (sizeof ac_aggr.$3)
2178 return 0;
2180 return 0;
2182 _ACEOF
2183 if ac_fn_c_try_compile "$LINENO"; then :
2184 eval "$4=yes"
2185 else
2186 eval "$4=no"
2188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192 eval ac_res=\$$4
2193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2194 $as_echo "$ac_res" >&6; }
2195 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2197 } # ac_fn_c_check_member
2199 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2200 # --------------------------------------------
2201 # Tries to find the compile-time value of EXPR in a program that includes
2202 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2203 # computed
2204 ac_fn_c_compute_int ()
2206 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2207 if test "$cross_compiling" = yes; then
2208 # Depending upon the size, compute the lo and hi bounds.
2209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210 /* end confdefs.h. */
2213 main ()
2215 static int test_array [1 - 2 * !(($2) >= 0)];
2216 test_array [0] = 0;
2217 return test_array [0];
2220 return 0;
2222 _ACEOF
2223 if ac_fn_c_try_compile "$LINENO"; then :
2224 ac_lo=0 ac_mid=0
2225 while :; do
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227 /* end confdefs.h. */
2230 main ()
2232 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2233 test_array [0] = 0;
2234 return test_array [0];
2237 return 0;
2239 _ACEOF
2240 if ac_fn_c_try_compile "$LINENO"; then :
2241 ac_hi=$ac_mid; break
2242 else
2243 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2244 if test $ac_lo -le $ac_mid; then
2245 ac_lo= ac_hi=
2246 break
2248 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2251 done
2252 else
2253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254 /* end confdefs.h. */
2257 main ()
2259 static int test_array [1 - 2 * !(($2) < 0)];
2260 test_array [0] = 0;
2261 return test_array [0];
2264 return 0;
2266 _ACEOF
2267 if ac_fn_c_try_compile "$LINENO"; then :
2268 ac_hi=-1 ac_mid=-1
2269 while :; do
2270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271 /* end confdefs.h. */
2274 main ()
2276 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2277 test_array [0] = 0;
2278 return test_array [0];
2281 return 0;
2283 _ACEOF
2284 if ac_fn_c_try_compile "$LINENO"; then :
2285 ac_lo=$ac_mid; break
2286 else
2287 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2288 if test $ac_mid -le $ac_hi; then
2289 ac_lo= ac_hi=
2290 break
2292 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295 done
2296 else
2297 ac_lo= ac_hi=
2299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302 # Binary search between lo and hi bounds.
2303 while test "x$ac_lo" != "x$ac_hi"; do
2304 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306 /* end confdefs.h. */
2309 main ()
2311 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2312 test_array [0] = 0;
2313 return test_array [0];
2316 return 0;
2318 _ACEOF
2319 if ac_fn_c_try_compile "$LINENO"; then :
2320 ac_hi=$ac_mid
2321 else
2322 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325 done
2326 case $ac_lo in #((
2327 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2328 '') ac_retval=1 ;;
2329 esac
2330 else
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332 /* end confdefs.h. */
2334 static long int longval () { return $2; }
2335 static unsigned long int ulongval () { return $2; }
2336 #include <stdio.h>
2337 #include <stdlib.h>
2339 main ()
2342 FILE *f = fopen ("conftest.val", "w");
2343 if (! f)
2344 return 1;
2345 if (($2) < 0)
2347 long int i = longval ();
2348 if (i != ($2))
2349 return 1;
2350 fprintf (f, "%ld", i);
2352 else
2354 unsigned long int i = ulongval ();
2355 if (i != ($2))
2356 return 1;
2357 fprintf (f, "%lu", i);
2359 /* Do not output a trailing newline, as this causes \r\n confusion
2360 on some platforms. */
2361 return ferror (f) || fclose (f) != 0;
2364 return 0;
2366 _ACEOF
2367 if ac_fn_c_try_run "$LINENO"; then :
2368 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2369 else
2370 ac_retval=1
2372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2373 conftest.$ac_objext conftest.beam conftest.$ac_ext
2374 rm -f conftest.val
2377 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2378 as_fn_set_status $ac_retval
2380 } # ac_fn_c_compute_int
2382 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2383 # ---------------------------------------------
2384 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2385 # accordingly.
2386 ac_fn_c_check_decl ()
2388 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2389 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2390 as_decl_name=`echo $2|sed 's/ *(.*//'`
2391 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2393 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2394 if eval \${$3+:} false; then :
2395 $as_echo_n "(cached) " >&6
2396 else
2397 ac_save_werror_flag=$ac_c_werror_flag
2398 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400 /* end confdefs.h. */
2403 main ()
2405 #ifndef $as_decl_name
2406 #ifdef __cplusplus
2407 (void) $as_decl_use;
2408 #else
2409 (void) $as_decl_name;
2410 #endif
2411 #endif
2414 return 0;
2416 _ACEOF
2417 if ac_fn_c_try_compile "$LINENO"; then :
2418 eval "$3=yes"
2419 else
2420 eval "$3=no"
2422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423 ac_c_werror_flag=$ac_save_werror_flag
2425 eval ac_res=\$$3
2426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2427 $as_echo "$ac_res" >&6; }
2428 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2430 } # ac_fn_c_check_decl
2431 cat >config.log <<_ACEOF
2432 This file contains any messages produced by compilers while
2433 running configure, to aid debugging if configure makes a mistake.
2435 It was created by PostgreSQL $as_me 15devel, which was
2436 generated by GNU Autoconf 2.69. Invocation command line was
2438 $ $0 $@
2440 _ACEOF
2441 exec 5>>config.log
2443 cat <<_ASUNAME
2444 ## --------- ##
2445 ## Platform. ##
2446 ## --------- ##
2448 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2449 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2450 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2451 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2452 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2454 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2455 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2457 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2458 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2459 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2460 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2461 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2462 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2463 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2465 _ASUNAME
2467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2468 for as_dir in $PATH
2470 IFS=$as_save_IFS
2471 test -z "$as_dir" && as_dir=.
2472 $as_echo "PATH: $as_dir"
2473 done
2474 IFS=$as_save_IFS
2476 } >&5
2478 cat >&5 <<_ACEOF
2481 ## ----------- ##
2482 ## Core tests. ##
2483 ## ----------- ##
2485 _ACEOF
2488 # Keep a trace of the command line.
2489 # Strip out --no-create and --no-recursion so they do not pile up.
2490 # Strip out --silent because we don't want to record it for future runs.
2491 # Also quote any args containing shell meta-characters.
2492 # Make two passes to allow for proper duplicate-argument suppression.
2493 ac_configure_args=
2494 ac_configure_args0=
2495 ac_configure_args1=
2496 ac_must_keep_next=false
2497 for ac_pass in 1 2
2499 for ac_arg
2501 case $ac_arg in
2502 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2503 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2504 | -silent | --silent | --silen | --sile | --sil)
2505 continue ;;
2506 *\'*)
2507 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2508 esac
2509 case $ac_pass in
2510 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2512 as_fn_append ac_configure_args1 " '$ac_arg'"
2513 if test $ac_must_keep_next = true; then
2514 ac_must_keep_next=false # Got value, back to normal.
2515 else
2516 case $ac_arg in
2517 *=* | --config-cache | -C | -disable-* | --disable-* \
2518 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2519 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2520 | -with-* | --with-* | -without-* | --without-* | --x)
2521 case "$ac_configure_args0 " in
2522 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2523 esac
2525 -* ) ac_must_keep_next=true ;;
2526 esac
2528 as_fn_append ac_configure_args " '$ac_arg'"
2530 esac
2531 done
2532 done
2533 { ac_configure_args0=; unset ac_configure_args0;}
2534 { ac_configure_args1=; unset ac_configure_args1;}
2536 # When interrupted or exit'd, cleanup temporary files, and complete
2537 # config.log. We remove comments because anyway the quotes in there
2538 # would cause problems or look ugly.
2539 # WARNING: Use '\'' to represent an apostrophe within the trap.
2540 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2541 trap 'exit_status=$?
2542 # Save into config.log some information that might help in debugging.
2544 echo
2546 $as_echo "## ---------------- ##
2547 ## Cache variables. ##
2548 ## ---------------- ##"
2549 echo
2550 # The following way of writing the cache mishandles newlines in values,
2552 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2553 eval ac_val=\$$ac_var
2554 case $ac_val in #(
2555 *${as_nl}*)
2556 case $ac_var in #(
2557 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2558 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2559 esac
2560 case $ac_var in #(
2561 _ | IFS | as_nl) ;; #(
2562 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2563 *) { eval $ac_var=; unset $ac_var;} ;;
2564 esac ;;
2565 esac
2566 done
2567 (set) 2>&1 |
2568 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2569 *${as_nl}ac_space=\ *)
2570 sed -n \
2571 "s/'\''/'\''\\\\'\'''\''/g;
2572 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2573 ;; #(
2575 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2577 esac |
2578 sort
2580 echo
2582 $as_echo "## ----------------- ##
2583 ## Output variables. ##
2584 ## ----------------- ##"
2585 echo
2586 for ac_var in $ac_subst_vars
2588 eval ac_val=\$$ac_var
2589 case $ac_val in
2590 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2591 esac
2592 $as_echo "$ac_var='\''$ac_val'\''"
2593 done | sort
2594 echo
2596 if test -n "$ac_subst_files"; then
2597 $as_echo "## ------------------- ##
2598 ## File substitutions. ##
2599 ## ------------------- ##"
2600 echo
2601 for ac_var in $ac_subst_files
2603 eval ac_val=\$$ac_var
2604 case $ac_val in
2605 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2606 esac
2607 $as_echo "$ac_var='\''$ac_val'\''"
2608 done | sort
2609 echo
2612 if test -s confdefs.h; then
2613 $as_echo "## ----------- ##
2614 ## confdefs.h. ##
2615 ## ----------- ##"
2616 echo
2617 cat confdefs.h
2618 echo
2620 test "$ac_signal" != 0 &&
2621 $as_echo "$as_me: caught signal $ac_signal"
2622 $as_echo "$as_me: exit $exit_status"
2623 } >&5
2624 rm -f core *.core core.conftest.* &&
2625 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2626 exit $exit_status
2628 for ac_signal in 1 2 13 15; do
2629 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2630 done
2631 ac_signal=0
2633 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2634 rm -f -r conftest* confdefs.h
2636 $as_echo "/* confdefs.h */" > confdefs.h
2638 # Predefined preprocessor variables.
2640 cat >>confdefs.h <<_ACEOF
2641 #define PACKAGE_NAME "$PACKAGE_NAME"
2642 _ACEOF
2644 cat >>confdefs.h <<_ACEOF
2645 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2646 _ACEOF
2648 cat >>confdefs.h <<_ACEOF
2649 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2650 _ACEOF
2652 cat >>confdefs.h <<_ACEOF
2653 #define PACKAGE_STRING "$PACKAGE_STRING"
2654 _ACEOF
2656 cat >>confdefs.h <<_ACEOF
2657 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2658 _ACEOF
2660 cat >>confdefs.h <<_ACEOF
2661 #define PACKAGE_URL "$PACKAGE_URL"
2662 _ACEOF
2665 # Let the site file select an alternate cache file if it wants to.
2666 # Prefer an explicitly selected file to automatically selected ones.
2667 ac_site_file1=NONE
2668 ac_site_file2=NONE
2669 if test -n "$CONFIG_SITE"; then
2670 # We do not want a PATH search for config.site.
2671 case $CONFIG_SITE in #((
2672 -*) ac_site_file1=./$CONFIG_SITE;;
2673 */*) ac_site_file1=$CONFIG_SITE;;
2674 *) ac_site_file1=./$CONFIG_SITE;;
2675 esac
2676 elif test "x$prefix" != xNONE; then
2677 ac_site_file1=$prefix/share/config.site
2678 ac_site_file2=$prefix/etc/config.site
2679 else
2680 ac_site_file1=$ac_default_prefix/share/config.site
2681 ac_site_file2=$ac_default_prefix/etc/config.site
2683 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2685 test "x$ac_site_file" = xNONE && continue
2686 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2688 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2689 sed 's/^/| /' "$ac_site_file" >&5
2690 . "$ac_site_file" \
2691 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2692 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2693 as_fn_error $? "failed to load site script $ac_site_file
2694 See \`config.log' for more details" "$LINENO" 5; }
2696 done
2698 if test -r "$cache_file"; then
2699 # Some versions of bash will fail to source /dev/null (special files
2700 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2701 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2703 $as_echo "$as_me: loading cache $cache_file" >&6;}
2704 case $cache_file in
2705 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2706 *) . "./$cache_file";;
2707 esac
2709 else
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2711 $as_echo "$as_me: creating cache $cache_file" >&6;}
2712 >$cache_file
2715 # Check that the precious variables saved in the cache have kept the same
2716 # value.
2717 ac_cache_corrupted=false
2718 for ac_var in $ac_precious_vars; do
2719 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2720 eval ac_new_set=\$ac_env_${ac_var}_set
2721 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2722 eval ac_new_val=\$ac_env_${ac_var}_value
2723 case $ac_old_set,$ac_new_set in
2724 set,)
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2726 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2727 ac_cache_corrupted=: ;;
2728 ,set)
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2730 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2731 ac_cache_corrupted=: ;;
2732 ,);;
2734 if test "x$ac_old_val" != "x$ac_new_val"; then
2735 # differences in whitespace do not lead to failure.
2736 ac_old_val_w=`echo x $ac_old_val`
2737 ac_new_val_w=`echo x $ac_new_val`
2738 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2740 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2741 ac_cache_corrupted=:
2742 else
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2744 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2745 eval $ac_var=\$ac_old_val
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2748 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2750 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2751 fi;;
2752 esac
2753 # Pass precious variables to config.status.
2754 if test "$ac_new_set" = set; then
2755 case $ac_new_val in
2756 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2757 *) ac_arg=$ac_var=$ac_new_val ;;
2758 esac
2759 case " $ac_configure_args " in
2760 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2761 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2762 esac
2764 done
2765 if $ac_cache_corrupted; then
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2767 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2769 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2770 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2772 ## -------------------- ##
2773 ## Main body of script. ##
2774 ## -------------------- ##
2776 ac_ext=c
2777 ac_cpp='$CPP $CPPFLAGS'
2778 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2779 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2780 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2787 ac_aux_dir=
2788 for ac_dir in config "$srcdir"/config; do
2789 if test -f "$ac_dir/install-sh"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/install-sh -c"
2792 break
2793 elif test -f "$ac_dir/install.sh"; then
2794 ac_aux_dir=$ac_dir
2795 ac_install_sh="$ac_aux_dir/install.sh -c"
2796 break
2797 elif test -f "$ac_dir/shtool"; then
2798 ac_aux_dir=$ac_dir
2799 ac_install_sh="$ac_aux_dir/shtool install -c"
2800 break
2802 done
2803 if test -z "$ac_aux_dir"; then
2804 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2807 # These three variables are undocumented and unsupported,
2808 # and are intended to be withdrawn in a future Autoconf release.
2809 # They can cause serious problems if a builder's source tree is in a directory
2810 # whose full name contains unusual characters.
2811 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2812 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2813 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2818 cat >>confdefs.h <<_ACEOF
2819 #define CONFIGURE_ARGS "$ac_configure_args"
2820 _ACEOF
2823 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2824 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2825 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2828 cat >>confdefs.h <<_ACEOF
2829 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2830 _ACEOF
2833 cat >>confdefs.h <<_ACEOF
2834 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2835 _ACEOF
2838 cat >>confdefs.h <<_ACEOF
2839 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2840 _ACEOF
2846 # Check whether --with-extra-version was given.
2847 if test "${with_extra_version+set}" = set; then :
2848 withval=$with_extra_version;
2849 case $withval in
2850 yes)
2851 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2854 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2857 PG_VERSION="$PACKAGE_VERSION$withval"
2859 esac
2861 else
2862 PG_VERSION="$PACKAGE_VERSION"
2867 cat >>confdefs.h <<_ACEOF
2868 #define PG_VERSION "$PG_VERSION"
2869 _ACEOF
2872 # Make sure we can run config.sub.
2873 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2874 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2877 $as_echo_n "checking build system type... " >&6; }
2878 if ${ac_cv_build+:} false; then :
2879 $as_echo_n "(cached) " >&6
2880 else
2881 ac_build_alias=$build_alias
2882 test "x$ac_build_alias" = x &&
2883 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2884 test "x$ac_build_alias" = x &&
2885 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2886 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2887 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2891 $as_echo "$ac_cv_build" >&6; }
2892 case $ac_cv_build in
2893 *-*-*) ;;
2894 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2895 esac
2896 build=$ac_cv_build
2897 ac_save_IFS=$IFS; IFS='-'
2898 set x $ac_cv_build
2899 shift
2900 build_cpu=$1
2901 build_vendor=$2
2902 shift; shift
2903 # Remember, the first character of IFS is used to create $*,
2904 # except with old shells:
2905 build_os=$*
2906 IFS=$ac_save_IFS
2907 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2911 $as_echo_n "checking host system type... " >&6; }
2912 if ${ac_cv_host+:} false; then :
2913 $as_echo_n "(cached) " >&6
2914 else
2915 if test "x$host_alias" = x; then
2916 ac_cv_host=$ac_cv_build
2917 else
2918 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2919 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2924 $as_echo "$ac_cv_host" >&6; }
2925 case $ac_cv_host in
2926 *-*-*) ;;
2927 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2928 esac
2929 host=$ac_cv_host
2930 ac_save_IFS=$IFS; IFS='-'
2931 set x $ac_cv_host
2932 shift
2933 host_cpu=$1
2934 host_vendor=$2
2935 shift; shift
2936 # Remember, the first character of IFS is used to create $*,
2937 # except with old shells:
2938 host_os=$*
2939 IFS=$ac_save_IFS
2940 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2944 template=
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2946 $as_echo_n "checking which template to use... " >&6; }
2951 # Check whether --with-template was given.
2952 if test "${with_template+set}" = set; then :
2953 withval=$with_template;
2954 case $withval in
2955 yes)
2956 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2959 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2963 case $withval in
2964 list) echo; ls "$srcdir/src/template"; exit;;
2965 *) if test -f "$srcdir/src/template/$with_template" ; then
2966 template=$withval
2967 else
2968 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2969 fi;;
2970 esac
2973 esac
2975 else
2977 # --with-template not given
2979 case $host_os in
2980 aix*) template=aix ;;
2981 cygwin*|msys*) template=cygwin ;;
2982 darwin*) template=darwin ;;
2983 dragonfly*) template=netbsd ;;
2984 freebsd*) template=freebsd ;;
2985 hpux*) template=hpux ;;
2986 linux*|gnu*|k*bsd*-gnu)
2987 template=linux ;;
2988 mingw*) template=win32 ;;
2989 netbsd*) template=netbsd ;;
2990 openbsd*) template=openbsd ;;
2991 solaris*) template=solaris ;;
2992 esac
2994 if test x"$template" = x"" ; then
2995 as_fn_error $? "
2996 *******************************************************************
2997 PostgreSQL has apparently not been ported to your platform yet.
2998 To try a manual configuration, look into the src/template directory
2999 for a similar platform and use the '--with-template=' option.
3001 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3002 rectifying this. Include the above 'checking host system type...'
3003 line.
3004 *******************************************************************
3005 " "$LINENO" 5
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3014 $as_echo "$template" >&6; }
3016 PORTNAME=$template
3019 # Initialize default assumption that we do not need separate assembly code
3020 # for TAS (test-and-set). This can be overridden by the template file
3021 # when it's executed.
3022 need_tas=no
3023 tas_file=dummy.s
3028 ## Command line options
3032 # Add non-standard directories to the include path
3037 # Check whether --with-includes was given.
3038 if test "${with_includes+set}" = set; then :
3039 withval=$with_includes;
3040 case $withval in
3041 yes)
3042 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3045 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3050 esac
3058 # Add non-standard directories to the library search path
3063 # Check whether --with-libraries was given.
3064 if test "${with_libraries+set}" = set; then :
3065 withval=$with_libraries;
3066 case $withval in
3067 yes)
3068 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3071 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3074 LIBRARY_DIRS=$withval
3076 esac
3085 # Check whether --with-libs was given.
3086 if test "${with_libs+set}" = set; then :
3087 withval=$with_libs;
3088 case $withval in
3089 yes)
3090 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3093 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3096 LIBRARY_DIRS=$withval
3098 esac
3106 # 64-bit integer date/time storage is now the only option, but to avoid
3107 # unnecessary breakage of build scripts, continue to accept an explicit
3108 # "--enable-integer-datetimes" switch.
3112 # Check whether --enable-integer-datetimes was given.
3113 if test "${enable_integer_datetimes+set}" = set; then :
3114 enableval=$enable_integer_datetimes;
3115 case $enableval in
3116 yes)
3120 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3123 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3125 esac
3127 else
3128 enable_integer_datetimes=yes
3136 # NLS
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3139 $as_echo_n "checking whether NLS is wanted... " >&6; }
3142 # Check whether --enable-nls was given.
3143 if test "${enable_nls+set}" = set; then :
3144 enableval=$enable_nls;
3145 case $enableval in
3146 yes)
3153 enable_nls=yes
3154 WANTED_LANGUAGES=$enableval
3156 esac
3158 else
3159 enable_nls=no
3164 if test "$enable_nls" = yes; then
3166 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3171 $as_echo "$enable_nls" >&6; }
3176 # Default port number (--with-pgport), default 5432
3178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3179 $as_echo_n "checking for default port number... " >&6; }
3183 # Check whether --with-pgport was given.
3184 if test "${with_pgport+set}" = set; then :
3185 withval=$with_pgport;
3186 case $withval in
3187 yes)
3188 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3191 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3194 default_port=$withval
3196 esac
3198 else
3199 default_port=5432
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3204 $as_echo "$default_port" >&6; }
3205 # Need both of these because some places want an integer and some a string
3207 cat >>confdefs.h <<_ACEOF
3208 #define DEF_PGPORT ${default_port}
3209 _ACEOF
3212 cat >>confdefs.h <<_ACEOF
3213 #define DEF_PGPORT_STR "${default_port}"
3214 _ACEOF
3218 # It's worth validating port; you can get very confusing errors otherwise
3219 if test x"$default_port" = x""; then
3220 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3221 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3222 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3223 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3224 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3225 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3226 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3230 # '-rpath'-like feature can be disabled
3234 # Check whether --enable-rpath was given.
3235 if test "${enable_rpath+set}" = set; then :
3236 enableval=$enable_rpath;
3237 case $enableval in
3238 yes)
3245 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3247 esac
3249 else
3250 enable_rpath=yes
3258 # Spinlocks
3262 # Check whether --enable-spinlocks was given.
3263 if test "${enable_spinlocks+set}" = set; then :
3264 enableval=$enable_spinlocks;
3265 case $enableval in
3266 yes)
3273 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3275 esac
3277 else
3278 enable_spinlocks=yes
3285 # Atomic operations
3289 # Check whether --enable-atomics was given.
3290 if test "${enable_atomics+set}" = set; then :
3291 enableval=$enable_atomics;
3292 case $enableval in
3293 yes)
3300 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3302 esac
3304 else
3305 enable_atomics=yes
3312 # --enable-debug adds -g to compiler flags
3316 # Check whether --enable-debug was given.
3317 if test "${enable_debug+set}" = set; then :
3318 enableval=$enable_debug;
3319 case $enableval in
3320 yes)
3327 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3329 esac
3331 else
3332 enable_debug=no
3340 # --enable-profiling enables gcc profiling
3344 # Check whether --enable-profiling was given.
3345 if test "${enable_profiling+set}" = set; then :
3346 enableval=$enable_profiling;
3347 case $enableval in
3348 yes)
3355 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3357 esac
3359 else
3360 enable_profiling=no
3367 # --enable-coverage enables generation of code coverage metrics with gcov
3371 # Check whether --enable-coverage was given.
3372 if test "${enable_coverage+set}" = set; then :
3373 enableval=$enable_coverage;
3374 case $enableval in
3375 yes)
3376 if test -z "$GCOV"; then
3377 for ac_prog in gcov
3379 # Extract the first word of "$ac_prog", so it can be a program name with args.
3380 set dummy $ac_prog; ac_word=$2
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3382 $as_echo_n "checking for $ac_word... " >&6; }
3383 if ${ac_cv_path_GCOV+:} false; then :
3384 $as_echo_n "(cached) " >&6
3385 else
3386 case $GCOV in
3387 [\\/]* | ?:[\\/]*)
3388 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3392 for as_dir in $PATH
3394 IFS=$as_save_IFS
3395 test -z "$as_dir" && as_dir=.
3396 for ac_exec_ext in '' $ac_executable_extensions; do
3397 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3398 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3400 break 2
3402 done
3403 done
3404 IFS=$as_save_IFS
3407 esac
3409 GCOV=$ac_cv_path_GCOV
3410 if test -n "$GCOV"; then
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3412 $as_echo "$GCOV" >&6; }
3413 else
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3415 $as_echo "no" >&6; }
3419 test -n "$GCOV" && break
3420 done
3422 else
3423 # Report the value of GCOV in configure's output in all cases.
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3425 $as_echo_n "checking for GCOV... " >&6; }
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3427 $as_echo "$GCOV" >&6; }
3430 if test -z "$GCOV"; then
3431 as_fn_error $? "gcov not found" "$LINENO" 5
3433 if test -z "$LCOV"; then
3434 for ac_prog in lcov
3436 # Extract the first word of "$ac_prog", so it can be a program name with args.
3437 set dummy $ac_prog; ac_word=$2
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3439 $as_echo_n "checking for $ac_word... " >&6; }
3440 if ${ac_cv_path_LCOV+:} false; then :
3441 $as_echo_n "(cached) " >&6
3442 else
3443 case $LCOV in
3444 [\\/]* | ?:[\\/]*)
3445 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3449 for as_dir in $PATH
3451 IFS=$as_save_IFS
3452 test -z "$as_dir" && as_dir=.
3453 for ac_exec_ext in '' $ac_executable_extensions; do
3454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3455 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3457 break 2
3459 done
3460 done
3461 IFS=$as_save_IFS
3464 esac
3466 LCOV=$ac_cv_path_LCOV
3467 if test -n "$LCOV"; then
3468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3469 $as_echo "$LCOV" >&6; }
3470 else
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3472 $as_echo "no" >&6; }
3476 test -n "$LCOV" && break
3477 done
3479 else
3480 # Report the value of LCOV in configure's output in all cases.
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3482 $as_echo_n "checking for LCOV... " >&6; }
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3484 $as_echo "$LCOV" >&6; }
3487 if test -z "$LCOV"; then
3488 as_fn_error $? "lcov not found" "$LINENO" 5
3490 if test -z "$GENHTML"; then
3491 for ac_prog in genhtml
3493 # Extract the first word of "$ac_prog", so it can be a program name with args.
3494 set dummy $ac_prog; ac_word=$2
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3496 $as_echo_n "checking for $ac_word... " >&6; }
3497 if ${ac_cv_path_GENHTML+:} false; then :
3498 $as_echo_n "(cached) " >&6
3499 else
3500 case $GENHTML in
3501 [\\/]* | ?:[\\/]*)
3502 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506 for as_dir in $PATH
3508 IFS=$as_save_IFS
3509 test -z "$as_dir" && as_dir=.
3510 for ac_exec_ext in '' $ac_executable_extensions; do
3511 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3512 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3514 break 2
3516 done
3517 done
3518 IFS=$as_save_IFS
3521 esac
3523 GENHTML=$ac_cv_path_GENHTML
3524 if test -n "$GENHTML"; then
3525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3526 $as_echo "$GENHTML" >&6; }
3527 else
3528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3529 $as_echo "no" >&6; }
3533 test -n "$GENHTML" && break
3534 done
3536 else
3537 # Report the value of GENHTML in configure's output in all cases.
3538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3539 $as_echo_n "checking for GENHTML... " >&6; }
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3541 $as_echo "$GENHTML" >&6; }
3544 if test -z "$GENHTML"; then
3545 as_fn_error $? "genhtml not found" "$LINENO" 5
3552 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3554 esac
3556 else
3557 enable_coverage=no
3565 # DTrace
3569 # Check whether --enable-dtrace was given.
3570 if test "${enable_dtrace+set}" = set; then :
3571 enableval=$enable_dtrace;
3572 case $enableval in
3573 yes)
3574 if test -z "$DTRACE"; then
3575 for ac_prog in dtrace
3577 # Extract the first word of "$ac_prog", so it can be a program name with args.
3578 set dummy $ac_prog; ac_word=$2
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3580 $as_echo_n "checking for $ac_word... " >&6; }
3581 if ${ac_cv_path_DTRACE+:} false; then :
3582 $as_echo_n "(cached) " >&6
3583 else
3584 case $DTRACE in
3585 [\\/]* | ?:[\\/]*)
3586 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590 for as_dir in $PATH
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
3594 for ac_exec_ext in '' $ac_executable_extensions; do
3595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3596 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3598 break 2
3600 done
3601 done
3602 IFS=$as_save_IFS
3605 esac
3607 DTRACE=$ac_cv_path_DTRACE
3608 if test -n "$DTRACE"; then
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3610 $as_echo "$DTRACE" >&6; }
3611 else
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613 $as_echo "no" >&6; }
3617 test -n "$DTRACE" && break
3618 done
3620 else
3621 # Report the value of DTRACE in configure's output in all cases.
3622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3623 $as_echo_n "checking for DTRACE... " >&6; }
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3625 $as_echo "$DTRACE" >&6; }
3628 if test -z "$DTRACE"; then
3629 as_fn_error $? "dtrace not found" "$LINENO" 5
3637 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3639 esac
3641 else
3642 enable_dtrace=no
3650 # TAP tests
3654 # Check whether --enable-tap-tests was given.
3655 if test "${enable_tap_tests+set}" = set; then :
3656 enableval=$enable_tap_tests;
3657 case $enableval in
3658 yes)
3665 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3667 esac
3669 else
3670 enable_tap_tests=no
3678 # Block size
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3681 $as_echo_n "checking for block size... " >&6; }
3685 # Check whether --with-blocksize was given.
3686 if test "${with_blocksize+set}" = set; then :
3687 withval=$with_blocksize;
3688 case $withval in
3689 yes)
3690 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3693 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3696 blocksize=$withval
3698 esac
3700 else
3701 blocksize=8
3705 case ${blocksize} in
3706 1) BLCKSZ=1024;;
3707 2) BLCKSZ=2048;;
3708 4) BLCKSZ=4096;;
3709 8) BLCKSZ=8192;;
3710 16) BLCKSZ=16384;;
3711 32) BLCKSZ=32768;;
3712 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3713 esac
3714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3715 $as_echo "${blocksize}kB" >&6; }
3718 cat >>confdefs.h <<_ACEOF
3719 #define BLCKSZ ${BLCKSZ}
3720 _ACEOF
3724 # Relation segment size
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3727 $as_echo_n "checking for segment size... " >&6; }
3731 # Check whether --with-segsize was given.
3732 if test "${with_segsize+set}" = set; then :
3733 withval=$with_segsize;
3734 case $withval in
3735 yes)
3736 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3739 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3742 segsize=$withval
3744 esac
3746 else
3747 segsize=1
3751 # this expression is set up to avoid unnecessary integer overflow
3752 # blocksize is already guaranteed to be a factor of 1024
3753 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3754 test $? -eq 0 || exit 1
3755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3756 $as_echo "${segsize}GB" >&6; }
3759 cat >>confdefs.h <<_ACEOF
3760 #define RELSEG_SIZE ${RELSEG_SIZE}
3761 _ACEOF
3765 # WAL block size
3767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3768 $as_echo_n "checking for WAL block size... " >&6; }
3772 # Check whether --with-wal-blocksize was given.
3773 if test "${with_wal_blocksize+set}" = set; then :
3774 withval=$with_wal_blocksize;
3775 case $withval in
3776 yes)
3777 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3780 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3783 wal_blocksize=$withval
3785 esac
3787 else
3788 wal_blocksize=8
3792 case ${wal_blocksize} in
3793 1) XLOG_BLCKSZ=1024;;
3794 2) XLOG_BLCKSZ=2048;;
3795 4) XLOG_BLCKSZ=4096;;
3796 8) XLOG_BLCKSZ=8192;;
3797 16) XLOG_BLCKSZ=16384;;
3798 32) XLOG_BLCKSZ=32768;;
3799 64) XLOG_BLCKSZ=65536;;
3800 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3801 esac
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3803 $as_echo "${wal_blocksize}kB" >&6; }
3806 cat >>confdefs.h <<_ACEOF
3807 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3808 _ACEOF
3812 # C compiler
3815 # For historical reasons you can also use --with-CC to specify the C compiler
3816 # to use, although the standard way to do this is to set the CC environment
3817 # variable.
3821 # Check whether --with-CC was given.
3822 if test "${with_CC+set}" = set; then :
3823 withval=$with_CC;
3824 case $withval in
3825 yes)
3826 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3829 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3832 CC=$with_CC
3834 esac
3840 case $template in
3841 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3842 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3843 esac
3845 ac_ext=c
3846 ac_cpp='$CPP $CPPFLAGS'
3847 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3848 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3850 if test -n "$ac_tool_prefix"; then
3851 for ac_prog in $pgac_cc_list
3853 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3854 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3856 $as_echo_n "checking for $ac_word... " >&6; }
3857 if ${ac_cv_prog_CC+:} false; then :
3858 $as_echo_n "(cached) " >&6
3859 else
3860 if test -n "$CC"; then
3861 ac_cv_prog_CC="$CC" # Let the user override the test.
3862 else
3863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3864 for as_dir in $PATH
3866 IFS=$as_save_IFS
3867 test -z "$as_dir" && as_dir=.
3868 for ac_exec_ext in '' $ac_executable_extensions; do
3869 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3870 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3872 break 2
3874 done
3875 done
3876 IFS=$as_save_IFS
3880 CC=$ac_cv_prog_CC
3881 if test -n "$CC"; then
3882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3883 $as_echo "$CC" >&6; }
3884 else
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3886 $as_echo "no" >&6; }
3890 test -n "$CC" && break
3891 done
3893 if test -z "$CC"; then
3894 ac_ct_CC=$CC
3895 for ac_prog in $pgac_cc_list
3897 # Extract the first word of "$ac_prog", so it can be a program name with args.
3898 set dummy $ac_prog; ac_word=$2
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3900 $as_echo_n "checking for $ac_word... " >&6; }
3901 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3902 $as_echo_n "(cached) " >&6
3903 else
3904 if test -n "$ac_ct_CC"; then
3905 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3906 else
3907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3908 for as_dir in $PATH
3910 IFS=$as_save_IFS
3911 test -z "$as_dir" && as_dir=.
3912 for ac_exec_ext in '' $ac_executable_extensions; do
3913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3914 ac_cv_prog_ac_ct_CC="$ac_prog"
3915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3916 break 2
3918 done
3919 done
3920 IFS=$as_save_IFS
3924 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3925 if test -n "$ac_ct_CC"; then
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3927 $as_echo "$ac_ct_CC" >&6; }
3928 else
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3930 $as_echo "no" >&6; }
3934 test -n "$ac_ct_CC" && break
3935 done
3937 if test "x$ac_ct_CC" = x; then
3938 CC=""
3939 else
3940 case $cross_compiling:$ac_tool_warned in
3941 yes:)
3942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3943 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3944 ac_tool_warned=yes ;;
3945 esac
3946 CC=$ac_ct_CC
3951 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3952 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3953 as_fn_error $? "no acceptable C compiler found in \$PATH
3954 See \`config.log' for more details" "$LINENO" 5; }
3956 # Provide some information about the compiler.
3957 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3958 set X $ac_compile
3959 ac_compiler=$2
3960 for ac_option in --version -v -V -qversion; do
3961 { { ac_try="$ac_compiler $ac_option >&5"
3962 case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965 esac
3966 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967 $as_echo "$ac_try_echo"; } >&5
3968 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3969 ac_status=$?
3970 if test -s conftest.err; then
3971 sed '10a\
3972 ... rest of stderr output deleted ...
3973 10q' conftest.err >conftest.er1
3974 cat conftest.er1 >&5
3976 rm -f conftest.er1 conftest.err
3977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978 test $ac_status = 0; }
3979 done
3981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3982 /* end confdefs.h. */
3985 main ()
3989 return 0;
3991 _ACEOF
3992 ac_clean_files_save=$ac_clean_files
3993 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3994 # Try to create an executable without -o first, disregard a.out.
3995 # It will help us diagnose broken compilers, and finding out an intuition
3996 # of exeext.
3997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3998 $as_echo_n "checking whether the C compiler works... " >&6; }
3999 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4001 # The possible output files:
4002 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4004 ac_rmfiles=
4005 for ac_file in $ac_files
4007 case $ac_file in
4008 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4009 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4010 esac
4011 done
4012 rm -f $ac_rmfiles
4014 if { { ac_try="$ac_link_default"
4015 case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018 esac
4019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020 $as_echo "$ac_try_echo"; } >&5
4021 (eval "$ac_link_default") 2>&5
4022 ac_status=$?
4023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; then :
4025 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4026 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4027 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4028 # so that the user can short-circuit this test for compilers unknown to
4029 # Autoconf.
4030 for ac_file in $ac_files ''
4032 test -f "$ac_file" || continue
4033 case $ac_file in
4034 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4036 [ab].out )
4037 # We found the default executable, but exeext='' is most
4038 # certainly right.
4039 break;;
4040 *.* )
4041 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4042 then :; else
4043 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4045 # We set ac_cv_exeext here because the later test for it is not
4046 # safe: cross compilers may not add the suffix if given an `-o'
4047 # argument, so we may need to know it at that point already.
4048 # Even if this section looks crufty: it has the advantage of
4049 # actually working.
4050 break;;
4052 break;;
4053 esac
4054 done
4055 test "$ac_cv_exeext" = no && ac_cv_exeext=
4057 else
4058 ac_file=''
4060 if test -z "$ac_file"; then :
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4062 $as_echo "no" >&6; }
4063 $as_echo "$as_me: failed program was:" >&5
4064 sed 's/^/| /' conftest.$ac_ext >&5
4066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4068 as_fn_error 77 "C compiler cannot create executables
4069 See \`config.log' for more details" "$LINENO" 5; }
4070 else
4071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4072 $as_echo "yes" >&6; }
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4075 $as_echo_n "checking for C compiler default output file name... " >&6; }
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4077 $as_echo "$ac_file" >&6; }
4078 ac_exeext=$ac_cv_exeext
4080 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4081 ac_clean_files=$ac_clean_files_save
4082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4083 $as_echo_n "checking for suffix of executables... " >&6; }
4084 if { { ac_try="$ac_link"
4085 case "(($ac_try" in
4086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087 *) ac_try_echo=$ac_try;;
4088 esac
4089 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4090 $as_echo "$ac_try_echo"; } >&5
4091 (eval "$ac_link") 2>&5
4092 ac_status=$?
4093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4094 test $ac_status = 0; }; then :
4095 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4096 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4097 # work properly (i.e., refer to `conftest.exe'), while it won't with
4098 # `rm'.
4099 for ac_file in conftest.exe conftest conftest.*; do
4100 test -f "$ac_file" || continue
4101 case $ac_file in
4102 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4103 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4104 break;;
4105 * ) break;;
4106 esac
4107 done
4108 else
4109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4111 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4112 See \`config.log' for more details" "$LINENO" 5; }
4114 rm -f conftest conftest$ac_cv_exeext
4115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4116 $as_echo "$ac_cv_exeext" >&6; }
4118 rm -f conftest.$ac_ext
4119 EXEEXT=$ac_cv_exeext
4120 ac_exeext=$EXEEXT
4121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4122 /* end confdefs.h. */
4123 #include <stdio.h>
4125 main ()
4127 FILE *f = fopen ("conftest.out", "w");
4128 return ferror (f) || fclose (f) != 0;
4131 return 0;
4133 _ACEOF
4134 ac_clean_files="$ac_clean_files conftest.out"
4135 # Check that the compiler produces executables we can run. If not, either
4136 # the compiler is broken, or we cross compile.
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4138 $as_echo_n "checking whether we are cross compiling... " >&6; }
4139 if test "$cross_compiling" != yes; then
4140 { { ac_try="$ac_link"
4141 case "(($ac_try" in
4142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4143 *) ac_try_echo=$ac_try;;
4144 esac
4145 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4146 $as_echo "$ac_try_echo"; } >&5
4147 (eval "$ac_link") 2>&5
4148 ac_status=$?
4149 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150 test $ac_status = 0; }
4151 if { ac_try='./conftest$ac_cv_exeext'
4152 { { case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155 esac
4156 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157 $as_echo "$ac_try_echo"; } >&5
4158 (eval "$ac_try") 2>&5
4159 ac_status=$?
4160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; }; then
4162 cross_compiling=no
4163 else
4164 if test "$cross_compiling" = maybe; then
4165 cross_compiling=yes
4166 else
4167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4169 as_fn_error $? "cannot run C compiled programs.
4170 If you meant to cross compile, use \`--host'.
4171 See \`config.log' for more details" "$LINENO" 5; }
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4176 $as_echo "$cross_compiling" >&6; }
4178 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4179 ac_clean_files=$ac_clean_files_save
4180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4181 $as_echo_n "checking for suffix of object files... " >&6; }
4182 if ${ac_cv_objext+:} false; then :
4183 $as_echo_n "(cached) " >&6
4184 else
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186 /* end confdefs.h. */
4189 main ()
4193 return 0;
4195 _ACEOF
4196 rm -f conftest.o conftest.obj
4197 if { { ac_try="$ac_compile"
4198 case "(($ac_try" in
4199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4200 *) ac_try_echo=$ac_try;;
4201 esac
4202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4203 $as_echo "$ac_try_echo"; } >&5
4204 (eval "$ac_compile") 2>&5
4205 ac_status=$?
4206 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4207 test $ac_status = 0; }; then :
4208 for ac_file in conftest.o conftest.obj conftest.*; do
4209 test -f "$ac_file" || continue;
4210 case $ac_file in
4211 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4212 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4213 break;;
4214 esac
4215 done
4216 else
4217 $as_echo "$as_me: failed program was:" >&5
4218 sed 's/^/| /' conftest.$ac_ext >&5
4220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4222 as_fn_error $? "cannot compute suffix of object files: cannot compile
4223 See \`config.log' for more details" "$LINENO" 5; }
4225 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4228 $as_echo "$ac_cv_objext" >&6; }
4229 OBJEXT=$ac_cv_objext
4230 ac_objext=$OBJEXT
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4232 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4233 if ${ac_cv_c_compiler_gnu+:} false; then :
4234 $as_echo_n "(cached) " >&6
4235 else
4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h. */
4240 main ()
4242 #ifndef __GNUC__
4243 choke me
4244 #endif
4247 return 0;
4249 _ACEOF
4250 if ac_fn_c_try_compile "$LINENO"; then :
4251 ac_compiler_gnu=yes
4252 else
4253 ac_compiler_gnu=no
4255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4260 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4261 if test $ac_compiler_gnu = yes; then
4262 GCC=yes
4263 else
4264 GCC=
4266 ac_test_CFLAGS=${CFLAGS+set}
4267 ac_save_CFLAGS=$CFLAGS
4268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4269 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4270 if ${ac_cv_prog_cc_g+:} false; then :
4271 $as_echo_n "(cached) " >&6
4272 else
4273 ac_save_c_werror_flag=$ac_c_werror_flag
4274 ac_c_werror_flag=yes
4275 ac_cv_prog_cc_g=no
4276 CFLAGS="-g"
4277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4278 /* end confdefs.h. */
4281 main ()
4285 return 0;
4287 _ACEOF
4288 if ac_fn_c_try_compile "$LINENO"; then :
4289 ac_cv_prog_cc_g=yes
4290 else
4291 CFLAGS=""
4292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4293 /* end confdefs.h. */
4296 main ()
4300 return 0;
4302 _ACEOF
4303 if ac_fn_c_try_compile "$LINENO"; then :
4305 else
4306 ac_c_werror_flag=$ac_save_c_werror_flag
4307 CFLAGS="-g"
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4309 /* end confdefs.h. */
4312 main ()
4316 return 0;
4318 _ACEOF
4319 if ac_fn_c_try_compile "$LINENO"; then :
4320 ac_cv_prog_cc_g=yes
4322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4327 ac_c_werror_flag=$ac_save_c_werror_flag
4329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4330 $as_echo "$ac_cv_prog_cc_g" >&6; }
4331 if test "$ac_test_CFLAGS" = set; then
4332 CFLAGS=$ac_save_CFLAGS
4333 elif test $ac_cv_prog_cc_g = yes; then
4334 if test "$GCC" = yes; then
4335 CFLAGS="-g -O2"
4336 else
4337 CFLAGS="-g"
4339 else
4340 if test "$GCC" = yes; then
4341 CFLAGS="-O2"
4342 else
4343 CFLAGS=
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4347 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4348 if ${ac_cv_prog_cc_c89+:} false; then :
4349 $as_echo_n "(cached) " >&6
4350 else
4351 ac_cv_prog_cc_c89=no
4352 ac_save_CC=$CC
4353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4354 /* end confdefs.h. */
4355 #include <stdarg.h>
4356 #include <stdio.h>
4357 struct stat;
4358 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4359 struct buf { int x; };
4360 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4361 static char *e (p, i)
4362 char **p;
4363 int i;
4365 return p[i];
4367 static char *f (char * (*g) (char **, int), char **p, ...)
4369 char *s;
4370 va_list v;
4371 va_start (v,p);
4372 s = g (p, va_arg (v,int));
4373 va_end (v);
4374 return s;
4377 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4378 function prototypes and stuff, but not '\xHH' hex character constants.
4379 These don't provoke an error unfortunately, instead are silently treated
4380 as 'x'. The following induces an error, until -std is added to get
4381 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4382 array size at least. It's necessary to write '\x00'==0 to get something
4383 that's true only with -std. */
4384 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4386 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4387 inside strings and character constants. */
4388 #define FOO(x) 'x'
4389 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4391 int test (int i, double x);
4392 struct s1 {int (*f) (int a);};
4393 struct s2 {int (*f) (double a);};
4394 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4395 int argc;
4396 char **argv;
4398 main ()
4400 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4402 return 0;
4404 _ACEOF
4405 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4406 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4408 CC="$ac_save_CC $ac_arg"
4409 if ac_fn_c_try_compile "$LINENO"; then :
4410 ac_cv_prog_cc_c89=$ac_arg
4412 rm -f core conftest.err conftest.$ac_objext
4413 test "x$ac_cv_prog_cc_c89" != "xno" && break
4414 done
4415 rm -f conftest.$ac_ext
4416 CC=$ac_save_CC
4419 # AC_CACHE_VAL
4420 case "x$ac_cv_prog_cc_c89" in
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4423 $as_echo "none needed" >&6; } ;;
4424 xno)
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4426 $as_echo "unsupported" >&6; } ;;
4428 CC="$CC $ac_cv_prog_cc_c89"
4429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4430 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4431 esac
4432 if test "x$ac_cv_prog_cc_c89" != xno; then :
4436 ac_ext=c
4437 ac_cpp='$CPP $CPPFLAGS'
4438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4443 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4444 if ${ac_cv_prog_cc_c99+:} false; then :
4445 $as_echo_n "(cached) " >&6
4446 else
4447 ac_cv_prog_cc_c99=no
4448 ac_save_CC=$CC
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450 /* end confdefs.h. */
4451 #include <stdarg.h>
4452 #include <stdbool.h>
4453 #include <stdlib.h>
4454 #include <wchar.h>
4455 #include <stdio.h>
4457 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4458 #define debug(...) fprintf (stderr, __VA_ARGS__)
4459 #define showlist(...) puts (#__VA_ARGS__)
4460 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4461 static void
4462 test_varargs_macros (void)
4464 int x = 1234;
4465 int y = 5678;
4466 debug ("Flag");
4467 debug ("X = %d\n", x);
4468 showlist (The first, second, and third items.);
4469 report (x>y, "x is %d but y is %d", x, y);
4472 // Check long long types.
4473 #define BIG64 18446744073709551615ull
4474 #define BIG32 4294967295ul
4475 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4476 #if !BIG_OK
4477 your preprocessor is broken;
4478 #endif
4479 #if BIG_OK
4480 #else
4481 your preprocessor is broken;
4482 #endif
4483 static long long int bignum = -9223372036854775807LL;
4484 static unsigned long long int ubignum = BIG64;
4486 struct incomplete_array
4488 int datasize;
4489 double data[];
4492 struct named_init {
4493 int number;
4494 const wchar_t *name;
4495 double average;
4498 typedef const char *ccp;
4500 static inline int
4501 test_restrict (ccp restrict text)
4503 // See if C++-style comments work.
4504 // Iterate through items via the restricted pointer.
4505 // Also check for declarations in for loops.
4506 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4507 continue;
4508 return 0;
4511 // Check varargs and va_copy.
4512 static void
4513 test_varargs (const char *format, ...)
4515 va_list args;
4516 va_start (args, format);
4517 va_list args_copy;
4518 va_copy (args_copy, args);
4520 const char *str;
4521 int number;
4522 float fnumber;
4524 while (*format)
4526 switch (*format++)
4528 case 's': // string
4529 str = va_arg (args_copy, const char *);
4530 break;
4531 case 'd': // int
4532 number = va_arg (args_copy, int);
4533 break;
4534 case 'f': // float
4535 fnumber = va_arg (args_copy, double);
4536 break;
4537 default:
4538 break;
4541 va_end (args_copy);
4542 va_end (args);
4546 main ()
4549 // Check bool.
4550 _Bool success = false;
4552 // Check restrict.
4553 if (test_restrict ("String literal") == 0)
4554 success = true;
4555 char *restrict newvar = "Another string";
4557 // Check varargs.
4558 test_varargs ("s, d' f .", "string", 65, 34.234);
4559 test_varargs_macros ();
4561 // Check flexible array members.
4562 struct incomplete_array *ia =
4563 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4564 ia->datasize = 10;
4565 for (int i = 0; i < ia->datasize; ++i)
4566 ia->data[i] = i * 1.234;
4568 // Check named initializers.
4569 struct named_init ni = {
4570 .number = 34,
4571 .name = L"Test wide string",
4572 .average = 543.34343,
4575 ni.number = 58;
4577 int dynamic_array[ni.number];
4578 dynamic_array[ni.number - 1] = 543;
4580 // work around unused variable warnings
4581 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4582 || dynamic_array[ni.number - 1] != 543);
4585 return 0;
4587 _ACEOF
4588 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4590 CC="$ac_save_CC $ac_arg"
4591 if ac_fn_c_try_compile "$LINENO"; then :
4592 ac_cv_prog_cc_c99=$ac_arg
4594 rm -f core conftest.err conftest.$ac_objext
4595 test "x$ac_cv_prog_cc_c99" != "xno" && break
4596 done
4597 rm -f conftest.$ac_ext
4598 CC=$ac_save_CC
4601 # AC_CACHE_VAL
4602 case "x$ac_cv_prog_cc_c99" in
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4605 $as_echo "none needed" >&6; } ;;
4606 xno)
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4608 $as_echo "unsupported" >&6; } ;;
4610 CC="$CC $ac_cv_prog_cc_c99"
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4612 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4613 esac
4614 if test "x$ac_cv_prog_cc_c99" != xno; then :
4620 # Error out if the compiler does not support C99, as the codebase
4621 # relies on that.
4622 if test "$ac_cv_prog_cc_c99" = no; then
4623 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4626 ac_ext=cpp
4627 ac_cpp='$CXXCPP $CPPFLAGS'
4628 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4629 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4630 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4631 if test -z "$CXX"; then
4632 if test -n "$CCC"; then
4633 CXX=$CCC
4634 else
4635 if test -n "$ac_tool_prefix"; then
4636 for ac_prog in $pgac_cxx_list
4638 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4639 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4641 $as_echo_n "checking for $ac_word... " >&6; }
4642 if ${ac_cv_prog_CXX+:} false; then :
4643 $as_echo_n "(cached) " >&6
4644 else
4645 if test -n "$CXX"; then
4646 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4647 else
4648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649 for as_dir in $PATH
4651 IFS=$as_save_IFS
4652 test -z "$as_dir" && as_dir=.
4653 for ac_exec_ext in '' $ac_executable_extensions; do
4654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4655 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657 break 2
4659 done
4660 done
4661 IFS=$as_save_IFS
4665 CXX=$ac_cv_prog_CXX
4666 if test -n "$CXX"; then
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4668 $as_echo "$CXX" >&6; }
4669 else
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671 $as_echo "no" >&6; }
4675 test -n "$CXX" && break
4676 done
4678 if test -z "$CXX"; then
4679 ac_ct_CXX=$CXX
4680 for ac_prog in $pgac_cxx_list
4682 # Extract the first word of "$ac_prog", so it can be a program name with args.
4683 set dummy $ac_prog; ac_word=$2
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685 $as_echo_n "checking for $ac_word... " >&6; }
4686 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688 else
4689 if test -n "$ac_ct_CXX"; then
4690 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4691 else
4692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693 for as_dir in $PATH
4695 IFS=$as_save_IFS
4696 test -z "$as_dir" && as_dir=.
4697 for ac_exec_ext in '' $ac_executable_extensions; do
4698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699 ac_cv_prog_ac_ct_CXX="$ac_prog"
4700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701 break 2
4703 done
4704 done
4705 IFS=$as_save_IFS
4709 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4710 if test -n "$ac_ct_CXX"; then
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4712 $as_echo "$ac_ct_CXX" >&6; }
4713 else
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715 $as_echo "no" >&6; }
4719 test -n "$ac_ct_CXX" && break
4720 done
4722 if test "x$ac_ct_CXX" = x; then
4723 CXX="g++"
4724 else
4725 case $cross_compiling:$ac_tool_warned in
4726 yes:)
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4728 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4729 ac_tool_warned=yes ;;
4730 esac
4731 CXX=$ac_ct_CXX
4737 # Provide some information about the compiler.
4738 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4739 set X $ac_compile
4740 ac_compiler=$2
4741 for ac_option in --version -v -V -qversion; do
4742 { { ac_try="$ac_compiler $ac_option >&5"
4743 case "(($ac_try" in
4744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4745 *) ac_try_echo=$ac_try;;
4746 esac
4747 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4748 $as_echo "$ac_try_echo"; } >&5
4749 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4750 ac_status=$?
4751 if test -s conftest.err; then
4752 sed '10a\
4753 ... rest of stderr output deleted ...
4754 10q' conftest.err >conftest.er1
4755 cat conftest.er1 >&5
4757 rm -f conftest.er1 conftest.err
4758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4759 test $ac_status = 0; }
4760 done
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4763 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4764 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4765 $as_echo_n "(cached) " >&6
4766 else
4767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4768 /* end confdefs.h. */
4771 main ()
4773 #ifndef __GNUC__
4774 choke me
4775 #endif
4778 return 0;
4780 _ACEOF
4781 if ac_fn_cxx_try_compile "$LINENO"; then :
4782 ac_compiler_gnu=yes
4783 else
4784 ac_compiler_gnu=no
4786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4787 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4791 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4792 if test $ac_compiler_gnu = yes; then
4793 GXX=yes
4794 else
4795 GXX=
4797 ac_test_CXXFLAGS=${CXXFLAGS+set}
4798 ac_save_CXXFLAGS=$CXXFLAGS
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4800 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4801 if ${ac_cv_prog_cxx_g+:} false; then :
4802 $as_echo_n "(cached) " >&6
4803 else
4804 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4805 ac_cxx_werror_flag=yes
4806 ac_cv_prog_cxx_g=no
4807 CXXFLAGS="-g"
4808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4809 /* end confdefs.h. */
4812 main ()
4816 return 0;
4818 _ACEOF
4819 if ac_fn_cxx_try_compile "$LINENO"; then :
4820 ac_cv_prog_cxx_g=yes
4821 else
4822 CXXFLAGS=""
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824 /* end confdefs.h. */
4827 main ()
4831 return 0;
4833 _ACEOF
4834 if ac_fn_cxx_try_compile "$LINENO"; then :
4836 else
4837 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4838 CXXFLAGS="-g"
4839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4840 /* end confdefs.h. */
4843 main ()
4847 return 0;
4849 _ACEOF
4850 if ac_fn_cxx_try_compile "$LINENO"; then :
4851 ac_cv_prog_cxx_g=yes
4853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4858 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4861 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4862 if test "$ac_test_CXXFLAGS" = set; then
4863 CXXFLAGS=$ac_save_CXXFLAGS
4864 elif test $ac_cv_prog_cxx_g = yes; then
4865 if test "$GXX" = yes; then
4866 CXXFLAGS="-g -O2"
4867 else
4868 CXXFLAGS="-g"
4870 else
4871 if test "$GXX" = yes; then
4872 CXXFLAGS="-O2"
4873 else
4874 CXXFLAGS=
4877 ac_ext=c
4878 ac_cpp='$CPP $CPPFLAGS'
4879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4884 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4885 # but has idiosyncrasies of its own. We assume icc will define
4886 # __INTEL_COMPILER regardless of CFLAGS.
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4892 main ()
4894 #ifndef __INTEL_COMPILER
4895 choke me
4896 #endif
4898 return 0;
4900 _ACEOF
4901 if ac_fn_c_try_compile "$LINENO"; then :
4902 ICC=yes
4903 else
4904 ICC=no
4906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4908 # Check if it's Sun Studio compiler. We assume that
4909 # __SUNPRO_C will be defined for Sun Studio compilers
4910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4911 /* end confdefs.h. */
4914 main ()
4916 #ifndef __SUNPRO_C
4917 choke me
4918 #endif
4920 return 0;
4922 _ACEOF
4923 if ac_fn_c_try_compile "$LINENO"; then :
4924 SUN_STUDIO_CC=yes
4925 else
4926 SUN_STUDIO_CC=no
4928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934 # LLVM
4936 # Checked early because subsequent tests depend on it.
4940 # Check whether --with-llvm was given.
4941 if test "${with_llvm+set}" = set; then :
4942 withval=$with_llvm;
4943 case $withval in
4944 yes)
4946 $as_echo "#define USE_LLVM 1" >>confdefs.h
4953 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4955 esac
4957 else
4958 with_llvm=no
4964 for ac_prog in gawk mawk nawk awk
4966 # Extract the first word of "$ac_prog", so it can be a program name with args.
4967 set dummy $ac_prog; ac_word=$2
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969 $as_echo_n "checking for $ac_word... " >&6; }
4970 if ${ac_cv_prog_AWK+:} false; then :
4971 $as_echo_n "(cached) " >&6
4972 else
4973 if test -n "$AWK"; then
4974 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4975 else
4976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977 for as_dir in $PATH
4979 IFS=$as_save_IFS
4980 test -z "$as_dir" && as_dir=.
4981 for ac_exec_ext in '' $ac_executable_extensions; do
4982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983 ac_cv_prog_AWK="$ac_prog"
4984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985 break 2
4987 done
4988 done
4989 IFS=$as_save_IFS
4993 AWK=$ac_cv_prog_AWK
4994 if test -n "$AWK"; then
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4996 $as_echo "$AWK" >&6; }
4997 else
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999 $as_echo "no" >&6; }
5003 test -n "$AWK" && break
5004 done
5006 if test "$with_llvm" = yes; then :
5012 if test -z "$LLVM_CONFIG"; then
5013 for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
5015 # Extract the first word of "$ac_prog", so it can be a program name with args.
5016 set dummy $ac_prog; ac_word=$2
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018 $as_echo_n "checking for $ac_word... " >&6; }
5019 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5020 $as_echo_n "(cached) " >&6
5021 else
5022 case $LLVM_CONFIG in
5023 [\\/]* | ?:[\\/]*)
5024 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028 for as_dir in $PATH
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
5032 for ac_exec_ext in '' $ac_executable_extensions; do
5033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5034 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5036 break 2
5038 done
5039 done
5040 IFS=$as_save_IFS
5043 esac
5045 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5046 if test -n "$LLVM_CONFIG"; then
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5048 $as_echo "$LLVM_CONFIG" >&6; }
5049 else
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051 $as_echo "no" >&6; }
5055 test -n "$LLVM_CONFIG" && break
5056 done
5058 else
5059 # Report the value of LLVM_CONFIG in configure's output in all cases.
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5061 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5063 $as_echo "$LLVM_CONFIG" >&6; }
5067 # no point continuing if llvm wasn't found
5068 if test -z "$LLVM_CONFIG"; then
5069 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5071 # check if detected $LLVM_CONFIG is executable
5072 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5073 if test "x$pgac_llvm_version" = "xno"; then
5074 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5076 # and whether the version is supported
5077 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5078 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5081 # need clang to create some bitcode files
5083 if test -z "$CLANG"; then
5084 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5086 # Extract the first word of "$ac_prog", so it can be a program name with args.
5087 set dummy $ac_prog; ac_word=$2
5088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089 $as_echo_n "checking for $ac_word... " >&6; }
5090 if ${ac_cv_path_CLANG+:} false; then :
5091 $as_echo_n "(cached) " >&6
5092 else
5093 case $CLANG in
5094 [\\/]* | ?:[\\/]*)
5095 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099 for as_dir in $PATH
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
5103 for ac_exec_ext in '' $ac_executable_extensions; do
5104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5105 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107 break 2
5109 done
5110 done
5111 IFS=$as_save_IFS
5114 esac
5116 CLANG=$ac_cv_path_CLANG
5117 if test -n "$CLANG"; then
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5119 $as_echo "$CLANG" >&6; }
5120 else
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122 $as_echo "no" >&6; }
5126 test -n "$CLANG" && break
5127 done
5129 else
5130 # Report the value of CLANG in configure's output in all cases.
5131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5132 $as_echo_n "checking for CLANG... " >&6; }
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5134 $as_echo "$CLANG" >&6; }
5137 if test -z "$CLANG"; then
5138 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5140 # make sure clang is executable
5141 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5142 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5144 # Could check clang version, but it doesn't seem that
5145 # important. Systems with a new enough LLVM version are usually
5146 # going to have a decent clang version too. It's also not entirely
5147 # clear what the minimum version is.
5149 # Collect compiler flags necessary to build the LLVM dependent
5150 # shared library.
5151 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5152 case $pgac_option in
5153 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5154 esac
5155 done
5157 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5158 case $pgac_option in
5159 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5160 esac
5161 done
5163 # ABI influencing options, standard influencing options
5164 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5165 case $pgac_option in
5166 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5167 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5168 esac
5169 done
5171 # Look for components we're interested in, collect necessary
5172 # libs. As some components are optional, we can't just list all of
5173 # them as it'd raise an error.
5174 pgac_components='';
5175 for pgac_component in `$LLVM_CONFIG --components`; do
5176 case $pgac_component in
5177 engine) pgac_components="$pgac_components $pgac_component";;
5178 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5179 orcjit) pgac_components="$pgac_components $pgac_component";;
5180 passes) pgac_components="$pgac_components $pgac_component";;
5181 native) pgac_components="$pgac_components $pgac_component";;
5182 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5183 esac
5184 done;
5186 # And then get the libraries that need to be linked in for the
5187 # selected components. They're large libraries, we only want to
5188 # link them into the LLVM using shared library.
5189 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5190 case $pgac_option in
5191 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5192 esac
5193 done
5195 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5205 fi # fi
5208 unset CFLAGS
5209 unset CXXFLAGS
5212 # Read the template
5214 . "$srcdir/src/template/$template" || exit
5216 # C[XX]FLAGS are selected so:
5217 # If the user specifies something in the environment, that is used.
5218 # else: If the template file set something, that is used.
5219 # else: If coverage was enabled, don't set anything.
5220 # else: If the compiler is GCC, then we use -O2.
5221 # else: If the compiler is something else, then we use -O, unless debugging.
5223 if test "$ac_env_CFLAGS_set" = set; then
5224 CFLAGS=$ac_env_CFLAGS_value
5225 elif test "${CFLAGS+set}" = set; then
5226 : # (keep what template set)
5227 elif test "$enable_coverage" = yes; then
5228 : # no optimization by default
5229 elif test "$GCC" = yes; then
5230 CFLAGS="-O2"
5231 else
5232 # if the user selected debug mode, don't use -O
5233 if test "$enable_debug" != yes; then
5234 CFLAGS="-O"
5238 if test "$ac_env_CXXFLAGS_set" = set; then
5239 CXXFLAGS=$ac_env_CXXFLAGS_value
5240 elif test "${CXXFLAGS+set}" = set; then
5241 : # (keep what template set)
5242 elif test "$enable_coverage" = yes; then
5243 : # no optimization by default
5244 elif test "$GCC" = yes; then
5245 CXXFLAGS="-O2"
5246 else
5247 # if the user selected debug mode, don't use -O
5248 if test "$enable_debug" != yes; then
5249 CXXFLAGS="-O"
5253 # When generating bitcode (for inlining) we always want to use -O2
5254 # even when --enable-debug is specified. The bitcode is not going to
5255 # be used for line-by-line debugging, and JIT inlining doesn't work
5256 # without at least -O1 (otherwise clang will emit 'noinline'
5257 # attributes everywhere), which is bad for testing. Still allow the
5258 # environment to override if done explicitly.
5259 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5260 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5261 else
5262 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5264 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5265 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5266 else
5267 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5270 # C[XX]FLAGS we determined above will be added back at the end
5271 user_CFLAGS=$CFLAGS
5272 CFLAGS=""
5273 user_CXXFLAGS=$CXXFLAGS
5274 CXXFLAGS=""
5275 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5276 BITCODE_CFLAGS=""
5277 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5278 BITCODE_CXXFLAGS=""
5280 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5281 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5282 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5284 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5285 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5288 # Some versions of GCC support some additional useful warning flags.
5289 # Check whether they are supported, and add them to CFLAGS if so.
5290 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5291 # but has its own. Also check other compiler-specific flags here.
5293 if test "$GCC" = yes -a "$ICC" = no; then
5294 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5295 CXXFLAGS="-Wall -Wpointer-arith"
5296 # These work in some but not all gcc versions
5297 save_CFLAGS=$CFLAGS
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5300 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5301 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5302 $as_echo_n "(cached) " >&6
5303 else
5304 pgac_save_CFLAGS=$CFLAGS
5305 pgac_save_CC=$CC
5306 CC=${CC}
5307 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5308 ac_save_c_werror_flag=$ac_c_werror_flag
5309 ac_c_werror_flag=yes
5310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5311 /* end confdefs.h. */
5314 main ()
5318 return 0;
5320 _ACEOF
5321 if ac_fn_c_try_compile "$LINENO"; then :
5322 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5323 else
5324 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5327 ac_c_werror_flag=$ac_save_c_werror_flag
5328 CFLAGS="$pgac_save_CFLAGS"
5329 CC="$pgac_save_CC"
5331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5332 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5333 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5334 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5338 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5339 # disable it, so AC_SUBST the negative form.
5340 PERMIT_DECLARATION_AFTER_STATEMENT=
5341 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5342 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5345 # Really don't want VLAs to be used in our dialect of C
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5348 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5349 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5350 $as_echo_n "(cached) " >&6
5351 else
5352 pgac_save_CFLAGS=$CFLAGS
5353 pgac_save_CC=$CC
5354 CC=${CC}
5355 CFLAGS="${CFLAGS} -Werror=vla"
5356 ac_save_c_werror_flag=$ac_c_werror_flag
5357 ac_c_werror_flag=yes
5358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5359 /* end confdefs.h. */
5362 main ()
5366 return 0;
5368 _ACEOF
5369 if ac_fn_c_try_compile "$LINENO"; then :
5370 pgac_cv_prog_CC_cflags__Werror_vla=yes
5371 else
5372 pgac_cv_prog_CC_cflags__Werror_vla=no
5374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5375 ac_c_werror_flag=$ac_save_c_werror_flag
5376 CFLAGS="$pgac_save_CFLAGS"
5377 CC="$pgac_save_CC"
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5380 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5381 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5382 CFLAGS="${CFLAGS} -Werror=vla"
5386 # On macOS, complain about usage of symbols newer than the deployment target
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5389 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5390 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5391 $as_echo_n "(cached) " >&6
5392 else
5393 pgac_save_CFLAGS=$CFLAGS
5394 pgac_save_CC=$CC
5395 CC=${CC}
5396 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5397 ac_save_c_werror_flag=$ac_c_werror_flag
5398 ac_c_werror_flag=yes
5399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5400 /* end confdefs.h. */
5403 main ()
5407 return 0;
5409 _ACEOF
5410 if ac_fn_c_try_compile "$LINENO"; then :
5411 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5412 else
5413 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5416 ac_c_werror_flag=$ac_save_c_werror_flag
5417 CFLAGS="$pgac_save_CFLAGS"
5418 CC="$pgac_save_CC"
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5421 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5422 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5423 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5428 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5429 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5430 $as_echo_n "(cached) " >&6
5431 else
5432 pgac_save_CXXFLAGS=$CXXFLAGS
5433 pgac_save_CXX=$CXX
5434 CXX=${CXX}
5435 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5436 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5437 ac_cxx_werror_flag=yes
5438 ac_ext=cpp
5439 ac_cpp='$CXXCPP $CPPFLAGS'
5440 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5441 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5442 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445 /* end confdefs.h. */
5448 main ()
5452 return 0;
5454 _ACEOF
5455 if ac_fn_cxx_try_compile "$LINENO"; then :
5456 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5457 else
5458 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5461 ac_ext=c
5462 ac_cpp='$CPP $CPPFLAGS'
5463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5467 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5468 CXXFLAGS="$pgac_save_CXXFLAGS"
5469 CXX="$pgac_save_CXX"
5471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5472 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5473 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5474 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5478 # -Wvla is not applicable for C++
5480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5481 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5482 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5483 $as_echo_n "(cached) " >&6
5484 else
5485 pgac_save_CFLAGS=$CFLAGS
5486 pgac_save_CC=$CC
5487 CC=${CC}
5488 CFLAGS="${CFLAGS} -Wendif-labels"
5489 ac_save_c_werror_flag=$ac_c_werror_flag
5490 ac_c_werror_flag=yes
5491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492 /* end confdefs.h. */
5495 main ()
5499 return 0;
5501 _ACEOF
5502 if ac_fn_c_try_compile "$LINENO"; then :
5503 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5504 else
5505 pgac_cv_prog_CC_cflags__Wendif_labels=no
5507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5508 ac_c_werror_flag=$ac_save_c_werror_flag
5509 CFLAGS="$pgac_save_CFLAGS"
5510 CC="$pgac_save_CC"
5512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5513 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5514 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5515 CFLAGS="${CFLAGS} -Wendif-labels"
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5520 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5521 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5522 $as_echo_n "(cached) " >&6
5523 else
5524 pgac_save_CXXFLAGS=$CXXFLAGS
5525 pgac_save_CXX=$CXX
5526 CXX=${CXX}
5527 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5528 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5529 ac_cxx_werror_flag=yes
5530 ac_ext=cpp
5531 ac_cpp='$CXXCPP $CPPFLAGS'
5532 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5533 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5534 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5537 /* end confdefs.h. */
5540 main ()
5544 return 0;
5546 _ACEOF
5547 if ac_fn_cxx_try_compile "$LINENO"; then :
5548 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5549 else
5550 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5553 ac_ext=c
5554 ac_cpp='$CPP $CPPFLAGS'
5555 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5556 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5557 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5559 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5560 CXXFLAGS="$pgac_save_CXXFLAGS"
5561 CXX="$pgac_save_CXX"
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5564 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5565 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5566 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5572 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5573 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5574 $as_echo_n "(cached) " >&6
5575 else
5576 pgac_save_CFLAGS=$CFLAGS
5577 pgac_save_CC=$CC
5578 CC=${CC}
5579 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5580 ac_save_c_werror_flag=$ac_c_werror_flag
5581 ac_c_werror_flag=yes
5582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5583 /* end confdefs.h. */
5586 main ()
5590 return 0;
5592 _ACEOF
5593 if ac_fn_c_try_compile "$LINENO"; then :
5594 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5595 else
5596 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5599 ac_c_werror_flag=$ac_save_c_werror_flag
5600 CFLAGS="$pgac_save_CFLAGS"
5601 CC="$pgac_save_CC"
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5604 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5605 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5606 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5611 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5612 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5613 $as_echo_n "(cached) " >&6
5614 else
5615 pgac_save_CXXFLAGS=$CXXFLAGS
5616 pgac_save_CXX=$CXX
5617 CXX=${CXX}
5618 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5619 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5620 ac_cxx_werror_flag=yes
5621 ac_ext=cpp
5622 ac_cpp='$CXXCPP $CPPFLAGS'
5623 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5624 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5625 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5628 /* end confdefs.h. */
5631 main ()
5635 return 0;
5637 _ACEOF
5638 if ac_fn_cxx_try_compile "$LINENO"; then :
5639 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5640 else
5641 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5644 ac_ext=c
5645 ac_cpp='$CPP $CPPFLAGS'
5646 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5647 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5648 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5650 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5651 CXXFLAGS="$pgac_save_CXXFLAGS"
5652 CXX="$pgac_save_CXX"
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5655 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5656 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5657 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5663 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5664 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5665 $as_echo_n "(cached) " >&6
5666 else
5667 pgac_save_CFLAGS=$CFLAGS
5668 pgac_save_CC=$CC
5669 CC=${CC}
5670 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5671 ac_save_c_werror_flag=$ac_c_werror_flag
5672 ac_c_werror_flag=yes
5673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5674 /* end confdefs.h. */
5677 main ()
5681 return 0;
5683 _ACEOF
5684 if ac_fn_c_try_compile "$LINENO"; then :
5685 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5686 else
5687 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5690 ac_c_werror_flag=$ac_save_c_werror_flag
5691 CFLAGS="$pgac_save_CFLAGS"
5692 CC="$pgac_save_CC"
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5695 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5696 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5697 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5702 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5703 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5704 $as_echo_n "(cached) " >&6
5705 else
5706 pgac_save_CXXFLAGS=$CXXFLAGS
5707 pgac_save_CXX=$CXX
5708 CXX=${CXX}
5709 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5710 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5711 ac_cxx_werror_flag=yes
5712 ac_ext=cpp
5713 ac_cpp='$CXXCPP $CPPFLAGS'
5714 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5715 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5716 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5719 /* end confdefs.h. */
5722 main ()
5726 return 0;
5728 _ACEOF
5729 if ac_fn_cxx_try_compile "$LINENO"; then :
5730 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5731 else
5732 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5735 ac_ext=c
5736 ac_cpp='$CPP $CPPFLAGS'
5737 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5738 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5739 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5741 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5742 CXXFLAGS="$pgac_save_CXXFLAGS"
5743 CXX="$pgac_save_CXX"
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5746 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5747 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5748 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5754 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5755 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5756 $as_echo_n "(cached) " >&6
5757 else
5758 pgac_save_CFLAGS=$CFLAGS
5759 pgac_save_CC=$CC
5760 CC=${CC}
5761 CFLAGS="${CFLAGS} -Wcast-function-type"
5762 ac_save_c_werror_flag=$ac_c_werror_flag
5763 ac_c_werror_flag=yes
5764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5765 /* end confdefs.h. */
5768 main ()
5772 return 0;
5774 _ACEOF
5775 if ac_fn_c_try_compile "$LINENO"; then :
5776 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5777 else
5778 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5781 ac_c_werror_flag=$ac_save_c_werror_flag
5782 CFLAGS="$pgac_save_CFLAGS"
5783 CC="$pgac_save_CC"
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5786 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5787 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5788 CFLAGS="${CFLAGS} -Wcast-function-type"
5792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5793 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5794 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5795 $as_echo_n "(cached) " >&6
5796 else
5797 pgac_save_CXXFLAGS=$CXXFLAGS
5798 pgac_save_CXX=$CXX
5799 CXX=${CXX}
5800 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5801 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5802 ac_cxx_werror_flag=yes
5803 ac_ext=cpp
5804 ac_cpp='$CXXCPP $CPPFLAGS'
5805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5806 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5810 /* end confdefs.h. */
5813 main ()
5817 return 0;
5819 _ACEOF
5820 if ac_fn_cxx_try_compile "$LINENO"; then :
5821 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5822 else
5823 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5826 ac_ext=c
5827 ac_cpp='$CPP $CPPFLAGS'
5828 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5829 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5830 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5832 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5833 CXXFLAGS="$pgac_save_CXXFLAGS"
5834 CXX="$pgac_save_CXX"
5836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5837 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5838 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5839 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5843 # This was included in -Wall/-Wformat in older GCC versions
5845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5846 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5847 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5848 $as_echo_n "(cached) " >&6
5849 else
5850 pgac_save_CFLAGS=$CFLAGS
5851 pgac_save_CC=$CC
5852 CC=${CC}
5853 CFLAGS="${CFLAGS} -Wformat-security"
5854 ac_save_c_werror_flag=$ac_c_werror_flag
5855 ac_c_werror_flag=yes
5856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5857 /* end confdefs.h. */
5860 main ()
5864 return 0;
5866 _ACEOF
5867 if ac_fn_c_try_compile "$LINENO"; then :
5868 pgac_cv_prog_CC_cflags__Wformat_security=yes
5869 else
5870 pgac_cv_prog_CC_cflags__Wformat_security=no
5872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5873 ac_c_werror_flag=$ac_save_c_werror_flag
5874 CFLAGS="$pgac_save_CFLAGS"
5875 CC="$pgac_save_CC"
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5878 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5879 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5880 CFLAGS="${CFLAGS} -Wformat-security"
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5885 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5886 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5887 $as_echo_n "(cached) " >&6
5888 else
5889 pgac_save_CXXFLAGS=$CXXFLAGS
5890 pgac_save_CXX=$CXX
5891 CXX=${CXX}
5892 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5893 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5894 ac_cxx_werror_flag=yes
5895 ac_ext=cpp
5896 ac_cpp='$CXXCPP $CPPFLAGS'
5897 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5898 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5899 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5902 /* end confdefs.h. */
5905 main ()
5909 return 0;
5911 _ACEOF
5912 if ac_fn_cxx_try_compile "$LINENO"; then :
5913 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5914 else
5915 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5918 ac_ext=c
5919 ac_cpp='$CPP $CPPFLAGS'
5920 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5921 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5922 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5924 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5925 CXXFLAGS="$pgac_save_CXXFLAGS"
5926 CXX="$pgac_save_CXX"
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5929 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5930 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5931 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5935 # Disable strict-aliasing rules; needed for gcc 3.3+
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5938 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5939 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5940 $as_echo_n "(cached) " >&6
5941 else
5942 pgac_save_CFLAGS=$CFLAGS
5943 pgac_save_CC=$CC
5944 CC=${CC}
5945 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5946 ac_save_c_werror_flag=$ac_c_werror_flag
5947 ac_c_werror_flag=yes
5948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5949 /* end confdefs.h. */
5952 main ()
5956 return 0;
5958 _ACEOF
5959 if ac_fn_c_try_compile "$LINENO"; then :
5960 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5961 else
5962 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5965 ac_c_werror_flag=$ac_save_c_werror_flag
5966 CFLAGS="$pgac_save_CFLAGS"
5967 CC="$pgac_save_CC"
5969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5970 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5971 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5972 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5977 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5978 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5979 $as_echo_n "(cached) " >&6
5980 else
5981 pgac_save_CXXFLAGS=$CXXFLAGS
5982 pgac_save_CXX=$CXX
5983 CXX=${CXX}
5984 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5985 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5986 ac_cxx_werror_flag=yes
5987 ac_ext=cpp
5988 ac_cpp='$CXXCPP $CPPFLAGS'
5989 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5990 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5991 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5994 /* end confdefs.h. */
5997 main ()
6001 return 0;
6003 _ACEOF
6004 if ac_fn_cxx_try_compile "$LINENO"; then :
6005 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6006 else
6007 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6010 ac_ext=c
6011 ac_cpp='$CPP $CPPFLAGS'
6012 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6013 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6014 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6016 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6017 CXXFLAGS="$pgac_save_CXXFLAGS"
6018 CXX="$pgac_save_CXX"
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6021 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6022 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6023 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6027 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6030 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6031 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6032 $as_echo_n "(cached) " >&6
6033 else
6034 pgac_save_CFLAGS=$CFLAGS
6035 pgac_save_CC=$CC
6036 CC=${CC}
6037 CFLAGS="${CFLAGS} -fwrapv"
6038 ac_save_c_werror_flag=$ac_c_werror_flag
6039 ac_c_werror_flag=yes
6040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6041 /* end confdefs.h. */
6044 main ()
6048 return 0;
6050 _ACEOF
6051 if ac_fn_c_try_compile "$LINENO"; then :
6052 pgac_cv_prog_CC_cflags__fwrapv=yes
6053 else
6054 pgac_cv_prog_CC_cflags__fwrapv=no
6056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6057 ac_c_werror_flag=$ac_save_c_werror_flag
6058 CFLAGS="$pgac_save_CFLAGS"
6059 CC="$pgac_save_CC"
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6062 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6063 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6064 CFLAGS="${CFLAGS} -fwrapv"
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6069 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6070 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6071 $as_echo_n "(cached) " >&6
6072 else
6073 pgac_save_CXXFLAGS=$CXXFLAGS
6074 pgac_save_CXX=$CXX
6075 CXX=${CXX}
6076 CXXFLAGS="${CXXFLAGS} -fwrapv"
6077 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6078 ac_cxx_werror_flag=yes
6079 ac_ext=cpp
6080 ac_cpp='$CXXCPP $CPPFLAGS'
6081 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6082 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6083 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6086 /* end confdefs.h. */
6089 main ()
6093 return 0;
6095 _ACEOF
6096 if ac_fn_cxx_try_compile "$LINENO"; then :
6097 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6098 else
6099 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6102 ac_ext=c
6103 ac_cpp='$CPP $CPPFLAGS'
6104 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6105 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6108 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6109 CXXFLAGS="$pgac_save_CXXFLAGS"
6110 CXX="$pgac_save_CXX"
6112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6113 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6114 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6115 CXXFLAGS="${CXXFLAGS} -fwrapv"
6119 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6122 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6123 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6124 $as_echo_n "(cached) " >&6
6125 else
6126 pgac_save_CFLAGS=$CFLAGS
6127 pgac_save_CC=$CC
6128 CC=${CC}
6129 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6130 ac_save_c_werror_flag=$ac_c_werror_flag
6131 ac_c_werror_flag=yes
6132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133 /* end confdefs.h. */
6136 main ()
6140 return 0;
6142 _ACEOF
6143 if ac_fn_c_try_compile "$LINENO"; then :
6144 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6145 else
6146 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6149 ac_c_werror_flag=$ac_save_c_werror_flag
6150 CFLAGS="$pgac_save_CFLAGS"
6151 CC="$pgac_save_CC"
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6154 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6155 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6156 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6161 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6162 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6163 $as_echo_n "(cached) " >&6
6164 else
6165 pgac_save_CXXFLAGS=$CXXFLAGS
6166 pgac_save_CXX=$CXX
6167 CXX=${CXX}
6168 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6169 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6170 ac_cxx_werror_flag=yes
6171 ac_ext=cpp
6172 ac_cpp='$CXXCPP $CPPFLAGS'
6173 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6174 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6175 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178 /* end confdefs.h. */
6181 main ()
6185 return 0;
6187 _ACEOF
6188 if ac_fn_cxx_try_compile "$LINENO"; then :
6189 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6190 else
6191 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6194 ac_ext=c
6195 ac_cpp='$CPP $CPPFLAGS'
6196 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6197 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6198 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6200 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6201 CXXFLAGS="$pgac_save_CXXFLAGS"
6202 CXX="$pgac_save_CXX"
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6205 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6206 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6207 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6211 # Optimization flags for specific files that benefit from loop unrolling
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6213 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6214 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6215 $as_echo_n "(cached) " >&6
6216 else
6217 pgac_save_CFLAGS=$CFLAGS
6218 pgac_save_CC=$CC
6219 CC=${CC}
6220 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6221 ac_save_c_werror_flag=$ac_c_werror_flag
6222 ac_c_werror_flag=yes
6223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6224 /* end confdefs.h. */
6227 main ()
6231 return 0;
6233 _ACEOF
6234 if ac_fn_c_try_compile "$LINENO"; then :
6235 pgac_cv_prog_CC_cflags__funroll_loops=yes
6236 else
6237 pgac_cv_prog_CC_cflags__funroll_loops=no
6239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6240 ac_c_werror_flag=$ac_save_c_werror_flag
6241 CFLAGS="$pgac_save_CFLAGS"
6242 CC="$pgac_save_CC"
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6245 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6246 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6247 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6251 # Optimization flags for specific files that benefit from vectorization
6252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6253 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6254 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6255 $as_echo_n "(cached) " >&6
6256 else
6257 pgac_save_CFLAGS=$CFLAGS
6258 pgac_save_CC=$CC
6259 CC=${CC}
6260 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6261 ac_save_c_werror_flag=$ac_c_werror_flag
6262 ac_c_werror_flag=yes
6263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6264 /* end confdefs.h. */
6267 main ()
6271 return 0;
6273 _ACEOF
6274 if ac_fn_c_try_compile "$LINENO"; then :
6275 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6276 else
6277 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6280 ac_c_werror_flag=$ac_save_c_werror_flag
6281 CFLAGS="$pgac_save_CFLAGS"
6282 CC="$pgac_save_CC"
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6285 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6286 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6287 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6292 # The following tests want to suppress various unhelpful warnings by adding
6293 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6294 # switches, so we have to test for the positive form and if that works,
6295 # add the negative form. Note that tests of this form typically need to
6296 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6298 # Suppress clang's unhelpful unused-command-line-argument warnings.
6299 NOT_THE_CFLAGS=""
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6301 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6302 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6303 $as_echo_n "(cached) " >&6
6304 else
6305 pgac_save_CFLAGS=$CFLAGS
6306 pgac_save_CC=$CC
6307 CC=${CC}
6308 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6309 ac_save_c_werror_flag=$ac_c_werror_flag
6310 ac_c_werror_flag=yes
6311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6312 /* end confdefs.h. */
6315 main ()
6319 return 0;
6321 _ACEOF
6322 if ac_fn_c_try_compile "$LINENO"; then :
6323 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6324 else
6325 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6328 ac_c_werror_flag=$ac_save_c_werror_flag
6329 CFLAGS="$pgac_save_CFLAGS"
6330 CC="$pgac_save_CC"
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6333 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6334 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6335 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6339 if test -n "$NOT_THE_CFLAGS"; then
6340 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6342 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6343 # of warnings when building plperl because of usages in the Perl headers.
6344 NOT_THE_CFLAGS=""
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6346 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6347 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6348 $as_echo_n "(cached) " >&6
6349 else
6350 pgac_save_CFLAGS=$CFLAGS
6351 pgac_save_CC=$CC
6352 CC=${CC}
6353 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6354 ac_save_c_werror_flag=$ac_c_werror_flag
6355 ac_c_werror_flag=yes
6356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6357 /* end confdefs.h. */
6360 main ()
6364 return 0;
6366 _ACEOF
6367 if ac_fn_c_try_compile "$LINENO"; then :
6368 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6369 else
6370 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6373 ac_c_werror_flag=$ac_save_c_werror_flag
6374 CFLAGS="$pgac_save_CFLAGS"
6375 CC="$pgac_save_CC"
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6378 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6379 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6380 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6384 if test -n "$NOT_THE_CFLAGS"; then
6385 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6387 # Similarly disable useless truncation warnings from gcc 8+
6388 NOT_THE_CFLAGS=""
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6390 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6391 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6392 $as_echo_n "(cached) " >&6
6393 else
6394 pgac_save_CFLAGS=$CFLAGS
6395 pgac_save_CC=$CC
6396 CC=${CC}
6397 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6398 ac_save_c_werror_flag=$ac_c_werror_flag
6399 ac_c_werror_flag=yes
6400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6401 /* end confdefs.h. */
6404 main ()
6408 return 0;
6410 _ACEOF
6411 if ac_fn_c_try_compile "$LINENO"; then :
6412 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6413 else
6414 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6417 ac_c_werror_flag=$ac_save_c_werror_flag
6418 CFLAGS="$pgac_save_CFLAGS"
6419 CC="$pgac_save_CC"
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6422 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6423 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6424 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6428 if test -n "$NOT_THE_CFLAGS"; then
6429 CFLAGS="$CFLAGS -Wno-format-truncation"
6431 NOT_THE_CFLAGS=""
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6433 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6434 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6435 $as_echo_n "(cached) " >&6
6436 else
6437 pgac_save_CFLAGS=$CFLAGS
6438 pgac_save_CC=$CC
6439 CC=${CC}
6440 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6441 ac_save_c_werror_flag=$ac_c_werror_flag
6442 ac_c_werror_flag=yes
6443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6444 /* end confdefs.h. */
6447 main ()
6451 return 0;
6453 _ACEOF
6454 if ac_fn_c_try_compile "$LINENO"; then :
6455 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6456 else
6457 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6460 ac_c_werror_flag=$ac_save_c_werror_flag
6461 CFLAGS="$pgac_save_CFLAGS"
6462 CC="$pgac_save_CC"
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6465 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6466 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6467 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6471 if test -n "$NOT_THE_CFLAGS"; then
6472 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6474 elif test "$ICC" = yes; then
6475 # Intel's compiler has a bug/misoptimization in checking for
6476 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6479 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6480 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6481 $as_echo_n "(cached) " >&6
6482 else
6483 pgac_save_CFLAGS=$CFLAGS
6484 pgac_save_CC=$CC
6485 CC=${CC}
6486 CFLAGS="${CFLAGS} -mp1"
6487 ac_save_c_werror_flag=$ac_c_werror_flag
6488 ac_c_werror_flag=yes
6489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6490 /* end confdefs.h. */
6493 main ()
6497 return 0;
6499 _ACEOF
6500 if ac_fn_c_try_compile "$LINENO"; then :
6501 pgac_cv_prog_CC_cflags__mp1=yes
6502 else
6503 pgac_cv_prog_CC_cflags__mp1=no
6505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6506 ac_c_werror_flag=$ac_save_c_werror_flag
6507 CFLAGS="$pgac_save_CFLAGS"
6508 CC="$pgac_save_CC"
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6511 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6512 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6513 CFLAGS="${CFLAGS} -mp1"
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6518 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6519 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6520 $as_echo_n "(cached) " >&6
6521 else
6522 pgac_save_CXXFLAGS=$CXXFLAGS
6523 pgac_save_CXX=$CXX
6524 CXX=${CXX}
6525 CXXFLAGS="${CXXFLAGS} -mp1"
6526 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6527 ac_cxx_werror_flag=yes
6528 ac_ext=cpp
6529 ac_cpp='$CXXCPP $CPPFLAGS'
6530 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6531 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6532 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6535 /* end confdefs.h. */
6538 main ()
6542 return 0;
6544 _ACEOF
6545 if ac_fn_cxx_try_compile "$LINENO"; then :
6546 pgac_cv_prog_CXX_cxxflags__mp1=yes
6547 else
6548 pgac_cv_prog_CXX_cxxflags__mp1=no
6550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6551 ac_ext=c
6552 ac_cpp='$CPP $CPPFLAGS'
6553 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6554 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6555 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6557 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6558 CXXFLAGS="$pgac_save_CXXFLAGS"
6559 CXX="$pgac_save_CXX"
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6562 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6563 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6564 CXXFLAGS="${CXXFLAGS} -mp1"
6568 # Make sure strict aliasing is off (though this is said to be the default)
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6571 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6572 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6573 $as_echo_n "(cached) " >&6
6574 else
6575 pgac_save_CFLAGS=$CFLAGS
6576 pgac_save_CC=$CC
6577 CC=${CC}
6578 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6579 ac_save_c_werror_flag=$ac_c_werror_flag
6580 ac_c_werror_flag=yes
6581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6582 /* end confdefs.h. */
6585 main ()
6589 return 0;
6591 _ACEOF
6592 if ac_fn_c_try_compile "$LINENO"; then :
6593 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6594 else
6595 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6598 ac_c_werror_flag=$ac_save_c_werror_flag
6599 CFLAGS="$pgac_save_CFLAGS"
6600 CC="$pgac_save_CC"
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6603 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6604 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6605 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6610 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6611 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6612 $as_echo_n "(cached) " >&6
6613 else
6614 pgac_save_CXXFLAGS=$CXXFLAGS
6615 pgac_save_CXX=$CXX
6616 CXX=${CXX}
6617 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6618 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6619 ac_cxx_werror_flag=yes
6620 ac_ext=cpp
6621 ac_cpp='$CXXCPP $CPPFLAGS'
6622 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6623 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6624 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6627 /* end confdefs.h. */
6630 main ()
6634 return 0;
6636 _ACEOF
6637 if ac_fn_cxx_try_compile "$LINENO"; then :
6638 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6639 else
6640 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6643 ac_ext=c
6644 ac_cpp='$CPP $CPPFLAGS'
6645 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6646 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6647 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6649 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6650 CXXFLAGS="$pgac_save_CXXFLAGS"
6651 CXX="$pgac_save_CXX"
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6654 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6655 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6656 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6660 elif test "$PORTNAME" = "aix"; then
6661 # AIX's xlc has to have strict aliasing turned off too
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6664 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6665 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667 else
6668 pgac_save_CFLAGS=$CFLAGS
6669 pgac_save_CC=$CC
6670 CC=${CC}
6671 CFLAGS="${CFLAGS} -qnoansialias"
6672 ac_save_c_werror_flag=$ac_c_werror_flag
6673 ac_c_werror_flag=yes
6674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6675 /* end confdefs.h. */
6678 main ()
6682 return 0;
6684 _ACEOF
6685 if ac_fn_c_try_compile "$LINENO"; then :
6686 pgac_cv_prog_CC_cflags__qnoansialias=yes
6687 else
6688 pgac_cv_prog_CC_cflags__qnoansialias=no
6690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6691 ac_c_werror_flag=$ac_save_c_werror_flag
6692 CFLAGS="$pgac_save_CFLAGS"
6693 CC="$pgac_save_CC"
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6696 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6697 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6698 CFLAGS="${CFLAGS} -qnoansialias"
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6703 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6704 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6705 $as_echo_n "(cached) " >&6
6706 else
6707 pgac_save_CXXFLAGS=$CXXFLAGS
6708 pgac_save_CXX=$CXX
6709 CXX=${CXX}
6710 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6711 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6712 ac_cxx_werror_flag=yes
6713 ac_ext=cpp
6714 ac_cpp='$CXXCPP $CPPFLAGS'
6715 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6716 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6717 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6720 /* end confdefs.h. */
6723 main ()
6727 return 0;
6729 _ACEOF
6730 if ac_fn_cxx_try_compile "$LINENO"; then :
6731 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6732 else
6733 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6736 ac_ext=c
6737 ac_cpp='$CPP $CPPFLAGS'
6738 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6739 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6740 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6742 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6743 CXXFLAGS="$pgac_save_CXXFLAGS"
6744 CXX="$pgac_save_CXX"
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6747 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6748 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6749 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6755 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6756 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6757 $as_echo_n "(cached) " >&6
6758 else
6759 pgac_save_CFLAGS=$CFLAGS
6760 pgac_save_CC=$CC
6761 CC=${CC}
6762 CFLAGS="${CFLAGS} -qlonglong"
6763 ac_save_c_werror_flag=$ac_c_werror_flag
6764 ac_c_werror_flag=yes
6765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6766 /* end confdefs.h. */
6769 main ()
6773 return 0;
6775 _ACEOF
6776 if ac_fn_c_try_compile "$LINENO"; then :
6777 pgac_cv_prog_CC_cflags__qlonglong=yes
6778 else
6779 pgac_cv_prog_CC_cflags__qlonglong=no
6781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6782 ac_c_werror_flag=$ac_save_c_werror_flag
6783 CFLAGS="$pgac_save_CFLAGS"
6784 CC="$pgac_save_CC"
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6787 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6788 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6789 CFLAGS="${CFLAGS} -qlonglong"
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6794 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6795 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6796 $as_echo_n "(cached) " >&6
6797 else
6798 pgac_save_CXXFLAGS=$CXXFLAGS
6799 pgac_save_CXX=$CXX
6800 CXX=${CXX}
6801 CXXFLAGS="${CXXFLAGS} -qlonglong"
6802 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6803 ac_cxx_werror_flag=yes
6804 ac_ext=cpp
6805 ac_cpp='$CXXCPP $CPPFLAGS'
6806 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6807 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6808 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6811 /* end confdefs.h. */
6814 main ()
6818 return 0;
6820 _ACEOF
6821 if ac_fn_cxx_try_compile "$LINENO"; then :
6822 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6823 else
6824 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6827 ac_ext=c
6828 ac_cpp='$CPP $CPPFLAGS'
6829 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6830 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6831 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6833 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6834 CXXFLAGS="$pgac_save_CXXFLAGS"
6835 CXX="$pgac_save_CXX"
6837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6838 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6839 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6840 CXXFLAGS="${CXXFLAGS} -qlonglong"
6844 elif test "$PORTNAME" = "hpux"; then
6845 # On some versions of HP-UX, libm functions do not set errno by default.
6846 # Fix that by using +Olibmerrno if the compiler recognizes it.
6848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6849 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6850 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6851 $as_echo_n "(cached) " >&6
6852 else
6853 pgac_save_CFLAGS=$CFLAGS
6854 pgac_save_CC=$CC
6855 CC=${CC}
6856 CFLAGS="${CFLAGS} +Olibmerrno"
6857 ac_save_c_werror_flag=$ac_c_werror_flag
6858 ac_c_werror_flag=yes
6859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6860 /* end confdefs.h. */
6863 main ()
6867 return 0;
6869 _ACEOF
6870 if ac_fn_c_try_compile "$LINENO"; then :
6871 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6872 else
6873 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6876 ac_c_werror_flag=$ac_save_c_werror_flag
6877 CFLAGS="$pgac_save_CFLAGS"
6878 CC="$pgac_save_CC"
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6881 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6882 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6883 CFLAGS="${CFLAGS} +Olibmerrno"
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6888 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6889 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6890 $as_echo_n "(cached) " >&6
6891 else
6892 pgac_save_CXXFLAGS=$CXXFLAGS
6893 pgac_save_CXX=$CXX
6894 CXX=${CXX}
6895 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6896 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6897 ac_cxx_werror_flag=yes
6898 ac_ext=cpp
6899 ac_cpp='$CXXCPP $CPPFLAGS'
6900 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6901 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6902 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6905 /* end confdefs.h. */
6908 main ()
6912 return 0;
6914 _ACEOF
6915 if ac_fn_cxx_try_compile "$LINENO"; then :
6916 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6917 else
6918 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6921 ac_ext=c
6922 ac_cpp='$CPP $CPPFLAGS'
6923 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6924 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6925 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6927 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6928 CXXFLAGS="$pgac_save_CXXFLAGS"
6929 CXX="$pgac_save_CXX"
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6932 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6933 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6934 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6943 # Determine flags used to emit bitcode for JIT inlining.
6944 # 1. We must duplicate any behaviour-changing compiler flags used above,
6945 # to keep compatibility with the compiler used for normal Postgres code.
6946 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
6947 # warning in the main build is enough.
6948 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
6949 if test "$with_llvm" = yes ; then
6950 CLANGXX="$CLANG -xc++"
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6953 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6954 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6955 $as_echo_n "(cached) " >&6
6956 else
6957 pgac_save_CFLAGS=$CFLAGS
6958 pgac_save_CC=$CC
6959 CC=${CLANG}
6960 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6961 ac_save_c_werror_flag=$ac_c_werror_flag
6962 ac_c_werror_flag=yes
6963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6964 /* end confdefs.h. */
6967 main ()
6971 return 0;
6973 _ACEOF
6974 if ac_fn_c_try_compile "$LINENO"; then :
6975 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6976 else
6977 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6980 ac_c_werror_flag=$ac_save_c_werror_flag
6981 CFLAGS="$pgac_save_CFLAGS"
6982 CC="$pgac_save_CC"
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6985 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6986 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6987 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6991 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6992 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6993 $as_echo_n "(cached) " >&6
6994 else
6995 pgac_save_CXXFLAGS=$CXXFLAGS
6996 pgac_save_CXX=$CXX
6997 CXX=${CLANGXX}
6998 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6999 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7000 ac_cxx_werror_flag=yes
7001 ac_ext=cpp
7002 ac_cpp='$CXXCPP $CPPFLAGS'
7003 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7004 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7005 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7008 /* end confdefs.h. */
7011 main ()
7015 return 0;
7017 _ACEOF
7018 if ac_fn_cxx_try_compile "$LINENO"; then :
7019 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7020 else
7021 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7024 ac_ext=c
7025 ac_cpp='$CPP $CPPFLAGS'
7026 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7027 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7030 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7031 CXXFLAGS="$pgac_save_CXXFLAGS"
7032 CXX="$pgac_save_CXX"
7034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7035 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7036 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7037 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7041 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7042 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7043 $as_echo_n "(cached) " >&6
7044 else
7045 pgac_save_CFLAGS=$CFLAGS
7046 pgac_save_CC=$CC
7047 CC=${CLANG}
7048 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7049 ac_save_c_werror_flag=$ac_c_werror_flag
7050 ac_c_werror_flag=yes
7051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7052 /* end confdefs.h. */
7055 main ()
7059 return 0;
7061 _ACEOF
7062 if ac_fn_c_try_compile "$LINENO"; then :
7063 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7064 else
7065 pgac_cv_prog_CLANG_cflags__fwrapv=no
7067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7068 ac_c_werror_flag=$ac_save_c_werror_flag
7069 CFLAGS="$pgac_save_CFLAGS"
7070 CC="$pgac_save_CC"
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7073 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7074 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7075 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7079 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7080 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7081 $as_echo_n "(cached) " >&6
7082 else
7083 pgac_save_CXXFLAGS=$CXXFLAGS
7084 pgac_save_CXX=$CXX
7085 CXX=${CLANGXX}
7086 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7087 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7088 ac_cxx_werror_flag=yes
7089 ac_ext=cpp
7090 ac_cpp='$CXXCPP $CPPFLAGS'
7091 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7092 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7093 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7096 /* end confdefs.h. */
7099 main ()
7103 return 0;
7105 _ACEOF
7106 if ac_fn_cxx_try_compile "$LINENO"; then :
7107 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7108 else
7109 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7112 ac_ext=c
7113 ac_cpp='$CPP $CPPFLAGS'
7114 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7115 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7116 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7118 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7119 CXXFLAGS="$pgac_save_CXXFLAGS"
7120 CXX="$pgac_save_CXX"
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7123 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7124 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7125 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7129 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7130 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7131 $as_echo_n "(cached) " >&6
7132 else
7133 pgac_save_CFLAGS=$CFLAGS
7134 pgac_save_CC=$CC
7135 CC=${CLANG}
7136 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7137 ac_save_c_werror_flag=$ac_c_werror_flag
7138 ac_c_werror_flag=yes
7139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7140 /* end confdefs.h. */
7143 main ()
7147 return 0;
7149 _ACEOF
7150 if ac_fn_c_try_compile "$LINENO"; then :
7151 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7152 else
7153 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7156 ac_c_werror_flag=$ac_save_c_werror_flag
7157 CFLAGS="$pgac_save_CFLAGS"
7158 CC="$pgac_save_CC"
7160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7161 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7162 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7163 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7167 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7168 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7169 $as_echo_n "(cached) " >&6
7170 else
7171 pgac_save_CXXFLAGS=$CXXFLAGS
7172 pgac_save_CXX=$CXX
7173 CXX=${CLANGXX}
7174 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7175 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7176 ac_cxx_werror_flag=yes
7177 ac_ext=cpp
7178 ac_cpp='$CXXCPP $CPPFLAGS'
7179 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7180 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7181 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7184 /* end confdefs.h. */
7187 main ()
7191 return 0;
7193 _ACEOF
7194 if ac_fn_cxx_try_compile "$LINENO"; then :
7195 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7196 else
7197 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7200 ac_ext=c
7201 ac_cpp='$CPP $CPPFLAGS'
7202 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7203 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7204 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7206 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7207 CXXFLAGS="$pgac_save_CXXFLAGS"
7208 CXX="$pgac_save_CXX"
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7211 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7212 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7213 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7217 NOT_THE_CFLAGS=""
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7219 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7220 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7221 $as_echo_n "(cached) " >&6
7222 else
7223 pgac_save_CFLAGS=$CFLAGS
7224 pgac_save_CC=$CC
7225 CC=${CLANG}
7226 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7227 ac_save_c_werror_flag=$ac_c_werror_flag
7228 ac_c_werror_flag=yes
7229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7230 /* end confdefs.h. */
7233 main ()
7237 return 0;
7239 _ACEOF
7240 if ac_fn_c_try_compile "$LINENO"; then :
7241 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7242 else
7243 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7246 ac_c_werror_flag=$ac_save_c_werror_flag
7247 CFLAGS="$pgac_save_CFLAGS"
7248 CC="$pgac_save_CC"
7250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7251 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7252 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7253 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7256 if test -n "$NOT_THE_CFLAGS"; then
7257 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7259 NOT_THE_CFLAGS=""
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7261 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7262 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7263 $as_echo_n "(cached) " >&6
7264 else
7265 pgac_save_CFLAGS=$CFLAGS
7266 pgac_save_CC=$CC
7267 CC=${CLANG}
7268 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7269 ac_save_c_werror_flag=$ac_c_werror_flag
7270 ac_c_werror_flag=yes
7271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7272 /* end confdefs.h. */
7275 main ()
7279 return 0;
7281 _ACEOF
7282 if ac_fn_c_try_compile "$LINENO"; then :
7283 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7284 else
7285 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7288 ac_c_werror_flag=$ac_save_c_werror_flag
7289 CFLAGS="$pgac_save_CFLAGS"
7290 CC="$pgac_save_CC"
7292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7293 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7294 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7295 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7298 if test -n "$NOT_THE_CFLAGS"; then
7299 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7301 NOT_THE_CFLAGS=""
7302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7303 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7304 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7305 $as_echo_n "(cached) " >&6
7306 else
7307 pgac_save_CFLAGS=$CFLAGS
7308 pgac_save_CC=$CC
7309 CC=${CLANG}
7310 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7311 ac_save_c_werror_flag=$ac_c_werror_flag
7312 ac_c_werror_flag=yes
7313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7314 /* end confdefs.h. */
7317 main ()
7321 return 0;
7323 _ACEOF
7324 if ac_fn_c_try_compile "$LINENO"; then :
7325 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7326 else
7327 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7330 ac_c_werror_flag=$ac_save_c_werror_flag
7331 CFLAGS="$pgac_save_CFLAGS"
7332 CC="$pgac_save_CC"
7334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7335 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7336 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7337 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7340 if test -n "$NOT_THE_CFLAGS"; then
7341 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7343 NOT_THE_CFLAGS=""
7344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7345 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7346 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7347 $as_echo_n "(cached) " >&6
7348 else
7349 pgac_save_CFLAGS=$CFLAGS
7350 pgac_save_CC=$CC
7351 CC=${CLANG}
7352 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7353 ac_save_c_werror_flag=$ac_c_werror_flag
7354 ac_c_werror_flag=yes
7355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7356 /* end confdefs.h. */
7359 main ()
7363 return 0;
7365 _ACEOF
7366 if ac_fn_c_try_compile "$LINENO"; then :
7367 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7368 else
7369 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7372 ac_c_werror_flag=$ac_save_c_werror_flag
7373 CFLAGS="$pgac_save_CFLAGS"
7374 CC="$pgac_save_CC"
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7377 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7378 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7379 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7382 if test -n "$NOT_THE_CFLAGS"; then
7383 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7387 # supply -g if --enable-debug
7388 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7389 CFLAGS="$CFLAGS -g"
7392 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7393 CXXFLAGS="$CXXFLAGS -g"
7396 # enable code coverage if --enable-coverage
7397 if test "$enable_coverage" = yes; then
7398 if test "$GCC" = yes; then
7399 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7400 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7401 else
7402 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7406 # enable profiling if --enable-profiling
7407 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7408 if test "$GCC" = yes; then
7410 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7412 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7413 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7414 else
7415 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7419 # On Solaris, we need this #define to get POSIX-conforming versions
7420 # of many interfaces (sigwait, getpwuid_r, ...).
7421 if test "$PORTNAME" = "solaris"; then
7422 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7425 # We already have this in Makefile.win32, but configure needs it too
7426 if test "$PORTNAME" = "win32"; then
7427 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7430 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7431 # user-specified flags (if any) at the end. This lets users override
7432 # the automatic additions.
7433 CFLAGS="$CFLAGS $user_CFLAGS"
7434 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7435 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7436 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7441 # The template file must set up CFLAGS_SL; we don't support user override
7444 # Check if the compiler still works with the final flag settings
7445 # (note, we're not checking that for CXX, which is optional)
7446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7447 $as_echo_n "checking whether the C compiler still works... " >&6; }
7448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7449 /* end confdefs.h. */
7452 main ()
7454 return 0;
7456 return 0;
7458 _ACEOF
7459 if ac_fn_c_try_link "$LINENO"; then :
7460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7461 $as_echo "yes" >&6; }
7462 else
7463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7464 $as_echo "no" >&6; }
7465 as_fn_error $? "cannot proceed" "$LINENO" 5
7467 rm -f core conftest.err conftest.$ac_objext \
7468 conftest$ac_exeext conftest.$ac_ext
7470 # Defend against gcc -ffast-math
7471 if test "$GCC" = yes; then
7472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7473 /* end confdefs.h. */
7476 main ()
7478 #ifdef __FAST_MATH__
7479 choke me
7480 #endif
7482 return 0;
7484 _ACEOF
7485 if ac_fn_c_try_compile "$LINENO"; then :
7487 else
7488 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7493 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7494 # versions of clang do not understand -fexcess-precision=standard, the use of
7495 # x87 floating point operations leads to problems like isinf possibly returning
7496 # false for a value that is infinite when converted from the 80bit register to
7497 # the 8byte memory representation.
7499 # Only perform the test if the compiler doesn't understand
7500 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7501 # automatically.
7502 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7504 /* end confdefs.h. */
7507 main ()
7510 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7511 choke me
7512 #endif
7515 return 0;
7517 _ACEOF
7518 if ac_fn_c_try_compile "$LINENO"; then :
7520 else
7521 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7526 ac_ext=c
7527 ac_cpp='$CPP $CPPFLAGS'
7528 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7529 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7530 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7532 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7533 # On Suns, sometimes $CPP names a directory.
7534 if test -n "$CPP" && test -d "$CPP"; then
7535 CPP=
7537 if test -z "$CPP"; then
7538 if ${ac_cv_prog_CPP+:} false; then :
7539 $as_echo_n "(cached) " >&6
7540 else
7541 # Double quotes because CPP needs to be expanded
7542 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7544 ac_preproc_ok=false
7545 for ac_c_preproc_warn_flag in '' yes
7547 # Use a header file that comes with gcc, so configuring glibc
7548 # with a fresh cross-compiler works.
7549 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7550 # <limits.h> exists even on freestanding compilers.
7551 # On the NeXT, cc -E runs the code through the compiler's parser,
7552 # not just through cpp. "Syntax error" is here to catch this case.
7553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7554 /* end confdefs.h. */
7555 #ifdef __STDC__
7556 # include <limits.h>
7557 #else
7558 # include <assert.h>
7559 #endif
7560 Syntax error
7561 _ACEOF
7562 if ac_fn_c_try_cpp "$LINENO"; then :
7564 else
7565 # Broken: fails on valid input.
7566 continue
7568 rm -f conftest.err conftest.i conftest.$ac_ext
7570 # OK, works on sane cases. Now check whether nonexistent headers
7571 # can be detected and how.
7572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7573 /* end confdefs.h. */
7574 #include <ac_nonexistent.h>
7575 _ACEOF
7576 if ac_fn_c_try_cpp "$LINENO"; then :
7577 # Broken: success on invalid input.
7578 continue
7579 else
7580 # Passes both tests.
7581 ac_preproc_ok=:
7582 break
7584 rm -f conftest.err conftest.i conftest.$ac_ext
7586 done
7587 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7588 rm -f conftest.i conftest.err conftest.$ac_ext
7589 if $ac_preproc_ok; then :
7590 break
7593 done
7594 ac_cv_prog_CPP=$CPP
7597 CPP=$ac_cv_prog_CPP
7598 else
7599 ac_cv_prog_CPP=$CPP
7601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7602 $as_echo "$CPP" >&6; }
7603 ac_preproc_ok=false
7604 for ac_c_preproc_warn_flag in '' yes
7606 # Use a header file that comes with gcc, so configuring glibc
7607 # with a fresh cross-compiler works.
7608 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7609 # <limits.h> exists even on freestanding compilers.
7610 # On the NeXT, cc -E runs the code through the compiler's parser,
7611 # not just through cpp. "Syntax error" is here to catch this case.
7612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7613 /* end confdefs.h. */
7614 #ifdef __STDC__
7615 # include <limits.h>
7616 #else
7617 # include <assert.h>
7618 #endif
7619 Syntax error
7620 _ACEOF
7621 if ac_fn_c_try_cpp "$LINENO"; then :
7623 else
7624 # Broken: fails on valid input.
7625 continue
7627 rm -f conftest.err conftest.i conftest.$ac_ext
7629 # OK, works on sane cases. Now check whether nonexistent headers
7630 # can be detected and how.
7631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7632 /* end confdefs.h. */
7633 #include <ac_nonexistent.h>
7634 _ACEOF
7635 if ac_fn_c_try_cpp "$LINENO"; then :
7636 # Broken: success on invalid input.
7637 continue
7638 else
7639 # Passes both tests.
7640 ac_preproc_ok=:
7641 break
7643 rm -f conftest.err conftest.i conftest.$ac_ext
7645 done
7646 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7647 rm -f conftest.i conftest.err conftest.$ac_ext
7648 if $ac_preproc_ok; then :
7650 else
7651 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7652 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7653 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7654 See \`config.log' for more details" "$LINENO" 5; }
7657 ac_ext=c
7658 ac_cpp='$CPP $CPPFLAGS'
7659 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7660 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7661 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7667 # Set up TAS assembly code if needed; the template file has now had its
7668 # chance to request this.
7670 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7673 if test "$need_tas" = yes ; then
7674 TAS=tas.o
7675 else
7676 TAS=""
7681 # Set up pkg_config in case we need it below
7690 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7691 if test -n "$ac_tool_prefix"; then
7692 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7693 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7695 $as_echo_n "checking for $ac_word... " >&6; }
7696 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7697 $as_echo_n "(cached) " >&6
7698 else
7699 case $PKG_CONFIG in
7700 [\\/]* | ?:[\\/]*)
7701 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7705 for as_dir in $PATH
7707 IFS=$as_save_IFS
7708 test -z "$as_dir" && as_dir=.
7709 for ac_exec_ext in '' $ac_executable_extensions; do
7710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7711 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7713 break 2
7715 done
7716 done
7717 IFS=$as_save_IFS
7720 esac
7722 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7723 if test -n "$PKG_CONFIG"; then
7724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7725 $as_echo "$PKG_CONFIG" >&6; }
7726 else
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7728 $as_echo "no" >&6; }
7733 if test -z "$ac_cv_path_PKG_CONFIG"; then
7734 ac_pt_PKG_CONFIG=$PKG_CONFIG
7735 # Extract the first word of "pkg-config", so it can be a program name with args.
7736 set dummy pkg-config; ac_word=$2
7737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7738 $as_echo_n "checking for $ac_word... " >&6; }
7739 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7740 $as_echo_n "(cached) " >&6
7741 else
7742 case $ac_pt_PKG_CONFIG in
7743 [\\/]* | ?:[\\/]*)
7744 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7748 for as_dir in $PATH
7750 IFS=$as_save_IFS
7751 test -z "$as_dir" && as_dir=.
7752 for ac_exec_ext in '' $ac_executable_extensions; do
7753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7754 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7756 break 2
7758 done
7759 done
7760 IFS=$as_save_IFS
7763 esac
7765 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7766 if test -n "$ac_pt_PKG_CONFIG"; then
7767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7768 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7769 else
7770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7771 $as_echo "no" >&6; }
7774 if test "x$ac_pt_PKG_CONFIG" = x; then
7775 PKG_CONFIG=""
7776 else
7777 case $cross_compiling:$ac_tool_warned in
7778 yes:)
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7780 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7781 ac_tool_warned=yes ;;
7782 esac
7783 PKG_CONFIG=$ac_pt_PKG_CONFIG
7785 else
7786 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7790 if test -n "$PKG_CONFIG"; then
7791 _pkg_min_version=0.9.0
7792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7793 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7794 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7796 $as_echo "yes" >&6; }
7797 else
7798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7799 $as_echo "no" >&6; }
7800 PKG_CONFIG=""
7805 # Automatic dependency tracking
7809 # Check whether --enable-depend was given.
7810 if test "${enable_depend+set}" = set; then :
7811 enableval=$enable_depend;
7812 case $enableval in
7813 yes)
7814 autodepend=yes
7820 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7822 esac
7824 else
7825 enable_depend=no
7834 # Enable assert checks
7838 # Check whether --enable-cassert was given.
7839 if test "${enable_cassert+set}" = set; then :
7840 enableval=$enable_cassert;
7841 case $enableval in
7842 yes)
7844 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7851 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7853 esac
7855 else
7856 enable_cassert=no
7864 # Include directories
7866 ac_save_IFS=$IFS
7867 IFS="${IFS}${PATH_SEPARATOR}"
7868 # SRCH_INC comes from the template file
7869 for dir in $with_includes $SRCH_INC; do
7870 if test -d "$dir"; then
7871 INCLUDES="$INCLUDES -I$dir"
7872 else
7873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7874 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7876 done
7877 IFS=$ac_save_IFS
7882 # Library directories
7884 ac_save_IFS=$IFS
7885 IFS="${IFS}${PATH_SEPARATOR}"
7886 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7887 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7888 if test -d "$dir"; then
7889 LIBDIRS="$LIBDIRS -L$dir"
7890 else
7891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7892 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7894 done
7895 IFS=$ac_save_IFS
7898 # Enable thread-safe client libraries
7900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7901 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7904 # Check whether --enable-thread-safety was given.
7905 if test "${enable_thread_safety+set}" = set; then :
7906 enableval=$enable_thread_safety;
7907 case $enableval in
7908 yes)
7915 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7917 esac
7919 else
7920 enable_thread_safety=yes
7925 if test "$enable_thread_safety" = yes; then
7927 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7931 $as_echo "$enable_thread_safety" >&6; }
7935 # ICU
7937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7938 $as_echo_n "checking whether to build with ICU support... " >&6; }
7942 # Check whether --with-icu was given.
7943 if test "${with_icu+set}" = set; then :
7944 withval=$with_icu;
7945 case $withval in
7946 yes)
7948 $as_echo "#define USE_ICU 1" >>confdefs.h
7955 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7957 esac
7959 else
7960 with_icu=no
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7966 $as_echo "$with_icu" >&6; }
7969 if test "$with_icu" = yes; then
7971 pkg_failed=no
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7973 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7975 if test -n "$ICU_CFLAGS"; then
7976 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7977 elif test -n "$PKG_CONFIG"; then
7978 if test -n "$PKG_CONFIG" && \
7979 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7980 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7981 ac_status=$?
7982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7983 test $ac_status = 0; }; then
7984 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7985 test "x$?" != "x0" && pkg_failed=yes
7986 else
7987 pkg_failed=yes
7989 else
7990 pkg_failed=untried
7992 if test -n "$ICU_LIBS"; then
7993 pkg_cv_ICU_LIBS="$ICU_LIBS"
7994 elif test -n "$PKG_CONFIG"; then
7995 if test -n "$PKG_CONFIG" && \
7996 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7997 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7998 ac_status=$?
7999 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8000 test $ac_status = 0; }; then
8001 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8002 test "x$?" != "x0" && pkg_failed=yes
8003 else
8004 pkg_failed=yes
8006 else
8007 pkg_failed=untried
8012 if test $pkg_failed = yes; then
8013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8014 $as_echo "no" >&6; }
8016 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8017 _pkg_short_errors_supported=yes
8018 else
8019 _pkg_short_errors_supported=no
8021 if test $_pkg_short_errors_supported = yes; then
8022 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8023 else
8024 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8026 # Put the nasty error message in config.log where it belongs
8027 echo "$ICU_PKG_ERRORS" >&5
8029 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8031 $ICU_PKG_ERRORS
8033 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8034 installed software in a non-standard prefix.
8036 Alternatively, you may set the environment variables ICU_CFLAGS
8037 and ICU_LIBS to avoid the need to call pkg-config.
8038 See the pkg-config man page for more details." "$LINENO" 5
8039 elif test $pkg_failed = untried; then
8040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8041 $as_echo "no" >&6; }
8042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8043 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8044 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8045 is in your PATH or set the PKG_CONFIG environment variable to the full
8046 path to pkg-config.
8048 Alternatively, you may set the environment variables ICU_CFLAGS
8049 and ICU_LIBS to avoid the need to call pkg-config.
8050 See the pkg-config man page for more details.
8052 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8053 See \`config.log' for more details" "$LINENO" 5; }
8054 else
8055 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8056 ICU_LIBS=$pkg_cv_ICU_LIBS
8057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8058 $as_echo "yes" >&6; }
8064 # Optionally build Tcl modules (PL/Tcl)
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8067 $as_echo_n "checking whether to build with Tcl... " >&6; }
8071 # Check whether --with-tcl was given.
8072 if test "${with_tcl+set}" = set; then :
8073 withval=$with_tcl;
8074 case $withval in
8075 yes)
8082 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8084 esac
8086 else
8087 with_tcl=no
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8093 $as_echo "$with_tcl" >&6; }
8096 # We see if the path to the Tcl/Tk configuration scripts is specified.
8097 # This will override the use of tclsh to find the paths to search.
8102 # Check whether --with-tclconfig was given.
8103 if test "${with_tclconfig+set}" = set; then :
8104 withval=$with_tclconfig;
8105 case $withval in
8106 yes)
8107 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8110 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8115 esac
8122 # Optionally build Perl modules (PL/Perl)
8124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8125 $as_echo_n "checking whether to build Perl modules... " >&6; }
8129 # Check whether --with-perl was given.
8130 if test "${with_perl+set}" = set; then :
8131 withval=$with_perl;
8132 case $withval in
8133 yes)
8140 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8142 esac
8144 else
8145 with_perl=no
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8151 $as_echo "$with_perl" >&6; }
8155 # Optionally build Python modules (PL/Python)
8157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8158 $as_echo_n "checking whether to build Python modules... " >&6; }
8162 # Check whether --with-python was given.
8163 if test "${with_python+set}" = set; then :
8164 withval=$with_python;
8165 case $withval in
8166 yes)
8173 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8175 esac
8177 else
8178 with_python=no
8183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8184 $as_echo "$with_python" >&6; }
8188 # GSSAPI
8190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8191 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8195 # Check whether --with-gssapi was given.
8196 if test "${with_gssapi+set}" = set; then :
8197 withval=$with_gssapi;
8198 case $withval in
8199 yes)
8202 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8204 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8211 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8213 esac
8215 else
8216 with_gssapi=no
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8222 $as_echo "$with_gssapi" >&6; }
8230 # Kerberos configuration parameters
8235 # Check whether --with-krb-srvnam was given.
8236 if test "${with_krb_srvnam+set}" = set; then :
8237 withval=$with_krb_srvnam;
8238 case $withval in
8239 yes)
8240 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8243 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8248 esac
8250 else
8251 with_krb_srvnam="postgres"
8257 cat >>confdefs.h <<_ACEOF
8258 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8259 _ACEOF
8264 # PAM
8266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8267 $as_echo_n "checking whether to build with PAM support... " >&6; }
8271 # Check whether --with-pam was given.
8272 if test "${with_pam+set}" = set; then :
8273 withval=$with_pam;
8274 case $withval in
8275 yes)
8277 $as_echo "#define USE_PAM 1" >>confdefs.h
8284 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8286 esac
8288 else
8289 with_pam=no
8294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8295 $as_echo "$with_pam" >&6; }
8299 # BSD AUTH
8301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8302 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8306 # Check whether --with-bsd-auth was given.
8307 if test "${with_bsd_auth+set}" = set; then :
8308 withval=$with_bsd_auth;
8309 case $withval in
8310 yes)
8312 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8319 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8321 esac
8323 else
8324 with_bsd_auth=no
8329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8330 $as_echo "$with_bsd_auth" >&6; }
8334 # LDAP
8336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8337 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8341 # Check whether --with-ldap was given.
8342 if test "${with_ldap+set}" = set; then :
8343 withval=$with_ldap;
8344 case $withval in
8345 yes)
8347 $as_echo "#define USE_LDAP 1" >>confdefs.h
8354 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8356 esac
8358 else
8359 with_ldap=no
8364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8365 $as_echo "$with_ldap" >&6; }
8370 # Bonjour
8372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8373 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8377 # Check whether --with-bonjour was given.
8378 if test "${with_bonjour+set}" = set; then :
8379 withval=$with_bonjour;
8380 case $withval in
8381 yes)
8383 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8390 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8392 esac
8394 else
8395 with_bonjour=no
8400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8401 $as_echo "$with_bonjour" >&6; }
8405 # SELinux
8407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8408 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8412 # Check whether --with-selinux was given.
8413 if test "${with_selinux+set}" = set; then :
8414 withval=$with_selinux;
8415 case $withval in
8416 yes)
8423 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8425 esac
8427 else
8428 with_selinux=no
8434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8435 $as_echo "$with_selinux" >&6; }
8438 # Systemd
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8441 $as_echo_n "checking whether to build with systemd support... " >&6; }
8445 # Check whether --with-systemd was given.
8446 if test "${with_systemd+set}" = set; then :
8447 withval=$with_systemd;
8448 case $withval in
8449 yes)
8451 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8458 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8460 esac
8462 else
8463 with_systemd=no
8469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8470 $as_echo "$with_systemd" >&6; }
8473 # Readline
8478 # Check whether --with-readline was given.
8479 if test "${with_readline+set}" = set; then :
8480 withval=$with_readline;
8481 case $withval in
8482 yes)
8489 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8491 esac
8493 else
8494 with_readline=yes
8499 # readline on MinGW has problems with backslashes in psql and other bugs.
8500 # This is particularly a problem with non-US code pages.
8501 # Therefore disable its use until we understand the cause. 2004-07-20
8502 if test "$PORTNAME" = "win32"; then
8503 if test "$with_readline" = yes; then
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8505 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8506 with_readline=no
8513 # Prefer libedit
8518 # Check whether --with-libedit-preferred was given.
8519 if test "${with_libedit_preferred+set}" = set; then :
8520 withval=$with_libedit_preferred;
8521 case $withval in
8522 yes)
8529 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8531 esac
8533 else
8534 with_libedit_preferred=no
8542 # UUID library
8544 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8545 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8546 # UUID library. More than one of these might be present on a given platform,
8547 # so we make the user say which one she wants.
8552 # Check whether --with-uuid was given.
8553 if test "${with_uuid+set}" = set; then :
8554 withval=$with_uuid;
8555 case $withval in
8556 yes)
8557 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8560 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8565 esac
8570 if test x"$with_uuid" = x"" ; then
8571 with_uuid=no
8576 # Check whether --with-ossp-uuid was given.
8577 if test "${with_ossp_uuid+set}" = set; then :
8578 withval=$with_ossp_uuid;
8579 case $withval in
8580 yes)
8587 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8589 esac
8591 else
8592 with_ossp_uuid=no
8597 if test "$with_ossp_uuid" = yes ; then
8598 with_uuid=ossp
8601 if test "$with_uuid" != no ; then
8602 if test "$with_uuid" = bsd ; then
8604 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8606 elif test "$with_uuid" = e2fs ; then
8608 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8610 elif test "$with_uuid" = ossp ; then
8612 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8614 else
8615 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8622 # XML
8624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8625 $as_echo_n "checking whether to build with XML support... " >&6; }
8629 # Check whether --with-libxml was given.
8630 if test "${with_libxml+set}" = set; then :
8631 withval=$with_libxml;
8632 case $withval in
8633 yes)
8635 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8642 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8644 esac
8646 else
8647 with_libxml=no
8652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8653 $as_echo "$with_libxml" >&6; }
8656 if test "$with_libxml" = yes ; then
8657 # Check pkg-config, then xml2-config. But for backwards compatibility,
8658 # setting XML2_CONFIG overrides pkg-config.
8659 have_libxml2_pkg_config=no
8660 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8662 pkg_failed=no
8663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8664 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8666 if test -n "$XML2_CFLAGS"; then
8667 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8668 elif test -n "$PKG_CONFIG"; then
8669 if test -n "$PKG_CONFIG" && \
8670 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8671 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8672 ac_status=$?
8673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8674 test $ac_status = 0; }; then
8675 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8676 test "x$?" != "x0" && pkg_failed=yes
8677 else
8678 pkg_failed=yes
8680 else
8681 pkg_failed=untried
8683 if test -n "$XML2_LIBS"; then
8684 pkg_cv_XML2_LIBS="$XML2_LIBS"
8685 elif test -n "$PKG_CONFIG"; then
8686 if test -n "$PKG_CONFIG" && \
8687 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8688 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8689 ac_status=$?
8690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8691 test $ac_status = 0; }; then
8692 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8693 test "x$?" != "x0" && pkg_failed=yes
8694 else
8695 pkg_failed=yes
8697 else
8698 pkg_failed=untried
8703 if test $pkg_failed = yes; then
8704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8705 $as_echo "no" >&6; }
8707 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8708 _pkg_short_errors_supported=yes
8709 else
8710 _pkg_short_errors_supported=no
8712 if test $_pkg_short_errors_supported = yes; then
8713 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8714 else
8715 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8717 # Put the nasty error message in config.log where it belongs
8718 echo "$XML2_PKG_ERRORS" >&5
8720 # do nothing
8721 elif test $pkg_failed = untried; then
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8723 $as_echo "no" >&6; }
8724 # do nothing
8725 else
8726 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8727 XML2_LIBS=$pkg_cv_XML2_LIBS
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8729 $as_echo "yes" >&6; }
8730 have_libxml2_pkg_config=yes
8733 if test "$have_libxml2_pkg_config" = no ; then
8734 if test -z "$XML2_CONFIG"; then
8735 for ac_prog in xml2-config
8737 # Extract the first word of "$ac_prog", so it can be a program name with args.
8738 set dummy $ac_prog; ac_word=$2
8739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8740 $as_echo_n "checking for $ac_word... " >&6; }
8741 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8742 $as_echo_n "(cached) " >&6
8743 else
8744 case $XML2_CONFIG in
8745 [\\/]* | ?:[\\/]*)
8746 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8750 for as_dir in $PATH
8752 IFS=$as_save_IFS
8753 test -z "$as_dir" && as_dir=.
8754 for ac_exec_ext in '' $ac_executable_extensions; do
8755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8756 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8758 break 2
8760 done
8761 done
8762 IFS=$as_save_IFS
8765 esac
8767 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8768 if test -n "$XML2_CONFIG"; then
8769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8770 $as_echo "$XML2_CONFIG" >&6; }
8771 else
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8773 $as_echo "no" >&6; }
8777 test -n "$XML2_CONFIG" && break
8778 done
8780 else
8781 # Report the value of XML2_CONFIG in configure's output in all cases.
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8783 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8785 $as_echo "$XML2_CONFIG" >&6; }
8788 if test -n "$XML2_CONFIG"; then
8789 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8790 XML2_LIBS=`$XML2_CONFIG --libs`
8793 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8794 for pgac_option in $XML2_CFLAGS; do
8795 case $pgac_option in
8796 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8797 esac
8798 done
8799 for pgac_option in $XML2_LIBS; do
8800 case $pgac_option in
8801 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8802 esac
8803 done
8808 # XSLT
8813 # Check whether --with-libxslt was given.
8814 if test "${with_libxslt+set}" = set; then :
8815 withval=$with_libxslt;
8816 case $withval in
8817 yes)
8819 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8826 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8828 esac
8830 else
8831 with_libxslt=no
8841 # tzdata
8846 # Check whether --with-system-tzdata was given.
8847 if test "${with_system_tzdata+set}" = set; then :
8848 withval=$with_system_tzdata;
8849 case $withval in
8850 yes)
8851 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8854 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8859 esac
8867 # Zlib
8872 # Check whether --with-zlib was given.
8873 if test "${with_zlib+set}" = set; then :
8874 withval=$with_zlib;
8875 case $withval in
8876 yes)
8883 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8885 esac
8887 else
8888 with_zlib=yes
8896 # LZ4
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
8899 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
8903 # Check whether --with-lz4 was given.
8904 if test "${with_lz4+set}" = set; then :
8905 withval=$with_lz4;
8906 case $withval in
8907 yes)
8909 $as_echo "#define USE_LZ4 1" >>confdefs.h
8916 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
8918 esac
8920 else
8921 with_lz4=no
8926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
8927 $as_echo "$with_lz4" >&6; }
8930 if test "$with_lz4" = yes; then
8932 pkg_failed=no
8933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
8934 $as_echo_n "checking for liblz4... " >&6; }
8936 if test -n "$LZ4_CFLAGS"; then
8937 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
8938 elif test -n "$PKG_CONFIG"; then
8939 if test -n "$PKG_CONFIG" && \
8940 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8941 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8942 ac_status=$?
8943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8944 test $ac_status = 0; }; then
8945 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
8946 test "x$?" != "x0" && pkg_failed=yes
8947 else
8948 pkg_failed=yes
8950 else
8951 pkg_failed=untried
8953 if test -n "$LZ4_LIBS"; then
8954 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
8955 elif test -n "$PKG_CONFIG"; then
8956 if test -n "$PKG_CONFIG" && \
8957 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8958 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8959 ac_status=$?
8960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8961 test $ac_status = 0; }; then
8962 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
8963 test "x$?" != "x0" && pkg_failed=yes
8964 else
8965 pkg_failed=yes
8967 else
8968 pkg_failed=untried
8973 if test $pkg_failed = yes; then
8974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8975 $as_echo "no" >&6; }
8977 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8978 _pkg_short_errors_supported=yes
8979 else
8980 _pkg_short_errors_supported=no
8982 if test $_pkg_short_errors_supported = yes; then
8983 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
8984 else
8985 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
8987 # Put the nasty error message in config.log where it belongs
8988 echo "$LZ4_PKG_ERRORS" >&5
8990 as_fn_error $? "Package requirements (liblz4) were not met:
8992 $LZ4_PKG_ERRORS
8994 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8995 installed software in a non-standard prefix.
8997 Alternatively, you may set the environment variables LZ4_CFLAGS
8998 and LZ4_LIBS to avoid the need to call pkg-config.
8999 See the pkg-config man page for more details." "$LINENO" 5
9000 elif test $pkg_failed = untried; then
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9002 $as_echo "no" >&6; }
9003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9004 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9005 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9006 is in your PATH or set the PKG_CONFIG environment variable to the full
9007 path to pkg-config.
9009 Alternatively, you may set the environment variables LZ4_CFLAGS
9010 and LZ4_LIBS to avoid the need to call pkg-config.
9011 See the pkg-config man page for more details.
9013 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9014 See \`config.log' for more details" "$LINENO" 5; }
9015 else
9016 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9017 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9019 $as_echo "yes" >&6; }
9022 # We only care about -I, -D, and -L switches;
9023 # note that -llz4 will be added by AC_CHECK_LIB below.
9024 for pgac_option in $LZ4_CFLAGS; do
9025 case $pgac_option in
9026 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9027 esac
9028 done
9029 for pgac_option in $LZ4_LIBS; do
9030 case $pgac_option in
9031 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9032 esac
9033 done
9037 # Assignments
9040 CPPFLAGS="$CPPFLAGS $INCLUDES"
9041 LDFLAGS="$LDFLAGS $LIBDIRS"
9047 # Check whether --with-gnu-ld was given.
9048 if test "${with_gnu_ld+set}" = set; then :
9049 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9050 else
9051 with_gnu_ld=no
9054 ac_prog=ld
9055 if test "$GCC" = yes; then
9056 # Check if gcc -print-prog-name=ld gives a path.
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9058 $as_echo_n "checking for ld used by GCC... " >&6; }
9059 case $host in
9060 *-*-mingw*)
9061 # gcc leaves a trailing carriage return which upsets mingw
9062 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9064 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9065 esac
9066 case "$ac_prog" in
9067 # Accept absolute paths.
9068 [\\/]* | [A-Za-z]:[\\/]*)
9069 re_direlt='/[^/][^/]*/\.\./'
9070 # Canonicalize the path of ld
9071 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9072 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9073 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9074 done
9075 test -z "$LD" && LD="$ac_prog"
9078 # If it fails, then pretend we aren't using GCC.
9079 ac_prog=ld
9082 # If it is relative, then search for the first ld in PATH.
9083 with_gnu_ld=unknown
9085 esac
9086 elif test "$with_gnu_ld" = yes; then
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9088 $as_echo_n "checking for GNU ld... " >&6; }
9089 else
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9091 $as_echo_n "checking for non-GNU ld... " >&6; }
9093 if ${ac_cv_path_LD+:} false; then :
9094 $as_echo_n "(cached) " >&6
9095 else
9096 if test -z "$LD"; then
9097 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9098 for ac_dir in $PATH; do
9099 test -z "$ac_dir" && ac_dir=.
9100 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9101 ac_cv_path_LD="$ac_dir/$ac_prog"
9102 # Check to see if the program is GNU ld. I'd rather use --version,
9103 # but apparently some GNU ld's only accept -v.
9104 # Break only if it was the GNU/non-GNU ld that we prefer.
9105 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9106 test "$with_gnu_ld" != no && break
9107 else
9108 test "$with_gnu_ld" != yes && break
9111 done
9112 IFS="$ac_save_ifs"
9113 else
9114 ac_cv_path_LD="$LD" # Let the user override the test with a path.
9118 LD="$ac_cv_path_LD"
9119 if test -n "$LD"; then
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9121 $as_echo "$LD" >&6; }
9122 else
9123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124 $as_echo "no" >&6; }
9126 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9128 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9129 if ${ac_cv_prog_gnu_ld+:} false; then :
9130 $as_echo_n "(cached) " >&6
9131 else
9132 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9133 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9134 ac_cv_prog_gnu_ld=yes
9135 else
9136 ac_cv_prog_gnu_ld=no
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
9140 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
9141 with_gnu_ld=$ac_cv_prog_gnu_ld
9146 if test -n "$ac_tool_prefix"; then
9147 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9148 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9150 $as_echo_n "checking for $ac_word... " >&6; }
9151 if ${ac_cv_prog_RANLIB+:} false; then :
9152 $as_echo_n "(cached) " >&6
9153 else
9154 if test -n "$RANLIB"; then
9155 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9156 else
9157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9158 for as_dir in $PATH
9160 IFS=$as_save_IFS
9161 test -z "$as_dir" && as_dir=.
9162 for ac_exec_ext in '' $ac_executable_extensions; do
9163 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9164 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9166 break 2
9168 done
9169 done
9170 IFS=$as_save_IFS
9174 RANLIB=$ac_cv_prog_RANLIB
9175 if test -n "$RANLIB"; then
9176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9177 $as_echo "$RANLIB" >&6; }
9178 else
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9180 $as_echo "no" >&6; }
9185 if test -z "$ac_cv_prog_RANLIB"; then
9186 ac_ct_RANLIB=$RANLIB
9187 # Extract the first word of "ranlib", so it can be a program name with args.
9188 set dummy ranlib; ac_word=$2
9189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9190 $as_echo_n "checking for $ac_word... " >&6; }
9191 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
9192 $as_echo_n "(cached) " >&6
9193 else
9194 if test -n "$ac_ct_RANLIB"; then
9195 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9196 else
9197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9198 for as_dir in $PATH
9200 IFS=$as_save_IFS
9201 test -z "$as_dir" && as_dir=.
9202 for ac_exec_ext in '' $ac_executable_extensions; do
9203 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9204 ac_cv_prog_ac_ct_RANLIB="ranlib"
9205 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9206 break 2
9208 done
9209 done
9210 IFS=$as_save_IFS
9214 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9215 if test -n "$ac_ct_RANLIB"; then
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9217 $as_echo "$ac_ct_RANLIB" >&6; }
9218 else
9219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9220 $as_echo "no" >&6; }
9223 if test "x$ac_ct_RANLIB" = x; then
9224 RANLIB=":"
9225 else
9226 case $cross_compiling:$ac_tool_warned in
9227 yes:)
9228 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9229 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9230 ac_tool_warned=yes ;;
9231 esac
9232 RANLIB=$ac_ct_RANLIB
9234 else
9235 RANLIB="$ac_cv_prog_RANLIB"
9239 if test -n "$ac_tool_prefix"; then
9240 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9241 set dummy ${ac_tool_prefix}strip; ac_word=$2
9242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9243 $as_echo_n "checking for $ac_word... " >&6; }
9244 if ${ac_cv_prog_STRIP+:} false; then :
9245 $as_echo_n "(cached) " >&6
9246 else
9247 if test -n "$STRIP"; then
9248 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9249 else
9250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9251 for as_dir in $PATH
9253 IFS=$as_save_IFS
9254 test -z "$as_dir" && as_dir=.
9255 for ac_exec_ext in '' $ac_executable_extensions; do
9256 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9257 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9259 break 2
9261 done
9262 done
9263 IFS=$as_save_IFS
9267 STRIP=$ac_cv_prog_STRIP
9268 if test -n "$STRIP"; then
9269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9270 $as_echo "$STRIP" >&6; }
9271 else
9272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9273 $as_echo "no" >&6; }
9278 if test -z "$ac_cv_prog_STRIP"; then
9279 ac_ct_STRIP=$STRIP
9280 # Extract the first word of "strip", so it can be a program name with args.
9281 set dummy strip; ac_word=$2
9282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9283 $as_echo_n "checking for $ac_word... " >&6; }
9284 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9285 $as_echo_n "(cached) " >&6
9286 else
9287 if test -n "$ac_ct_STRIP"; then
9288 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9289 else
9290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9291 for as_dir in $PATH
9293 IFS=$as_save_IFS
9294 test -z "$as_dir" && as_dir=.
9295 for ac_exec_ext in '' $ac_executable_extensions; do
9296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9297 ac_cv_prog_ac_ct_STRIP="strip"
9298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9299 break 2
9301 done
9302 done
9303 IFS=$as_save_IFS
9307 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9308 if test -n "$ac_ct_STRIP"; then
9309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9310 $as_echo "$ac_ct_STRIP" >&6; }
9311 else
9312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9313 $as_echo "no" >&6; }
9316 if test "x$ac_ct_STRIP" = x; then
9317 STRIP=":"
9318 else
9319 case $cross_compiling:$ac_tool_warned in
9320 yes:)
9321 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9322 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9323 ac_tool_warned=yes ;;
9324 esac
9325 STRIP=$ac_ct_STRIP
9327 else
9328 STRIP="$ac_cv_prog_STRIP"
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9333 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9334 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9335 STRIP_STATIC_LIB="$STRIP -x"
9336 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9338 $as_echo "yes" >&6; }
9339 else
9340 case $host_os in
9341 darwin*)
9342 STRIP="$STRIP -x"
9343 STRIP_STATIC_LIB=$STRIP
9344 STRIP_SHARED_LIB=$STRIP
9345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9346 $as_echo "yes" >&6; }
9349 STRIP_STATIC_LIB=:
9350 STRIP_SHARED_LIB=:
9351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352 $as_echo "no" >&6; }
9354 esac
9359 if test -n "$ac_tool_prefix"; then
9360 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9361 set dummy ${ac_tool_prefix}ar; ac_word=$2
9362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9363 $as_echo_n "checking for $ac_word... " >&6; }
9364 if ${ac_cv_prog_AR+:} false; then :
9365 $as_echo_n "(cached) " >&6
9366 else
9367 if test -n "$AR"; then
9368 ac_cv_prog_AR="$AR" # Let the user override the test.
9369 else
9370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9371 for as_dir in $PATH
9373 IFS=$as_save_IFS
9374 test -z "$as_dir" && as_dir=.
9375 for ac_exec_ext in '' $ac_executable_extensions; do
9376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9377 ac_cv_prog_AR="${ac_tool_prefix}ar"
9378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9379 break 2
9381 done
9382 done
9383 IFS=$as_save_IFS
9387 AR=$ac_cv_prog_AR
9388 if test -n "$AR"; then
9389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9390 $as_echo "$AR" >&6; }
9391 else
9392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393 $as_echo "no" >&6; }
9398 if test -z "$ac_cv_prog_AR"; then
9399 ac_ct_AR=$AR
9400 # Extract the first word of "ar", so it can be a program name with args.
9401 set dummy ar; ac_word=$2
9402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9403 $as_echo_n "checking for $ac_word... " >&6; }
9404 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9405 $as_echo_n "(cached) " >&6
9406 else
9407 if test -n "$ac_ct_AR"; then
9408 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9409 else
9410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9411 for as_dir in $PATH
9413 IFS=$as_save_IFS
9414 test -z "$as_dir" && as_dir=.
9415 for ac_exec_ext in '' $ac_executable_extensions; do
9416 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9417 ac_cv_prog_ac_ct_AR="ar"
9418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9419 break 2
9421 done
9422 done
9423 IFS=$as_save_IFS
9427 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9428 if test -n "$ac_ct_AR"; then
9429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9430 $as_echo "$ac_ct_AR" >&6; }
9431 else
9432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9433 $as_echo "no" >&6; }
9436 if test "x$ac_ct_AR" = x; then
9437 AR="ar"
9438 else
9439 case $cross_compiling:$ac_tool_warned in
9440 yes:)
9441 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9442 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9443 ac_tool_warned=yes ;;
9444 esac
9445 AR=$ac_ct_AR
9447 else
9448 AR="$ac_cv_prog_AR"
9451 if test "$PORTNAME" = "win32"; then
9452 if test -n "$ac_tool_prefix"; then
9453 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9454 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9456 $as_echo_n "checking for $ac_word... " >&6; }
9457 if ${ac_cv_prog_DLLTOOL+:} false; then :
9458 $as_echo_n "(cached) " >&6
9459 else
9460 if test -n "$DLLTOOL"; then
9461 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9462 else
9463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9464 for as_dir in $PATH
9466 IFS=$as_save_IFS
9467 test -z "$as_dir" && as_dir=.
9468 for ac_exec_ext in '' $ac_executable_extensions; do
9469 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9470 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9471 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9472 break 2
9474 done
9475 done
9476 IFS=$as_save_IFS
9480 DLLTOOL=$ac_cv_prog_DLLTOOL
9481 if test -n "$DLLTOOL"; then
9482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9483 $as_echo "$DLLTOOL" >&6; }
9484 else
9485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486 $as_echo "no" >&6; }
9491 if test -z "$ac_cv_prog_DLLTOOL"; then
9492 ac_ct_DLLTOOL=$DLLTOOL
9493 # Extract the first word of "dlltool", so it can be a program name with args.
9494 set dummy dlltool; ac_word=$2
9495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9496 $as_echo_n "checking for $ac_word... " >&6; }
9497 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9498 $as_echo_n "(cached) " >&6
9499 else
9500 if test -n "$ac_ct_DLLTOOL"; then
9501 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9502 else
9503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9504 for as_dir in $PATH
9506 IFS=$as_save_IFS
9507 test -z "$as_dir" && as_dir=.
9508 for ac_exec_ext in '' $ac_executable_extensions; do
9509 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9510 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9511 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9512 break 2
9514 done
9515 done
9516 IFS=$as_save_IFS
9520 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9521 if test -n "$ac_ct_DLLTOOL"; then
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9523 $as_echo "$ac_ct_DLLTOOL" >&6; }
9524 else
9525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9526 $as_echo "no" >&6; }
9529 if test "x$ac_ct_DLLTOOL" = x; then
9530 DLLTOOL="dlltool"
9531 else
9532 case $cross_compiling:$ac_tool_warned in
9533 yes:)
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9535 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9536 ac_tool_warned=yes ;;
9537 esac
9538 DLLTOOL=$ac_ct_DLLTOOL
9540 else
9541 DLLTOOL="$ac_cv_prog_DLLTOOL"
9544 if test -n "$ac_tool_prefix"; then
9545 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9546 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9548 $as_echo_n "checking for $ac_word... " >&6; }
9549 if ${ac_cv_prog_DLLWRAP+:} false; then :
9550 $as_echo_n "(cached) " >&6
9551 else
9552 if test -n "$DLLWRAP"; then
9553 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9554 else
9555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9556 for as_dir in $PATH
9558 IFS=$as_save_IFS
9559 test -z "$as_dir" && as_dir=.
9560 for ac_exec_ext in '' $ac_executable_extensions; do
9561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9562 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9564 break 2
9566 done
9567 done
9568 IFS=$as_save_IFS
9572 DLLWRAP=$ac_cv_prog_DLLWRAP
9573 if test -n "$DLLWRAP"; then
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9575 $as_echo "$DLLWRAP" >&6; }
9576 else
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9578 $as_echo "no" >&6; }
9583 if test -z "$ac_cv_prog_DLLWRAP"; then
9584 ac_ct_DLLWRAP=$DLLWRAP
9585 # Extract the first word of "dllwrap", so it can be a program name with args.
9586 set dummy dllwrap; ac_word=$2
9587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9588 $as_echo_n "checking for $ac_word... " >&6; }
9589 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9590 $as_echo_n "(cached) " >&6
9591 else
9592 if test -n "$ac_ct_DLLWRAP"; then
9593 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9594 else
9595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9596 for as_dir in $PATH
9598 IFS=$as_save_IFS
9599 test -z "$as_dir" && as_dir=.
9600 for ac_exec_ext in '' $ac_executable_extensions; do
9601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9602 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9604 break 2
9606 done
9607 done
9608 IFS=$as_save_IFS
9612 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9613 if test -n "$ac_ct_DLLWRAP"; then
9614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9615 $as_echo "$ac_ct_DLLWRAP" >&6; }
9616 else
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9618 $as_echo "no" >&6; }
9621 if test "x$ac_ct_DLLWRAP" = x; then
9622 DLLWRAP="dllwrap"
9623 else
9624 case $cross_compiling:$ac_tool_warned in
9625 yes:)
9626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9627 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9628 ac_tool_warned=yes ;;
9629 esac
9630 DLLWRAP=$ac_ct_DLLWRAP
9632 else
9633 DLLWRAP="$ac_cv_prog_DLLWRAP"
9636 if test -n "$ac_tool_prefix"; then
9637 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9638 set dummy ${ac_tool_prefix}windres; ac_word=$2
9639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9640 $as_echo_n "checking for $ac_word... " >&6; }
9641 if ${ac_cv_prog_WINDRES+:} false; then :
9642 $as_echo_n "(cached) " >&6
9643 else
9644 if test -n "$WINDRES"; then
9645 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9646 else
9647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9648 for as_dir in $PATH
9650 IFS=$as_save_IFS
9651 test -z "$as_dir" && as_dir=.
9652 for ac_exec_ext in '' $ac_executable_extensions; do
9653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9654 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9656 break 2
9658 done
9659 done
9660 IFS=$as_save_IFS
9664 WINDRES=$ac_cv_prog_WINDRES
9665 if test -n "$WINDRES"; then
9666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9667 $as_echo "$WINDRES" >&6; }
9668 else
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670 $as_echo "no" >&6; }
9675 if test -z "$ac_cv_prog_WINDRES"; then
9676 ac_ct_WINDRES=$WINDRES
9677 # Extract the first word of "windres", so it can be a program name with args.
9678 set dummy windres; ac_word=$2
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9680 $as_echo_n "checking for $ac_word... " >&6; }
9681 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9682 $as_echo_n "(cached) " >&6
9683 else
9684 if test -n "$ac_ct_WINDRES"; then
9685 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9686 else
9687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9688 for as_dir in $PATH
9690 IFS=$as_save_IFS
9691 test -z "$as_dir" && as_dir=.
9692 for ac_exec_ext in '' $ac_executable_extensions; do
9693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9694 ac_cv_prog_ac_ct_WINDRES="windres"
9695 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9696 break 2
9698 done
9699 done
9700 IFS=$as_save_IFS
9704 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9705 if test -n "$ac_ct_WINDRES"; then
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9707 $as_echo "$ac_ct_WINDRES" >&6; }
9708 else
9709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9710 $as_echo "no" >&6; }
9713 if test "x$ac_ct_WINDRES" = x; then
9714 WINDRES="windres"
9715 else
9716 case $cross_compiling:$ac_tool_warned in
9717 yes:)
9718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9719 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9720 ac_tool_warned=yes ;;
9721 esac
9722 WINDRES=$ac_ct_WINDRES
9724 else
9725 WINDRES="$ac_cv_prog_WINDRES"
9730 # Find a good install program. We prefer a C program (faster),
9731 # so one script is as good as another. But avoid the broken or
9732 # incompatible versions:
9733 # SysV /etc/install, /usr/sbin/install
9734 # SunOS /usr/etc/install
9735 # IRIX /sbin/install
9736 # AIX /bin/install
9737 # AmigaOS /C/install, which installs bootblocks on floppy discs
9738 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9739 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9740 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9741 # OS/2's system install, which has a completely different semantic
9742 # ./install, which can be erroneously created by make from ./install.sh.
9743 # Reject install programs that cannot install multiple files.
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9745 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9746 if test -z "$INSTALL"; then
9747 if ${ac_cv_path_install+:} false; then :
9748 $as_echo_n "(cached) " >&6
9749 else
9750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9751 for as_dir in $PATH
9753 IFS=$as_save_IFS
9754 test -z "$as_dir" && as_dir=.
9755 # Account for people who put trailing slashes in PATH elements.
9756 case $as_dir/ in #((
9757 ./ | .// | /[cC]/* | \
9758 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9759 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9760 /usr/ucb/* ) ;;
9762 # OSF1 and SCO ODT 3.0 have their own names for install.
9763 # Don't use installbsd from OSF since it installs stuff as root
9764 # by default.
9765 for ac_prog in ginstall scoinst install; do
9766 for ac_exec_ext in '' $ac_executable_extensions; do
9767 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9768 if test $ac_prog = install &&
9769 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9770 # AIX install. It has an incompatible calling convention.
9772 elif test $ac_prog = install &&
9773 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9774 # program-specific install script used by HP pwplus--don't use.
9776 else
9777 rm -rf conftest.one conftest.two conftest.dir
9778 echo one > conftest.one
9779 echo two > conftest.two
9780 mkdir conftest.dir
9781 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9782 test -s conftest.one && test -s conftest.two &&
9783 test -s conftest.dir/conftest.one &&
9784 test -s conftest.dir/conftest.two
9785 then
9786 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9787 break 3
9791 done
9792 done
9794 esac
9796 done
9797 IFS=$as_save_IFS
9799 rm -rf conftest.one conftest.two conftest.dir
9802 if test "${ac_cv_path_install+set}" = set; then
9803 INSTALL=$ac_cv_path_install
9804 else
9805 # As a last resort, use the slow shell script. Don't cache a
9806 # value for INSTALL within a source directory, because that will
9807 # break other packages using the cache if that directory is
9808 # removed, or if the value is a relative name.
9809 INSTALL=$ac_install_sh
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9813 $as_echo "$INSTALL" >&6; }
9815 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9816 # It thinks the first close brace ends the variable substitution.
9817 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9819 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9821 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9823 # When Autoconf chooses install-sh as install program it tries to generate
9824 # a relative path to it in each makefile where it substitutes it. This clashes
9825 # with our Makefile.global concept. This workaround helps.
9826 case $INSTALL in
9827 *install-sh*) install_bin='';;
9828 *) install_bin=$INSTALL;;
9829 esac
9832 if test -z "$TAR"; then
9833 for ac_prog in tar
9835 # Extract the first word of "$ac_prog", so it can be a program name with args.
9836 set dummy $ac_prog; ac_word=$2
9837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9838 $as_echo_n "checking for $ac_word... " >&6; }
9839 if ${ac_cv_path_TAR+:} false; then :
9840 $as_echo_n "(cached) " >&6
9841 else
9842 case $TAR in
9843 [\\/]* | ?:[\\/]*)
9844 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9847 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9848 for as_dir in $PATH
9850 IFS=$as_save_IFS
9851 test -z "$as_dir" && as_dir=.
9852 for ac_exec_ext in '' $ac_executable_extensions; do
9853 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9854 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9855 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9856 break 2
9858 done
9859 done
9860 IFS=$as_save_IFS
9863 esac
9865 TAR=$ac_cv_path_TAR
9866 if test -n "$TAR"; then
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9868 $as_echo "$TAR" >&6; }
9869 else
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871 $as_echo "no" >&6; }
9875 test -n "$TAR" && break
9876 done
9878 else
9879 # Report the value of TAR in configure's output in all cases.
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9881 $as_echo_n "checking for TAR... " >&6; }
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9883 $as_echo "$TAR" >&6; }
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9887 $as_echo_n "checking whether ln -s works... " >&6; }
9888 LN_S=$as_ln_s
9889 if test "$LN_S" = "ln -s"; then
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9891 $as_echo "yes" >&6; }
9892 else
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9894 $as_echo "no, using $LN_S" >&6; }
9897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9898 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9899 if test -z "$MKDIR_P"; then
9900 if ${ac_cv_path_mkdir+:} false; then :
9901 $as_echo_n "(cached) " >&6
9902 else
9903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9904 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9906 IFS=$as_save_IFS
9907 test -z "$as_dir" && as_dir=.
9908 for ac_prog in mkdir gmkdir; do
9909 for ac_exec_ext in '' $ac_executable_extensions; do
9910 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9911 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9912 'mkdir (GNU coreutils) '* | \
9913 'mkdir (coreutils) '* | \
9914 'mkdir (fileutils) '4.1*)
9915 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9916 break 3;;
9917 esac
9918 done
9919 done
9920 done
9921 IFS=$as_save_IFS
9925 test -d ./--version && rmdir ./--version
9926 if test "${ac_cv_path_mkdir+set}" = set; then
9927 MKDIR_P="$ac_cv_path_mkdir -p"
9928 else
9929 # As a last resort, use the slow shell script. Don't cache a
9930 # value for MKDIR_P within a source directory, because that will
9931 # break other packages using the cache if that directory is
9932 # removed, or if the value is a relative name.
9933 MKDIR_P="$ac_install_sh -d"
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9937 $as_echo "$MKDIR_P" >&6; }
9939 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9940 # a relative path to it in each makefile where it substitutes it. This clashes
9941 # with our Makefile.global concept. This workaround helps.
9942 case $MKDIR_P in
9943 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9944 esac
9946 if test -z "$BISON"; then
9947 for ac_prog in bison
9949 # Extract the first word of "$ac_prog", so it can be a program name with args.
9950 set dummy $ac_prog; ac_word=$2
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9952 $as_echo_n "checking for $ac_word... " >&6; }
9953 if ${ac_cv_path_BISON+:} false; then :
9954 $as_echo_n "(cached) " >&6
9955 else
9956 case $BISON in
9957 [\\/]* | ?:[\\/]*)
9958 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9962 for as_dir in $PATH
9964 IFS=$as_save_IFS
9965 test -z "$as_dir" && as_dir=.
9966 for ac_exec_ext in '' $ac_executable_extensions; do
9967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9968 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9970 break 2
9972 done
9973 done
9974 IFS=$as_save_IFS
9977 esac
9979 BISON=$ac_cv_path_BISON
9980 if test -n "$BISON"; then
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9982 $as_echo "$BISON" >&6; }
9983 else
9984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985 $as_echo "no" >&6; }
9989 test -n "$BISON" && break
9990 done
9992 else
9993 # Report the value of BISON in configure's output in all cases.
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9995 $as_echo_n "checking for BISON... " >&6; }
9996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9997 $as_echo "$BISON" >&6; }
10001 if test "$BISON"; then
10002 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10004 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10005 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
10006 then
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10008 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10009 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
10010 $as_echo "$as_me: WARNING:
10011 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10012 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
10013 BISON=""
10015 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10016 # of the now preferred %name-prefix "base_yy", but the latter
10017 # doesn't work with Bison 2.3 or less. So for now we silence the
10018 # deprecation warnings.
10019 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10020 then
10021 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10025 if test -z "$BISON"; then
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10027 *** Without Bison you will not be able to build PostgreSQL from Git nor
10028 *** change any of the parser definition files. You can obtain Bison from
10029 *** a GNU mirror site. (If you are using the official distribution of
10030 *** PostgreSQL then you do not need to worry about this, because the Bison
10031 *** output is pre-generated.)" >&5
10032 $as_echo "$as_me: WARNING:
10033 *** Without Bison you will not be able to build PostgreSQL from Git nor
10034 *** change any of the parser definition files. You can obtain Bison from
10035 *** a GNU mirror site. (If you are using the official distribution of
10036 *** PostgreSQL then you do not need to worry about this, because the Bison
10037 *** output is pre-generated.)" >&2;}
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
10042 $as_echo_n "checking for flex... " >&6; }
10043 if ${pgac_cv_path_flex+:} false; then :
10044 $as_echo_n "(cached) " >&6
10045 else
10046 # Let the user override the test
10047 if test -n "$FLEX"; then
10048 pgac_cv_path_flex=$FLEX
10049 else
10050 pgac_save_IFS=$IFS
10051 IFS=$PATH_SEPARATOR
10052 for pgac_dir in $PATH; do
10053 IFS=$pgac_save_IFS
10054 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
10055 pgac_dir=`pwd`
10057 for pgac_prog in flex lex; do
10058 pgac_candidate="$pgac_dir/$pgac_prog"
10059 if test -f "$pgac_candidate" \
10060 && $pgac_candidate --version </dev/null >/dev/null 2>&1
10061 then
10062 echo '%%' > conftest.l
10063 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
10064 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
10065 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;}'
10066 then
10067 pgac_cv_path_flex=$pgac_candidate
10068 break 2
10069 else
10070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10071 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10072 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
10073 $as_echo "$as_me: WARNING:
10074 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10075 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
10079 done
10080 done
10081 rm -f conftest.l lex.yy.c
10082 : ${pgac_cv_path_flex=no}
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10087 $as_echo "$pgac_cv_path_flex" >&6; }
10088 if test x"$pgac_cv_path_flex" = x"no"; then
10089 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10090 *** Without Flex you will not be able to build PostgreSQL from Git nor
10091 *** change any of the scanner definition files. You can obtain Flex from
10092 *** a GNU mirror site. (If you are using the official distribution of
10093 *** PostgreSQL then you do not need to worry about this because the Flex
10094 *** output is pre-generated.)" >&5
10095 $as_echo "$as_me: WARNING:
10096 *** Without Flex you will not be able to build PostgreSQL from Git nor
10097 *** change any of the scanner definition files. You can obtain Flex from
10098 *** a GNU mirror site. (If you are using the official distribution of
10099 *** PostgreSQL then you do not need to worry about this because the Flex
10100 *** output is pre-generated.)" >&2;}
10102 FLEX=
10103 else
10104 FLEX=$pgac_cv_path_flex
10105 pgac_flex_version=`$FLEX --version 2>/dev/null`
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10107 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10114 if test -z "$PERL"; then
10115 for ac_prog in perl
10117 # Extract the first word of "$ac_prog", so it can be a program name with args.
10118 set dummy $ac_prog; ac_word=$2
10119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10120 $as_echo_n "checking for $ac_word... " >&6; }
10121 if ${ac_cv_path_PERL+:} false; then :
10122 $as_echo_n "(cached) " >&6
10123 else
10124 case $PERL in
10125 [\\/]* | ?:[\\/]*)
10126 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10130 for as_dir in $PATH
10132 IFS=$as_save_IFS
10133 test -z "$as_dir" && as_dir=.
10134 for ac_exec_ext in '' $ac_executable_extensions; do
10135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10136 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10138 break 2
10140 done
10141 done
10142 IFS=$as_save_IFS
10145 esac
10147 PERL=$ac_cv_path_PERL
10148 if test -n "$PERL"; then
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10150 $as_echo "$PERL" >&6; }
10151 else
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10153 $as_echo "no" >&6; }
10157 test -n "$PERL" && break
10158 done
10160 else
10161 # Report the value of PERL in configure's output in all cases.
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10163 $as_echo_n "checking for PERL... " >&6; }
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10165 $as_echo "$PERL" >&6; }
10169 if test "$PERL"; then
10170 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'`
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10172 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10173 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10174 $AWK '{ if ($1 == 5 && ($2 > 8 || ($2 == 8 && $3 >= 3))) exit 1; else exit 0;}'
10175 then
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10177 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10178 *** Perl version 5.8.3 or later is required, but this is $pgac_perl_version." >&5
10179 $as_echo "$as_me: WARNING:
10180 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10181 *** Perl version 5.8.3 or later is required, but this is $pgac_perl_version." >&2;}
10182 PERL=""
10186 if test -z "$PERL"; then
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10188 *** Without Perl you will not be able to build PostgreSQL from Git.
10189 *** You can obtain Perl from any CPAN mirror site.
10190 *** (If you are using the official distribution of PostgreSQL then you do not
10191 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10192 $as_echo "$as_me: WARNING:
10193 *** Without Perl you will not be able to build PostgreSQL from Git.
10194 *** You can obtain Perl from any CPAN mirror site.
10195 *** (If you are using the official distribution of PostgreSQL then you do not
10196 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10199 if test "$with_perl" = yes; then
10200 if test -z "$PERL"; then
10201 as_fn_error $? "Perl not found" "$LINENO" 5
10204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10205 $as_echo_n "checking for Perl archlibexp... " >&6; }
10206 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10207 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10209 $as_echo "$perl_archlibexp" >&6; }
10210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10211 $as_echo_n "checking for Perl privlibexp... " >&6; }
10212 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10213 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10215 $as_echo "$perl_privlibexp" >&6; }
10216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10217 $as_echo_n "checking for Perl useshrplib... " >&6; }
10218 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10219 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10221 $as_echo "$perl_useshrplib" >&6; }
10222 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10223 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10224 You might have to rebuild your Perl installation. Refer to the
10225 documentation for details. Use --without-perl to disable building
10226 PL/Perl." "$LINENO" 5
10228 # On most platforms, archlibexp is also where the Perl include files live ...
10229 perl_includespec="-I$perl_archlibexp/CORE"
10230 # ... but on newer macOS versions, we must use -iwithsysroot to look
10231 # under $PG_SYSROOT
10232 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10233 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10234 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10239 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10240 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10242 $as_echo "$perl_ccflags" >&6; }
10243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10244 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10245 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10247 $as_echo "$perl_embed_ccflags" >&6; }
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10251 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10252 if test "$PORTNAME" = "win32" ; then
10253 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10254 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10255 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10256 else
10257 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10258 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10259 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10262 else
10263 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10264 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
10265 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
10267 if test -z "$perl_embed_ldflags" ; then
10268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10269 $as_echo "no" >&6; }
10270 as_fn_error $? "could not determine flags for linking embedded Perl.
10271 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10272 installed." "$LINENO" 5
10273 else
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10275 $as_echo "$perl_embed_ldflags" >&6; }
10280 if test "$with_python" = yes; then
10281 if test -z "$PYTHON"; then
10282 for ac_prog in python python3 python2
10284 # Extract the first word of "$ac_prog", so it can be a program name with args.
10285 set dummy $ac_prog; ac_word=$2
10286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10287 $as_echo_n "checking for $ac_word... " >&6; }
10288 if ${ac_cv_path_PYTHON+:} false; then :
10289 $as_echo_n "(cached) " >&6
10290 else
10291 case $PYTHON in
10292 [\\/]* | ?:[\\/]*)
10293 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10297 for as_dir in $PATH
10299 IFS=$as_save_IFS
10300 test -z "$as_dir" && as_dir=.
10301 for ac_exec_ext in '' $ac_executable_extensions; do
10302 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10303 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10304 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10305 break 2
10307 done
10308 done
10309 IFS=$as_save_IFS
10312 esac
10314 PYTHON=$ac_cv_path_PYTHON
10315 if test -n "$PYTHON"; then
10316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10317 $as_echo "$PYTHON" >&6; }
10318 else
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10320 $as_echo "no" >&6; }
10324 test -n "$PYTHON" && break
10325 done
10327 else
10328 # Report the value of PYTHON in configure's output in all cases.
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10330 $as_echo_n "checking for PYTHON... " >&6; }
10331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10332 $as_echo "$PYTHON" >&6; }
10335 if test x"$PYTHON" = x""; then
10336 as_fn_error $? "Python not found" "$LINENO" 5
10340 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10341 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10342 $as_echo "$as_me: using python $python_fullversion" >&6;}
10343 # python_fullversion is typically n.n.n plus some trailing junk
10344 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10345 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10346 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10347 # Reject unsupported Python versions as soon as practical.
10348 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 6; then
10349 as_fn_error $? "Python version $python_version is too old (version 2.6 or later is required)" "$LINENO" 5
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
10353 $as_echo_n "checking for Python distutils module... " >&6; }
10354 if "${PYTHON}" -c 'import distutils' 2>&5
10355 then
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10357 $as_echo "yes" >&6; }
10358 else
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360 $as_echo "no" >&6; }
10361 as_fn_error $? "distutils module not found" "$LINENO" 5
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10365 $as_echo_n "checking Python configuration directory... " >&6; }
10366 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
10367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10368 $as_echo "$python_configdir" >&6; }
10370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
10371 $as_echo_n "checking Python include directories... " >&6; }
10372 python_includespec=`${PYTHON} -c "
10373 import distutils.sysconfig
10374 a = '-I' + distutils.sysconfig.get_python_inc(False)
10375 b = '-I' + distutils.sysconfig.get_python_inc(True)
10376 if a == b:
10377 print(a)
10378 else:
10379 print(a + ' ' + b)"`
10380 if test "$PORTNAME" = win32 ; then
10381 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10384 $as_echo "$python_includespec" >&6; }
10388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10389 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10391 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
10392 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
10394 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10395 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10396 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10397 then
10398 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10399 found_shlib=1
10400 else
10401 # Otherwise, guess the base name of the shlib.
10402 # LDVERSION was added in Python 3.2, before that use VERSION,
10403 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10404 python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
10405 if test x"${python_ldversion}" != x""; then
10406 ldlibrary="python${python_ldversion}"
10407 else
10408 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
10409 if test x"${python_version_var}" != x""; then
10410 ldlibrary="python${python_version_var}"
10411 else
10412 ldlibrary="python${python_version}"
10415 # Search for a likely-looking file.
10416 found_shlib=0
10417 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10419 # We don't know the platform DLSUFFIX here, so check 'em all.
10420 for e in .so .dll .dylib .sl; do
10421 if test -e "$d/lib${ldlibrary}$e"; then
10422 python_libdir="$d"
10423 found_shlib=1
10424 break 2
10426 done
10427 done
10428 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10429 # (".so.n.n") as well. However, check this only after failing to find
10430 # ".so" anywhere, because yet other platforms (Debian) put the .so
10431 # symlink in a different directory from the underlying versioned shlib.
10432 if test "$found_shlib" != 1; then
10433 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10435 for f in "$d/lib${ldlibrary}.so."* ; do
10436 if test -e "$f"; then
10437 python_libdir="$d"
10438 found_shlib=1
10439 break 2
10441 done
10442 done
10444 # As usual, Windows has its own ideas. Possible default library
10445 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10446 # and the "lib" prefix might not be there.
10447 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10448 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10450 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10451 if test -e "$f"; then
10452 python_libdir="$d"
10453 found_shlib=1
10454 break 2
10456 done
10457 done
10460 if test "$found_shlib" != 1; then
10461 as_fn_error $? "could not find shared library for Python
10462 You might have to rebuild your Python installation. Refer to the
10463 documentation for details. Use --without-python to disable building
10464 PL/Python." "$LINENO" 5
10466 python_libspec="-L${python_libdir} -l${ldlibrary}"
10468 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10471 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10477 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10478 if test -z "$ZIC"; then
10479 for ac_prog in zic
10481 # Extract the first word of "$ac_prog", so it can be a program name with args.
10482 set dummy $ac_prog; ac_word=$2
10483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10484 $as_echo_n "checking for $ac_word... " >&6; }
10485 if ${ac_cv_path_ZIC+:} false; then :
10486 $as_echo_n "(cached) " >&6
10487 else
10488 case $ZIC in
10489 [\\/]* | ?:[\\/]*)
10490 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10494 for as_dir in $PATH
10496 IFS=$as_save_IFS
10497 test -z "$as_dir" && as_dir=.
10498 for ac_exec_ext in '' $ac_executable_extensions; do
10499 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10500 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10502 break 2
10504 done
10505 done
10506 IFS=$as_save_IFS
10509 esac
10511 ZIC=$ac_cv_path_ZIC
10512 if test -n "$ZIC"; then
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10514 $as_echo "$ZIC" >&6; }
10515 else
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10517 $as_echo "no" >&6; }
10521 test -n "$ZIC" && break
10522 done
10524 else
10525 # Report the value of ZIC in configure's output in all cases.
10526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10527 $as_echo_n "checking for ZIC... " >&6; }
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10529 $as_echo "$ZIC" >&6; }
10532 if test -z "$ZIC"; then
10533 as_fn_error $? "
10534 When cross-compiling, either use the option --with-system-tzdata to use
10535 existing time-zone data, or set the environment variable ZIC to a zic
10536 program to use during the build." "$LINENO" 5
10541 # Pthreads
10543 # For each platform, we need to know about any special compile and link
10544 # libraries, and whether the normal C function names are thread-safe.
10545 # See the comment at the top of src/port/thread.c for more information.
10546 # WIN32 doesn't need the pthread tests; it always uses threads
10548 # These tests are run before the library-tests, because linking with the
10549 # other libraries can pull in the pthread functions as a side-effect. We
10550 # want to use the -pthread or similar flags directly, and not rely on
10551 # the side-effects of linking with some other library.
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10554 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10555 if ${ac_cv_path_SED+:} false; then :
10556 $as_echo_n "(cached) " >&6
10557 else
10558 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10559 for ac_i in 1 2 3 4 5 6 7; do
10560 ac_script="$ac_script$as_nl$ac_script"
10561 done
10562 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10563 { ac_script=; unset ac_script;}
10564 if test -z "$SED"; then
10565 ac_path_SED_found=false
10566 # Loop through the user's path and test for each of PROGNAME-LIST
10567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10568 for as_dir in $PATH
10570 IFS=$as_save_IFS
10571 test -z "$as_dir" && as_dir=.
10572 for ac_prog in sed gsed; do
10573 for ac_exec_ext in '' $ac_executable_extensions; do
10574 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10575 as_fn_executable_p "$ac_path_SED" || continue
10576 # Check for GNU ac_path_SED and select it if it is found.
10577 # Check for GNU $ac_path_SED
10578 case `"$ac_path_SED" --version 2>&1` in
10579 *GNU*)
10580 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10582 ac_count=0
10583 $as_echo_n 0123456789 >"conftest.in"
10584 while :
10586 cat "conftest.in" "conftest.in" >"conftest.tmp"
10587 mv "conftest.tmp" "conftest.in"
10588 cp "conftest.in" "conftest.nl"
10589 $as_echo '' >> "conftest.nl"
10590 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10591 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10592 as_fn_arith $ac_count + 1 && ac_count=$as_val
10593 if test $ac_count -gt ${ac_path_SED_max-0}; then
10594 # Best one so far, save it but keep looking for a better one
10595 ac_cv_path_SED="$ac_path_SED"
10596 ac_path_SED_max=$ac_count
10598 # 10*(2^10) chars as input seems more than enough
10599 test $ac_count -gt 10 && break
10600 done
10601 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10602 esac
10604 $ac_path_SED_found && break 3
10605 done
10606 done
10607 done
10608 IFS=$as_save_IFS
10609 if test -z "$ac_cv_path_SED"; then
10610 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10612 else
10613 ac_cv_path_SED=$SED
10617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10618 $as_echo "$ac_cv_path_SED" >&6; }
10619 SED="$ac_cv_path_SED"
10620 rm -f conftest.sed
10623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10624 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10625 if ${ac_cv_path_GREP+:} false; then :
10626 $as_echo_n "(cached) " >&6
10627 else
10628 if test -z "$GREP"; then
10629 ac_path_GREP_found=false
10630 # Loop through the user's path and test for each of PROGNAME-LIST
10631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10632 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10634 IFS=$as_save_IFS
10635 test -z "$as_dir" && as_dir=.
10636 for ac_prog in grep ggrep; do
10637 for ac_exec_ext in '' $ac_executable_extensions; do
10638 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10639 as_fn_executable_p "$ac_path_GREP" || continue
10640 # Check for GNU ac_path_GREP and select it if it is found.
10641 # Check for GNU $ac_path_GREP
10642 case `"$ac_path_GREP" --version 2>&1` in
10643 *GNU*)
10644 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10646 ac_count=0
10647 $as_echo_n 0123456789 >"conftest.in"
10648 while :
10650 cat "conftest.in" "conftest.in" >"conftest.tmp"
10651 mv "conftest.tmp" "conftest.in"
10652 cp "conftest.in" "conftest.nl"
10653 $as_echo 'GREP' >> "conftest.nl"
10654 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10655 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10656 as_fn_arith $ac_count + 1 && ac_count=$as_val
10657 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10658 # Best one so far, save it but keep looking for a better one
10659 ac_cv_path_GREP="$ac_path_GREP"
10660 ac_path_GREP_max=$ac_count
10662 # 10*(2^10) chars as input seems more than enough
10663 test $ac_count -gt 10 && break
10664 done
10665 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10666 esac
10668 $ac_path_GREP_found && break 3
10669 done
10670 done
10671 done
10672 IFS=$as_save_IFS
10673 if test -z "$ac_cv_path_GREP"; then
10674 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10676 else
10677 ac_cv_path_GREP=$GREP
10681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10682 $as_echo "$ac_cv_path_GREP" >&6; }
10683 GREP="$ac_cv_path_GREP"
10686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10687 $as_echo_n "checking for egrep... " >&6; }
10688 if ${ac_cv_path_EGREP+:} false; then :
10689 $as_echo_n "(cached) " >&6
10690 else
10691 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10692 then ac_cv_path_EGREP="$GREP -E"
10693 else
10694 if test -z "$EGREP"; then
10695 ac_path_EGREP_found=false
10696 # Loop through the user's path and test for each of PROGNAME-LIST
10697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10698 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10700 IFS=$as_save_IFS
10701 test -z "$as_dir" && as_dir=.
10702 for ac_prog in egrep; do
10703 for ac_exec_ext in '' $ac_executable_extensions; do
10704 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10705 as_fn_executable_p "$ac_path_EGREP" || continue
10706 # Check for GNU ac_path_EGREP and select it if it is found.
10707 # Check for GNU $ac_path_EGREP
10708 case `"$ac_path_EGREP" --version 2>&1` in
10709 *GNU*)
10710 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10712 ac_count=0
10713 $as_echo_n 0123456789 >"conftest.in"
10714 while :
10716 cat "conftest.in" "conftest.in" >"conftest.tmp"
10717 mv "conftest.tmp" "conftest.in"
10718 cp "conftest.in" "conftest.nl"
10719 $as_echo 'EGREP' >> "conftest.nl"
10720 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10721 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10722 as_fn_arith $ac_count + 1 && ac_count=$as_val
10723 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10724 # Best one so far, save it but keep looking for a better one
10725 ac_cv_path_EGREP="$ac_path_EGREP"
10726 ac_path_EGREP_max=$ac_count
10728 # 10*(2^10) chars as input seems more than enough
10729 test $ac_count -gt 10 && break
10730 done
10731 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10732 esac
10734 $ac_path_EGREP_found && break 3
10735 done
10736 done
10737 done
10738 IFS=$as_save_IFS
10739 if test -z "$ac_cv_path_EGREP"; then
10740 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10742 else
10743 ac_cv_path_EGREP=$EGREP
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10749 $as_echo "$ac_cv_path_EGREP" >&6; }
10750 EGREP="$ac_cv_path_EGREP"
10753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10754 $as_echo_n "checking for ANSI C header files... " >&6; }
10755 if ${ac_cv_header_stdc+:} false; then :
10756 $as_echo_n "(cached) " >&6
10757 else
10758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10759 /* end confdefs.h. */
10760 #include <stdlib.h>
10761 #include <stdarg.h>
10762 #include <string.h>
10763 #include <float.h>
10766 main ()
10770 return 0;
10772 _ACEOF
10773 if ac_fn_c_try_compile "$LINENO"; then :
10774 ac_cv_header_stdc=yes
10775 else
10776 ac_cv_header_stdc=no
10778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10780 if test $ac_cv_header_stdc = yes; then
10781 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10783 /* end confdefs.h. */
10784 #include <string.h>
10786 _ACEOF
10787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10788 $EGREP "memchr" >/dev/null 2>&1; then :
10790 else
10791 ac_cv_header_stdc=no
10793 rm -f conftest*
10797 if test $ac_cv_header_stdc = yes; then
10798 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10800 /* end confdefs.h. */
10801 #include <stdlib.h>
10803 _ACEOF
10804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10805 $EGREP "free" >/dev/null 2>&1; then :
10807 else
10808 ac_cv_header_stdc=no
10810 rm -f conftest*
10814 if test $ac_cv_header_stdc = yes; then
10815 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10816 if test "$cross_compiling" = yes; then :
10818 else
10819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10820 /* end confdefs.h. */
10821 #include <ctype.h>
10822 #include <stdlib.h>
10823 #if ((' ' & 0x0FF) == 0x020)
10824 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10825 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10826 #else
10827 # define ISLOWER(c) \
10828 (('a' <= (c) && (c) <= 'i') \
10829 || ('j' <= (c) && (c) <= 'r') \
10830 || ('s' <= (c) && (c) <= 'z'))
10831 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10832 #endif
10834 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10836 main ()
10838 int i;
10839 for (i = 0; i < 256; i++)
10840 if (XOR (islower (i), ISLOWER (i))
10841 || toupper (i) != TOUPPER (i))
10842 return 2;
10843 return 0;
10845 _ACEOF
10846 if ac_fn_c_try_run "$LINENO"; then :
10848 else
10849 ac_cv_header_stdc=no
10851 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10852 conftest.$ac_objext conftest.beam conftest.$ac_ext
10857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10858 $as_echo "$ac_cv_header_stdc" >&6; }
10859 if test $ac_cv_header_stdc = yes; then
10861 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10865 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10866 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10867 inttypes.h stdint.h unistd.h
10868 do :
10869 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10870 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10872 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10873 cat >>confdefs.h <<_ACEOF
10874 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10875 _ACEOF
10879 done
10882 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10883 # then
10888 ac_ext=c
10889 ac_cpp='$CPP $CPPFLAGS'
10890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10894 ax_pthread_ok=no
10896 # We used to check for pthread.h first, but this fails if pthread.h
10897 # requires special compiler flags (e.g. on Tru64 or Sequent).
10898 # It gets checked for in the link test anyway.
10900 # First of all, check if the user has set any of the PTHREAD_LIBS,
10901 # etcetera environment variables, and if threads linking works using
10902 # them:
10903 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10904 ax_pthread_save_CC="$CC"
10905 ax_pthread_save_CFLAGS="$CFLAGS"
10906 ax_pthread_save_LIBS="$LIBS"
10907 if test "x$PTHREAD_CC" != "x"; then :
10908 CC="$PTHREAD_CC"
10910 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10911 LIBS="$PTHREAD_LIBS $LIBS"
10912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10913 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10915 /* end confdefs.h. */
10917 /* Override any GCC internal prototype to avoid an error.
10918 Use char because int might match the return type of a GCC
10919 builtin and then its argument prototype would still apply. */
10920 #ifdef __cplusplus
10921 extern "C"
10922 #endif
10923 char pthread_join ();
10925 main ()
10927 return pthread_join ();
10929 return 0;
10931 _ACEOF
10932 if ac_fn_c_try_link "$LINENO"; then :
10933 ax_pthread_ok=yes
10935 rm -f core conftest.err conftest.$ac_objext \
10936 conftest$ac_exeext conftest.$ac_ext
10937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10938 $as_echo "$ax_pthread_ok" >&6; }
10939 if test "x$ax_pthread_ok" = "xno"; then
10940 PTHREAD_LIBS=""
10941 PTHREAD_CFLAGS=""
10943 CC="$ax_pthread_save_CC"
10944 CFLAGS="$ax_pthread_save_CFLAGS"
10945 LIBS="$ax_pthread_save_LIBS"
10948 # We must check for the threads library under a number of different
10949 # names; the ordering is very important because some systems
10950 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10951 # libraries is broken (non-POSIX).
10953 # Create a list of thread flags to try. Items starting with a "-" are
10954 # C compiler flags, and other items are library names, except for "none"
10955 # which indicates that we try without any flags at all, and "pthread-config"
10956 # which is a program returning the flags for the Pth emulation library.
10958 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10960 # The ordering *is* (sometimes) important. Some notes on the
10961 # individual items follow:
10963 # pthreads: AIX (must check this before -lpthread)
10964 # none: in case threads are in libc; should be tried before -Kthread and
10965 # other compiler flags to prevent continual compiler warnings
10966 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10967 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10968 # (Note: HP C rejects this with "bad form for `-t' option")
10969 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10970 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10971 # doesn't hurt to check since this sometimes defines pthreads and
10972 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10973 # is present but should not be used directly; and before -mthreads,
10974 # because the compiler interprets this as "-mt" + "-hreads")
10975 # -mthreads: Mingw32/gcc, Lynx/gcc
10976 # pthread: Linux, etcetera
10977 # --thread-safe: KAI C++
10978 # pthread-config: use pthread-config program (for GNU Pth library)
10980 case $host_os in
10982 freebsd*)
10984 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10985 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10987 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10990 hpux*)
10992 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10993 # multi-threading and also sets -lpthread."
10995 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10998 openedition*)
11000 # IBM z/OS requires a feature-test macro to be defined in order to
11001 # enable POSIX threads at all, so give the user a hint if this is
11002 # not set. (We don't define these ourselves, as they can affect
11003 # other portions of the system API in unpredictable ways.)
11005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11006 /* end confdefs.h. */
11008 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11009 AX_PTHREAD_ZOS_MISSING
11010 # endif
11012 _ACEOF
11013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11014 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11016 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11018 rm -f conftest*
11022 solaris*)
11024 # On Solaris (at least, for some versions), libc contains stubbed
11025 # (non-functional) versions of the pthreads routines, so link-based
11026 # tests will erroneously succeed. (N.B.: The stubs are missing
11027 # pthread_cleanup_push, or rather a function called by this macro,
11028 # so we could check for that, but who knows whether they'll stub
11029 # that too in a future libc.) So we'll check first for the
11030 # standard Solaris way of linking pthreads (-mt -lpthread).
11032 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11034 esac
11036 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11038 if test "x$GCC" = "xyes"; then :
11039 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11042 # The presence of a feature test macro requesting re-entrant function
11043 # definitions is, on some systems, a strong hint that pthreads support is
11044 # correctly enabled
11046 case $host_os in
11047 darwin* | hpux* | linux* | osf* | solaris*)
11048 ax_pthread_check_macro="_REENTRANT"
11051 aix*)
11052 ax_pthread_check_macro="_THREAD_SAFE"
11056 ax_pthread_check_macro="--"
11058 esac
11059 if test "x$ax_pthread_check_macro" = "x--"; then :
11060 ax_pthread_check_cond=0
11061 else
11062 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11065 # Are we compiling with Clang?
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11068 $as_echo_n "checking whether $CC is Clang... " >&6; }
11069 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11070 $as_echo_n "(cached) " >&6
11071 else
11072 ax_cv_PTHREAD_CLANG=no
11073 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11074 if test "x$GCC" = "xyes"; then
11075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11076 /* end confdefs.h. */
11077 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11078 # if defined(__clang__) && defined(__llvm__)
11079 AX_PTHREAD_CC_IS_CLANG
11080 # endif
11082 _ACEOF
11083 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11084 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11085 ax_cv_PTHREAD_CLANG=yes
11087 rm -f conftest*
11092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11093 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11094 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11096 ax_pthread_clang_warning=no
11098 # Clang needs special handling, because older versions handle the -pthread
11099 # option in a rather... idiosyncratic way
11101 if test "x$ax_pthread_clang" = "xyes"; then
11103 # Clang takes -pthread; it has never supported any other flag
11105 # (Note 1: This will need to be revisited if a system that Clang
11106 # supports has POSIX threads in a separate library. This tends not
11107 # to be the way of modern systems, but it's conceivable.)
11109 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11110 # to get POSIX threads support; the API is always present and
11111 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11112 # -pthread does define _REENTRANT, and while the Darwin headers
11113 # ignore this macro, third-party headers might not.)
11115 PTHREAD_CFLAGS="-pthread"
11116 PTHREAD_LIBS=
11118 ax_pthread_ok=yes
11120 # However, older versions of Clang make a point of warning the user
11121 # that, in an invocation where only linking and no compilation is
11122 # taking place, the -pthread option has no effect ("argument unused
11123 # during compilation"). They expect -pthread to be passed in only
11124 # when source code is being compiled.
11126 # Problem is, this is at odds with the way Automake and most other
11127 # C build frameworks function, which is that the same flags used in
11128 # compilation (CFLAGS) are also used in linking. Many systems
11129 # supported by AX_PTHREAD require exactly this for POSIX threads
11130 # support, and in fact it is often not straightforward to specify a
11131 # flag that is used only in the compilation phase and not in
11132 # linking. Such a scenario is extremely rare in practice.
11134 # Even though use of the -pthread flag in linking would only print
11135 # a warning, this can be a nuisance for well-run software projects
11136 # that build with -Werror. So if the active version of Clang has
11137 # this misfeature, we search for an option to squash it.
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11140 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11141 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11142 $as_echo_n "(cached) " >&6
11143 else
11144 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11145 # Create an alternate version of $ac_link that compiles and
11146 # links in two steps (.c -> .o, .o -> exe) instead of one
11147 # (.c -> exe), because the warning occurs only in the second
11148 # step
11149 ax_pthread_save_ac_link="$ac_link"
11150 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11151 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11152 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11153 ax_pthread_save_CFLAGS="$CFLAGS"
11154 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11155 if test "x$ax_pthread_try" = "xunknown"; then :
11156 break
11158 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11159 ac_link="$ax_pthread_save_ac_link"
11160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11161 /* end confdefs.h. */
11162 int main(void){return 0;}
11163 _ACEOF
11164 if ac_fn_c_try_link "$LINENO"; then :
11165 ac_link="$ax_pthread_2step_ac_link"
11166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11167 /* end confdefs.h. */
11168 int main(void){return 0;}
11169 _ACEOF
11170 if ac_fn_c_try_link "$LINENO"; then :
11171 break
11173 rm -f core conftest.err conftest.$ac_objext \
11174 conftest$ac_exeext conftest.$ac_ext
11177 rm -f core conftest.err conftest.$ac_objext \
11178 conftest$ac_exeext conftest.$ac_ext
11179 done
11180 ac_link="$ax_pthread_save_ac_link"
11181 CFLAGS="$ax_pthread_save_CFLAGS"
11182 if test "x$ax_pthread_try" = "x"; then :
11183 ax_pthread_try=no
11185 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11189 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11191 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11192 no | unknown) ;;
11193 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11194 esac
11196 fi # $ax_pthread_clang = yes
11198 if test "x$ax_pthread_ok" = "xno"; then
11199 for ax_pthread_try_flag in $ax_pthread_flags; do
11201 case $ax_pthread_try_flag in
11202 none)
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11204 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11207 -mt,pthread)
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11209 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11210 PTHREAD_CFLAGS="-mt"
11211 PTHREAD_LIBS="-lpthread"
11215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11216 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11217 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11220 pthread-config)
11221 # Extract the first word of "pthread-config", so it can be a program name with args.
11222 set dummy pthread-config; ac_word=$2
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11224 $as_echo_n "checking for $ac_word... " >&6; }
11225 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11226 $as_echo_n "(cached) " >&6
11227 else
11228 if test -n "$ax_pthread_config"; then
11229 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11230 else
11231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11232 for as_dir in $PATH
11234 IFS=$as_save_IFS
11235 test -z "$as_dir" && as_dir=.
11236 for ac_exec_ext in '' $ac_executable_extensions; do
11237 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11238 ac_cv_prog_ax_pthread_config="yes"
11239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11240 break 2
11242 done
11243 done
11244 IFS=$as_save_IFS
11246 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11249 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11250 if test -n "$ax_pthread_config"; then
11251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11252 $as_echo "$ax_pthread_config" >&6; }
11253 else
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11255 $as_echo "no" >&6; }
11259 if test "x$ax_pthread_config" = "xno"; then :
11260 continue
11262 PTHREAD_CFLAGS="`pthread-config --cflags`"
11263 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11268 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11269 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11271 esac
11273 ax_pthread_save_CFLAGS="$CFLAGS"
11274 ax_pthread_save_LIBS="$LIBS"
11275 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11276 LIBS="$PTHREAD_LIBS $LIBS"
11278 # Check for various functions. We must include pthread.h,
11279 # since some functions may be macros. (On the Sequent, we
11280 # need a special flag -Kthread to make this header compile.)
11281 # We check for pthread_join because it is in -lpthread on IRIX
11282 # while pthread_create is in libc. We check for pthread_attr_init
11283 # due to DEC craziness with -lpthreads. We check for
11284 # pthread_cleanup_push because it is one of the few pthread
11285 # functions on Solaris that doesn't have a non-functional libc stub.
11286 # We try pthread_create on general principles.
11288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11289 /* end confdefs.h. */
11290 #include <pthread.h>
11291 # if $ax_pthread_check_cond
11292 # error "$ax_pthread_check_macro must be defined"
11293 # endif
11294 static void routine(void *a) { a = 0; }
11295 static void *start_routine(void *a) { return a; }
11297 main ()
11299 pthread_t th; pthread_attr_t attr;
11300 pthread_create(&th, 0, start_routine, 0);
11301 pthread_join(th, 0);
11302 pthread_attr_init(&attr);
11303 pthread_cleanup_push(routine, 0);
11304 pthread_cleanup_pop(0) /* ; */
11306 return 0;
11308 _ACEOF
11309 if ac_fn_c_try_link "$LINENO"; then :
11310 ax_pthread_ok=yes
11312 rm -f core conftest.err conftest.$ac_objext \
11313 conftest$ac_exeext conftest.$ac_ext
11315 CFLAGS="$ax_pthread_save_CFLAGS"
11316 LIBS="$ax_pthread_save_LIBS"
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11319 $as_echo "$ax_pthread_ok" >&6; }
11320 if test "x$ax_pthread_ok" = "xyes"; then :
11321 break
11324 PTHREAD_LIBS=""
11325 PTHREAD_CFLAGS=""
11326 done
11329 # Various other checks:
11330 if test "x$ax_pthread_ok" = "xyes"; then
11331 ax_pthread_save_CFLAGS="$CFLAGS"
11332 ax_pthread_save_LIBS="$LIBS"
11333 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11334 LIBS="$PTHREAD_LIBS $LIBS"
11336 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11338 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11339 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11340 $as_echo_n "(cached) " >&6
11341 else
11342 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11343 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11345 /* end confdefs.h. */
11346 #include <pthread.h>
11348 main ()
11350 int attr = $ax_pthread_attr; return attr /* ; */
11352 return 0;
11354 _ACEOF
11355 if ac_fn_c_try_link "$LINENO"; then :
11356 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11358 rm -f core conftest.err conftest.$ac_objext \
11359 conftest$ac_exeext conftest.$ac_ext
11360 done
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11364 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11365 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11366 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11367 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11369 cat >>confdefs.h <<_ACEOF
11370 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11371 _ACEOF
11373 ax_pthread_joinable_attr_defined=yes
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11378 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11379 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11380 $as_echo_n "(cached) " >&6
11381 else
11382 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11383 case $host_os in
11384 solaris*)
11385 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11387 esac
11390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11391 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11392 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11393 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11394 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11395 ax_pthread_special_flags_added=yes
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11399 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11400 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11401 $as_echo_n "(cached) " >&6
11402 else
11403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11404 /* end confdefs.h. */
11405 #include <pthread.h>
11407 main ()
11409 int i = PTHREAD_PRIO_INHERIT;
11411 return 0;
11413 _ACEOF
11414 if ac_fn_c_try_link "$LINENO"; then :
11415 ax_cv_PTHREAD_PRIO_INHERIT=yes
11416 else
11417 ax_cv_PTHREAD_PRIO_INHERIT=no
11419 rm -f core conftest.err conftest.$ac_objext \
11420 conftest$ac_exeext conftest.$ac_ext
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11424 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11425 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11426 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11428 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11430 ax_pthread_prio_inherit_defined=yes
11434 CFLAGS="$ax_pthread_save_CFLAGS"
11435 LIBS="$ax_pthread_save_LIBS"
11437 # More AIX lossage: compile with *_r variant
11438 if test "x$GCC" != "xyes"; then
11439 case $host_os in
11440 aix*)
11441 case "x/$CC" in #(
11442 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11443 #handle absolute path differently from PATH based program lookup
11444 case "x$CC" in #(
11445 x/*) :
11446 if as_fn_executable_p ${CC}_r; then :
11447 PTHREAD_CC="${CC}_r"
11448 fi ;; #(
11449 *) :
11450 for ac_prog in ${CC}_r
11452 # Extract the first word of "$ac_prog", so it can be a program name with args.
11453 set dummy $ac_prog; ac_word=$2
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11455 $as_echo_n "checking for $ac_word... " >&6; }
11456 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11457 $as_echo_n "(cached) " >&6
11458 else
11459 if test -n "$PTHREAD_CC"; then
11460 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11461 else
11462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11463 for as_dir in $PATH
11465 IFS=$as_save_IFS
11466 test -z "$as_dir" && as_dir=.
11467 for ac_exec_ext in '' $ac_executable_extensions; do
11468 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11469 ac_cv_prog_PTHREAD_CC="$ac_prog"
11470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11471 break 2
11473 done
11474 done
11475 IFS=$as_save_IFS
11479 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11480 if test -n "$PTHREAD_CC"; then
11481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11482 $as_echo "$PTHREAD_CC" >&6; }
11483 else
11484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485 $as_echo "no" >&6; }
11489 test -n "$PTHREAD_CC" && break
11490 done
11491 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11493 esac ;; #(
11494 *) :
11496 esac
11498 esac
11502 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11508 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11509 if test "x$ax_pthread_ok" = "xyes"; then
11511 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11514 else
11515 ax_pthread_ok=no
11518 ac_ext=c
11519 ac_cpp='$CPP $CPPFLAGS'
11520 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11521 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11522 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11524 # set thread flags
11526 # Some platforms use these, so just define them. They can't hurt if they
11527 # are not supported.
11528 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11530 # Check for *_r functions
11531 _CFLAGS="$CFLAGS"
11532 _LIBS="$LIBS"
11533 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11534 LIBS="$LIBS $PTHREAD_LIBS"
11536 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11537 if test "x$ac_cv_header_pthread_h" = xyes; then :
11539 else
11540 as_fn_error $? "
11541 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11546 for ac_func in strerror_r getpwuid_r gethostbyname_r
11547 do :
11548 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11549 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11550 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11551 cat >>confdefs.h <<_ACEOF
11552 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11553 _ACEOF
11556 done
11559 # Do test here with the proper thread flags
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11561 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11562 if ${pgac_cv_func_strerror_r_int+:} false; then :
11563 $as_echo_n "(cached) " >&6
11564 else
11565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11566 /* end confdefs.h. */
11567 #include <string.h>
11569 main ()
11571 char buf[100];
11572 switch (strerror_r(1, buf, sizeof(buf)))
11573 { case 0: break; default: break; }
11576 return 0;
11578 _ACEOF
11579 if ac_fn_c_try_compile "$LINENO"; then :
11580 pgac_cv_func_strerror_r_int=yes
11581 else
11582 pgac_cv_func_strerror_r_int=no
11584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11587 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11588 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11590 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11595 CFLAGS="$_CFLAGS"
11596 LIBS="$_LIBS"
11599 else
11600 # else
11601 # do not use values from template file
11602 PTHREAD_CFLAGS=
11603 PTHREAD_LIBS=
11605 fi # fi
11612 ## Libraries
11614 ## Most libraries are included only if they demonstrably provide a function
11615 ## we need, but libm is an exception: always include it, because there are
11616 ## too many compilers that play cute optimization games that will break
11617 ## probes for standard functions such as pow().
11620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11621 $as_echo_n "checking for main in -lm... " >&6; }
11622 if ${ac_cv_lib_m_main+:} false; then :
11623 $as_echo_n "(cached) " >&6
11624 else
11625 ac_check_lib_save_LIBS=$LIBS
11626 LIBS="-lm $LIBS"
11627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11628 /* end confdefs.h. */
11632 main ()
11634 return main ();
11636 return 0;
11638 _ACEOF
11639 if ac_fn_c_try_link "$LINENO"; then :
11640 ac_cv_lib_m_main=yes
11641 else
11642 ac_cv_lib_m_main=no
11644 rm -f core conftest.err conftest.$ac_objext \
11645 conftest$ac_exeext conftest.$ac_ext
11646 LIBS=$ac_check_lib_save_LIBS
11648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11649 $as_echo "$ac_cv_lib_m_main" >&6; }
11650 if test "x$ac_cv_lib_m_main" = xyes; then :
11651 cat >>confdefs.h <<_ACEOF
11652 #define HAVE_LIBM 1
11653 _ACEOF
11655 LIBS="-lm $LIBS"
11659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11660 $as_echo_n "checking for library containing setproctitle... " >&6; }
11661 if ${ac_cv_search_setproctitle+:} false; then :
11662 $as_echo_n "(cached) " >&6
11663 else
11664 ac_func_search_save_LIBS=$LIBS
11665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11666 /* end confdefs.h. */
11668 /* Override any GCC internal prototype to avoid an error.
11669 Use char because int might match the return type of a GCC
11670 builtin and then its argument prototype would still apply. */
11671 #ifdef __cplusplus
11672 extern "C"
11673 #endif
11674 char setproctitle ();
11676 main ()
11678 return setproctitle ();
11680 return 0;
11682 _ACEOF
11683 for ac_lib in '' util; do
11684 if test -z "$ac_lib"; then
11685 ac_res="none required"
11686 else
11687 ac_res=-l$ac_lib
11688 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11690 if ac_fn_c_try_link "$LINENO"; then :
11691 ac_cv_search_setproctitle=$ac_res
11693 rm -f core conftest.err conftest.$ac_objext \
11694 conftest$ac_exeext
11695 if ${ac_cv_search_setproctitle+:} false; then :
11696 break
11698 done
11699 if ${ac_cv_search_setproctitle+:} false; then :
11701 else
11702 ac_cv_search_setproctitle=no
11704 rm conftest.$ac_ext
11705 LIBS=$ac_func_search_save_LIBS
11707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11708 $as_echo "$ac_cv_search_setproctitle" >&6; }
11709 ac_res=$ac_cv_search_setproctitle
11710 if test "$ac_res" != no; then :
11711 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11716 $as_echo_n "checking for library containing dlopen... " >&6; }
11717 if ${ac_cv_search_dlopen+:} false; then :
11718 $as_echo_n "(cached) " >&6
11719 else
11720 ac_func_search_save_LIBS=$LIBS
11721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11722 /* end confdefs.h. */
11724 /* Override any GCC internal prototype to avoid an error.
11725 Use char because int might match the return type of a GCC
11726 builtin and then its argument prototype would still apply. */
11727 #ifdef __cplusplus
11728 extern "C"
11729 #endif
11730 char dlopen ();
11732 main ()
11734 return dlopen ();
11736 return 0;
11738 _ACEOF
11739 for ac_lib in '' dl; do
11740 if test -z "$ac_lib"; then
11741 ac_res="none required"
11742 else
11743 ac_res=-l$ac_lib
11744 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11746 if ac_fn_c_try_link "$LINENO"; then :
11747 ac_cv_search_dlopen=$ac_res
11749 rm -f core conftest.err conftest.$ac_objext \
11750 conftest$ac_exeext
11751 if ${ac_cv_search_dlopen+:} false; then :
11752 break
11754 done
11755 if ${ac_cv_search_dlopen+:} false; then :
11757 else
11758 ac_cv_search_dlopen=no
11760 rm conftest.$ac_ext
11761 LIBS=$ac_func_search_save_LIBS
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11764 $as_echo "$ac_cv_search_dlopen" >&6; }
11765 ac_res=$ac_cv_search_dlopen
11766 if test "$ac_res" != no; then :
11767 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11772 $as_echo_n "checking for library containing socket... " >&6; }
11773 if ${ac_cv_search_socket+:} false; then :
11774 $as_echo_n "(cached) " >&6
11775 else
11776 ac_func_search_save_LIBS=$LIBS
11777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11778 /* end confdefs.h. */
11780 /* Override any GCC internal prototype to avoid an error.
11781 Use char because int might match the return type of a GCC
11782 builtin and then its argument prototype would still apply. */
11783 #ifdef __cplusplus
11784 extern "C"
11785 #endif
11786 char socket ();
11788 main ()
11790 return socket ();
11792 return 0;
11794 _ACEOF
11795 for ac_lib in '' socket ws2_32; do
11796 if test -z "$ac_lib"; then
11797 ac_res="none required"
11798 else
11799 ac_res=-l$ac_lib
11800 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11802 if ac_fn_c_try_link "$LINENO"; then :
11803 ac_cv_search_socket=$ac_res
11805 rm -f core conftest.err conftest.$ac_objext \
11806 conftest$ac_exeext
11807 if ${ac_cv_search_socket+:} false; then :
11808 break
11810 done
11811 if ${ac_cv_search_socket+:} false; then :
11813 else
11814 ac_cv_search_socket=no
11816 rm conftest.$ac_ext
11817 LIBS=$ac_func_search_save_LIBS
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11820 $as_echo "$ac_cv_search_socket" >&6; }
11821 ac_res=$ac_cv_search_socket
11822 if test "$ac_res" != no; then :
11823 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11828 $as_echo_n "checking for library containing shl_load... " >&6; }
11829 if ${ac_cv_search_shl_load+:} false; then :
11830 $as_echo_n "(cached) " >&6
11831 else
11832 ac_func_search_save_LIBS=$LIBS
11833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11834 /* end confdefs.h. */
11836 /* Override any GCC internal prototype to avoid an error.
11837 Use char because int might match the return type of a GCC
11838 builtin and then its argument prototype would still apply. */
11839 #ifdef __cplusplus
11840 extern "C"
11841 #endif
11842 char shl_load ();
11844 main ()
11846 return shl_load ();
11848 return 0;
11850 _ACEOF
11851 for ac_lib in '' dld; do
11852 if test -z "$ac_lib"; then
11853 ac_res="none required"
11854 else
11855 ac_res=-l$ac_lib
11856 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11858 if ac_fn_c_try_link "$LINENO"; then :
11859 ac_cv_search_shl_load=$ac_res
11861 rm -f core conftest.err conftest.$ac_objext \
11862 conftest$ac_exeext
11863 if ${ac_cv_search_shl_load+:} false; then :
11864 break
11866 done
11867 if ${ac_cv_search_shl_load+:} false; then :
11869 else
11870 ac_cv_search_shl_load=no
11872 rm conftest.$ac_ext
11873 LIBS=$ac_func_search_save_LIBS
11875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11876 $as_echo "$ac_cv_search_shl_load" >&6; }
11877 ac_res=$ac_cv_search_shl_load
11878 if test "$ac_res" != no; then :
11879 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11884 $as_echo_n "checking for library containing getopt_long... " >&6; }
11885 if ${ac_cv_search_getopt_long+:} false; then :
11886 $as_echo_n "(cached) " >&6
11887 else
11888 ac_func_search_save_LIBS=$LIBS
11889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11890 /* end confdefs.h. */
11892 /* Override any GCC internal prototype to avoid an error.
11893 Use char because int might match the return type of a GCC
11894 builtin and then its argument prototype would still apply. */
11895 #ifdef __cplusplus
11896 extern "C"
11897 #endif
11898 char getopt_long ();
11900 main ()
11902 return getopt_long ();
11904 return 0;
11906 _ACEOF
11907 for ac_lib in '' getopt gnugetopt; do
11908 if test -z "$ac_lib"; then
11909 ac_res="none required"
11910 else
11911 ac_res=-l$ac_lib
11912 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11914 if ac_fn_c_try_link "$LINENO"; then :
11915 ac_cv_search_getopt_long=$ac_res
11917 rm -f core conftest.err conftest.$ac_objext \
11918 conftest$ac_exeext
11919 if ${ac_cv_search_getopt_long+:} false; then :
11920 break
11922 done
11923 if ${ac_cv_search_getopt_long+:} false; then :
11925 else
11926 ac_cv_search_getopt_long=no
11928 rm conftest.$ac_ext
11929 LIBS=$ac_func_search_save_LIBS
11931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11932 $as_echo "$ac_cv_search_getopt_long" >&6; }
11933 ac_res=$ac_cv_search_getopt_long
11934 if test "$ac_res" != no; then :
11935 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11940 $as_echo_n "checking for library containing shm_open... " >&6; }
11941 if ${ac_cv_search_shm_open+:} false; then :
11942 $as_echo_n "(cached) " >&6
11943 else
11944 ac_func_search_save_LIBS=$LIBS
11945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11946 /* end confdefs.h. */
11948 /* Override any GCC internal prototype to avoid an error.
11949 Use char because int might match the return type of a GCC
11950 builtin and then its argument prototype would still apply. */
11951 #ifdef __cplusplus
11952 extern "C"
11953 #endif
11954 char shm_open ();
11956 main ()
11958 return shm_open ();
11960 return 0;
11962 _ACEOF
11963 for ac_lib in '' rt; do
11964 if test -z "$ac_lib"; then
11965 ac_res="none required"
11966 else
11967 ac_res=-l$ac_lib
11968 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11970 if ac_fn_c_try_link "$LINENO"; then :
11971 ac_cv_search_shm_open=$ac_res
11973 rm -f core conftest.err conftest.$ac_objext \
11974 conftest$ac_exeext
11975 if ${ac_cv_search_shm_open+:} false; then :
11976 break
11978 done
11979 if ${ac_cv_search_shm_open+:} false; then :
11981 else
11982 ac_cv_search_shm_open=no
11984 rm conftest.$ac_ext
11985 LIBS=$ac_func_search_save_LIBS
11987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11988 $as_echo "$ac_cv_search_shm_open" >&6; }
11989 ac_res=$ac_cv_search_shm_open
11990 if test "$ac_res" != no; then :
11991 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11996 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11997 if ${ac_cv_search_shm_unlink+:} false; then :
11998 $as_echo_n "(cached) " >&6
11999 else
12000 ac_func_search_save_LIBS=$LIBS
12001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12002 /* end confdefs.h. */
12004 /* Override any GCC internal prototype to avoid an error.
12005 Use char because int might match the return type of a GCC
12006 builtin and then its argument prototype would still apply. */
12007 #ifdef __cplusplus
12008 extern "C"
12009 #endif
12010 char shm_unlink ();
12012 main ()
12014 return shm_unlink ();
12016 return 0;
12018 _ACEOF
12019 for ac_lib in '' rt; do
12020 if test -z "$ac_lib"; then
12021 ac_res="none required"
12022 else
12023 ac_res=-l$ac_lib
12024 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12026 if ac_fn_c_try_link "$LINENO"; then :
12027 ac_cv_search_shm_unlink=$ac_res
12029 rm -f core conftest.err conftest.$ac_objext \
12030 conftest$ac_exeext
12031 if ${ac_cv_search_shm_unlink+:} false; then :
12032 break
12034 done
12035 if ${ac_cv_search_shm_unlink+:} false; then :
12037 else
12038 ac_cv_search_shm_unlink=no
12040 rm conftest.$ac_ext
12041 LIBS=$ac_func_search_save_LIBS
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12044 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12045 ac_res=$ac_cv_search_shm_unlink
12046 if test "$ac_res" != no; then :
12047 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12052 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12053 if ${ac_cv_search_clock_gettime+:} false; then :
12054 $as_echo_n "(cached) " >&6
12055 else
12056 ac_func_search_save_LIBS=$LIBS
12057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12058 /* end confdefs.h. */
12060 /* Override any GCC internal prototype to avoid an error.
12061 Use char because int might match the return type of a GCC
12062 builtin and then its argument prototype would still apply. */
12063 #ifdef __cplusplus
12064 extern "C"
12065 #endif
12066 char clock_gettime ();
12068 main ()
12070 return clock_gettime ();
12072 return 0;
12074 _ACEOF
12075 for ac_lib in '' rt posix4; do
12076 if test -z "$ac_lib"; then
12077 ac_res="none required"
12078 else
12079 ac_res=-l$ac_lib
12080 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12082 if ac_fn_c_try_link "$LINENO"; then :
12083 ac_cv_search_clock_gettime=$ac_res
12085 rm -f core conftest.err conftest.$ac_objext \
12086 conftest$ac_exeext
12087 if ${ac_cv_search_clock_gettime+:} false; then :
12088 break
12090 done
12091 if ${ac_cv_search_clock_gettime+:} false; then :
12093 else
12094 ac_cv_search_clock_gettime=no
12096 rm conftest.$ac_ext
12097 LIBS=$ac_func_search_save_LIBS
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12100 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12101 ac_res=$ac_cv_search_clock_gettime
12102 if test "$ac_res" != no; then :
12103 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12107 # Solaris:
12108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
12109 $as_echo_n "checking for library containing fdatasync... " >&6; }
12110 if ${ac_cv_search_fdatasync+:} false; then :
12111 $as_echo_n "(cached) " >&6
12112 else
12113 ac_func_search_save_LIBS=$LIBS
12114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12115 /* end confdefs.h. */
12117 /* Override any GCC internal prototype to avoid an error.
12118 Use char because int might match the return type of a GCC
12119 builtin and then its argument prototype would still apply. */
12120 #ifdef __cplusplus
12121 extern "C"
12122 #endif
12123 char fdatasync ();
12125 main ()
12127 return fdatasync ();
12129 return 0;
12131 _ACEOF
12132 for ac_lib in '' rt posix4; do
12133 if test -z "$ac_lib"; then
12134 ac_res="none required"
12135 else
12136 ac_res=-l$ac_lib
12137 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12139 if ac_fn_c_try_link "$LINENO"; then :
12140 ac_cv_search_fdatasync=$ac_res
12142 rm -f core conftest.err conftest.$ac_objext \
12143 conftest$ac_exeext
12144 if ${ac_cv_search_fdatasync+:} false; then :
12145 break
12147 done
12148 if ${ac_cv_search_fdatasync+:} false; then :
12150 else
12151 ac_cv_search_fdatasync=no
12153 rm conftest.$ac_ext
12154 LIBS=$ac_func_search_save_LIBS
12156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
12157 $as_echo "$ac_cv_search_fdatasync" >&6; }
12158 ac_res=$ac_cv_search_fdatasync
12159 if test "$ac_res" != no; then :
12160 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12164 # Cygwin:
12165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12166 $as_echo_n "checking for library containing shmget... " >&6; }
12167 if ${ac_cv_search_shmget+:} false; then :
12168 $as_echo_n "(cached) " >&6
12169 else
12170 ac_func_search_save_LIBS=$LIBS
12171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12172 /* end confdefs.h. */
12174 /* Override any GCC internal prototype to avoid an error.
12175 Use char because int might match the return type of a GCC
12176 builtin and then its argument prototype would still apply. */
12177 #ifdef __cplusplus
12178 extern "C"
12179 #endif
12180 char shmget ();
12182 main ()
12184 return shmget ();
12186 return 0;
12188 _ACEOF
12189 for ac_lib in '' cygipc; do
12190 if test -z "$ac_lib"; then
12191 ac_res="none required"
12192 else
12193 ac_res=-l$ac_lib
12194 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12196 if ac_fn_c_try_link "$LINENO"; then :
12197 ac_cv_search_shmget=$ac_res
12199 rm -f core conftest.err conftest.$ac_objext \
12200 conftest$ac_exeext
12201 if ${ac_cv_search_shmget+:} false; then :
12202 break
12204 done
12205 if ${ac_cv_search_shmget+:} false; then :
12207 else
12208 ac_cv_search_shmget=no
12210 rm conftest.$ac_ext
12211 LIBS=$ac_func_search_save_LIBS
12213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12214 $as_echo "$ac_cv_search_shmget" >&6; }
12215 ac_res=$ac_cv_search_shmget
12216 if test "$ac_res" != no; then :
12217 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12221 # *BSD:
12222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12223 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12224 if ${ac_cv_search_backtrace_symbols+:} false; then :
12225 $as_echo_n "(cached) " >&6
12226 else
12227 ac_func_search_save_LIBS=$LIBS
12228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12229 /* end confdefs.h. */
12231 /* Override any GCC internal prototype to avoid an error.
12232 Use char because int might match the return type of a GCC
12233 builtin and then its argument prototype would still apply. */
12234 #ifdef __cplusplus
12235 extern "C"
12236 #endif
12237 char backtrace_symbols ();
12239 main ()
12241 return backtrace_symbols ();
12243 return 0;
12245 _ACEOF
12246 for ac_lib in '' execinfo; do
12247 if test -z "$ac_lib"; then
12248 ac_res="none required"
12249 else
12250 ac_res=-l$ac_lib
12251 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12253 if ac_fn_c_try_link "$LINENO"; then :
12254 ac_cv_search_backtrace_symbols=$ac_res
12256 rm -f core conftest.err conftest.$ac_objext \
12257 conftest$ac_exeext
12258 if ${ac_cv_search_backtrace_symbols+:} false; then :
12259 break
12261 done
12262 if ${ac_cv_search_backtrace_symbols+:} false; then :
12264 else
12265 ac_cv_search_backtrace_symbols=no
12267 rm conftest.$ac_ext
12268 LIBS=$ac_func_search_save_LIBS
12270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12271 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12272 ac_res=$ac_cv_search_backtrace_symbols
12273 if test "$ac_res" != no; then :
12274 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12279 if test "$enable_thread_safety" = yes; then
12280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
12281 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
12282 if ${ac_cv_search_gethostbyname_r+:} false; then :
12283 $as_echo_n "(cached) " >&6
12284 else
12285 ac_func_search_save_LIBS=$LIBS
12286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12287 /* end confdefs.h. */
12289 /* Override any GCC internal prototype to avoid an error.
12290 Use char because int might match the return type of a GCC
12291 builtin and then its argument prototype would still apply. */
12292 #ifdef __cplusplus
12293 extern "C"
12294 #endif
12295 char gethostbyname_r ();
12297 main ()
12299 return gethostbyname_r ();
12301 return 0;
12303 _ACEOF
12304 for ac_lib in '' nsl; do
12305 if test -z "$ac_lib"; then
12306 ac_res="none required"
12307 else
12308 ac_res=-l$ac_lib
12309 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12311 if ac_fn_c_try_link "$LINENO"; then :
12312 ac_cv_search_gethostbyname_r=$ac_res
12314 rm -f core conftest.err conftest.$ac_objext \
12315 conftest$ac_exeext
12316 if ${ac_cv_search_gethostbyname_r+:} false; then :
12317 break
12319 done
12320 if ${ac_cv_search_gethostbyname_r+:} false; then :
12322 else
12323 ac_cv_search_gethostbyname_r=no
12325 rm conftest.$ac_ext
12326 LIBS=$ac_func_search_save_LIBS
12328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
12329 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
12330 ac_res=$ac_cv_search_gethostbyname_r
12331 if test "$ac_res" != no; then :
12332 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12337 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12338 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12339 $as_echo_n "(cached) " >&6
12340 else
12341 ac_func_search_save_LIBS=$LIBS
12342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12343 /* end confdefs.h. */
12345 /* Override any GCC internal prototype to avoid an error.
12346 Use char because int might match the return type of a GCC
12347 builtin and then its argument prototype would still apply. */
12348 #ifdef __cplusplus
12349 extern "C"
12350 #endif
12351 char pthread_barrier_wait ();
12353 main ()
12355 return pthread_barrier_wait ();
12357 return 0;
12359 _ACEOF
12360 for ac_lib in '' pthread; do
12361 if test -z "$ac_lib"; then
12362 ac_res="none required"
12363 else
12364 ac_res=-l$ac_lib
12365 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12367 if ac_fn_c_try_link "$LINENO"; then :
12368 ac_cv_search_pthread_barrier_wait=$ac_res
12370 rm -f core conftest.err conftest.$ac_objext \
12371 conftest$ac_exeext
12372 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12373 break
12375 done
12376 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12378 else
12379 ac_cv_search_pthread_barrier_wait=no
12381 rm conftest.$ac_ext
12382 LIBS=$ac_func_search_save_LIBS
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12385 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12386 ac_res=$ac_cv_search_pthread_barrier_wait
12387 if test "$ac_res" != no; then :
12388 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12394 if test "$with_readline" = yes; then
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12398 $as_echo_n "checking for library containing readline... " >&6; }
12399 if ${pgac_cv_check_readline+:} false; then :
12400 $as_echo_n "(cached) " >&6
12401 else
12402 pgac_cv_check_readline=no
12403 pgac_save_LIBS=$LIBS
12404 if test x"$with_libedit_preferred" != x"yes"
12405 then READLINE_ORDER="-lreadline -ledit"
12406 else READLINE_ORDER="-ledit -lreadline"
12408 for pgac_rllib in $READLINE_ORDER ; do
12409 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12410 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12412 /* end confdefs.h. */
12414 /* Override any GCC internal prototype to avoid an error.
12415 Use char because int might match the return type of a GCC
12416 builtin and then its argument prototype would still apply. */
12417 #ifdef __cplusplus
12418 extern "C"
12419 #endif
12420 char readline ();
12422 main ()
12424 return readline ();
12426 return 0;
12428 _ACEOF
12429 if ac_fn_c_try_link "$LINENO"; then :
12431 # Older NetBSD and OpenBSD have a broken linker that does not
12432 # recognize dependent libraries; assume curses is needed if we didn't
12433 # find any dependency.
12434 case $host_os in
12435 netbsd* | openbsd*)
12436 if test x"$pgac_lib" = x"" ; then
12437 pgac_lib=" -lcurses"
12438 fi ;;
12439 esac
12441 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12442 break
12445 rm -f core conftest.err conftest.$ac_objext \
12446 conftest$ac_exeext conftest.$ac_ext
12447 done
12448 if test "$pgac_cv_check_readline" != no ; then
12449 break
12451 done
12452 LIBS=$pgac_save_LIBS
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12456 $as_echo "$pgac_cv_check_readline" >&6; }
12457 if test "$pgac_cv_check_readline" != no ; then
12458 LIBS="$pgac_cv_check_readline $LIBS"
12460 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12465 if test x"$pgac_cv_check_readline" = x"no"; then
12466 as_fn_error $? "readline library not found
12467 If you have readline already installed, see config.log for details on the
12468 failure. It is possible the compiler isn't looking in the proper directory.
12469 Use --without-readline to disable readline support." "$LINENO" 5
12473 if test "$with_zlib" = yes; then
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12475 $as_echo_n "checking for inflate in -lz... " >&6; }
12476 if ${ac_cv_lib_z_inflate+:} false; then :
12477 $as_echo_n "(cached) " >&6
12478 else
12479 ac_check_lib_save_LIBS=$LIBS
12480 LIBS="-lz $LIBS"
12481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12482 /* end confdefs.h. */
12484 /* Override any GCC internal prototype to avoid an error.
12485 Use char because int might match the return type of a GCC
12486 builtin and then its argument prototype would still apply. */
12487 #ifdef __cplusplus
12488 extern "C"
12489 #endif
12490 char inflate ();
12492 main ()
12494 return inflate ();
12496 return 0;
12498 _ACEOF
12499 if ac_fn_c_try_link "$LINENO"; then :
12500 ac_cv_lib_z_inflate=yes
12501 else
12502 ac_cv_lib_z_inflate=no
12504 rm -f core conftest.err conftest.$ac_objext \
12505 conftest$ac_exeext conftest.$ac_ext
12506 LIBS=$ac_check_lib_save_LIBS
12508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12509 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12510 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12511 cat >>confdefs.h <<_ACEOF
12512 #define HAVE_LIBZ 1
12513 _ACEOF
12515 LIBS="-lz $LIBS"
12517 else
12518 as_fn_error $? "zlib library not found
12519 If you have zlib already installed, see config.log for details on the
12520 failure. It is possible the compiler isn't looking in the proper directory.
12521 Use --without-zlib to disable zlib support." "$LINENO" 5
12526 if test "$enable_spinlocks" = yes; then
12528 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12530 else
12531 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12532 *** Not using spinlocks will cause poor performance." >&5
12533 $as_echo "$as_me: WARNING:
12534 *** Not using spinlocks will cause poor performance." >&2;}
12537 if test "$enable_atomics" = yes; then
12539 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12541 else
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12543 *** Not using atomic operations will cause poor performance." >&5
12544 $as_echo "$as_me: WARNING:
12545 *** Not using atomic operations will cause poor performance." >&2;}
12548 if test "$with_gssapi" = yes ; then
12549 if test "$PORTNAME" != "win32"; then
12550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12551 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12552 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12553 $as_echo_n "(cached) " >&6
12554 else
12555 ac_func_search_save_LIBS=$LIBS
12556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12557 /* end confdefs.h. */
12559 /* Override any GCC internal prototype to avoid an error.
12560 Use char because int might match the return type of a GCC
12561 builtin and then its argument prototype would still apply. */
12562 #ifdef __cplusplus
12563 extern "C"
12564 #endif
12565 char gss_init_sec_context ();
12567 main ()
12569 return gss_init_sec_context ();
12571 return 0;
12573 _ACEOF
12574 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12575 if test -z "$ac_lib"; then
12576 ac_res="none required"
12577 else
12578 ac_res=-l$ac_lib
12579 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12581 if ac_fn_c_try_link "$LINENO"; then :
12582 ac_cv_search_gss_init_sec_context=$ac_res
12584 rm -f core conftest.err conftest.$ac_objext \
12585 conftest$ac_exeext
12586 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12587 break
12589 done
12590 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12592 else
12593 ac_cv_search_gss_init_sec_context=no
12595 rm conftest.$ac_ext
12596 LIBS=$ac_func_search_save_LIBS
12598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12599 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12600 ac_res=$ac_cv_search_gss_init_sec_context
12601 if test "$ac_res" != no; then :
12602 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12604 else
12605 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12608 else
12609 LIBS="$LIBS -lgssapi32"
12614 # SSL Library
12616 # There is currently only one supported SSL/TLS library: OpenSSL.
12621 # Check whether --with-ssl was given.
12622 if test "${with_ssl+set}" = set; then :
12623 withval=$with_ssl;
12624 case $withval in
12625 yes)
12626 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12629 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12634 esac
12639 if test x"$with_ssl" = x"" ; then
12640 with_ssl=no
12645 # Check whether --with-openssl was given.
12646 if test "${with_openssl+set}" = set; then :
12647 withval=$with_openssl;
12648 case $withval in
12649 yes)
12656 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12658 esac
12660 else
12661 with_openssl=no
12666 if test "$with_openssl" = yes ; then
12667 with_ssl=openssl
12670 if test "$with_ssl" = openssl ; then
12671 # Minimum required OpenSSL version is 1.0.1
12673 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12675 if test "$PORTNAME" != "win32"; then
12676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12677 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12678 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12679 $as_echo_n "(cached) " >&6
12680 else
12681 ac_check_lib_save_LIBS=$LIBS
12682 LIBS="-lcrypto $LIBS"
12683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12684 /* end confdefs.h. */
12686 /* Override any GCC internal prototype to avoid an error.
12687 Use char because int might match the return type of a GCC
12688 builtin and then its argument prototype would still apply. */
12689 #ifdef __cplusplus
12690 extern "C"
12691 #endif
12692 char CRYPTO_new_ex_data ();
12694 main ()
12696 return CRYPTO_new_ex_data ();
12698 return 0;
12700 _ACEOF
12701 if ac_fn_c_try_link "$LINENO"; then :
12702 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12703 else
12704 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12706 rm -f core conftest.err conftest.$ac_objext \
12707 conftest$ac_exeext conftest.$ac_ext
12708 LIBS=$ac_check_lib_save_LIBS
12710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12711 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12712 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12713 cat >>confdefs.h <<_ACEOF
12714 #define HAVE_LIBCRYPTO 1
12715 _ACEOF
12717 LIBS="-lcrypto $LIBS"
12719 else
12720 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12724 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12725 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12726 $as_echo_n "(cached) " >&6
12727 else
12728 ac_check_lib_save_LIBS=$LIBS
12729 LIBS="-lssl $LIBS"
12730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12731 /* end confdefs.h. */
12733 /* Override any GCC internal prototype to avoid an error.
12734 Use char because int might match the return type of a GCC
12735 builtin and then its argument prototype would still apply. */
12736 #ifdef __cplusplus
12737 extern "C"
12738 #endif
12739 char SSL_new ();
12741 main ()
12743 return SSL_new ();
12745 return 0;
12747 _ACEOF
12748 if ac_fn_c_try_link "$LINENO"; then :
12749 ac_cv_lib_ssl_SSL_new=yes
12750 else
12751 ac_cv_lib_ssl_SSL_new=no
12753 rm -f core conftest.err conftest.$ac_objext \
12754 conftest$ac_exeext conftest.$ac_ext
12755 LIBS=$ac_check_lib_save_LIBS
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12758 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12759 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12760 cat >>confdefs.h <<_ACEOF
12761 #define HAVE_LIBSSL 1
12762 _ACEOF
12764 LIBS="-lssl $LIBS"
12766 else
12767 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12770 else
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12772 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12773 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12774 $as_echo_n "(cached) " >&6
12775 else
12776 ac_func_search_save_LIBS=$LIBS
12777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12778 /* end confdefs.h. */
12780 /* Override any GCC internal prototype to avoid an error.
12781 Use char because int might match the return type of a GCC
12782 builtin and then its argument prototype would still apply. */
12783 #ifdef __cplusplus
12784 extern "C"
12785 #endif
12786 char CRYPTO_new_ex_data ();
12788 main ()
12790 return CRYPTO_new_ex_data ();
12792 return 0;
12794 _ACEOF
12795 for ac_lib in '' eay32 crypto; do
12796 if test -z "$ac_lib"; then
12797 ac_res="none required"
12798 else
12799 ac_res=-l$ac_lib
12800 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12802 if ac_fn_c_try_link "$LINENO"; then :
12803 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12805 rm -f core conftest.err conftest.$ac_objext \
12806 conftest$ac_exeext
12807 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12808 break
12810 done
12811 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12813 else
12814 ac_cv_search_CRYPTO_new_ex_data=no
12816 rm conftest.$ac_ext
12817 LIBS=$ac_func_search_save_LIBS
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12820 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12821 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12822 if test "$ac_res" != no; then :
12823 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12825 else
12826 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12830 $as_echo_n "checking for library containing SSL_new... " >&6; }
12831 if ${ac_cv_search_SSL_new+:} false; then :
12832 $as_echo_n "(cached) " >&6
12833 else
12834 ac_func_search_save_LIBS=$LIBS
12835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12836 /* end confdefs.h. */
12838 /* Override any GCC internal prototype to avoid an error.
12839 Use char because int might match the return type of a GCC
12840 builtin and then its argument prototype would still apply. */
12841 #ifdef __cplusplus
12842 extern "C"
12843 #endif
12844 char SSL_new ();
12846 main ()
12848 return SSL_new ();
12850 return 0;
12852 _ACEOF
12853 for ac_lib in '' ssleay32 ssl; do
12854 if test -z "$ac_lib"; then
12855 ac_res="none required"
12856 else
12857 ac_res=-l$ac_lib
12858 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12860 if ac_fn_c_try_link "$LINENO"; then :
12861 ac_cv_search_SSL_new=$ac_res
12863 rm -f core conftest.err conftest.$ac_objext \
12864 conftest$ac_exeext
12865 if ${ac_cv_search_SSL_new+:} false; then :
12866 break
12868 done
12869 if ${ac_cv_search_SSL_new+:} false; then :
12871 else
12872 ac_cv_search_SSL_new=no
12874 rm conftest.$ac_ext
12875 LIBS=$ac_func_search_save_LIBS
12877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12878 $as_echo "$ac_cv_search_SSL_new" >&6; }
12879 ac_res=$ac_cv_search_SSL_new
12880 if test "$ac_res" != no; then :
12881 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12883 else
12884 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12888 # Function introduced in OpenSSL 1.0.2.
12889 for ac_func in X509_get_signature_nid
12890 do :
12891 ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
12892 if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
12893 cat >>confdefs.h <<_ACEOF
12894 #define HAVE_X509_GET_SIGNATURE_NID 1
12895 _ACEOF
12898 done
12900 # Functions introduced in OpenSSL 1.1.0. We used to check for
12901 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12902 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12903 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12904 # functions.
12905 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12906 do :
12907 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12908 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12909 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12910 cat >>confdefs.h <<_ACEOF
12911 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12912 _ACEOF
12915 done
12917 # OpenSSL versions before 1.1.0 required setting callback functions, for
12918 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12919 # function was removed.
12920 for ac_func in CRYPTO_lock
12921 do :
12922 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12923 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12924 cat >>confdefs.h <<_ACEOF
12925 #define HAVE_CRYPTO_LOCK 1
12926 _ACEOF
12929 done
12932 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12934 elif test "$with_ssl" != no ; then
12935 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12939 if test "$with_pam" = yes ; then
12940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12941 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12942 if ${ac_cv_lib_pam_pam_start+:} false; then :
12943 $as_echo_n "(cached) " >&6
12944 else
12945 ac_check_lib_save_LIBS=$LIBS
12946 LIBS="-lpam $LIBS"
12947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12948 /* end confdefs.h. */
12950 /* Override any GCC internal prototype to avoid an error.
12951 Use char because int might match the return type of a GCC
12952 builtin and then its argument prototype would still apply. */
12953 #ifdef __cplusplus
12954 extern "C"
12955 #endif
12956 char pam_start ();
12958 main ()
12960 return pam_start ();
12962 return 0;
12964 _ACEOF
12965 if ac_fn_c_try_link "$LINENO"; then :
12966 ac_cv_lib_pam_pam_start=yes
12967 else
12968 ac_cv_lib_pam_pam_start=no
12970 rm -f core conftest.err conftest.$ac_objext \
12971 conftest$ac_exeext conftest.$ac_ext
12972 LIBS=$ac_check_lib_save_LIBS
12974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12975 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12976 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12977 cat >>confdefs.h <<_ACEOF
12978 #define HAVE_LIBPAM 1
12979 _ACEOF
12981 LIBS="-lpam $LIBS"
12983 else
12984 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12989 if test "$with_libxml" = yes ; then
12990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12991 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12992 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12993 $as_echo_n "(cached) " >&6
12994 else
12995 ac_check_lib_save_LIBS=$LIBS
12996 LIBS="-lxml2 $LIBS"
12997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12998 /* end confdefs.h. */
13000 /* Override any GCC internal prototype to avoid an error.
13001 Use char because int might match the return type of a GCC
13002 builtin and then its argument prototype would still apply. */
13003 #ifdef __cplusplus
13004 extern "C"
13005 #endif
13006 char xmlSaveToBuffer ();
13008 main ()
13010 return xmlSaveToBuffer ();
13012 return 0;
13014 _ACEOF
13015 if ac_fn_c_try_link "$LINENO"; then :
13016 ac_cv_lib_xml2_xmlSaveToBuffer=yes
13017 else
13018 ac_cv_lib_xml2_xmlSaveToBuffer=no
13020 rm -f core conftest.err conftest.$ac_objext \
13021 conftest$ac_exeext conftest.$ac_ext
13022 LIBS=$ac_check_lib_save_LIBS
13024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13025 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13026 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13027 cat >>confdefs.h <<_ACEOF
13028 #define HAVE_LIBXML2 1
13029 _ACEOF
13031 LIBS="-lxml2 $LIBS"
13033 else
13034 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13039 if test "$with_libxslt" = yes ; then
13040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13041 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13042 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13043 $as_echo_n "(cached) " >&6
13044 else
13045 ac_check_lib_save_LIBS=$LIBS
13046 LIBS="-lxslt $LIBS"
13047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13048 /* end confdefs.h. */
13050 /* Override any GCC internal prototype to avoid an error.
13051 Use char because int might match the return type of a GCC
13052 builtin and then its argument prototype would still apply. */
13053 #ifdef __cplusplus
13054 extern "C"
13055 #endif
13056 char xsltCleanupGlobals ();
13058 main ()
13060 return xsltCleanupGlobals ();
13062 return 0;
13064 _ACEOF
13065 if ac_fn_c_try_link "$LINENO"; then :
13066 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13067 else
13068 ac_cv_lib_xslt_xsltCleanupGlobals=no
13070 rm -f core conftest.err conftest.$ac_objext \
13071 conftest$ac_exeext conftest.$ac_ext
13072 LIBS=$ac_check_lib_save_LIBS
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13075 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13076 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13077 cat >>confdefs.h <<_ACEOF
13078 #define HAVE_LIBXSLT 1
13079 _ACEOF
13081 LIBS="-lxslt $LIBS"
13083 else
13084 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13089 if test "$with_lz4" = yes ; then
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13091 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13092 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13093 $as_echo_n "(cached) " >&6
13094 else
13095 ac_check_lib_save_LIBS=$LIBS
13096 LIBS="-llz4 $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 LZ4_compress_default ();
13108 main ()
13110 return LZ4_compress_default ();
13112 return 0;
13114 _ACEOF
13115 if ac_fn_c_try_link "$LINENO"; then :
13116 ac_cv_lib_lz4_LZ4_compress_default=yes
13117 else
13118 ac_cv_lib_lz4_LZ4_compress_default=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_lz4_LZ4_compress_default" >&5
13125 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13126 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13127 cat >>confdefs.h <<_ACEOF
13128 #define HAVE_LIBLZ4 1
13129 _ACEOF
13131 LIBS="-llz4 $LIBS"
13133 else
13134 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13139 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
13140 # also, on AIX, we may need to have openssl in LIBS for this step.
13141 if test "$with_ldap" = yes ; then
13142 _LIBS="$LIBS"
13143 if test "$PORTNAME" != "win32"; then
13144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13145 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13146 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13147 $as_echo_n "(cached) " >&6
13148 else
13149 ac_check_lib_save_LIBS=$LIBS
13150 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
13151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13152 /* end confdefs.h. */
13154 /* Override any GCC internal prototype to avoid an error.
13155 Use char because int might match the return type of a GCC
13156 builtin and then its argument prototype would still apply. */
13157 #ifdef __cplusplus
13158 extern "C"
13159 #endif
13160 char ldap_bind ();
13162 main ()
13164 return ldap_bind ();
13166 return 0;
13168 _ACEOF
13169 if ac_fn_c_try_link "$LINENO"; then :
13170 ac_cv_lib_ldap_ldap_bind=yes
13171 else
13172 ac_cv_lib_ldap_ldap_bind=no
13174 rm -f core conftest.err conftest.$ac_objext \
13175 conftest$ac_exeext conftest.$ac_ext
13176 LIBS=$ac_check_lib_save_LIBS
13178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
13179 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13180 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13181 cat >>confdefs.h <<_ACEOF
13182 #define HAVE_LIBLDAP 1
13183 _ACEOF
13185 LIBS="-lldap $LIBS"
13187 else
13188 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13191 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13192 # This test is carried out against libldap.
13193 for ac_func in ldap_initialize
13194 do :
13195 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13196 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13197 cat >>confdefs.h <<_ACEOF
13198 #define HAVE_LDAP_INITIALIZE 1
13199 _ACEOF
13202 done
13204 if test "$enable_thread_safety" = yes; then
13205 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13206 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13207 LIBS="$_LIBS"
13208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13209 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13210 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13211 $as_echo_n "(cached) " >&6
13212 else
13213 ac_check_lib_save_LIBS=$LIBS
13214 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13216 /* end confdefs.h. */
13218 /* Override any GCC internal prototype to avoid an error.
13219 Use char because int might match the return type of a GCC
13220 builtin and then its argument prototype would still apply. */
13221 #ifdef __cplusplus
13222 extern "C"
13223 #endif
13224 char ldap_bind ();
13226 main ()
13228 return ldap_bind ();
13230 return 0;
13232 _ACEOF
13233 if ac_fn_c_try_link "$LINENO"; then :
13234 ac_cv_lib_ldap_r_ldap_bind=yes
13235 else
13236 ac_cv_lib_ldap_r_ldap_bind=no
13238 rm -f core conftest.err conftest.$ac_objext \
13239 conftest$ac_exeext conftest.$ac_ext
13240 LIBS=$ac_check_lib_save_LIBS
13242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13243 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13244 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13245 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13246 else
13247 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13250 else
13251 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13253 else
13254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13255 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13256 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13257 $as_echo_n "(cached) " >&6
13258 else
13259 ac_check_lib_save_LIBS=$LIBS
13260 LIBS="-lwldap32 $LIBS"
13261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262 /* end confdefs.h. */
13264 /* Override any GCC internal prototype to avoid an error.
13265 Use char because int might match the return type of a GCC
13266 builtin and then its argument prototype would still apply. */
13267 #ifdef __cplusplus
13268 extern "C"
13269 #endif
13270 char ldap_bind ();
13272 main ()
13274 return ldap_bind ();
13276 return 0;
13278 _ACEOF
13279 if ac_fn_c_try_link "$LINENO"; then :
13280 ac_cv_lib_wldap32_ldap_bind=yes
13281 else
13282 ac_cv_lib_wldap32_ldap_bind=no
13284 rm -f core conftest.err conftest.$ac_objext \
13285 conftest$ac_exeext conftest.$ac_ext
13286 LIBS=$ac_check_lib_save_LIBS
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13289 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13290 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13291 cat >>confdefs.h <<_ACEOF
13292 #define HAVE_LIBWLDAP32 1
13293 _ACEOF
13295 LIBS="-lwldap32 $LIBS"
13297 else
13298 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13301 LDAP_LIBS_FE="-lwldap32"
13302 LDAP_LIBS_BE="-lwldap32"
13304 LIBS="$_LIBS"
13309 # for contrib/sepgsql
13310 if test "$with_selinux" = yes; then
13311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13312 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13313 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13314 $as_echo_n "(cached) " >&6
13315 else
13316 ac_check_lib_save_LIBS=$LIBS
13317 LIBS="-lselinux $LIBS"
13318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13319 /* end confdefs.h. */
13321 /* Override any GCC internal prototype to avoid an error.
13322 Use char because int might match the return type of a GCC
13323 builtin and then its argument prototype would still apply. */
13324 #ifdef __cplusplus
13325 extern "C"
13326 #endif
13327 char security_compute_create_name ();
13329 main ()
13331 return security_compute_create_name ();
13333 return 0;
13335 _ACEOF
13336 if ac_fn_c_try_link "$LINENO"; then :
13337 ac_cv_lib_selinux_security_compute_create_name=yes
13338 else
13339 ac_cv_lib_selinux_security_compute_create_name=no
13341 rm -f core conftest.err conftest.$ac_objext \
13342 conftest$ac_exeext conftest.$ac_ext
13343 LIBS=$ac_check_lib_save_LIBS
13345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13346 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13347 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13348 cat >>confdefs.h <<_ACEOF
13349 #define HAVE_LIBSELINUX 1
13350 _ACEOF
13352 LIBS="-lselinux $LIBS"
13354 else
13355 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13360 # for contrib/uuid-ossp
13361 if test "$with_uuid" = bsd ; then
13362 # On BSD, the UUID functions are in libc
13363 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13364 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13365 UUID_LIBS=""
13366 else
13367 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13370 elif test "$with_uuid" = e2fs ; then
13371 # On macOS, the UUID functions are in libc
13372 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13373 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13374 UUID_LIBS=""
13375 else
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13377 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13378 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13379 $as_echo_n "(cached) " >&6
13380 else
13381 ac_check_lib_save_LIBS=$LIBS
13382 LIBS="-luuid $LIBS"
13383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13384 /* end confdefs.h. */
13386 /* Override any GCC internal prototype to avoid an error.
13387 Use char because int might match the return type of a GCC
13388 builtin and then its argument prototype would still apply. */
13389 #ifdef __cplusplus
13390 extern "C"
13391 #endif
13392 char uuid_generate ();
13394 main ()
13396 return uuid_generate ();
13398 return 0;
13400 _ACEOF
13401 if ac_fn_c_try_link "$LINENO"; then :
13402 ac_cv_lib_uuid_uuid_generate=yes
13403 else
13404 ac_cv_lib_uuid_uuid_generate=no
13406 rm -f core conftest.err conftest.$ac_objext \
13407 conftest$ac_exeext conftest.$ac_ext
13408 LIBS=$ac_check_lib_save_LIBS
13410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13411 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13412 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13413 UUID_LIBS="-luuid"
13414 else
13415 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13420 elif test "$with_uuid" = ossp ; then
13421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13422 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13423 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13424 $as_echo_n "(cached) " >&6
13425 else
13426 ac_check_lib_save_LIBS=$LIBS
13427 LIBS="-lossp-uuid $LIBS"
13428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13429 /* end confdefs.h. */
13431 /* Override any GCC internal prototype to avoid an error.
13432 Use char because int might match the return type of a GCC
13433 builtin and then its argument prototype would still apply. */
13434 #ifdef __cplusplus
13435 extern "C"
13436 #endif
13437 char uuid_export ();
13439 main ()
13441 return uuid_export ();
13443 return 0;
13445 _ACEOF
13446 if ac_fn_c_try_link "$LINENO"; then :
13447 ac_cv_lib_ossp_uuid_uuid_export=yes
13448 else
13449 ac_cv_lib_ossp_uuid_uuid_export=no
13451 rm -f core conftest.err conftest.$ac_objext \
13452 conftest$ac_exeext conftest.$ac_ext
13453 LIBS=$ac_check_lib_save_LIBS
13455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13456 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13457 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13458 UUID_LIBS="-lossp-uuid"
13459 else
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13461 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13462 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13463 $as_echo_n "(cached) " >&6
13464 else
13465 ac_check_lib_save_LIBS=$LIBS
13466 LIBS="-luuid $LIBS"
13467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13468 /* end confdefs.h. */
13470 /* Override any GCC internal prototype to avoid an error.
13471 Use char because int might match the return type of a GCC
13472 builtin and then its argument prototype would still apply. */
13473 #ifdef __cplusplus
13474 extern "C"
13475 #endif
13476 char uuid_export ();
13478 main ()
13480 return uuid_export ();
13482 return 0;
13484 _ACEOF
13485 if ac_fn_c_try_link "$LINENO"; then :
13486 ac_cv_lib_uuid_uuid_export=yes
13487 else
13488 ac_cv_lib_uuid_uuid_export=no
13490 rm -f core conftest.err conftest.$ac_objext \
13491 conftest$ac_exeext conftest.$ac_ext
13492 LIBS=$ac_check_lib_save_LIBS
13494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13495 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13496 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13497 UUID_LIBS="-luuid"
13498 else
13499 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13509 ## Header files
13512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13513 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13514 if ${ac_cv_header_stdbool_h+:} false; then :
13515 $as_echo_n "(cached) " >&6
13516 else
13517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13518 /* end confdefs.h. */
13520 #include <stdbool.h>
13521 #ifndef bool
13522 "error: bool is not defined"
13523 #endif
13524 #ifndef false
13525 "error: false is not defined"
13526 #endif
13527 #if false
13528 "error: false is not 0"
13529 #endif
13530 #ifndef true
13531 "error: true is not defined"
13532 #endif
13533 #if true != 1
13534 "error: true is not 1"
13535 #endif
13536 #ifndef __bool_true_false_are_defined
13537 "error: __bool_true_false_are_defined is not defined"
13538 #endif
13540 struct s { _Bool s: 1; _Bool t; } s;
13542 char a[true == 1 ? 1 : -1];
13543 char b[false == 0 ? 1 : -1];
13544 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13545 char d[(bool) 0.5 == true ? 1 : -1];
13546 /* See body of main program for 'e'. */
13547 char f[(_Bool) 0.0 == false ? 1 : -1];
13548 char g[true];
13549 char h[sizeof (_Bool)];
13550 char i[sizeof s.t];
13551 enum { j = false, k = true, l = false * true, m = true * 256 };
13552 /* The following fails for
13553 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13554 _Bool n[m];
13555 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13556 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13557 /* Catch a bug in an HP-UX C compiler. See
13558 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13559 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13561 _Bool q = true;
13562 _Bool *pq = &q;
13565 main ()
13568 bool e = &s;
13569 *pq |= q;
13570 *pq |= ! q;
13571 /* Refer to every declared value, to avoid compiler optimizations. */
13572 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13573 + !m + !n + !o + !p + !q + !pq);
13576 return 0;
13578 _ACEOF
13579 if ac_fn_c_try_compile "$LINENO"; then :
13580 ac_cv_header_stdbool_h=yes
13581 else
13582 ac_cv_header_stdbool_h=no
13584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13587 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13588 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13589 if test "x$ac_cv_type__Bool" = xyes; then :
13591 cat >>confdefs.h <<_ACEOF
13592 #define HAVE__BOOL 1
13593 _ACEOF
13599 if test $ac_cv_header_stdbool_h = yes; then
13601 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13606 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/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/uio.h sys/un.h termios.h ucred.h wctype.h
13607 do :
13608 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13609 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13610 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13611 cat >>confdefs.h <<_ACEOF
13612 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13613 _ACEOF
13617 done
13620 # On BSD, test for net/if.h will fail unless sys/socket.h
13621 # is included first.
13622 for ac_header in net/if.h
13623 do :
13624 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
13625 #include <sys/socket.h>
13628 if test "x$ac_cv_header_net_if_h" = xyes; then :
13629 cat >>confdefs.h <<_ACEOF
13630 #define HAVE_NET_IF_H 1
13631 _ACEOF
13635 done
13638 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
13639 # is included first.
13640 for ac_header in sys/ucred.h
13641 do :
13642 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13643 #include <sys/param.h>
13646 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13647 cat >>confdefs.h <<_ACEOF
13648 #define HAVE_SYS_UCRED_H 1
13649 _ACEOF
13653 done
13656 # At least on IRIX, test for netinet/tcp.h will fail unless
13657 # netinet/in.h is included first.
13658 for ac_header in netinet/tcp.h
13659 do :
13660 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13661 #include <netinet/in.h>
13664 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13665 cat >>confdefs.h <<_ACEOF
13666 #define HAVE_NETINET_TCP_H 1
13667 _ACEOF
13671 done
13674 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13675 for ac_header in readline/readline.h
13676 do :
13677 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13678 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13679 cat >>confdefs.h <<_ACEOF
13680 #define HAVE_READLINE_READLINE_H 1
13681 _ACEOF
13683 else
13684 for ac_header in readline.h
13685 do :
13686 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13687 if test "x$ac_cv_header_readline_h" = xyes; then :
13688 cat >>confdefs.h <<_ACEOF
13689 #define HAVE_READLINE_H 1
13690 _ACEOF
13692 else
13693 as_fn_error $? "readline header not found
13694 If you have readline already installed, see config.log for details on the
13695 failure. It is possible the compiler isn't looking in the proper directory.
13696 Use --without-readline to disable readline support." "$LINENO" 5
13699 done
13703 done
13705 for ac_header in readline/history.h
13706 do :
13707 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13708 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13709 cat >>confdefs.h <<_ACEOF
13710 #define HAVE_READLINE_HISTORY_H 1
13711 _ACEOF
13713 else
13714 for ac_header in history.h
13715 do :
13716 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13717 if test "x$ac_cv_header_history_h" = xyes; then :
13718 cat >>confdefs.h <<_ACEOF
13719 #define HAVE_HISTORY_H 1
13720 _ACEOF
13722 else
13723 as_fn_error $? "history header not found
13724 If you have readline already installed, see config.log for details on the
13725 failure. It is possible the compiler isn't looking in the proper directory.
13726 Use --without-readline to disable readline support." "$LINENO" 5
13729 done
13733 done
13737 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13738 # Some installations of libedit usurp /usr/include/readline/, which seems
13739 # bad practice, since in combined installations readline will have its headers
13740 # there. We might have to resort to AC_EGREP checks to make sure we found
13741 # the proper header...
13742 for ac_header in editline/readline.h
13743 do :
13744 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13745 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13746 cat >>confdefs.h <<_ACEOF
13747 #define HAVE_EDITLINE_READLINE_H 1
13748 _ACEOF
13750 else
13751 for ac_header in readline.h
13752 do :
13753 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13754 if test "x$ac_cv_header_readline_h" = xyes; then :
13755 cat >>confdefs.h <<_ACEOF
13756 #define HAVE_READLINE_H 1
13757 _ACEOF
13759 else
13760 for ac_header in readline/readline.h
13761 do :
13762 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13763 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13764 cat >>confdefs.h <<_ACEOF
13765 #define HAVE_READLINE_READLINE_H 1
13766 _ACEOF
13768 else
13769 as_fn_error $? "readline header not found
13770 If you have libedit already installed, see config.log for details on the
13771 failure. It is possible the compiler isn't looking in the proper directory.
13772 Use --without-readline to disable libedit support." "$LINENO" 5
13775 done
13779 done
13783 done
13785 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13786 # not be there at all. Hence, don't complain if not found. We must check
13787 # though, since in yet other versions it is an independent header.
13788 for ac_header in editline/history.h
13789 do :
13790 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13791 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13792 cat >>confdefs.h <<_ACEOF
13793 #define HAVE_EDITLINE_HISTORY_H 1
13794 _ACEOF
13796 else
13797 for ac_header in history.h
13798 do :
13799 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13800 if test "x$ac_cv_header_history_h" = xyes; then :
13801 cat >>confdefs.h <<_ACEOF
13802 #define HAVE_HISTORY_H 1
13803 _ACEOF
13805 else
13806 for ac_header in readline/history.h
13807 do :
13808 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13809 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13810 cat >>confdefs.h <<_ACEOF
13811 #define HAVE_READLINE_HISTORY_H 1
13812 _ACEOF
13816 done
13820 done
13824 done
13828 if test "$with_zlib" = yes; then
13829 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13830 if test "x$ac_cv_header_zlib_h" = xyes; then :
13832 else
13833 as_fn_error $? "zlib header not found
13834 If you have zlib already installed, see config.log for details on the
13835 failure. It is possible the compiler isn't looking in the proper directory.
13836 Use --without-zlib to disable zlib support." "$LINENO" 5
13842 if test "$with_lz4" = yes; then
13843 for ac_header in lz4.h
13844 do :
13845 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13846 if test "x$ac_cv_header_lz4_h" = xyes; then :
13847 cat >>confdefs.h <<_ACEOF
13848 #define HAVE_LZ4_H 1
13849 _ACEOF
13851 else
13852 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13855 done
13859 if test "$with_gssapi" = yes ; then
13860 for ac_header in gssapi/gssapi.h
13861 do :
13862 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13863 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13864 cat >>confdefs.h <<_ACEOF
13865 #define HAVE_GSSAPI_GSSAPI_H 1
13866 _ACEOF
13868 else
13869 for ac_header in gssapi.h
13870 do :
13871 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13872 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13873 cat >>confdefs.h <<_ACEOF
13874 #define HAVE_GSSAPI_H 1
13875 _ACEOF
13877 else
13878 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13881 done
13885 done
13889 if test "$with_ssl" = openssl ; then
13890 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13891 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13893 else
13894 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13898 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13899 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13901 else
13902 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13908 if test "$with_pam" = yes ; then
13909 for ac_header in security/pam_appl.h
13910 do :
13911 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13912 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13913 cat >>confdefs.h <<_ACEOF
13914 #define HAVE_SECURITY_PAM_APPL_H 1
13915 _ACEOF
13917 else
13918 for ac_header in pam/pam_appl.h
13919 do :
13920 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13921 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13922 cat >>confdefs.h <<_ACEOF
13923 #define HAVE_PAM_PAM_APPL_H 1
13924 _ACEOF
13926 else
13927 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13930 done
13934 done
13938 if test "$with_bsd_auth" = yes ; then
13939 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13940 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13942 else
13943 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13949 if test "$with_systemd" = yes ; then
13950 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13951 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13953 else
13954 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13960 if test "$with_libxml" = yes ; then
13961 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13962 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13964 else
13965 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13971 if test "$with_libxslt" = yes ; then
13972 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13973 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13975 else
13976 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13982 if test "$with_ldap" = yes ; then
13983 if test "$PORTNAME" != "win32"; then
13984 for ac_header in ldap.h
13985 do :
13986 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13987 if test "x$ac_cv_header_ldap_h" = xyes; then :
13988 cat >>confdefs.h <<_ACEOF
13989 #define HAVE_LDAP_H 1
13990 _ACEOF
13992 else
13993 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13996 done
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13999 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14000 if ${pgac_cv_ldap_safe+:} false; then :
14001 $as_echo_n "(cached) " >&6
14002 else
14003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14004 /* end confdefs.h. */
14005 #include <ldap.h>
14006 #if !defined(LDAP_VENDOR_VERSION) || \
14007 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14008 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14009 choke me
14010 #endif
14012 main ()
14016 return 0;
14018 _ACEOF
14019 if ac_fn_c_try_compile "$LINENO"; then :
14020 pgac_cv_ldap_safe=yes
14021 else
14022 pgac_cv_ldap_safe=no
14024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14027 $as_echo "$pgac_cv_ldap_safe" >&6; }
14029 if test "$pgac_cv_ldap_safe" != yes; then
14030 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14031 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14032 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14033 *** also uses LDAP will crash on exit." >&5
14034 $as_echo "$as_me: WARNING:
14035 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14036 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14037 *** also uses LDAP will crash on exit." >&2;}
14039 else
14040 for ac_header in winldap.h
14041 do :
14042 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14043 #include <windows.h>
14046 if test "x$ac_cv_header_winldap_h" = xyes; then :
14047 cat >>confdefs.h <<_ACEOF
14048 #define HAVE_WINLDAP_H 1
14049 _ACEOF
14051 else
14052 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14055 done
14060 if test "$with_bonjour" = yes ; then
14061 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14062 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14064 else
14065 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14071 # for contrib/uuid-ossp
14072 if test "$with_uuid" = bsd ; then
14073 for ac_header in uuid.h
14074 do :
14075 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14076 if test "x$ac_cv_header_uuid_h" = xyes; then :
14077 cat >>confdefs.h <<_ACEOF
14078 #define HAVE_UUID_H 1
14079 _ACEOF
14080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14081 /* end confdefs.h. */
14082 #include <uuid.h>
14084 _ACEOF
14085 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14086 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
14088 else
14089 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14091 rm -f conftest*
14093 else
14094 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14097 done
14099 elif test "$with_uuid" = e2fs ; then
14100 for ac_header in uuid/uuid.h
14101 do :
14102 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14103 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14104 cat >>confdefs.h <<_ACEOF
14105 #define HAVE_UUID_UUID_H 1
14106 _ACEOF
14107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14108 /* end confdefs.h. */
14109 #include <uuid/uuid.h>
14111 _ACEOF
14112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14113 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14115 else
14116 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14118 rm -f conftest*
14120 else
14121 for ac_header in uuid.h
14122 do :
14123 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14124 if test "x$ac_cv_header_uuid_h" = xyes; then :
14125 cat >>confdefs.h <<_ACEOF
14126 #define HAVE_UUID_H 1
14127 _ACEOF
14128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14129 /* end confdefs.h. */
14130 #include <uuid.h>
14132 _ACEOF
14133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14134 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14136 else
14137 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14139 rm -f conftest*
14141 else
14142 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14145 done
14149 done
14151 elif test "$with_uuid" = ossp ; then
14152 for ac_header in ossp/uuid.h
14153 do :
14154 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14155 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14156 cat >>confdefs.h <<_ACEOF
14157 #define HAVE_OSSP_UUID_H 1
14158 _ACEOF
14159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14160 /* end confdefs.h. */
14161 #include <ossp/uuid.h>
14163 _ACEOF
14164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14165 $EGREP "uuid_export" >/dev/null 2>&1; then :
14167 else
14168 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14170 rm -f conftest*
14172 else
14173 for ac_header in uuid.h
14174 do :
14175 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14176 if test "x$ac_cv_header_uuid_h" = xyes; then :
14177 cat >>confdefs.h <<_ACEOF
14178 #define HAVE_UUID_H 1
14179 _ACEOF
14180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14181 /* end confdefs.h. */
14182 #include <uuid.h>
14184 _ACEOF
14185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14186 $EGREP "uuid_export" >/dev/null 2>&1; then :
14188 else
14189 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14191 rm -f conftest*
14193 else
14194 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14197 done
14201 done
14205 if test "$PORTNAME" = "win32" ; then
14206 for ac_header in crtdefs.h
14207 do :
14208 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14209 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14210 cat >>confdefs.h <<_ACEOF
14211 #define HAVE_CRTDEFS_H 1
14212 _ACEOF
14216 done
14221 ## Types, structures, compiler characteristics
14224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14225 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14226 if ${ac_cv_c_bigendian+:} false; then :
14227 $as_echo_n "(cached) " >&6
14228 else
14229 ac_cv_c_bigendian=unknown
14230 # See if we're dealing with a universal compiler.
14231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14232 /* end confdefs.h. */
14233 #ifndef __APPLE_CC__
14234 not a universal capable compiler
14235 #endif
14236 typedef int dummy;
14238 _ACEOF
14239 if ac_fn_c_try_compile "$LINENO"; then :
14241 # Check for potential -arch flags. It is not universal unless
14242 # there are at least two -arch flags with different values.
14243 ac_arch=
14244 ac_prev=
14245 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14246 if test -n "$ac_prev"; then
14247 case $ac_word in
14248 i?86 | x86_64 | ppc | ppc64)
14249 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14250 ac_arch=$ac_word
14251 else
14252 ac_cv_c_bigendian=universal
14253 break
14256 esac
14257 ac_prev=
14258 elif test "x$ac_word" = "x-arch"; then
14259 ac_prev=arch
14261 done
14263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14264 if test $ac_cv_c_bigendian = unknown; then
14265 # See if sys/param.h defines the BYTE_ORDER macro.
14266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14267 /* end confdefs.h. */
14268 #include <sys/types.h>
14269 #include <sys/param.h>
14272 main ()
14274 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14275 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14276 && LITTLE_ENDIAN)
14277 bogus endian macros
14278 #endif
14281 return 0;
14283 _ACEOF
14284 if ac_fn_c_try_compile "$LINENO"; then :
14285 # It does; now see whether it defined to BIG_ENDIAN or not.
14286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14287 /* end confdefs.h. */
14288 #include <sys/types.h>
14289 #include <sys/param.h>
14292 main ()
14294 #if BYTE_ORDER != BIG_ENDIAN
14295 not big endian
14296 #endif
14299 return 0;
14301 _ACEOF
14302 if ac_fn_c_try_compile "$LINENO"; then :
14303 ac_cv_c_bigendian=yes
14304 else
14305 ac_cv_c_bigendian=no
14307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14311 if test $ac_cv_c_bigendian = unknown; then
14312 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14314 /* end confdefs.h. */
14315 #include <limits.h>
14318 main ()
14320 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14321 bogus endian macros
14322 #endif
14325 return 0;
14327 _ACEOF
14328 if ac_fn_c_try_compile "$LINENO"; then :
14329 # It does; now see whether it defined to _BIG_ENDIAN or not.
14330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14331 /* end confdefs.h. */
14332 #include <limits.h>
14335 main ()
14337 #ifndef _BIG_ENDIAN
14338 not big endian
14339 #endif
14342 return 0;
14344 _ACEOF
14345 if ac_fn_c_try_compile "$LINENO"; then :
14346 ac_cv_c_bigendian=yes
14347 else
14348 ac_cv_c_bigendian=no
14350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14354 if test $ac_cv_c_bigendian = unknown; then
14355 # Compile a test program.
14356 if test "$cross_compiling" = yes; then :
14357 # Try to guess by grepping values from an object file.
14358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14359 /* end confdefs.h. */
14360 short int ascii_mm[] =
14361 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14362 short int ascii_ii[] =
14363 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14364 int use_ascii (int i) {
14365 return ascii_mm[i] + ascii_ii[i];
14367 short int ebcdic_ii[] =
14368 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14369 short int ebcdic_mm[] =
14370 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14371 int use_ebcdic (int i) {
14372 return ebcdic_mm[i] + ebcdic_ii[i];
14374 extern int foo;
14377 main ()
14379 return use_ascii (foo) == use_ebcdic (foo);
14381 return 0;
14383 _ACEOF
14384 if ac_fn_c_try_compile "$LINENO"; then :
14385 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14386 ac_cv_c_bigendian=yes
14388 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14389 if test "$ac_cv_c_bigendian" = unknown; then
14390 ac_cv_c_bigendian=no
14391 else
14392 # finding both strings is unlikely to happen, but who knows?
14393 ac_cv_c_bigendian=unknown
14397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14398 else
14399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14400 /* end confdefs.h. */
14401 $ac_includes_default
14403 main ()
14406 /* Are we little or big endian? From Harbison&Steele. */
14407 union
14409 long int l;
14410 char c[sizeof (long int)];
14411 } u;
14412 u.l = 1;
14413 return u.c[sizeof (long int) - 1] == 1;
14416 return 0;
14418 _ACEOF
14419 if ac_fn_c_try_run "$LINENO"; then :
14420 ac_cv_c_bigendian=no
14421 else
14422 ac_cv_c_bigendian=yes
14424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14425 conftest.$ac_objext conftest.beam conftest.$ac_ext
14430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14431 $as_echo "$ac_cv_c_bigendian" >&6; }
14432 case $ac_cv_c_bigendian in #(
14433 yes)
14434 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14435 ;; #(
14437 ;; #(
14438 universal)
14440 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14442 ;; #(
14444 as_fn_error $? "unknown endianness
14445 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14446 esac
14448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14449 $as_echo_n "checking for inline... " >&6; }
14450 if ${ac_cv_c_inline+:} false; then :
14451 $as_echo_n "(cached) " >&6
14452 else
14453 ac_cv_c_inline=no
14454 for ac_kw in inline __inline__ __inline; do
14455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14456 /* end confdefs.h. */
14457 #ifndef __cplusplus
14458 typedef int foo_t;
14459 static $ac_kw foo_t static_foo () {return 0; }
14460 $ac_kw foo_t foo () {return 0; }
14461 #endif
14463 _ACEOF
14464 if ac_fn_c_try_compile "$LINENO"; then :
14465 ac_cv_c_inline=$ac_kw
14467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14468 test "$ac_cv_c_inline" != no && break
14469 done
14472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14473 $as_echo "$ac_cv_c_inline" >&6; }
14475 case $ac_cv_c_inline in
14476 inline | yes) ;;
14478 case $ac_cv_c_inline in
14479 no) ac_val=;;
14480 *) ac_val=$ac_cv_c_inline;;
14481 esac
14482 cat >>confdefs.h <<_ACEOF
14483 #ifndef __cplusplus
14484 #define inline $ac_val
14485 #endif
14486 _ACEOF
14488 esac
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14491 $as_echo_n "checking for printf format archetype... " >&6; }
14492 if ${pgac_cv_printf_archetype+:} false; then :
14493 $as_echo_n "(cached) " >&6
14494 else
14495 pgac_cv_printf_archetype=gnu_printf
14496 ac_save_c_werror_flag=$ac_c_werror_flag
14497 ac_c_werror_flag=yes
14498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14499 /* end confdefs.h. */
14500 extern void pgac_write(int ignore, const char *fmt,...)
14501 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14503 main ()
14505 pgac_write(0, "error %s: %m", "foo");
14507 return 0;
14509 _ACEOF
14510 if ac_fn_c_try_compile "$LINENO"; then :
14511 ac_archetype_ok=yes
14512 else
14513 ac_archetype_ok=no
14515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14516 ac_c_werror_flag=$ac_save_c_werror_flag
14518 if [ "$ac_archetype_ok" = no ]; then
14519 pgac_cv_printf_archetype=__syslog__
14520 ac_save_c_werror_flag=$ac_c_werror_flag
14521 ac_c_werror_flag=yes
14522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14523 /* end confdefs.h. */
14524 extern void pgac_write(int ignore, const char *fmt,...)
14525 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14527 main ()
14529 pgac_write(0, "error %s: %m", "foo");
14531 return 0;
14533 _ACEOF
14534 if ac_fn_c_try_compile "$LINENO"; then :
14535 ac_archetype_ok=yes
14536 else
14537 ac_archetype_ok=no
14539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14540 ac_c_werror_flag=$ac_save_c_werror_flag
14542 if [ "$ac_archetype_ok" = no ]; then
14543 pgac_cv_printf_archetype=printf
14547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14548 $as_echo "$pgac_cv_printf_archetype" >&6; }
14550 cat >>confdefs.h <<_ACEOF
14551 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14552 _ACEOF
14555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
14556 $as_echo_n "checking for __func__... " >&6; }
14557 if ${pgac_cv_funcname_func_support+:} false; then :
14558 $as_echo_n "(cached) " >&6
14559 else
14560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14561 /* end confdefs.h. */
14562 #include <stdio.h>
14564 main ()
14566 printf("%s\n", __func__);
14568 return 0;
14570 _ACEOF
14571 if ac_fn_c_try_compile "$LINENO"; then :
14572 pgac_cv_funcname_func_support=yes
14573 else
14574 pgac_cv_funcname_func_support=no
14576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
14579 $as_echo "$pgac_cv_funcname_func_support" >&6; }
14580 if test x"$pgac_cv_funcname_func_support" = xyes ; then
14582 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
14584 else
14585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
14586 $as_echo_n "checking for __FUNCTION__... " >&6; }
14587 if ${pgac_cv_funcname_function_support+:} false; then :
14588 $as_echo_n "(cached) " >&6
14589 else
14590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14591 /* end confdefs.h. */
14592 #include <stdio.h>
14594 main ()
14596 printf("%s\n", __FUNCTION__);
14598 return 0;
14600 _ACEOF
14601 if ac_fn_c_try_compile "$LINENO"; then :
14602 pgac_cv_funcname_function_support=yes
14603 else
14604 pgac_cv_funcname_function_support=no
14606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
14609 $as_echo "$pgac_cv_funcname_function_support" >&6; }
14610 if test x"$pgac_cv_funcname_function_support" = xyes ; then
14612 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14617 $as_echo_n "checking for _Static_assert... " >&6; }
14618 if ${pgac_cv__static_assert+:} false; then :
14619 $as_echo_n "(cached) " >&6
14620 else
14621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14622 /* end confdefs.h. */
14625 main ()
14627 ({ _Static_assert(1, "foo"); })
14629 return 0;
14631 _ACEOF
14632 if ac_fn_c_try_link "$LINENO"; then :
14633 pgac_cv__static_assert=yes
14634 else
14635 pgac_cv__static_assert=no
14637 rm -f core conftest.err conftest.$ac_objext \
14638 conftest$ac_exeext conftest.$ac_ext
14640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14641 $as_echo "$pgac_cv__static_assert" >&6; }
14642 if test x"$pgac_cv__static_assert" = xyes ; then
14644 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14648 $as_echo_n "checking for typeof... " >&6; }
14649 if ${pgac_cv_c_typeof+:} false; then :
14650 $as_echo_n "(cached) " >&6
14651 else
14652 pgac_cv_c_typeof=no
14653 for pgac_kw in typeof __typeof__ decltype; do
14654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14655 /* end confdefs.h. */
14658 main ()
14660 int x = 0;
14661 $pgac_kw(x) y;
14662 y = x;
14663 return y;
14665 return 0;
14667 _ACEOF
14668 if ac_fn_c_try_compile "$LINENO"; then :
14669 pgac_cv_c_typeof=$pgac_kw
14671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14672 test "$pgac_cv_c_typeof" != no && break
14673 done
14675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14676 $as_echo "$pgac_cv_c_typeof" >&6; }
14677 if test "$pgac_cv_c_typeof" != no; then
14679 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14681 if test "$pgac_cv_c_typeof" != typeof; then
14683 cat >>confdefs.h <<_ACEOF
14684 #define typeof $pgac_cv_c_typeof
14685 _ACEOF
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14690 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14691 if ${pgac_cv__types_compatible+:} false; then :
14692 $as_echo_n "(cached) " >&6
14693 else
14694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14695 /* end confdefs.h. */
14698 main ()
14700 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14702 return 0;
14704 _ACEOF
14705 if ac_fn_c_try_compile "$LINENO"; then :
14706 pgac_cv__types_compatible=yes
14707 else
14708 pgac_cv__types_compatible=no
14710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14713 $as_echo "$pgac_cv__types_compatible" >&6; }
14714 if test x"$pgac_cv__types_compatible" = xyes ; then
14716 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14720 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14721 if ${pgac_cv__builtin_constant_p+:} false; then :
14722 $as_echo_n "(cached) " >&6
14723 else
14724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14725 /* end confdefs.h. */
14726 static int x;
14727 static int y[__builtin_constant_p(x) ? x : 1];
14728 static int z[__builtin_constant_p("string literal") ? 1 : x];
14731 _ACEOF
14732 if ac_fn_c_try_compile "$LINENO"; then :
14733 pgac_cv__builtin_constant_p=yes
14734 else
14735 pgac_cv__builtin_constant_p=no
14737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14740 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14741 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14743 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14747 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14748 if ${pgac_cv__builtin_unreachable+:} false; then :
14749 $as_echo_n "(cached) " >&6
14750 else
14751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14752 /* end confdefs.h. */
14755 main ()
14757 __builtin_unreachable();
14759 return 0;
14761 _ACEOF
14762 if ac_fn_c_try_link "$LINENO"; then :
14763 pgac_cv__builtin_unreachable=yes
14764 else
14765 pgac_cv__builtin_unreachable=no
14767 rm -f core conftest.err conftest.$ac_objext \
14768 conftest$ac_exeext conftest.$ac_ext
14770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14771 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14772 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14774 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14778 $as_echo_n "checking for computed goto support... " >&6; }
14779 if ${pgac_cv_computed_goto+:} false; then :
14780 $as_echo_n "(cached) " >&6
14781 else
14782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14783 /* end confdefs.h. */
14786 main ()
14788 void *labeladdrs[] = {&&my_label};
14789 goto *labeladdrs[0];
14790 my_label:
14791 return 1;
14794 return 0;
14796 _ACEOF
14797 if ac_fn_c_try_compile "$LINENO"; then :
14798 pgac_cv_computed_goto=yes
14799 else
14800 pgac_cv_computed_goto=no
14802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14805 $as_echo "$pgac_cv_computed_goto" >&6; }
14806 if test x"$pgac_cv_computed_goto" = xyes ; then
14808 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14811 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14812 #include <time.h>
14815 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14817 cat >>confdefs.h <<_ACEOF
14818 #define HAVE_STRUCT_TM_TM_ZONE 1
14819 _ACEOF
14825 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14826 #ifdef HAVE_SYS_IPC_H
14827 #include <sys/ipc.h>
14828 #endif
14829 #ifdef HAVE_SYS_SEM_H
14830 #include <sys/sem.h>
14831 #endif
14833 if test "x$ac_cv_type_union_semun" = xyes; then :
14835 cat >>confdefs.h <<_ACEOF
14836 #define HAVE_UNION_SEMUN 1
14837 _ACEOF
14842 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14844 if test "x$ac_cv_type_socklen_t" = xyes; then :
14846 cat >>confdefs.h <<_ACEOF
14847 #define HAVE_SOCKLEN_T 1
14848 _ACEOF
14853 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14854 #ifdef HAVE_SYS_UN_H
14855 #include <sys/un.h>
14856 #endif
14859 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14861 cat >>confdefs.h <<_ACEOF
14862 #define HAVE_STRUCT_SOCKADDR_UN 1
14863 _ACEOF
14868 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14869 #include <sys/socket.h>
14872 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14874 cat >>confdefs.h <<_ACEOF
14875 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14876 _ACEOF
14881 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14882 #include <sys/socket.h>
14885 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14887 cat >>confdefs.h <<_ACEOF
14888 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14889 _ACEOF
14893 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14894 #include <sys/socket.h>
14897 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14899 cat >>confdefs.h <<_ACEOF
14900 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14901 _ACEOF
14905 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14906 #include <sys/socket.h>
14909 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14911 cat >>confdefs.h <<_ACEOF
14912 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14913 _ACEOF
14917 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14918 #include <sys/socket.h>
14921 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14923 cat >>confdefs.h <<_ACEOF
14924 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14925 _ACEOF
14929 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14930 #include <sys/socket.h>
14933 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14935 cat >>confdefs.h <<_ACEOF
14936 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14937 _ACEOF
14942 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14943 #include <sys/socket.h>
14944 #include <netdb.h>
14947 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14949 cat >>confdefs.h <<_ACEOF
14950 #define HAVE_STRUCT_ADDRINFO 1
14951 _ACEOF
14957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14958 $as_echo_n "checking for locale_t... " >&6; }
14959 if ${pgac_cv_type_locale_t+:} false; then :
14960 $as_echo_n "(cached) " >&6
14961 else
14962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14963 /* end confdefs.h. */
14964 #include <locale.h>
14965 locale_t x;
14967 main ()
14971 return 0;
14973 _ACEOF
14974 if ac_fn_c_try_compile "$LINENO"; then :
14975 pgac_cv_type_locale_t=yes
14976 else
14977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14978 /* end confdefs.h. */
14979 #include <xlocale.h>
14980 locale_t x;
14982 main ()
14986 return 0;
14988 _ACEOF
14989 if ac_fn_c_try_compile "$LINENO"; then :
14990 pgac_cv_type_locale_t='yes (in xlocale.h)'
14991 else
14992 pgac_cv_type_locale_t=no
14994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14999 $as_echo "$pgac_cv_type_locale_t" >&6; }
15000 if test "$pgac_cv_type_locale_t" != no; then
15002 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
15005 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
15007 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
15011 # MSVC doesn't cope well with defining restrict to __restrict, the
15012 # spelling it understands, because it conflicts with
15013 # __declspec(restrict). Therefore we define pg_restrict to the
15014 # appropriate definition, which presumably won't conflict.
15016 # Allow platforms with buggy compilers to force restrict to not be
15017 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
15018 # template.
15019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15020 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15021 if ${ac_cv_c_restrict+:} false; then :
15022 $as_echo_n "(cached) " >&6
15023 else
15024 ac_cv_c_restrict=no
15025 # The order here caters to the fact that C++ does not require restrict.
15026 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15028 /* end confdefs.h. */
15029 typedef int * int_ptr;
15030 int foo (int_ptr $ac_kw ip) {
15031 return ip[0];
15034 main ()
15036 int s[1];
15037 int * $ac_kw t = s;
15038 t[0] = 0;
15039 return foo(t)
15041 return 0;
15043 _ACEOF
15044 if ac_fn_c_try_compile "$LINENO"; then :
15045 ac_cv_c_restrict=$ac_kw
15047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15048 test "$ac_cv_c_restrict" != no && break
15049 done
15052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15053 $as_echo "$ac_cv_c_restrict" >&6; }
15055 case $ac_cv_c_restrict in
15056 restrict) ;;
15057 no) $as_echo "#define restrict /**/" >>confdefs.h
15059 *) cat >>confdefs.h <<_ACEOF
15060 #define restrict $ac_cv_c_restrict
15061 _ACEOF
15063 esac
15065 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15066 pg_restrict=""
15067 else
15068 pg_restrict="$ac_cv_c_restrict"
15071 cat >>confdefs.h <<_ACEOF
15072 #define pg_restrict $pg_restrict
15073 _ACEOF
15076 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
15077 #include <sys/param.h>
15078 #ifdef HAVE_SYS_UCRED_H
15079 #include <sys/ucred.h>
15080 #endif
15082 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
15084 cat >>confdefs.h <<_ACEOF
15085 #define HAVE_STRUCT_CMSGCRED 1
15086 _ACEOF
15092 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15093 #include <getopt.h>
15094 #endif
15096 if test "x$ac_cv_type_struct_option" = xyes; then :
15098 cat >>confdefs.h <<_ACEOF
15099 #define HAVE_STRUCT_OPTION 1
15100 _ACEOF
15106 if test "$with_zlib" = yes; then
15107 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
15108 # did not). While we could work around the lack of z_streamp, it
15109 # seems unwise to encourage people to use such old zlib versions...
15110 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
15112 if test "x$ac_cv_type_z_streamp" = xyes; then :
15114 else
15115 as_fn_error $? "zlib version is too old
15116 Use --without-zlib to disable zlib support." "$LINENO" 5
15121 case $host_cpu in
15122 x86_64)
15123 # On x86_64, check if we can compile a popcntq instruction
15124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15125 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15126 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15127 $as_echo_n "(cached) " >&6
15128 else
15129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15130 /* end confdefs.h. */
15133 main ()
15135 long long x = 1; long long r;
15136 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15138 return 0;
15140 _ACEOF
15141 if ac_fn_c_try_compile "$LINENO"; then :
15142 pgac_cv_have_x86_64_popcntq=yes
15143 else
15144 pgac_cv_have_x86_64_popcntq=no
15146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15149 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15150 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15152 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15156 ppc*|powerpc*)
15157 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
15158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
15159 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
15160 if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
15161 $as_echo_n "(cached) " >&6
15162 else
15163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15164 /* end confdefs.h. */
15167 main ()
15169 int a = 0; int *p = &a; int r;
15170 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
15172 return 0;
15174 _ACEOF
15175 if ac_fn_c_try_compile "$LINENO"; then :
15176 pgac_cv_have_ppc_mutex_hint=yes
15177 else
15178 pgac_cv_have_ppc_mutex_hint=no
15180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
15183 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
15184 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
15186 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
15189 # Check if compiler accepts "i"(x) when __builtin_constant_p(x).
15190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15191 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15192 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15193 $as_echo_n "(cached) " >&6
15194 else
15195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15196 /* end confdefs.h. */
15197 static inline int
15198 addi(int ra, int si)
15200 int res = 0;
15201 if (__builtin_constant_p(si))
15202 __asm__ __volatile__(
15203 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15204 return res;
15206 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15208 main ()
15212 return 0;
15214 _ACEOF
15215 if ac_fn_c_try_compile "$LINENO"; then :
15216 pgac_cv_have_i_constraint__builtin_constant_p=yes
15217 else
15218 pgac_cv_have_i_constraint__builtin_constant_p=no
15220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15223 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15224 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15226 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15230 esac
15232 # Check largefile support. You might think this is a system service not a
15233 # compiler characteristic, but you'd be wrong. We must check this before
15234 # probing existence of related functions such as fseeko, since the largefile
15235 # defines can affect what is generated for that.
15236 if test "$PORTNAME" != "win32"; then
15237 # Check whether --enable-largefile was given.
15238 if test "${enable_largefile+set}" = set; then :
15239 enableval=$enable_largefile;
15242 if test "$enable_largefile" != no; then
15244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15245 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15246 if ${ac_cv_sys_largefile_CC+:} false; then :
15247 $as_echo_n "(cached) " >&6
15248 else
15249 ac_cv_sys_largefile_CC=no
15250 if test "$GCC" != yes; then
15251 ac_save_CC=$CC
15252 while :; do
15253 # IRIX 6.2 and later do not support large files by default,
15254 # so use the C compiler's -n32 option if that helps.
15255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15256 /* end confdefs.h. */
15257 #include <sys/types.h>
15258 /* Check that off_t can represent 2**63 - 1 correctly.
15259 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15260 since some C++ compilers masquerading as C compilers
15261 incorrectly reject 9223372036854775807. */
15262 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15263 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15264 && LARGE_OFF_T % 2147483647 == 1)
15265 ? 1 : -1];
15267 main ()
15271 return 0;
15273 _ACEOF
15274 if ac_fn_c_try_compile "$LINENO"; then :
15275 break
15277 rm -f core conftest.err conftest.$ac_objext
15278 CC="$CC -n32"
15279 if ac_fn_c_try_compile "$LINENO"; then :
15280 ac_cv_sys_largefile_CC=' -n32'; break
15282 rm -f core conftest.err conftest.$ac_objext
15283 break
15284 done
15285 CC=$ac_save_CC
15286 rm -f conftest.$ac_ext
15289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15290 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15291 if test "$ac_cv_sys_largefile_CC" != no; then
15292 CC=$CC$ac_cv_sys_largefile_CC
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15296 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15297 if ${ac_cv_sys_file_offset_bits+:} false; then :
15298 $as_echo_n "(cached) " >&6
15299 else
15300 while :; do
15301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15302 /* end confdefs.h. */
15303 #include <sys/types.h>
15304 /* Check that off_t can represent 2**63 - 1 correctly.
15305 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15306 since some C++ compilers masquerading as C compilers
15307 incorrectly reject 9223372036854775807. */
15308 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15309 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15310 && LARGE_OFF_T % 2147483647 == 1)
15311 ? 1 : -1];
15313 main ()
15317 return 0;
15319 _ACEOF
15320 if ac_fn_c_try_compile "$LINENO"; then :
15321 ac_cv_sys_file_offset_bits=no; break
15323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15325 /* end confdefs.h. */
15326 #define _FILE_OFFSET_BITS 64
15327 #include <sys/types.h>
15328 /* Check that off_t can represent 2**63 - 1 correctly.
15329 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15330 since some C++ compilers masquerading as C compilers
15331 incorrectly reject 9223372036854775807. */
15332 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15333 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15334 && LARGE_OFF_T % 2147483647 == 1)
15335 ? 1 : -1];
15337 main ()
15341 return 0;
15343 _ACEOF
15344 if ac_fn_c_try_compile "$LINENO"; then :
15345 ac_cv_sys_file_offset_bits=64; break
15347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15348 ac_cv_sys_file_offset_bits=unknown
15349 break
15350 done
15352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15353 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15354 case $ac_cv_sys_file_offset_bits in #(
15355 no | unknown) ;;
15357 cat >>confdefs.h <<_ACEOF
15358 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15359 _ACEOF
15361 esac
15362 rm -rf conftest*
15363 if test $ac_cv_sys_file_offset_bits = unknown; then
15364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15365 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15366 if ${ac_cv_sys_large_files+:} false; then :
15367 $as_echo_n "(cached) " >&6
15368 else
15369 while :; do
15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371 /* end confdefs.h. */
15372 #include <sys/types.h>
15373 /* Check that off_t can represent 2**63 - 1 correctly.
15374 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15375 since some C++ compilers masquerading as C compilers
15376 incorrectly reject 9223372036854775807. */
15377 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15378 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15379 && LARGE_OFF_T % 2147483647 == 1)
15380 ? 1 : -1];
15382 main ()
15386 return 0;
15388 _ACEOF
15389 if ac_fn_c_try_compile "$LINENO"; then :
15390 ac_cv_sys_large_files=no; break
15392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15394 /* end confdefs.h. */
15395 #define _LARGE_FILES 1
15396 #include <sys/types.h>
15397 /* Check that off_t can represent 2**63 - 1 correctly.
15398 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15399 since some C++ compilers masquerading as C compilers
15400 incorrectly reject 9223372036854775807. */
15401 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15402 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15403 && LARGE_OFF_T % 2147483647 == 1)
15404 ? 1 : -1];
15406 main ()
15410 return 0;
15412 _ACEOF
15413 if ac_fn_c_try_compile "$LINENO"; then :
15414 ac_cv_sys_large_files=1; break
15416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15417 ac_cv_sys_large_files=unknown
15418 break
15419 done
15421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15422 $as_echo "$ac_cv_sys_large_files" >&6; }
15423 case $ac_cv_sys_large_files in #(
15424 no | unknown) ;;
15426 cat >>confdefs.h <<_ACEOF
15427 #define _LARGE_FILES $ac_cv_sys_large_files
15428 _ACEOF
15430 esac
15431 rm -rf conftest*
15440 # The cast to long int works around a bug in the HP C Compiler
15441 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15442 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15443 # This bug is HP SR number 8606223364.
15444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15445 $as_echo_n "checking size of off_t... " >&6; }
15446 if ${ac_cv_sizeof_off_t+:} false; then :
15447 $as_echo_n "(cached) " >&6
15448 else
15449 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15451 else
15452 if test "$ac_cv_type_off_t" = yes; then
15453 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15454 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15455 as_fn_error 77 "cannot compute sizeof (off_t)
15456 See \`config.log' for more details" "$LINENO" 5; }
15457 else
15458 ac_cv_sizeof_off_t=0
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15464 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15468 cat >>confdefs.h <<_ACEOF
15469 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15470 _ACEOF
15474 # If we don't have largefile support, can't handle segsize >= 2GB.
15475 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15476 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15479 # The cast to long int works around a bug in the HP C Compiler
15480 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15481 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15482 # This bug is HP SR number 8606223364.
15483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15484 $as_echo_n "checking size of bool... " >&6; }
15485 if ${ac_cv_sizeof_bool+:} false; then :
15486 $as_echo_n "(cached) " >&6
15487 else
15488 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15489 #include <stdbool.h>
15490 #endif
15491 "; then :
15493 else
15494 if test "$ac_cv_type_bool" = yes; then
15495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15496 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15497 as_fn_error 77 "cannot compute sizeof (bool)
15498 See \`config.log' for more details" "$LINENO" 5; }
15499 else
15500 ac_cv_sizeof_bool=0
15505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15506 $as_echo "$ac_cv_sizeof_bool" >&6; }
15510 cat >>confdefs.h <<_ACEOF
15511 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15512 _ACEOF
15516 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15518 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15524 ## Functions, global variables
15527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15528 $as_echo_n "checking for int timezone... " >&6; }
15529 if ${pgac_cv_var_int_timezone+:} false; then :
15530 $as_echo_n "(cached) " >&6
15531 else
15532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15533 /* end confdefs.h. */
15534 #include <time.h>
15535 int res;
15537 main ()
15539 #ifndef __CYGWIN__
15540 res = timezone / 60;
15541 #else
15542 res = _timezone / 60;
15543 #endif
15545 return 0;
15547 _ACEOF
15548 if ac_fn_c_try_link "$LINENO"; then :
15549 pgac_cv_var_int_timezone=yes
15550 else
15551 pgac_cv_var_int_timezone=no
15553 rm -f core conftest.err conftest.$ac_objext \
15554 conftest$ac_exeext conftest.$ac_ext
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15557 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15558 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15560 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15564 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15565 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15566 $as_echo_n "(cached) " >&6
15567 else
15568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15569 /* end confdefs.h. */
15570 #include <sys/time.h>
15572 main ()
15574 struct timeval *tp;
15575 struct timezone *tzp;
15576 gettimeofday(tp,tzp);
15578 return 0;
15580 _ACEOF
15581 if ac_fn_c_try_compile "$LINENO"; then :
15582 pgac_cv_func_gettimeofday_1arg=no
15583 else
15584 pgac_cv_func_gettimeofday_1arg=yes
15586 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15589 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15590 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15592 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15597 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15598 if ${pgac_cv_func_wcstombs_l+:} false; then :
15599 $as_echo_n "(cached) " >&6
15600 else
15601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15602 /* end confdefs.h. */
15603 #include <stdlib.h>
15604 #include <locale.h>
15606 main ()
15608 #ifndef wcstombs_l
15609 (void) wcstombs_l;
15610 #endif
15612 return 0;
15614 _ACEOF
15615 if ac_fn_c_try_compile "$LINENO"; then :
15616 pgac_cv_func_wcstombs_l='yes'
15617 else
15618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15619 /* end confdefs.h. */
15620 #include <stdlib.h>
15621 #include <locale.h>
15622 #include <xlocale.h>
15624 main ()
15626 #ifndef wcstombs_l
15627 (void) wcstombs_l;
15628 #endif
15630 return 0;
15632 _ACEOF
15633 if ac_fn_c_try_compile "$LINENO"; then :
15634 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15635 else
15636 pgac_cv_func_wcstombs_l='no'
15638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15643 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15644 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15646 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15650 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15651 # symbols that that library has no business exposing to the world. Pending
15652 # acquisition of a clue by those developers, ignore libedit (including its
15653 # possible alias of libreadline) while checking for everything else.
15654 LIBS_including_readline="$LIBS"
15655 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15657 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 readv setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink syncfs sync_file_range uselocale wcstombs_l writev
15658 do :
15659 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15660 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15661 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15662 cat >>confdefs.h <<_ACEOF
15663 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15664 _ACEOF
15667 done
15670 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15672 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15673 if ${pgac_cv__builtin_bswap16+:} false; then :
15674 $as_echo_n "(cached) " >&6
15675 else
15676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15677 /* end confdefs.h. */
15680 call__builtin_bswap16(int x)
15682 return __builtin_bswap16(x);
15685 main ()
15689 return 0;
15691 _ACEOF
15692 if ac_fn_c_try_link "$LINENO"; then :
15693 pgac_cv__builtin_bswap16=yes
15694 else
15695 pgac_cv__builtin_bswap16=no
15697 rm -f core conftest.err conftest.$ac_objext \
15698 conftest$ac_exeext conftest.$ac_ext
15700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15701 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15702 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15704 cat >>confdefs.h <<_ACEOF
15705 #define HAVE__BUILTIN_BSWAP16 1
15706 _ACEOF
15709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15710 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15711 if ${pgac_cv__builtin_bswap32+:} false; then :
15712 $as_echo_n "(cached) " >&6
15713 else
15714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15715 /* end confdefs.h. */
15718 call__builtin_bswap32(int x)
15720 return __builtin_bswap32(x);
15723 main ()
15727 return 0;
15729 _ACEOF
15730 if ac_fn_c_try_link "$LINENO"; then :
15731 pgac_cv__builtin_bswap32=yes
15732 else
15733 pgac_cv__builtin_bswap32=no
15735 rm -f core conftest.err conftest.$ac_objext \
15736 conftest$ac_exeext conftest.$ac_ext
15738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15739 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15740 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15742 cat >>confdefs.h <<_ACEOF
15743 #define HAVE__BUILTIN_BSWAP32 1
15744 _ACEOF
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15748 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15749 if ${pgac_cv__builtin_bswap64+:} false; then :
15750 $as_echo_n "(cached) " >&6
15751 else
15752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15753 /* end confdefs.h. */
15756 call__builtin_bswap64(long int x)
15758 return __builtin_bswap64(x);
15761 main ()
15765 return 0;
15767 _ACEOF
15768 if ac_fn_c_try_link "$LINENO"; then :
15769 pgac_cv__builtin_bswap64=yes
15770 else
15771 pgac_cv__builtin_bswap64=no
15773 rm -f core conftest.err conftest.$ac_objext \
15774 conftest$ac_exeext conftest.$ac_ext
15776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15777 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15778 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15780 cat >>confdefs.h <<_ACEOF
15781 #define HAVE__BUILTIN_BSWAP64 1
15782 _ACEOF
15785 # We assume that we needn't test all widths of these explicitly:
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15787 $as_echo_n "checking for __builtin_clz... " >&6; }
15788 if ${pgac_cv__builtin_clz+:} false; then :
15789 $as_echo_n "(cached) " >&6
15790 else
15791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15792 /* end confdefs.h. */
15795 call__builtin_clz(unsigned int x)
15797 return __builtin_clz(x);
15800 main ()
15804 return 0;
15806 _ACEOF
15807 if ac_fn_c_try_link "$LINENO"; then :
15808 pgac_cv__builtin_clz=yes
15809 else
15810 pgac_cv__builtin_clz=no
15812 rm -f core conftest.err conftest.$ac_objext \
15813 conftest$ac_exeext conftest.$ac_ext
15815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15816 $as_echo "$pgac_cv__builtin_clz" >&6; }
15817 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15819 cat >>confdefs.h <<_ACEOF
15820 #define HAVE__BUILTIN_CLZ 1
15821 _ACEOF
15824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15825 $as_echo_n "checking for __builtin_ctz... " >&6; }
15826 if ${pgac_cv__builtin_ctz+:} false; then :
15827 $as_echo_n "(cached) " >&6
15828 else
15829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15830 /* end confdefs.h. */
15833 call__builtin_ctz(unsigned int x)
15835 return __builtin_ctz(x);
15838 main ()
15842 return 0;
15844 _ACEOF
15845 if ac_fn_c_try_link "$LINENO"; then :
15846 pgac_cv__builtin_ctz=yes
15847 else
15848 pgac_cv__builtin_ctz=no
15850 rm -f core conftest.err conftest.$ac_objext \
15851 conftest$ac_exeext conftest.$ac_ext
15853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15854 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15855 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15857 cat >>confdefs.h <<_ACEOF
15858 #define HAVE__BUILTIN_CTZ 1
15859 _ACEOF
15862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15863 $as_echo_n "checking for __builtin_popcount... " >&6; }
15864 if ${pgac_cv__builtin_popcount+:} false; then :
15865 $as_echo_n "(cached) " >&6
15866 else
15867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15868 /* end confdefs.h. */
15871 call__builtin_popcount(unsigned int x)
15873 return __builtin_popcount(x);
15876 main ()
15880 return 0;
15882 _ACEOF
15883 if ac_fn_c_try_link "$LINENO"; then :
15884 pgac_cv__builtin_popcount=yes
15885 else
15886 pgac_cv__builtin_popcount=no
15888 rm -f core conftest.err conftest.$ac_objext \
15889 conftest$ac_exeext conftest.$ac_ext
15891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15892 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15893 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15895 cat >>confdefs.h <<_ACEOF
15896 #define HAVE__BUILTIN_POPCOUNT 1
15897 _ACEOF
15901 # We require 64-bit fseeko() to be available, but run this check anyway
15902 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15904 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15905 if ${ac_cv_sys_largefile_source+:} false; then :
15906 $as_echo_n "(cached) " >&6
15907 else
15908 while :; do
15909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15910 /* end confdefs.h. */
15911 #include <sys/types.h> /* for off_t */
15912 #include <stdio.h>
15914 main ()
15916 int (*fp) (FILE *, off_t, int) = fseeko;
15917 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15919 return 0;
15921 _ACEOF
15922 if ac_fn_c_try_link "$LINENO"; then :
15923 ac_cv_sys_largefile_source=no; break
15925 rm -f core conftest.err conftest.$ac_objext \
15926 conftest$ac_exeext conftest.$ac_ext
15927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15928 /* end confdefs.h. */
15929 #define _LARGEFILE_SOURCE 1
15930 #include <sys/types.h> /* for off_t */
15931 #include <stdio.h>
15933 main ()
15935 int (*fp) (FILE *, off_t, int) = fseeko;
15936 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15938 return 0;
15940 _ACEOF
15941 if ac_fn_c_try_link "$LINENO"; then :
15942 ac_cv_sys_largefile_source=1; break
15944 rm -f core conftest.err conftest.$ac_objext \
15945 conftest$ac_exeext conftest.$ac_ext
15946 ac_cv_sys_largefile_source=unknown
15947 break
15948 done
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15951 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15952 case $ac_cv_sys_largefile_source in #(
15953 no | unknown) ;;
15955 cat >>confdefs.h <<_ACEOF
15956 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15957 _ACEOF
15959 esac
15960 rm -rf conftest*
15962 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15963 # in glibc 2.1.3, but that breaks too many other things.
15964 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15965 if test $ac_cv_sys_largefile_source != unknown; then
15967 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15972 # Make sure there's a declaration for sigwait(), then make sure
15973 # that it conforms to the POSIX standard (there seem to still be
15974 # some platforms out there with pre-POSIX sigwait()). On Solaris,
15975 # _POSIX_PTHREAD_SEMANTICS affects the result, but we already
15976 # added that to CPPFLAGS.
15977 # The Clang compiler raises a warning for an undeclared identifier that matches
15978 # a compiler builtin function. All extant Clang versions are affected, as of
15979 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15980 # C and Objective C languages, but Clang does report an error under C++ and
15981 # Objective C++.
15983 # Passing -fno-builtin to the compiler would suppress this problem. That
15984 # strategy would have the advantage of being insensitive to stray warnings, but
15985 # it would make tests less realistic.
15986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15987 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15988 if ${ac_cv_c_decl_report+:} false; then :
15989 $as_echo_n "(cached) " >&6
15990 else
15991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15992 /* end confdefs.h. */
15995 main ()
15997 (void) strchr;
15999 return 0;
16001 _ACEOF
16002 if ac_fn_c_try_compile "$LINENO"; then :
16003 if test -s conftest.err; then :
16004 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
16005 # valid AC_CHECK_DECL input. No library function is consistently available
16006 # on freestanding implementations, so test against a dummy declaration.
16007 # Include always-available headers on the off chance that they somehow
16008 # elicit warnings.
16009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16010 /* end confdefs.h. */
16011 #include <float.h>
16012 #include <limits.h>
16013 #include <stdarg.h>
16014 #include <stddef.h>
16015 extern void ac_decl (int, char *);
16017 main ()
16019 #ifdef __cplusplus
16020 (void) ac_decl ((int) 0, (char *) 0);
16021 (void) ac_decl;
16022 #else
16023 (void) ac_decl;
16024 #endif
16027 return 0;
16029 _ACEOF
16030 if ac_fn_c_try_compile "$LINENO"; then :
16031 if test -s conftest.err; then :
16032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16033 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16034 as_fn_error $? "cannot detect from compiler exit status or warnings
16035 See \`config.log' for more details" "$LINENO" 5; }
16036 else
16037 ac_cv_c_decl_report=warning
16039 else
16040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16041 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16042 as_fn_error $? "cannot compile a simple declaration test
16043 See \`config.log' for more details" "$LINENO" 5; }
16045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16046 else
16047 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16048 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16049 as_fn_error $? "compiler does not report undeclared identifiers
16050 See \`config.log' for more details" "$LINENO" 5; }
16052 else
16053 ac_cv_c_decl_report=error
16055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16058 $as_echo "$ac_cv_c_decl_report" >&6; }
16060 case $ac_cv_c_decl_report in
16061 warning) ac_c_decl_warn_flag=yes ;;
16062 *) ac_c_decl_warn_flag= ;;
16063 esac
16065 ac_fn_c_check_decl "$LINENO" "sigwait" "ac_cv_have_decl_sigwait" "#include <signal.h>
16067 if test "x$ac_cv_have_decl_sigwait" = xyes; then :
16068 ac_have_decl=1
16069 else
16070 ac_have_decl=0
16073 cat >>confdefs.h <<_ACEOF
16074 #define HAVE_DECL_SIGWAIT $ac_have_decl
16075 _ACEOF
16077 if test "x$ac_cv_have_decl_sigwait" = xyes; then
16078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX-conforming sigwait declaration" >&5
16079 $as_echo_n "checking for POSIX-conforming sigwait declaration... " >&6; }
16080 if ${pgac_cv_have_posix_decl_sigwait+:} false; then :
16081 $as_echo_n "(cached) " >&6
16082 else
16083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16084 /* end confdefs.h. */
16086 #include <signal.h>
16087 int sigwait(const sigset_t *set, int *sig);
16090 main ()
16094 return 0;
16096 _ACEOF
16097 if ac_fn_c_try_compile "$LINENO"; then :
16098 pgac_cv_have_posix_decl_sigwait=yes
16099 else
16100 pgac_cv_have_posix_decl_sigwait=no
16102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_posix_decl_sigwait" >&5
16105 $as_echo "$pgac_cv_have_posix_decl_sigwait" >&6; }
16107 if test "x$pgac_cv_have_posix_decl_sigwait" = xyes; then
16109 $as_echo "#define HAVE_POSIX_DECL_SIGWAIT 1" >>confdefs.h
16111 else
16112 # On non-Windows, libpq requires POSIX sigwait() for thread safety.
16113 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
16114 as_fn_error $? "POSIX-conforming sigwait is required to enable thread safety." "$LINENO" 5
16118 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
16119 # by calling it, 2009-04-02
16120 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
16121 if test "$PORTNAME" != "solaris"; then :
16123 for ac_func in posix_fadvise
16124 do :
16125 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16126 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16127 cat >>confdefs.h <<_ACEOF
16128 #define HAVE_POSIX_FADVISE 1
16129 _ACEOF
16132 done
16134 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16136 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16137 ac_have_decl=1
16138 else
16139 ac_have_decl=0
16142 cat >>confdefs.h <<_ACEOF
16143 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16144 _ACEOF
16147 fi # fi
16149 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16151 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16152 ac_have_decl=1
16153 else
16154 ac_have_decl=0
16157 cat >>confdefs.h <<_ACEOF
16158 #define HAVE_DECL_FDATASYNC $ac_have_decl
16159 _ACEOF
16161 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16162 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16163 ac_have_decl=1
16164 else
16165 ac_have_decl=0
16168 cat >>confdefs.h <<_ACEOF
16169 #define HAVE_DECL_STRLCAT $ac_have_decl
16170 _ACEOF
16171 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16172 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16173 ac_have_decl=1
16174 else
16175 ac_have_decl=0
16178 cat >>confdefs.h <<_ACEOF
16179 #define HAVE_DECL_STRLCPY $ac_have_decl
16180 _ACEOF
16181 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16182 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16183 ac_have_decl=1
16184 else
16185 ac_have_decl=0
16188 cat >>confdefs.h <<_ACEOF
16189 #define HAVE_DECL_STRNLEN $ac_have_decl
16190 _ACEOF
16193 # We can't use AC_REPLACE_FUNCS to replace these functions, because it
16194 # won't handle deployment target restrictions on macOS
16195 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16197 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16198 ac_have_decl=1
16199 else
16200 ac_have_decl=0
16203 cat >>confdefs.h <<_ACEOF
16204 #define HAVE_DECL_PREADV $ac_have_decl
16205 _ACEOF
16206 if test $ac_have_decl = 1; then :
16208 else
16209 case " $LIBOBJS " in
16210 *" preadv.$ac_objext "* ) ;;
16211 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16213 esac
16217 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16219 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16220 ac_have_decl=1
16221 else
16222 ac_have_decl=0
16225 cat >>confdefs.h <<_ACEOF
16226 #define HAVE_DECL_PWRITEV $ac_have_decl
16227 _ACEOF
16228 if test $ac_have_decl = 1; then :
16230 else
16231 case " $LIBOBJS " in
16232 *" pwritev.$ac_objext "* ) ;;
16233 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16235 esac
16240 # This is probably only present on macOS, but may as well check always
16241 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16243 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16244 ac_have_decl=1
16245 else
16246 ac_have_decl=0
16249 cat >>confdefs.h <<_ACEOF
16250 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16251 _ACEOF
16254 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
16256 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
16257 ac_have_decl=1
16258 else
16259 ac_have_decl=0
16262 cat >>confdefs.h <<_ACEOF
16263 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
16264 _ACEOF
16265 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
16267 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
16268 ac_have_decl=1
16269 else
16270 ac_have_decl=0
16273 cat >>confdefs.h <<_ACEOF
16274 #define HAVE_DECL_RTLD_NOW $ac_have_decl
16275 _ACEOF
16278 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
16279 #include <netinet/in.h>
16281 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
16283 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
16288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
16289 $as_echo_n "checking for PS_STRINGS... " >&6; }
16290 if ${pgac_cv_var_PS_STRINGS+:} false; then :
16291 $as_echo_n "(cached) " >&6
16292 else
16293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16294 /* end confdefs.h. */
16295 #include <machine/vmparam.h>
16296 #include <sys/exec.h>
16299 main ()
16301 PS_STRINGS->ps_nargvstr = 1;
16302 PS_STRINGS->ps_argvstr = "foo";
16304 return 0;
16306 _ACEOF
16307 if ac_fn_c_try_link "$LINENO"; then :
16308 pgac_cv_var_PS_STRINGS=yes
16309 else
16310 pgac_cv_var_PS_STRINGS=no
16312 rm -f core conftest.err conftest.$ac_objext \
16313 conftest$ac_exeext conftest.$ac_ext
16315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16316 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16317 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16319 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16323 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16324 if test "x$ac_cv_func_dlopen" = xyes; then :
16325 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
16327 else
16328 case " $LIBOBJS " in
16329 *" dlopen.$ac_objext "* ) ;;
16330 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
16332 esac
16336 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16337 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16338 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16340 else
16341 case " $LIBOBJS " in
16342 *" explicit_bzero.$ac_objext "* ) ;;
16343 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16345 esac
16349 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
16350 if test "x$ac_cv_func_fls" = xyes; then :
16351 $as_echo "#define HAVE_FLS 1" >>confdefs.h
16353 else
16354 case " $LIBOBJS " in
16355 *" fls.$ac_objext "* ) ;;
16356 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
16358 esac
16362 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16363 if test "x$ac_cv_func_getopt" = xyes; then :
16364 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16366 else
16367 case " $LIBOBJS " in
16368 *" getopt.$ac_objext "* ) ;;
16369 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16371 esac
16375 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16376 if test "x$ac_cv_func_getpeereid" = xyes; then :
16377 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16379 else
16380 case " $LIBOBJS " in
16381 *" getpeereid.$ac_objext "* ) ;;
16382 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16384 esac
16388 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
16389 if test "x$ac_cv_func_getrusage" = xyes; then :
16390 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
16392 else
16393 case " $LIBOBJS " in
16394 *" getrusage.$ac_objext "* ) ;;
16395 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16397 esac
16401 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16402 if test "x$ac_cv_func_inet_aton" = xyes; then :
16403 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16405 else
16406 case " $LIBOBJS " in
16407 *" inet_aton.$ac_objext "* ) ;;
16408 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16410 esac
16414 ac_fn_c_check_func "$LINENO" "link" "ac_cv_func_link"
16415 if test "x$ac_cv_func_link" = xyes; then :
16416 $as_echo "#define HAVE_LINK 1" >>confdefs.h
16418 else
16419 case " $LIBOBJS " in
16420 *" link.$ac_objext "* ) ;;
16421 *) LIBOBJS="$LIBOBJS link.$ac_objext"
16423 esac
16427 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16428 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16429 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16431 else
16432 case " $LIBOBJS " in
16433 *" mkdtemp.$ac_objext "* ) ;;
16434 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16436 esac
16440 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
16441 if test "x$ac_cv_func_pread" = xyes; then :
16442 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
16444 else
16445 case " $LIBOBJS " in
16446 *" pread.$ac_objext "* ) ;;
16447 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
16449 esac
16453 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
16454 if test "x$ac_cv_func_pwrite" = xyes; then :
16455 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
16457 else
16458 case " $LIBOBJS " in
16459 *" pwrite.$ac_objext "* ) ;;
16460 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
16462 esac
16466 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16467 if test "x$ac_cv_func_strlcat" = xyes; then :
16468 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16470 else
16471 case " $LIBOBJS " in
16472 *" strlcat.$ac_objext "* ) ;;
16473 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16475 esac
16479 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16480 if test "x$ac_cv_func_strlcpy" = xyes; then :
16481 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16483 else
16484 case " $LIBOBJS " in
16485 *" strlcpy.$ac_objext "* ) ;;
16486 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16488 esac
16492 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16493 if test "x$ac_cv_func_strnlen" = xyes; then :
16494 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16496 else
16497 case " $LIBOBJS " in
16498 *" strnlen.$ac_objext "* ) ;;
16499 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16501 esac
16505 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
16506 if test "x$ac_cv_func_strtof" = xyes; then :
16507 $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
16509 else
16510 case " $LIBOBJS " in
16511 *" strtof.$ac_objext "* ) ;;
16512 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16514 esac
16520 if test "$enable_thread_safety" = yes; then
16521 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16522 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16523 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16525 else
16526 case " $LIBOBJS " in
16527 *" pthread_barrier_wait.$ac_objext "* ) ;;
16528 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16530 esac
16537 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16538 # Cygwin and (apparently, based on test results) Mingw both
16539 # have a broken strtof(), so substitute the same replacement
16540 # code we use with VS2013. That's not a perfect fix, since
16541 # (unlike with VS2013) it doesn't avoid double-rounding, but
16542 # we have no better options. To get that, though, we have to
16543 # force the file to be compiled despite HAVE_STRTOF.
16544 case " $LIBOBJS " in
16545 *" strtof.$ac_objext "* ) ;;
16546 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16548 esac
16550 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16551 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16554 case $host_os in
16555 # Windows uses a specialised env handler
16556 mingw*)
16558 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16561 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16563 ac_cv_func_setenv=yes
16564 ac_cv_func_unsetenv=yes
16567 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
16568 if test "x$ac_cv_func_setenv" = xyes; then :
16569 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16571 else
16572 case " $LIBOBJS " in
16573 *" setenv.$ac_objext "* ) ;;
16574 *) LIBOBJS="$LIBOBJS setenv.$ac_objext"
16576 esac
16580 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16581 if test "x$ac_cv_func_unsetenv" = xyes; then :
16582 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16584 else
16585 case " $LIBOBJS " in
16586 *" unsetenv.$ac_objext "* ) ;;
16587 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16589 esac
16595 esac
16597 # System's version of getaddrinfo(), if any, may be used only if we found
16598 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16599 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16600 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16601 test "$PORTNAME" != "win32"; then
16602 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16603 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16604 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16606 else
16607 case " $LIBOBJS " in
16608 *" getaddrinfo.$ac_objext "* ) ;;
16609 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16611 esac
16616 else
16617 case " $LIBOBJS " in
16618 *" getaddrinfo.$ac_objext "* ) ;;
16619 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16621 esac
16625 # Similarly, use system's getopt_long() only if system provides struct option.
16626 if test x"$ac_cv_type_struct_option" = xyes ; then
16627 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16628 if test "x$ac_cv_func_getopt_long" = xyes; then :
16629 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16631 else
16632 case " $LIBOBJS " in
16633 *" getopt_long.$ac_objext "* ) ;;
16634 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16636 esac
16641 else
16642 case " $LIBOBJS " in
16643 *" getopt_long.$ac_objext "* ) ;;
16644 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16646 esac
16650 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16651 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16652 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16653 case " $LIBOBJS " in
16654 *" getopt.$ac_objext "* ) ;;
16655 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16657 esac
16661 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16662 # so always use our version on Windows.
16663 if test "$PORTNAME" = "win32"; then
16664 case " $LIBOBJS " in
16665 *" getopt.$ac_objext "* ) ;;
16666 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16668 esac
16670 case " $LIBOBJS " in
16671 *" getopt_long.$ac_objext "* ) ;;
16672 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16674 esac
16678 # Win32 (really MinGW) support
16679 if test "$PORTNAME" = "win32"; then
16680 for ac_func in _configthreadlocale
16681 do :
16682 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16683 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16684 cat >>confdefs.h <<_ACEOF
16685 #define HAVE__CONFIGTHREADLOCALE 1
16686 _ACEOF
16689 done
16691 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16692 if test "x$ac_cv_func_gettimeofday" = xyes; then :
16693 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16695 else
16696 case " $LIBOBJS " in
16697 *" gettimeofday.$ac_objext "* ) ;;
16698 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16700 esac
16705 case " $LIBOBJS " in
16706 *" dirmod.$ac_objext "* ) ;;
16707 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16709 esac
16711 case " $LIBOBJS " in
16712 *" kill.$ac_objext "* ) ;;
16713 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16715 esac
16717 case " $LIBOBJS " in
16718 *" open.$ac_objext "* ) ;;
16719 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16721 esac
16723 case " $LIBOBJS " in
16724 *" system.$ac_objext "* ) ;;
16725 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16727 esac
16729 case " $LIBOBJS " in
16730 *" win32env.$ac_objext "* ) ;;
16731 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16733 esac
16735 case " $LIBOBJS " in
16736 *" win32error.$ac_objext "* ) ;;
16737 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16739 esac
16741 case " $LIBOBJS " in
16742 *" win32ntdll.$ac_objext "* ) ;;
16743 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16745 esac
16747 case " $LIBOBJS " in
16748 *" win32security.$ac_objext "* ) ;;
16749 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16751 esac
16753 case " $LIBOBJS " in
16754 *" win32setlocale.$ac_objext "* ) ;;
16755 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16757 esac
16759 case " $LIBOBJS " in
16760 *" win32stat.$ac_objext "* ) ;;
16761 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16763 esac
16766 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16768 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16769 #define WIN32_LEAN_AND_MEAN
16770 #include <windows.h>
16771 #include <string.h>
16772 #include <dbghelp.h>
16774 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16776 cat >>confdefs.h <<_ACEOF
16777 #define HAVE_MINIDUMP_TYPE 1
16778 _ACEOF
16780 pgac_minidump_type=yes
16781 else
16782 pgac_minidump_type=no
16786 if test x"$pgac_minidump_type" = x"yes" ; then
16787 have_win32_dbghelp=yes
16789 else
16790 have_win32_dbghelp=no
16794 # Cygwin needs only a bit of that
16795 if test "$PORTNAME" = "cygwin"; then
16796 case " $LIBOBJS " in
16797 *" dirmod.$ac_objext "* ) ;;
16798 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16800 esac
16804 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16805 if test "x$ac_cv_func_syslog" = xyes; then :
16806 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16807 if test "x$ac_cv_header_syslog_h" = xyes; then :
16809 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16818 $as_echo_n "checking for opterr... " >&6; }
16819 if ${pgac_cv_var_int_opterr+:} false; then :
16820 $as_echo_n "(cached) " >&6
16821 else
16822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16823 /* end confdefs.h. */
16824 #include <unistd.h>
16826 main ()
16828 extern int opterr; opterr = 1;
16830 return 0;
16832 _ACEOF
16833 if ac_fn_c_try_link "$LINENO"; then :
16834 pgac_cv_var_int_opterr=yes
16835 else
16836 pgac_cv_var_int_opterr=no
16838 rm -f core conftest.err conftest.$ac_objext \
16839 conftest$ac_exeext conftest.$ac_ext
16841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16842 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16843 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16845 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16850 $as_echo_n "checking for optreset... " >&6; }
16851 if ${pgac_cv_var_int_optreset+:} false; then :
16852 $as_echo_n "(cached) " >&6
16853 else
16854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16855 /* end confdefs.h. */
16856 #include <unistd.h>
16858 main ()
16860 extern int optreset; optreset = 1;
16862 return 0;
16864 _ACEOF
16865 if ac_fn_c_try_link "$LINENO"; then :
16866 pgac_cv_var_int_optreset=yes
16867 else
16868 pgac_cv_var_int_optreset=no
16870 rm -f core conftest.err conftest.$ac_objext \
16871 conftest$ac_exeext conftest.$ac_ext
16873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16874 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16875 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16877 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16881 for ac_func in strtoll __strtoll strtoq
16882 do :
16883 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16884 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16885 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16886 cat >>confdefs.h <<_ACEOF
16887 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16888 _ACEOF
16889 break
16891 done
16893 for ac_func in strtoull __strtoull strtouq
16894 do :
16895 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16896 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16897 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16898 cat >>confdefs.h <<_ACEOF
16899 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16900 _ACEOF
16901 break
16903 done
16905 # strto[u]ll may exist but not be declared
16906 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16907 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16908 ac_have_decl=1
16909 else
16910 ac_have_decl=0
16913 cat >>confdefs.h <<_ACEOF
16914 #define HAVE_DECL_STRTOLL $ac_have_decl
16915 _ACEOF
16916 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16917 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16918 ac_have_decl=1
16919 else
16920 ac_have_decl=0
16923 cat >>confdefs.h <<_ACEOF
16924 #define HAVE_DECL_STRTOULL $ac_have_decl
16925 _ACEOF
16928 if test "$with_icu" = yes; then
16929 ac_save_CPPFLAGS=$CPPFLAGS
16930 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16932 # Verify we have ICU's header files
16933 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16934 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16936 else
16937 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16942 CPPFLAGS=$ac_save_CPPFLAGS
16945 if test "$with_llvm" = yes; then
16947 # Check which functionality is present
16948 SAVE_CPPFLAGS="$CPPFLAGS"
16949 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16950 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16952 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16953 ac_have_decl=1
16954 else
16955 ac_have_decl=0
16958 cat >>confdefs.h <<_ACEOF
16959 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16960 _ACEOF
16962 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16964 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16965 ac_have_decl=1
16966 else
16967 ac_have_decl=0
16970 cat >>confdefs.h <<_ACEOF
16971 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16972 _ACEOF
16973 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16975 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16976 ac_have_decl=1
16977 else
16978 ac_have_decl=0
16981 cat >>confdefs.h <<_ACEOF
16982 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16983 _ACEOF
16985 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16987 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16988 ac_have_decl=1
16989 else
16990 ac_have_decl=0
16993 cat >>confdefs.h <<_ACEOF
16994 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16995 _ACEOF
16996 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16998 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16999 ac_have_decl=1
17000 else
17001 ac_have_decl=0
17004 cat >>confdefs.h <<_ACEOF
17005 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
17006 _ACEOF
17008 CPPFLAGS="$SAVE_CPPFLAGS"
17012 # Lastly, restore full LIBS list and check for readline/libedit symbols
17013 LIBS="$LIBS_including_readline"
17015 if test "$with_readline" = yes; then
17016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
17017 $as_echo_n "checking for rl_completion_append_character... " >&6; }
17018 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
17019 $as_echo_n "(cached) " >&6
17020 else
17021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17022 /* end confdefs.h. */
17023 #include <stdio.h>
17024 #if defined(HAVE_READLINE_READLINE_H)
17025 #include <readline/readline.h>
17026 #elif defined(HAVE_EDITLINE_READLINE_H)
17027 #include <editline/readline.h>
17028 #elif defined(HAVE_READLINE_H)
17029 #include <readline.h>
17030 #endif
17033 main ()
17035 rl_completion_append_character = 'x';
17037 return 0;
17039 _ACEOF
17040 if ac_fn_c_try_link "$LINENO"; then :
17041 pgac_cv_var_rl_completion_append_character=yes
17042 else
17043 pgac_cv_var_rl_completion_append_character=no
17045 rm -f core conftest.err conftest.$ac_objext \
17046 conftest$ac_exeext conftest.$ac_ext
17048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
17049 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
17050 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
17052 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
17055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
17056 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
17057 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
17058 $as_echo_n "(cached) " >&6
17059 else
17060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17061 /* end confdefs.h. */
17062 #include <stdio.h>
17063 #if defined(HAVE_READLINE_READLINE_H)
17064 #include <readline/readline.h>
17065 #elif defined(HAVE_EDITLINE_READLINE_H)
17066 #include <editline/readline.h>
17067 #elif defined(HAVE_READLINE_H)
17068 #include <readline.h>
17069 #endif
17072 main ()
17074 rl_completion_suppress_quote = 1;
17076 return 0;
17078 _ACEOF
17079 if ac_fn_c_try_link "$LINENO"; then :
17080 pgac_cv_var_rl_completion_suppress_quote=yes
17081 else
17082 pgac_cv_var_rl_completion_suppress_quote=no
17084 rm -f core conftest.err conftest.$ac_objext \
17085 conftest$ac_exeext conftest.$ac_ext
17087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
17088 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
17089 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
17091 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
17094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
17095 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
17096 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
17097 $as_echo_n "(cached) " >&6
17098 else
17099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17100 /* end confdefs.h. */
17101 #include <stdio.h>
17102 #if defined(HAVE_READLINE_READLINE_H)
17103 #include <readline/readline.h>
17104 #elif defined(HAVE_EDITLINE_READLINE_H)
17105 #include <editline/readline.h>
17106 #elif defined(HAVE_READLINE_H)
17107 #include <readline.h>
17108 #endif
17111 main ()
17113 rl_filename_quote_characters = "x";
17115 return 0;
17117 _ACEOF
17118 if ac_fn_c_try_link "$LINENO"; then :
17119 pgac_cv_var_rl_filename_quote_characters=yes
17120 else
17121 pgac_cv_var_rl_filename_quote_characters=no
17123 rm -f core conftest.err conftest.$ac_objext \
17124 conftest$ac_exeext conftest.$ac_ext
17126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
17127 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
17128 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
17130 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
17133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
17134 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
17135 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
17136 $as_echo_n "(cached) " >&6
17137 else
17138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17139 /* end confdefs.h. */
17140 #include <stdio.h>
17141 #if defined(HAVE_READLINE_READLINE_H)
17142 #include <readline/readline.h>
17143 #elif defined(HAVE_EDITLINE_READLINE_H)
17144 #include <editline/readline.h>
17145 #elif defined(HAVE_READLINE_H)
17146 #include <readline.h>
17147 #endif
17150 main ()
17152 rl_filename_quoting_function = 0;
17154 return 0;
17156 _ACEOF
17157 if ac_fn_c_try_link "$LINENO"; then :
17158 pgac_cv_var_rl_filename_quoting_function=yes
17159 else
17160 pgac_cv_var_rl_filename_quoting_function=no
17162 rm -f core conftest.err conftest.$ac_objext \
17163 conftest$ac_exeext conftest.$ac_ext
17165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
17166 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
17167 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
17169 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
17173 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
17174 do :
17175 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17176 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17177 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17178 cat >>confdefs.h <<_ACEOF
17179 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17180 _ACEOF
17183 done
17188 # This test makes sure that run tests work at all. Sometimes a shared
17189 # library is found by the linker, but the runtime linker can't find it.
17190 # This check should come after all modifications of compiler or linker
17191 # variables, and before any other run tests.
17192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
17193 $as_echo_n "checking test program... " >&6; }
17194 if test "$cross_compiling" = yes; then :
17195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
17196 $as_echo "cross-compiling" >&6; }
17197 else
17198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17199 /* end confdefs.h. */
17200 int main() { return 0; }
17201 _ACEOF
17202 if ac_fn_c_try_run "$LINENO"; then :
17203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17204 $as_echo "ok" >&6; }
17205 else
17206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17207 $as_echo "failed" >&6; }
17208 as_fn_error $? "
17209 Could not execute a simple test program. This may be a problem
17210 related to locating shared libraries. Check the file 'config.log'
17211 for the exact reason." "$LINENO" 5
17213 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17214 conftest.$ac_objext conftest.beam conftest.$ac_ext
17218 # --------------------
17219 # Run tests below here
17220 # --------------------
17223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
17224 $as_echo_n "checking whether long int is 64 bits... " >&6; }
17225 if ${pgac_cv_type_long_int_64+:} false; then :
17226 $as_echo_n "(cached) " >&6
17227 else
17228 if test "$cross_compiling" = yes; then :
17229 # If cross-compiling, check the size reported by the compiler and
17230 # trust that the arithmetic works.
17231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17232 /* end confdefs.h. */
17235 main ()
17237 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17238 test_array [0] = 0;
17239 return test_array [0];
17242 return 0;
17244 _ACEOF
17245 if ac_fn_c_try_compile "$LINENO"; then :
17246 pgac_cv_type_long_int_64=yes
17247 else
17248 pgac_cv_type_long_int_64=no
17250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17251 else
17252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17253 /* end confdefs.h. */
17254 typedef long int ac_int64;
17257 * These are globals to discourage the compiler from folding all the
17258 * arithmetic tests down to compile-time constants.
17260 ac_int64 a = 20000001;
17261 ac_int64 b = 40000005;
17263 int does_int64_work()
17265 ac_int64 c,d;
17267 if (sizeof(ac_int64) != 8)
17268 return 0; /* definitely not the right size */
17270 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17271 c = a * b;
17272 d = (c + b) / b;
17273 if (d != a+1)
17274 return 0;
17275 return 1;
17279 main() {
17280 return (! does_int64_work());
17282 _ACEOF
17283 if ac_fn_c_try_run "$LINENO"; then :
17284 pgac_cv_type_long_int_64=yes
17285 else
17286 pgac_cv_type_long_int_64=no
17288 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17289 conftest.$ac_objext conftest.beam conftest.$ac_ext
17293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
17294 $as_echo "$pgac_cv_type_long_int_64" >&6; }
17296 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17297 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17299 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
17304 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
17305 pg_int64_type="long int"
17306 else
17307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
17308 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
17309 if ${pgac_cv_type_long_long_int_64+:} false; then :
17310 $as_echo_n "(cached) " >&6
17311 else
17312 if test "$cross_compiling" = yes; then :
17313 # If cross-compiling, check the size reported by the compiler and
17314 # trust that the arithmetic works.
17315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17316 /* end confdefs.h. */
17319 main ()
17321 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17322 test_array [0] = 0;
17323 return test_array [0];
17326 return 0;
17328 _ACEOF
17329 if ac_fn_c_try_compile "$LINENO"; then :
17330 pgac_cv_type_long_long_int_64=yes
17331 else
17332 pgac_cv_type_long_long_int_64=no
17334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17335 else
17336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17337 /* end confdefs.h. */
17338 typedef long long int ac_int64;
17341 * These are globals to discourage the compiler from folding all the
17342 * arithmetic tests down to compile-time constants.
17344 ac_int64 a = 20000001;
17345 ac_int64 b = 40000005;
17347 int does_int64_work()
17349 ac_int64 c,d;
17351 if (sizeof(ac_int64) != 8)
17352 return 0; /* definitely not the right size */
17354 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17355 c = a * b;
17356 d = (c + b) / b;
17357 if (d != a+1)
17358 return 0;
17359 return 1;
17363 main() {
17364 return (! does_int64_work());
17366 _ACEOF
17367 if ac_fn_c_try_run "$LINENO"; then :
17368 pgac_cv_type_long_long_int_64=yes
17369 else
17370 pgac_cv_type_long_long_int_64=no
17372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17373 conftest.$ac_objext conftest.beam conftest.$ac_ext
17377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17378 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17380 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17381 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17383 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17387 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17388 pg_int64_type="long long int"
17389 else
17390 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17395 cat >>confdefs.h <<_ACEOF
17396 #define PG_INT64_TYPE $pg_int64_type
17397 _ACEOF
17400 # Select the printf length modifier that goes with that, too.
17401 if test x"$pg_int64_type" = x"long long int" ; then
17402 INT64_MODIFIER='"ll"'
17403 else
17404 INT64_MODIFIER='"l"'
17408 cat >>confdefs.h <<_ACEOF
17409 #define INT64_MODIFIER $INT64_MODIFIER
17410 _ACEOF
17413 # has to be down here, rather than with the other builtins, because
17414 # the test uses PG_INT64_TYPE.
17415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17416 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17417 if ${pgac_cv__builtin_op_overflow+:} false; then :
17418 $as_echo_n "(cached) " >&6
17419 else
17420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17421 /* end confdefs.h. */
17423 PG_INT64_TYPE a = 1;
17424 PG_INT64_TYPE b = 1;
17425 PG_INT64_TYPE result;
17426 int oflo;
17429 main ()
17431 oflo = __builtin_mul_overflow(a, b, &result);
17433 return 0;
17435 _ACEOF
17436 if ac_fn_c_try_link "$LINENO"; then :
17437 pgac_cv__builtin_op_overflow=yes
17438 else
17439 pgac_cv__builtin_op_overflow=no
17441 rm -f core conftest.err conftest.$ac_objext \
17442 conftest$ac_exeext conftest.$ac_ext
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17445 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17446 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17448 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17452 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17453 # The cast to long int works around a bug in the HP C Compiler
17454 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17455 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17456 # This bug is HP SR number 8606223364.
17457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17458 $as_echo_n "checking size of void *... " >&6; }
17459 if ${ac_cv_sizeof_void_p+:} false; then :
17460 $as_echo_n "(cached) " >&6
17461 else
17462 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17464 else
17465 if test "$ac_cv_type_void_p" = yes; then
17466 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17467 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17468 as_fn_error 77 "cannot compute sizeof (void *)
17469 See \`config.log' for more details" "$LINENO" 5; }
17470 else
17471 ac_cv_sizeof_void_p=0
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17477 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17481 cat >>confdefs.h <<_ACEOF
17482 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17483 _ACEOF
17486 # The cast to long int works around a bug in the HP C Compiler
17487 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17488 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17489 # This bug is HP SR number 8606223364.
17490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17491 $as_echo_n "checking size of size_t... " >&6; }
17492 if ${ac_cv_sizeof_size_t+:} false; then :
17493 $as_echo_n "(cached) " >&6
17494 else
17495 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17497 else
17498 if test "$ac_cv_type_size_t" = yes; then
17499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17500 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17501 as_fn_error 77 "cannot compute sizeof (size_t)
17502 See \`config.log' for more details" "$LINENO" 5; }
17503 else
17504 ac_cv_sizeof_size_t=0
17509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17510 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17514 cat >>confdefs.h <<_ACEOF
17515 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17516 _ACEOF
17519 # The cast to long int works around a bug in the HP C Compiler
17520 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17521 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17522 # This bug is HP SR number 8606223364.
17523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17524 $as_echo_n "checking size of long... " >&6; }
17525 if ${ac_cv_sizeof_long+:} false; then :
17526 $as_echo_n "(cached) " >&6
17527 else
17528 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17530 else
17531 if test "$ac_cv_type_long" = yes; then
17532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17533 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17534 as_fn_error 77 "cannot compute sizeof (long)
17535 See \`config.log' for more details" "$LINENO" 5; }
17536 else
17537 ac_cv_sizeof_long=0
17542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17543 $as_echo "$ac_cv_sizeof_long" >&6; }
17547 cat >>confdefs.h <<_ACEOF
17548 #define SIZEOF_LONG $ac_cv_sizeof_long
17549 _ACEOF
17553 # Determine memory alignment requirements for the basic C data types.
17555 # The cast to long int works around a bug in the HP C Compiler,
17556 # see AC_CHECK_SIZEOF for more information.
17557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17558 $as_echo_n "checking alignment of short... " >&6; }
17559 if ${ac_cv_alignof_short+:} false; then :
17560 $as_echo_n "(cached) " >&6
17561 else
17562 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17563 #ifndef offsetof
17564 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17565 #endif
17566 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17568 else
17569 if test "$ac_cv_type_short" = yes; then
17570 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17571 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17572 as_fn_error 77 "cannot compute alignment of short
17573 See \`config.log' for more details" "$LINENO" 5; }
17574 else
17575 ac_cv_alignof_short=0
17580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17581 $as_echo "$ac_cv_alignof_short" >&6; }
17585 cat >>confdefs.h <<_ACEOF
17586 #define ALIGNOF_SHORT $ac_cv_alignof_short
17587 _ACEOF
17590 # The cast to long int works around a bug in the HP C Compiler,
17591 # see AC_CHECK_SIZEOF for more information.
17592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17593 $as_echo_n "checking alignment of int... " >&6; }
17594 if ${ac_cv_alignof_int+:} false; then :
17595 $as_echo_n "(cached) " >&6
17596 else
17597 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17598 #ifndef offsetof
17599 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17600 #endif
17601 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17603 else
17604 if test "$ac_cv_type_int" = yes; then
17605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17606 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17607 as_fn_error 77 "cannot compute alignment of int
17608 See \`config.log' for more details" "$LINENO" 5; }
17609 else
17610 ac_cv_alignof_int=0
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17616 $as_echo "$ac_cv_alignof_int" >&6; }
17620 cat >>confdefs.h <<_ACEOF
17621 #define ALIGNOF_INT $ac_cv_alignof_int
17622 _ACEOF
17625 # The cast to long int works around a bug in the HP C Compiler,
17626 # see AC_CHECK_SIZEOF for more information.
17627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17628 $as_echo_n "checking alignment of long... " >&6; }
17629 if ${ac_cv_alignof_long+:} false; then :
17630 $as_echo_n "(cached) " >&6
17631 else
17632 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17633 #ifndef offsetof
17634 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17635 #endif
17636 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17638 else
17639 if test "$ac_cv_type_long" = yes; then
17640 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17641 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17642 as_fn_error 77 "cannot compute alignment of long
17643 See \`config.log' for more details" "$LINENO" 5; }
17644 else
17645 ac_cv_alignof_long=0
17650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17651 $as_echo "$ac_cv_alignof_long" >&6; }
17655 cat >>confdefs.h <<_ACEOF
17656 #define ALIGNOF_LONG $ac_cv_alignof_long
17657 _ACEOF
17660 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17661 # The cast to long int works around a bug in the HP C Compiler,
17662 # see AC_CHECK_SIZEOF for more information.
17663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17664 $as_echo_n "checking alignment of long long int... " >&6; }
17665 if ${ac_cv_alignof_long_long_int+:} false; then :
17666 $as_echo_n "(cached) " >&6
17667 else
17668 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17669 #ifndef offsetof
17670 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17671 #endif
17672 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17674 else
17675 if test "$ac_cv_type_long_long_int" = yes; then
17676 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17677 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17678 as_fn_error 77 "cannot compute alignment of long long int
17679 See \`config.log' for more details" "$LINENO" 5; }
17680 else
17681 ac_cv_alignof_long_long_int=0
17686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17687 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17691 cat >>confdefs.h <<_ACEOF
17692 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17693 _ACEOF
17697 # The cast to long int works around a bug in the HP C Compiler,
17698 # see AC_CHECK_SIZEOF for more information.
17699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17700 $as_echo_n "checking alignment of double... " >&6; }
17701 if ${ac_cv_alignof_double+:} false; then :
17702 $as_echo_n "(cached) " >&6
17703 else
17704 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17705 #ifndef offsetof
17706 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17707 #endif
17708 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17710 else
17711 if test "$ac_cv_type_double" = yes; then
17712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17713 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17714 as_fn_error 77 "cannot compute alignment of double
17715 See \`config.log' for more details" "$LINENO" 5; }
17716 else
17717 ac_cv_alignof_double=0
17722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17723 $as_echo "$ac_cv_alignof_double" >&6; }
17727 cat >>confdefs.h <<_ACEOF
17728 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17729 _ACEOF
17733 # Compute maximum alignment of any basic type.
17734 # We assume long's alignment is at least as strong as char, short, or int;
17735 # but we must check long long (if it is being used for int64) and double.
17736 # Note that we intentionally do not consider any types wider than 64 bits,
17737 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17738 # for disk and memory space.
17740 MAX_ALIGNOF=$ac_cv_alignof_long
17741 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17742 MAX_ALIGNOF=$ac_cv_alignof_double
17744 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17745 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17748 cat >>confdefs.h <<_ACEOF
17749 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17750 _ACEOF
17754 # Some platforms predefine the types int8, int16, etc. Only check
17755 # a (hopefully) representative subset.
17756 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17758 if test "x$ac_cv_type_int8" = xyes; then :
17760 cat >>confdefs.h <<_ACEOF
17761 #define HAVE_INT8 1
17762 _ACEOF
17766 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17768 if test "x$ac_cv_type_uint8" = xyes; then :
17770 cat >>confdefs.h <<_ACEOF
17771 #define HAVE_UINT8 1
17772 _ACEOF
17776 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17778 if test "x$ac_cv_type_int64" = xyes; then :
17780 cat >>confdefs.h <<_ACEOF
17781 #define HAVE_INT64 1
17782 _ACEOF
17786 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17788 if test "x$ac_cv_type_uint64" = xyes; then :
17790 cat >>confdefs.h <<_ACEOF
17791 #define HAVE_UINT64 1
17792 _ACEOF
17798 # Some compilers offer a 128-bit integer scalar type.
17799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17800 $as_echo_n "checking for __int128... " >&6; }
17801 if ${pgac_cv__128bit_int+:} false; then :
17802 $as_echo_n "(cached) " >&6
17803 else
17804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17805 /* end confdefs.h. */
17808 * We don't actually run this test, just link it to verify that any support
17809 * functions needed for __int128 are present.
17811 * These are globals to discourage the compiler from folding all the
17812 * arithmetic tests down to compile-time constants. We do not have
17813 * convenient support for 128bit literals at this point...
17815 __int128 a = 48828125;
17816 __int128 b = 97656250;
17819 main ()
17822 __int128 c,d;
17823 a = (a << 12) + 1; /* 200000000001 */
17824 b = (b << 12) + 5; /* 400000000005 */
17825 /* try the most relevant arithmetic ops */
17826 c = a * b;
17827 d = (c + b) / b;
17828 /* must use the results, else compiler may optimize arithmetic away */
17829 if (d != a+1)
17830 return 1;
17833 return 0;
17835 _ACEOF
17836 if ac_fn_c_try_link "$LINENO"; then :
17837 pgac_cv__128bit_int=yes
17838 else
17839 pgac_cv__128bit_int=no
17841 rm -f core conftest.err conftest.$ac_objext \
17842 conftest$ac_exeext conftest.$ac_ext
17844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17845 $as_echo "$pgac_cv__128bit_int" >&6; }
17846 if test x"$pgac_cv__128bit_int" = xyes ; then
17847 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17848 # If not cross-compiling, we can test for bugs and disable use of __int128
17849 # with buggy compilers. If cross-compiling, hope for the best.
17850 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17852 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17853 if ${pgac_cv__128bit_int_bug+:} false; then :
17854 $as_echo_n "(cached) " >&6
17855 else
17856 if test "$cross_compiling" = yes; then :
17857 pgac_cv__128bit_int_bug="assuming ok"
17858 else
17859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17860 /* end confdefs.h. */
17862 /* This must match the corresponding code in c.h: */
17863 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17864 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17865 #endif
17866 typedef __int128 int128a
17867 #if defined(pg_attribute_aligned)
17868 pg_attribute_aligned(8)
17869 #endif
17871 int128a holder;
17872 void pass_by_val(void *buffer, int128a par) { holder = par; }
17875 main ()
17878 long int i64 = 97656225L << 12;
17879 int128a q;
17880 pass_by_val(main, (int128a) i64);
17881 q = (int128a) i64;
17882 if (q != holder)
17883 return 1;
17886 return 0;
17888 _ACEOF
17889 if ac_fn_c_try_run "$LINENO"; then :
17890 pgac_cv__128bit_int_bug=ok
17891 else
17892 pgac_cv__128bit_int_bug=broken
17894 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17895 conftest.$ac_objext conftest.beam conftest.$ac_ext
17899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17900 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17901 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17903 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17905 # The cast to long int works around a bug in the HP C Compiler,
17906 # see AC_CHECK_SIZEOF for more information.
17907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17908 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17909 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17910 $as_echo_n "(cached) " >&6
17911 else
17912 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17913 #ifndef offsetof
17914 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17915 #endif
17916 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17918 else
17919 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17920 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17921 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17922 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17923 See \`config.log' for more details" "$LINENO" 5; }
17924 else
17925 ac_cv_alignof_PG_INT128_TYPE=0
17930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17931 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17935 cat >>confdefs.h <<_ACEOF
17936 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17937 _ACEOF
17943 # Check for various atomic operations now that we have checked how to declare
17944 # 64bit integers.
17945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17946 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17947 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17948 $as_echo_n "(cached) " >&6
17949 else
17950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17951 /* end confdefs.h. */
17954 main ()
17956 char lock = 0;
17957 __sync_lock_test_and_set(&lock, 1);
17958 __sync_lock_release(&lock);
17960 return 0;
17962 _ACEOF
17963 if ac_fn_c_try_link "$LINENO"; then :
17964 pgac_cv_gcc_sync_char_tas="yes"
17965 else
17966 pgac_cv_gcc_sync_char_tas="no"
17968 rm -f core conftest.err conftest.$ac_objext \
17969 conftest$ac_exeext conftest.$ac_ext
17971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17972 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17973 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17975 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17979 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17980 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17981 $as_echo_n "(cached) " >&6
17982 else
17983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17984 /* end confdefs.h. */
17987 main ()
17989 int lock = 0;
17990 __sync_lock_test_and_set(&lock, 1);
17991 __sync_lock_release(&lock);
17993 return 0;
17995 _ACEOF
17996 if ac_fn_c_try_link "$LINENO"; then :
17997 pgac_cv_gcc_sync_int32_tas="yes"
17998 else
17999 pgac_cv_gcc_sync_int32_tas="no"
18001 rm -f core conftest.err conftest.$ac_objext \
18002 conftest$ac_exeext conftest.$ac_ext
18004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
18005 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
18006 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
18008 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
18011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
18012 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
18013 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
18014 $as_echo_n "(cached) " >&6
18015 else
18016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18017 /* end confdefs.h. */
18020 main ()
18022 int val = 0;
18023 __sync_val_compare_and_swap(&val, 0, 37);
18025 return 0;
18027 _ACEOF
18028 if ac_fn_c_try_link "$LINENO"; then :
18029 pgac_cv_gcc_sync_int32_cas="yes"
18030 else
18031 pgac_cv_gcc_sync_int32_cas="no"
18033 rm -f core conftest.err conftest.$ac_objext \
18034 conftest$ac_exeext conftest.$ac_ext
18036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
18037 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
18038 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
18040 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
18043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
18044 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
18045 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
18046 $as_echo_n "(cached) " >&6
18047 else
18048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18049 /* end confdefs.h. */
18052 main ()
18054 PG_INT64_TYPE lock = 0;
18055 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
18057 return 0;
18059 _ACEOF
18060 if ac_fn_c_try_link "$LINENO"; then :
18061 pgac_cv_gcc_sync_int64_cas="yes"
18062 else
18063 pgac_cv_gcc_sync_int64_cas="no"
18065 rm -f core conftest.err conftest.$ac_objext \
18066 conftest$ac_exeext conftest.$ac_ext
18068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
18069 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
18070 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
18072 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
18075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
18076 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
18077 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
18078 $as_echo_n "(cached) " >&6
18079 else
18080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18081 /* end confdefs.h. */
18084 main ()
18086 int val = 0;
18087 int expect = 0;
18088 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
18090 return 0;
18092 _ACEOF
18093 if ac_fn_c_try_link "$LINENO"; then :
18094 pgac_cv_gcc_atomic_int32_cas="yes"
18095 else
18096 pgac_cv_gcc_atomic_int32_cas="no"
18098 rm -f core conftest.err conftest.$ac_objext \
18099 conftest$ac_exeext conftest.$ac_ext
18101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
18102 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
18103 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
18105 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
18108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
18109 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
18110 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
18111 $as_echo_n "(cached) " >&6
18112 else
18113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18114 /* end confdefs.h. */
18117 main ()
18119 PG_INT64_TYPE val = 0;
18120 PG_INT64_TYPE expect = 0;
18121 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
18123 return 0;
18125 _ACEOF
18126 if ac_fn_c_try_link "$LINENO"; then :
18127 pgac_cv_gcc_atomic_int64_cas="yes"
18128 else
18129 pgac_cv_gcc_atomic_int64_cas="no"
18131 rm -f core conftest.err conftest.$ac_objext \
18132 conftest$ac_exeext conftest.$ac_ext
18134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
18135 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
18136 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
18138 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
18143 # Check for x86 cpuid instruction
18144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
18145 $as_echo_n "checking for __get_cpuid... " >&6; }
18146 if ${pgac_cv__get_cpuid+:} false; then :
18147 $as_echo_n "(cached) " >&6
18148 else
18149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18150 /* end confdefs.h. */
18151 #include <cpuid.h>
18153 main ()
18155 unsigned int exx[4] = {0, 0, 0, 0};
18156 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
18159 return 0;
18161 _ACEOF
18162 if ac_fn_c_try_link "$LINENO"; then :
18163 pgac_cv__get_cpuid="yes"
18164 else
18165 pgac_cv__get_cpuid="no"
18167 rm -f core conftest.err conftest.$ac_objext \
18168 conftest$ac_exeext conftest.$ac_ext
18170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
18171 $as_echo "$pgac_cv__get_cpuid" >&6; }
18172 if test x"$pgac_cv__get_cpuid" = x"yes"; then
18174 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
18178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
18179 $as_echo_n "checking for __cpuid... " >&6; }
18180 if ${pgac_cv__cpuid+:} false; then :
18181 $as_echo_n "(cached) " >&6
18182 else
18183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18184 /* end confdefs.h. */
18185 #include <intrin.h>
18187 main ()
18189 unsigned int exx[4] = {0, 0, 0, 0};
18190 __get_cpuid(exx[0], 1);
18193 return 0;
18195 _ACEOF
18196 if ac_fn_c_try_link "$LINENO"; then :
18197 pgac_cv__cpuid="yes"
18198 else
18199 pgac_cv__cpuid="no"
18201 rm -f core conftest.err conftest.$ac_objext \
18202 conftest$ac_exeext conftest.$ac_ext
18204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
18205 $as_echo "$pgac_cv__cpuid" >&6; }
18206 if test x"$pgac_cv__cpuid" = x"yes"; then
18208 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
18212 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
18214 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
18215 # with the default compiler flags. If not, check if adding the -msse4.2
18216 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
18217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
18218 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
18219 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
18220 $as_echo_n "(cached) " >&6
18221 else
18222 pgac_save_CFLAGS=$CFLAGS
18223 CFLAGS="$pgac_save_CFLAGS "
18224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18225 /* end confdefs.h. */
18226 #include <nmmintrin.h>
18228 main ()
18230 unsigned int crc = 0;
18231 crc = _mm_crc32_u8(crc, 0);
18232 crc = _mm_crc32_u32(crc, 0);
18233 /* return computed value, to prevent the above being optimized away */
18234 return crc == 0;
18236 return 0;
18238 _ACEOF
18239 if ac_fn_c_try_link "$LINENO"; then :
18240 pgac_cv_sse42_crc32_intrinsics_=yes
18241 else
18242 pgac_cv_sse42_crc32_intrinsics_=no
18244 rm -f core conftest.err conftest.$ac_objext \
18245 conftest$ac_exeext conftest.$ac_ext
18246 CFLAGS="$pgac_save_CFLAGS"
18248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
18249 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
18250 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
18251 CFLAGS_SSE42=""
18252 pgac_sse42_crc32_intrinsics=yes
18255 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
18256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
18257 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
18258 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
18259 $as_echo_n "(cached) " >&6
18260 else
18261 pgac_save_CFLAGS=$CFLAGS
18262 CFLAGS="$pgac_save_CFLAGS -msse4.2"
18263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18264 /* end confdefs.h. */
18265 #include <nmmintrin.h>
18267 main ()
18269 unsigned int crc = 0;
18270 crc = _mm_crc32_u8(crc, 0);
18271 crc = _mm_crc32_u32(crc, 0);
18272 /* return computed value, to prevent the above being optimized away */
18273 return crc == 0;
18275 return 0;
18277 _ACEOF
18278 if ac_fn_c_try_link "$LINENO"; then :
18279 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
18280 else
18281 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
18283 rm -f core conftest.err conftest.$ac_objext \
18284 conftest$ac_exeext conftest.$ac_ext
18285 CFLAGS="$pgac_save_CFLAGS"
18287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
18288 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
18289 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
18290 CFLAGS_SSE42="-msse4.2"
18291 pgac_sse42_crc32_intrinsics=yes
18297 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18298 # define __SSE4_2__ in that case.
18299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18300 /* end confdefs.h. */
18303 main ()
18306 #ifndef __SSE4_2__
18307 #error __SSE4_2__ not defined
18308 #endif
18311 return 0;
18313 _ACEOF
18314 if ac_fn_c_try_compile "$LINENO"; then :
18315 SSE4_2_TARGETED=1
18317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18319 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18321 # First check if __crc32c* intrinsics can be used with the default compiler
18322 # flags. If not, check if adding -march=armv8-a+crc flag helps.
18323 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
18324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18325 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18326 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18327 $as_echo_n "(cached) " >&6
18328 else
18329 pgac_save_CFLAGS=$CFLAGS
18330 CFLAGS="$pgac_save_CFLAGS "
18331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18332 /* end confdefs.h. */
18333 #include <arm_acle.h>
18335 main ()
18337 unsigned int crc = 0;
18338 crc = __crc32cb(crc, 0);
18339 crc = __crc32ch(crc, 0);
18340 crc = __crc32cw(crc, 0);
18341 crc = __crc32cd(crc, 0);
18342 /* return computed value, to prevent the above being optimized away */
18343 return crc == 0;
18345 return 0;
18347 _ACEOF
18348 if ac_fn_c_try_link "$LINENO"; then :
18349 pgac_cv_armv8_crc32c_intrinsics_=yes
18350 else
18351 pgac_cv_armv8_crc32c_intrinsics_=no
18353 rm -f core conftest.err conftest.$ac_objext \
18354 conftest$ac_exeext conftest.$ac_ext
18355 CFLAGS="$pgac_save_CFLAGS"
18357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18358 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18359 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18360 CFLAGS_ARMV8_CRC32C=""
18361 pgac_armv8_crc32c_intrinsics=yes
18364 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18366 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18367 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18368 $as_echo_n "(cached) " >&6
18369 else
18370 pgac_save_CFLAGS=$CFLAGS
18371 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18373 /* end confdefs.h. */
18374 #include <arm_acle.h>
18376 main ()
18378 unsigned int crc = 0;
18379 crc = __crc32cb(crc, 0);
18380 crc = __crc32ch(crc, 0);
18381 crc = __crc32cw(crc, 0);
18382 crc = __crc32cd(crc, 0);
18383 /* return computed value, to prevent the above being optimized away */
18384 return crc == 0;
18386 return 0;
18388 _ACEOF
18389 if ac_fn_c_try_link "$LINENO"; then :
18390 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18391 else
18392 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18394 rm -f core conftest.err conftest.$ac_objext \
18395 conftest$ac_exeext conftest.$ac_ext
18396 CFLAGS="$pgac_save_CFLAGS"
18398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18399 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18400 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18401 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18402 pgac_armv8_crc32c_intrinsics=yes
18408 # Select CRC-32C implementation.
18410 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18411 # use the special CRC instructions for calculating CRC-32C. If we're not
18412 # targeting such a processor, but we can nevertheless produce code that uses
18413 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18414 # implementations and select which one to use at runtime, depending on whether
18415 # SSE 4.2 is supported by the processor we're running on.
18417 # Similarly, if we are targeting an ARM processor that has the CRC
18418 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18419 # we're not targeting such a processor, but can nevertheless produce code that
18420 # uses the CRC instructions, compile both, and select at runtime.
18422 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18423 # in the template or configure command line.
18424 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
18425 # Use Intel SSE 4.2 if available.
18426 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18427 USE_SSE42_CRC32C=1
18428 else
18429 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18430 # the runtime check.
18431 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
18432 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18433 else
18434 # Use ARM CRC Extension if available.
18435 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18436 USE_ARMV8_CRC32C=1
18437 else
18438 # ARM CRC Extension, with runtime check?
18439 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18440 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18441 else
18442 # fall back to slicing-by-8 algorithm, which doesn't require any
18443 # special CPU support.
18444 USE_SLICING_BY_8_CRC32C=1
18451 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18453 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18454 if test x"$USE_SSE42_CRC32C" = x"1"; then
18456 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18458 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18460 $as_echo "SSE 4.2" >&6; }
18461 else
18462 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18464 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18466 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18468 $as_echo "SSE 4.2 with runtime check" >&6; }
18469 else
18470 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18472 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18474 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18476 $as_echo "ARMv8 CRC instructions" >&6; }
18477 else
18478 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18480 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18482 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18484 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18485 else
18487 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18489 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18491 $as_echo "slicing-by-8" >&6; }
18499 # Select semaphore implementation type.
18500 if test "$PORTNAME" != "win32"; then
18501 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18502 # Need sem_open for this
18503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18504 $as_echo_n "checking for library containing sem_open... " >&6; }
18505 if ${ac_cv_search_sem_open+:} false; then :
18506 $as_echo_n "(cached) " >&6
18507 else
18508 ac_func_search_save_LIBS=$LIBS
18509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18510 /* end confdefs.h. */
18512 /* Override any GCC internal prototype to avoid an error.
18513 Use char because int might match the return type of a GCC
18514 builtin and then its argument prototype would still apply. */
18515 #ifdef __cplusplus
18516 extern "C"
18517 #endif
18518 char sem_open ();
18520 main ()
18522 return sem_open ();
18524 return 0;
18526 _ACEOF
18527 for ac_lib in '' rt pthread; do
18528 if test -z "$ac_lib"; then
18529 ac_res="none required"
18530 else
18531 ac_res=-l$ac_lib
18532 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18534 if ac_fn_c_try_link "$LINENO"; then :
18535 ac_cv_search_sem_open=$ac_res
18537 rm -f core conftest.err conftest.$ac_objext \
18538 conftest$ac_exeext
18539 if ${ac_cv_search_sem_open+:} false; then :
18540 break
18542 done
18543 if ${ac_cv_search_sem_open+:} false; then :
18545 else
18546 ac_cv_search_sem_open=no
18548 rm conftest.$ac_ext
18549 LIBS=$ac_func_search_save_LIBS
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18552 $as_echo "$ac_cv_search_sem_open" >&6; }
18553 ac_res=$ac_cv_search_sem_open
18554 if test "$ac_res" != no; then :
18555 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18556 USE_NAMED_POSIX_SEMAPHORES=1
18560 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18561 # Need sem_init for this
18562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18563 $as_echo_n "checking for library containing sem_init... " >&6; }
18564 if ${ac_cv_search_sem_init+:} false; then :
18565 $as_echo_n "(cached) " >&6
18566 else
18567 ac_func_search_save_LIBS=$LIBS
18568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18569 /* end confdefs.h. */
18571 /* Override any GCC internal prototype to avoid an error.
18572 Use char because int might match the return type of a GCC
18573 builtin and then its argument prototype would still apply. */
18574 #ifdef __cplusplus
18575 extern "C"
18576 #endif
18577 char sem_init ();
18579 main ()
18581 return sem_init ();
18583 return 0;
18585 _ACEOF
18586 for ac_lib in '' rt pthread; do
18587 if test -z "$ac_lib"; then
18588 ac_res="none required"
18589 else
18590 ac_res=-l$ac_lib
18591 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18593 if ac_fn_c_try_link "$LINENO"; then :
18594 ac_cv_search_sem_init=$ac_res
18596 rm -f core conftest.err conftest.$ac_objext \
18597 conftest$ac_exeext
18598 if ${ac_cv_search_sem_init+:} false; then :
18599 break
18601 done
18602 if ${ac_cv_search_sem_init+:} false; then :
18604 else
18605 ac_cv_search_sem_init=no
18607 rm conftest.$ac_ext
18608 LIBS=$ac_func_search_save_LIBS
18610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18611 $as_echo "$ac_cv_search_sem_init" >&6; }
18612 ac_res=$ac_cv_search_sem_init
18613 if test "$ac_res" != no; then :
18614 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18615 USE_UNNAMED_POSIX_SEMAPHORES=1
18619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18620 $as_echo_n "checking which semaphore API to use... " >&6; }
18621 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18623 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18625 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18626 sematype="named POSIX"
18627 else
18628 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18630 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18632 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18633 sematype="unnamed POSIX"
18634 else
18636 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18638 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18639 sematype="System V"
18642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18643 $as_echo "$sematype" >&6; }
18644 else
18646 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18648 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18652 # Select shared-memory implementation type.
18653 if test "$PORTNAME" != "win32"; then
18655 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18657 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18658 else
18660 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18662 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18665 # Select random number source. If a TLS library is used then it will be the
18666 # first choice, else the native platform sources (Windows API or /dev/urandom)
18667 # will be used.
18668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18669 $as_echo_n "checking which random number source to use... " >&6; }
18670 if test x"$with_ssl" = x"openssl" ; then
18671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18672 $as_echo "OpenSSL" >&6; }
18673 elif test x"$PORTNAME" = x"win32" ; then
18674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18675 $as_echo "Windows native" >&6; }
18676 elif test x"$cross_compiling" = x"yes"; then
18677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18678 $as_echo "assuming /dev/urandom" >&6; }
18679 else
18680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18681 $as_echo "/dev/urandom" >&6; }
18682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18683 $as_echo_n "checking for /dev/urandom... " >&6; }
18684 if ${ac_cv_file__dev_urandom+:} false; then :
18685 $as_echo_n "(cached) " >&6
18686 else
18687 test "$cross_compiling" = yes &&
18688 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18689 if test -r "/dev/urandom"; then
18690 ac_cv_file__dev_urandom=yes
18691 else
18692 ac_cv_file__dev_urandom=no
18695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18696 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18697 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18702 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18703 as_fn_error $? "
18704 no source of strong random numbers was found
18705 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18709 # If not set in template file, set bytes to use libc memset()
18710 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18711 MEMSET_LOOP_LIMIT=1024
18714 cat >>confdefs.h <<_ACEOF
18715 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18716 _ACEOF
18720 if test "$enable_nls" = yes ; then
18722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18723 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18724 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18725 $as_echo_n "(cached) " >&6
18726 else
18727 ac_func_search_save_LIBS=$LIBS
18728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18729 /* end confdefs.h. */
18731 /* Override any GCC internal prototype to avoid an error.
18732 Use char because int might match the return type of a GCC
18733 builtin and then its argument prototype would still apply. */
18734 #ifdef __cplusplus
18735 extern "C"
18736 #endif
18737 char bind_textdomain_codeset ();
18739 main ()
18741 return bind_textdomain_codeset ();
18743 return 0;
18745 _ACEOF
18746 for ac_lib in '' intl; do
18747 if test -z "$ac_lib"; then
18748 ac_res="none required"
18749 else
18750 ac_res=-l$ac_lib
18751 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18753 if ac_fn_c_try_link "$LINENO"; then :
18754 ac_cv_search_bind_textdomain_codeset=$ac_res
18756 rm -f core conftest.err conftest.$ac_objext \
18757 conftest$ac_exeext
18758 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18759 break
18761 done
18762 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18764 else
18765 ac_cv_search_bind_textdomain_codeset=no
18767 rm conftest.$ac_ext
18768 LIBS=$ac_func_search_save_LIBS
18770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18771 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18772 ac_res=$ac_cv_search_bind_textdomain_codeset
18773 if test "$ac_res" != no; then :
18774 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18776 else
18777 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18780 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18781 if test "x$ac_cv_header_libintl_h" = xyes; then :
18783 else
18784 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18788 if test -z "$MSGFMT"; then
18789 for ac_prog in msgfmt
18791 # Extract the first word of "$ac_prog", so it can be a program name with args.
18792 set dummy $ac_prog; ac_word=$2
18793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18794 $as_echo_n "checking for $ac_word... " >&6; }
18795 if ${ac_cv_path_MSGFMT+:} false; then :
18796 $as_echo_n "(cached) " >&6
18797 else
18798 case $MSGFMT in
18799 [\\/]* | ?:[\\/]*)
18800 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18803 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18804 for as_dir in $PATH
18806 IFS=$as_save_IFS
18807 test -z "$as_dir" && as_dir=.
18808 for ac_exec_ext in '' $ac_executable_extensions; do
18809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18810 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18812 break 2
18814 done
18815 done
18816 IFS=$as_save_IFS
18819 esac
18821 MSGFMT=$ac_cv_path_MSGFMT
18822 if test -n "$MSGFMT"; then
18823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18824 $as_echo "$MSGFMT" >&6; }
18825 else
18826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18827 $as_echo "no" >&6; }
18831 test -n "$MSGFMT" && break
18832 done
18834 else
18835 # Report the value of MSGFMT in configure's output in all cases.
18836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18837 $as_echo_n "checking for MSGFMT... " >&6; }
18838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18839 $as_echo "$MSGFMT" >&6; }
18842 if test -z "$MSGFMT"; then
18843 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18846 $as_echo_n "checking for msgfmt flags... " >&6; }
18847 if ${pgac_cv_msgfmt_flags+:} false; then :
18848 $as_echo_n "(cached) " >&6
18849 else
18850 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18851 pgac_cv_msgfmt_flags=-c
18854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18855 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18856 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18858 if test -z "$MSGMERGE"; then
18859 for ac_prog in msgmerge
18861 # Extract the first word of "$ac_prog", so it can be a program name with args.
18862 set dummy $ac_prog; ac_word=$2
18863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18864 $as_echo_n "checking for $ac_word... " >&6; }
18865 if ${ac_cv_path_MSGMERGE+:} false; then :
18866 $as_echo_n "(cached) " >&6
18867 else
18868 case $MSGMERGE in
18869 [\\/]* | ?:[\\/]*)
18870 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18874 for as_dir in $PATH
18876 IFS=$as_save_IFS
18877 test -z "$as_dir" && as_dir=.
18878 for ac_exec_ext in '' $ac_executable_extensions; do
18879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18880 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18882 break 2
18884 done
18885 done
18886 IFS=$as_save_IFS
18889 esac
18891 MSGMERGE=$ac_cv_path_MSGMERGE
18892 if test -n "$MSGMERGE"; then
18893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18894 $as_echo "$MSGMERGE" >&6; }
18895 else
18896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18897 $as_echo "no" >&6; }
18901 test -n "$MSGMERGE" && break
18902 done
18904 else
18905 # Report the value of MSGMERGE in configure's output in all cases.
18906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18907 $as_echo_n "checking for MSGMERGE... " >&6; }
18908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18909 $as_echo "$MSGMERGE" >&6; }
18912 if test -z "$XGETTEXT"; then
18913 for ac_prog in xgettext
18915 # Extract the first word of "$ac_prog", so it can be a program name with args.
18916 set dummy $ac_prog; ac_word=$2
18917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18918 $as_echo_n "checking for $ac_word... " >&6; }
18919 if ${ac_cv_path_XGETTEXT+:} false; then :
18920 $as_echo_n "(cached) " >&6
18921 else
18922 case $XGETTEXT in
18923 [\\/]* | ?:[\\/]*)
18924 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18928 for as_dir in $PATH
18930 IFS=$as_save_IFS
18931 test -z "$as_dir" && as_dir=.
18932 for ac_exec_ext in '' $ac_executable_extensions; do
18933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18934 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18936 break 2
18938 done
18939 done
18940 IFS=$as_save_IFS
18943 esac
18945 XGETTEXT=$ac_cv_path_XGETTEXT
18946 if test -n "$XGETTEXT"; then
18947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18948 $as_echo "$XGETTEXT" >&6; }
18949 else
18950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18951 $as_echo "no" >&6; }
18955 test -n "$XGETTEXT" && break
18956 done
18958 else
18959 # Report the value of XGETTEXT in configure's output in all cases.
18960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18961 $as_echo_n "checking for XGETTEXT... " >&6; }
18962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18963 $as_echo "$XGETTEXT" >&6; }
18969 # Check for Tcl configuration script tclConfig.sh
18970 if test "$with_tcl" = yes; then
18971 if test -z "$TCLSH"; then
18972 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18974 # Extract the first word of "$ac_prog", so it can be a program name with args.
18975 set dummy $ac_prog; ac_word=$2
18976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18977 $as_echo_n "checking for $ac_word... " >&6; }
18978 if ${ac_cv_path_TCLSH+:} false; then :
18979 $as_echo_n "(cached) " >&6
18980 else
18981 case $TCLSH in
18982 [\\/]* | ?:[\\/]*)
18983 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18987 for as_dir in $PATH
18989 IFS=$as_save_IFS
18990 test -z "$as_dir" && as_dir=.
18991 for ac_exec_ext in '' $ac_executable_extensions; do
18992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18993 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18995 break 2
18997 done
18998 done
18999 IFS=$as_save_IFS
19002 esac
19004 TCLSH=$ac_cv_path_TCLSH
19005 if test -n "$TCLSH"; then
19006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
19007 $as_echo "$TCLSH" >&6; }
19008 else
19009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19010 $as_echo "no" >&6; }
19014 test -n "$TCLSH" && break
19015 done
19017 else
19018 # Report the value of TCLSH in configure's output in all cases.
19019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
19020 $as_echo_n "checking for TCLSH... " >&6; }
19021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
19022 $as_echo "$TCLSH" >&6; }
19025 if test x"$TCLSH" = x""; then
19026 as_fn_error $? "Tcl shell not found" "$LINENO" 5
19029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
19030 $as_echo_n "checking for tclConfig.sh... " >&6; }
19031 # Let user override test
19032 if test -z "$TCL_CONFIG_SH"; then
19033 pgac_test_dirs="$with_tclconfig"
19035 set X $pgac_test_dirs; shift
19036 if test $# -eq 0; then
19037 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
19038 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
19039 # On newer macOS, $auto_path frequently doesn't include the place
19040 # where tclConfig.sh actually lives. Append that to the end, so as not
19041 # to break cases where a non-default Tcl installation is being used.
19042 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
19043 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
19045 set X $pgac_test_dirs; shift
19048 for pgac_dir do
19049 if test -r "$pgac_dir/tclConfig.sh"; then
19050 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
19051 break
19053 done
19056 if test -z "$TCL_CONFIG_SH"; then
19057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19058 $as_echo "no" >&6; }
19059 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
19060 else
19061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
19062 $as_echo "$TCL_CONFIG_SH" >&6; }
19067 . "$TCL_CONFIG_SH"
19068 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
19069 eval TCL_LIBS=\"$TCL_LIBS\"
19070 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
19071 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
19073 if test "$TCL_SHARED_BUILD" != 1; then
19074 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
19075 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
19077 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
19078 ac_save_CPPFLAGS=$CPPFLAGS
19079 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
19080 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
19081 if test "x$ac_cv_header_tcl_h" = xyes; then :
19083 else
19084 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
19088 CPPFLAGS=$ac_save_CPPFLAGS
19091 # check for <perl.h>
19092 if test "$with_perl" = yes; then
19093 ac_save_CPPFLAGS=$CPPFLAGS
19094 CPPFLAGS="$CPPFLAGS $perl_includespec"
19095 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
19097 if test "x$ac_cv_header_perl_h" = xyes; then :
19099 else
19100 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
19104 # While we're at it, check that we can link to libperl.
19105 # On most platforms, if perl.h is there then libperl.so will be too, but at
19106 # this writing Debian packages them separately. There is no known reason to
19107 # waste cycles on separate probes for the Tcl or Python libraries, though.
19108 # On some Red Hat platforms, the link attempt can fail if we don't use
19109 # CFLAGS_SL while building the test program.
19110 ac_save_CFLAGS=$CFLAGS
19111 CFLAGS="$CFLAGS $CFLAGS_SL"
19112 pgac_save_LIBS=$LIBS
19113 LIBS="$perl_embed_ldflags"
19114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
19115 $as_echo_n "checking for libperl... " >&6; }
19116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19117 /* end confdefs.h. */
19119 #include <EXTERN.h>
19120 #include <perl.h>
19123 main ()
19125 perl_alloc();
19127 return 0;
19129 _ACEOF
19130 if ac_fn_c_try_link "$LINENO"; then :
19131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19132 $as_echo "yes" >&6; }
19133 else
19134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19135 $as_echo "no" >&6; }
19136 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
19138 rm -f core conftest.err conftest.$ac_objext \
19139 conftest$ac_exeext conftest.$ac_ext
19140 LIBS=$pgac_save_LIBS
19141 CFLAGS=$ac_save_CFLAGS
19142 CPPFLAGS=$ac_save_CPPFLAGS
19145 # check for <Python.h>
19146 if test "$with_python" = yes; then
19147 ac_save_CPPFLAGS=$CPPFLAGS
19148 CPPFLAGS="$python_includespec $CPPFLAGS"
19149 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
19150 if test "x$ac_cv_header_Python_h" = xyes; then :
19152 else
19153 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
19157 CPPFLAGS=$ac_save_CPPFLAGS
19161 # Check for documentation-building tools
19163 if test -z "$XMLLINT"; then
19164 for ac_prog in xmllint
19166 # Extract the first word of "$ac_prog", so it can be a program name with args.
19167 set dummy $ac_prog; ac_word=$2
19168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19169 $as_echo_n "checking for $ac_word... " >&6; }
19170 if ${ac_cv_path_XMLLINT+:} false; then :
19171 $as_echo_n "(cached) " >&6
19172 else
19173 case $XMLLINT in
19174 [\\/]* | ?:[\\/]*)
19175 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
19178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19179 for as_dir in $PATH
19181 IFS=$as_save_IFS
19182 test -z "$as_dir" && as_dir=.
19183 for ac_exec_ext in '' $ac_executable_extensions; do
19184 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19185 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
19186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19187 break 2
19189 done
19190 done
19191 IFS=$as_save_IFS
19194 esac
19196 XMLLINT=$ac_cv_path_XMLLINT
19197 if test -n "$XMLLINT"; then
19198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19199 $as_echo "$XMLLINT" >&6; }
19200 else
19201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19202 $as_echo "no" >&6; }
19206 test -n "$XMLLINT" && break
19207 done
19209 else
19210 # Report the value of XMLLINT in configure's output in all cases.
19211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
19212 $as_echo_n "checking for XMLLINT... " >&6; }
19213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19214 $as_echo "$XMLLINT" >&6; }
19217 if test -z "$XSLTPROC"; then
19218 for ac_prog in xsltproc
19220 # Extract the first word of "$ac_prog", so it can be a program name with args.
19221 set dummy $ac_prog; ac_word=$2
19222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19223 $as_echo_n "checking for $ac_word... " >&6; }
19224 if ${ac_cv_path_XSLTPROC+:} false; then :
19225 $as_echo_n "(cached) " >&6
19226 else
19227 case $XSLTPROC in
19228 [\\/]* | ?:[\\/]*)
19229 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19233 for as_dir in $PATH
19235 IFS=$as_save_IFS
19236 test -z "$as_dir" && as_dir=.
19237 for ac_exec_ext in '' $ac_executable_extensions; do
19238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19239 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19241 break 2
19243 done
19244 done
19245 IFS=$as_save_IFS
19248 esac
19250 XSLTPROC=$ac_cv_path_XSLTPROC
19251 if test -n "$XSLTPROC"; then
19252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19253 $as_echo "$XSLTPROC" >&6; }
19254 else
19255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19256 $as_echo "no" >&6; }
19260 test -n "$XSLTPROC" && break
19261 done
19263 else
19264 # Report the value of XSLTPROC in configure's output in all cases.
19265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
19266 $as_echo_n "checking for XSLTPROC... " >&6; }
19267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19268 $as_echo "$XSLTPROC" >&6; }
19271 if test -z "$FOP"; then
19272 for ac_prog in fop
19274 # Extract the first word of "$ac_prog", so it can be a program name with args.
19275 set dummy $ac_prog; ac_word=$2
19276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19277 $as_echo_n "checking for $ac_word... " >&6; }
19278 if ${ac_cv_path_FOP+:} false; then :
19279 $as_echo_n "(cached) " >&6
19280 else
19281 case $FOP in
19282 [\\/]* | ?:[\\/]*)
19283 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19287 for as_dir in $PATH
19289 IFS=$as_save_IFS
19290 test -z "$as_dir" && as_dir=.
19291 for ac_exec_ext in '' $ac_executable_extensions; do
19292 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19293 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19294 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19295 break 2
19297 done
19298 done
19299 IFS=$as_save_IFS
19302 esac
19304 FOP=$ac_cv_path_FOP
19305 if test -n "$FOP"; then
19306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19307 $as_echo "$FOP" >&6; }
19308 else
19309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19310 $as_echo "no" >&6; }
19314 test -n "$FOP" && break
19315 done
19317 else
19318 # Report the value of FOP in configure's output in all cases.
19319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19320 $as_echo_n "checking for FOP... " >&6; }
19321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19322 $as_echo "$FOP" >&6; }
19325 if test -z "$DBTOEPUB"; then
19326 for ac_prog in dbtoepub
19328 # Extract the first word of "$ac_prog", so it can be a program name with args.
19329 set dummy $ac_prog; ac_word=$2
19330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19331 $as_echo_n "checking for $ac_word... " >&6; }
19332 if ${ac_cv_path_DBTOEPUB+:} false; then :
19333 $as_echo_n "(cached) " >&6
19334 else
19335 case $DBTOEPUB in
19336 [\\/]* | ?:[\\/]*)
19337 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19341 for as_dir in $PATH
19343 IFS=$as_save_IFS
19344 test -z "$as_dir" && as_dir=.
19345 for ac_exec_ext in '' $ac_executable_extensions; do
19346 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19347 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19348 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19349 break 2
19351 done
19352 done
19353 IFS=$as_save_IFS
19356 esac
19358 DBTOEPUB=$ac_cv_path_DBTOEPUB
19359 if test -n "$DBTOEPUB"; then
19360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19361 $as_echo "$DBTOEPUB" >&6; }
19362 else
19363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19364 $as_echo "no" >&6; }
19368 test -n "$DBTOEPUB" && break
19369 done
19371 else
19372 # Report the value of DBTOEPUB in configure's output in all cases.
19373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19374 $as_echo_n "checking for DBTOEPUB... " >&6; }
19375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19376 $as_echo "$DBTOEPUB" >&6; }
19381 # Check for test tools
19383 if test "$enable_tap_tests" = yes; then
19384 # Make sure we know where prove is.
19385 if test -z "$PROVE"; then
19386 for ac_prog in prove
19388 # Extract the first word of "$ac_prog", so it can be a program name with args.
19389 set dummy $ac_prog; ac_word=$2
19390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19391 $as_echo_n "checking for $ac_word... " >&6; }
19392 if ${ac_cv_path_PROVE+:} false; then :
19393 $as_echo_n "(cached) " >&6
19394 else
19395 case $PROVE in
19396 [\\/]* | ?:[\\/]*)
19397 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19401 for as_dir in $PATH
19403 IFS=$as_save_IFS
19404 test -z "$as_dir" && as_dir=.
19405 for ac_exec_ext in '' $ac_executable_extensions; do
19406 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19407 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19408 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19409 break 2
19411 done
19412 done
19413 IFS=$as_save_IFS
19416 esac
19418 PROVE=$ac_cv_path_PROVE
19419 if test -n "$PROVE"; then
19420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19421 $as_echo "$PROVE" >&6; }
19422 else
19423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19424 $as_echo "no" >&6; }
19428 test -n "$PROVE" && break
19429 done
19431 else
19432 # Report the value of PROVE in configure's output in all cases.
19433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19434 $as_echo_n "checking for PROVE... " >&6; }
19435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19436 $as_echo "$PROVE" >&6; }
19439 if test -z "$PROVE"; then
19440 as_fn_error $? "prove not found" "$LINENO" 5
19442 # Check for necessary Perl modules. You might think we should use
19443 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19444 # installation than perl, eg on MSys, so we have to check using prove.
19445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19446 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19447 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19448 if test $? -eq 0; then
19449 # log the module version details, but don't show them interactively
19450 echo "$modulestderr" >&5
19451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19452 $as_echo "yes" >&6; }
19453 else
19454 # on failure, though, show the results to the user
19455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19456 $as_echo "$modulestderr" >&6; }
19457 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19461 # If compiler will take -Wl,--as-needed (or various platform-specific
19462 # spellings thereof) then add that to LDFLAGS. This is much easier than
19463 # trying to filter LIBS to the minimum for each executable.
19464 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19465 # libreadline; therefore we postpone testing it until we know what library
19466 # dependencies readline has. The test code will try to link with $LIBS.
19467 if test "$with_readline" = yes; then
19468 link_test_func=readline
19469 else
19470 link_test_func=exit
19473 if test "$PORTNAME" = "darwin"; then
19474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19475 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19476 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19477 $as_echo_n "(cached) " >&6
19478 else
19479 pgac_save_LDFLAGS=$LDFLAGS
19480 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19481 if test "$cross_compiling" = yes; then :
19482 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19483 else
19484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19485 /* end confdefs.h. */
19486 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19488 main ()
19492 return 0;
19494 _ACEOF
19495 if ac_fn_c_try_run "$LINENO"; then :
19496 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19497 else
19498 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19501 conftest.$ac_objext conftest.beam conftest.$ac_ext
19504 LDFLAGS="$pgac_save_LDFLAGS"
19506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19507 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19508 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19509 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19512 elif test "$PORTNAME" = "openbsd"; then
19513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19514 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19515 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19516 $as_echo_n "(cached) " >&6
19517 else
19518 pgac_save_LDFLAGS=$LDFLAGS
19519 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19520 if test "$cross_compiling" = yes; then :
19521 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19522 else
19523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19524 /* end confdefs.h. */
19525 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19527 main ()
19531 return 0;
19533 _ACEOF
19534 if ac_fn_c_try_run "$LINENO"; then :
19535 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19536 else
19537 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19539 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19540 conftest.$ac_objext conftest.beam conftest.$ac_ext
19543 LDFLAGS="$pgac_save_LDFLAGS"
19545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19546 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19547 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19548 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19551 else
19552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19553 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19554 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19555 $as_echo_n "(cached) " >&6
19556 else
19557 pgac_save_LDFLAGS=$LDFLAGS
19558 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19559 if test "$cross_compiling" = yes; then :
19560 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19561 else
19562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19563 /* end confdefs.h. */
19564 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19566 main ()
19570 return 0;
19572 _ACEOF
19573 if ac_fn_c_try_run "$LINENO"; then :
19574 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19575 else
19576 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19578 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19579 conftest.$ac_objext conftest.beam conftest.$ac_ext
19582 LDFLAGS="$pgac_save_LDFLAGS"
19584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19585 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19586 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19587 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19592 # Create compiler version string
19593 if test x"$GCC" = x"yes" ; then
19594 cc_string=`${CC} --version | sed q`
19595 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19596 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19597 cc_string=`${CC} -V 2>&1 | sed q`
19598 else
19599 cc_string=$CC
19603 cat >>confdefs.h <<_ACEOF
19604 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19605 _ACEOF
19608 # Supply a numeric version string for use by 3rd party add-ons
19609 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19610 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19611 $AWK '{printf "%d%04d", $1, $2}'`"
19613 cat >>confdefs.h <<_ACEOF
19614 #define PG_VERSION_NUM $PG_VERSION_NUM
19615 _ACEOF
19619 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19620 # literally, so that it's possible to override it at build time using
19621 # a command like "make ... PG_SYSROOT=path". This has to be done after
19622 # we've finished all configure checks that depend on CPPFLAGS.
19623 # The same for LDFLAGS, too.
19624 if test x"$PG_SYSROOT" != x; then
19625 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19626 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19631 # Begin output steps
19633 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19634 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19635 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19636 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19637 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19638 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19639 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19640 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19641 # Currently only used when LLVM is used
19642 if test "$with_llvm" = yes ; then
19643 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19644 $as_echo "$as_me: using CXX=$CXX" >&6;}
19645 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19646 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19647 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19648 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19649 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19650 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19651 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19652 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19655 # prepare build tree if outside source tree
19656 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19657 # Note 2: /bin/pwd might be better than shell's built-in at getting
19658 # a symlink-free name.
19659 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19660 vpath_build=no
19661 else
19662 vpath_build=yes
19663 if test "$no_create" != yes; then
19664 $as_echo_n "preparing build tree... " >&6
19665 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19666 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19667 || as_fn_error $? "failed" "$LINENO" 5
19668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19669 $as_echo "done" >&6; }
19675 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19678 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}"
19681 if test "$PORTNAME" = "win32"; then
19682 ac_config_commands="$ac_config_commands check_win32_symlinks"
19686 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19689 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19692 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19695 cat >confcache <<\_ACEOF
19696 # This file is a shell script that caches the results of configure
19697 # tests run on this system so they can be shared between configure
19698 # scripts and configure runs, see configure's option --config-cache.
19699 # It is not useful on other systems. If it contains results you don't
19700 # want to keep, you may remove or edit it.
19702 # config.status only pays attention to the cache file if you give it
19703 # the --recheck option to rerun configure.
19705 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19706 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19707 # following values.
19709 _ACEOF
19711 # The following way of writing the cache mishandles newlines in values,
19712 # but we know of no workaround that is simple, portable, and efficient.
19713 # So, we kill variables containing newlines.
19714 # Ultrix sh set writes to stderr and can't be redirected directly,
19715 # and sets the high bit in the cache file unless we assign to the vars.
19717 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19718 eval ac_val=\$$ac_var
19719 case $ac_val in #(
19720 *${as_nl}*)
19721 case $ac_var in #(
19722 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19723 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19724 esac
19725 case $ac_var in #(
19726 _ | IFS | as_nl) ;; #(
19727 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19728 *) { eval $ac_var=; unset $ac_var;} ;;
19729 esac ;;
19730 esac
19731 done
19733 (set) 2>&1 |
19734 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19735 *${as_nl}ac_space=\ *)
19736 # `set' does not quote correctly, so add quotes: double-quote
19737 # substitution turns \\\\ into \\, and sed turns \\ into \.
19738 sed -n \
19739 "s/'/'\\\\''/g;
19740 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19741 ;; #(
19743 # `set' quotes correctly as required by POSIX, so do not add quotes.
19744 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19746 esac |
19747 sort
19749 sed '
19750 /^ac_cv_env_/b end
19751 t clear
19752 :clear
19753 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19754 t end
19755 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19756 :end' >>confcache
19757 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19758 if test -w "$cache_file"; then
19759 if test "x$cache_file" != "x/dev/null"; then
19760 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19761 $as_echo "$as_me: updating cache $cache_file" >&6;}
19762 if test ! -f "$cache_file" || test -h "$cache_file"; then
19763 cat confcache >"$cache_file"
19764 else
19765 case $cache_file in #(
19766 */* | ?:*)
19767 mv -f confcache "$cache_file"$$ &&
19768 mv -f "$cache_file"$$ "$cache_file" ;; #(
19770 mv -f confcache "$cache_file" ;;
19771 esac
19774 else
19775 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19776 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19779 rm -f confcache
19781 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19782 # Let make expand exec_prefix.
19783 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19785 DEFS=-DHAVE_CONFIG_H
19787 ac_libobjs=
19788 ac_ltlibobjs=
19790 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19791 # 1. Remove the extension, and $U if already installed.
19792 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19793 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19794 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19795 # will be set to the directory where LIBOBJS objects are built.
19796 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19797 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19798 done
19799 LIBOBJS=$ac_libobjs
19801 LTLIBOBJS=$ac_ltlibobjs
19806 : "${CONFIG_STATUS=./config.status}"
19807 ac_write_fail=0
19808 ac_clean_files_save=$ac_clean_files
19809 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19810 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19811 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19812 as_write_fail=0
19813 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19814 #! $SHELL
19815 # Generated by $as_me.
19816 # Run this file to recreate the current configuration.
19817 # Compiler output produced by configure, useful for debugging
19818 # configure, is in config.log if it exists.
19820 debug=false
19821 ac_cs_recheck=false
19822 ac_cs_silent=false
19824 SHELL=\${CONFIG_SHELL-$SHELL}
19825 export SHELL
19826 _ASEOF
19827 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19828 ## -------------------- ##
19829 ## M4sh Initialization. ##
19830 ## -------------------- ##
19832 # Be more Bourne compatible
19833 DUALCASE=1; export DUALCASE # for MKS sh
19834 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19835 emulate sh
19836 NULLCMD=:
19837 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19838 # is contrary to our usage. Disable this feature.
19839 alias -g '${1+"$@"}'='"$@"'
19840 setopt NO_GLOB_SUBST
19841 else
19842 case `(set -o) 2>/dev/null` in #(
19843 *posix*) :
19844 set -o posix ;; #(
19845 *) :
19847 esac
19851 as_nl='
19853 export as_nl
19854 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19855 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19856 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19857 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19858 # Prefer a ksh shell builtin over an external printf program on Solaris,
19859 # but without wasting forks for bash or zsh.
19860 if test -z "$BASH_VERSION$ZSH_VERSION" \
19861 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19862 as_echo='print -r --'
19863 as_echo_n='print -rn --'
19864 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19865 as_echo='printf %s\n'
19866 as_echo_n='printf %s'
19867 else
19868 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19869 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19870 as_echo_n='/usr/ucb/echo -n'
19871 else
19872 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19873 as_echo_n_body='eval
19874 arg=$1;
19875 case $arg in #(
19876 *"$as_nl"*)
19877 expr "X$arg" : "X\\(.*\\)$as_nl";
19878 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19879 esac;
19880 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19882 export as_echo_n_body
19883 as_echo_n='sh -c $as_echo_n_body as_echo'
19885 export as_echo_body
19886 as_echo='sh -c $as_echo_body as_echo'
19889 # The user is always right.
19890 if test "${PATH_SEPARATOR+set}" != set; then
19891 PATH_SEPARATOR=:
19892 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19893 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19894 PATH_SEPARATOR=';'
19899 # IFS
19900 # We need space, tab and new line, in precisely that order. Quoting is
19901 # there to prevent editors from complaining about space-tab.
19902 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19903 # splitting by setting IFS to empty value.)
19904 IFS=" "" $as_nl"
19906 # Find who we are. Look in the path if we contain no directory separator.
19907 as_myself=
19908 case $0 in #((
19909 *[\\/]* ) as_myself=$0 ;;
19910 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19911 for as_dir in $PATH
19913 IFS=$as_save_IFS
19914 test -z "$as_dir" && as_dir=.
19915 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19916 done
19917 IFS=$as_save_IFS
19920 esac
19921 # We did not find ourselves, most probably we were run as `sh COMMAND'
19922 # in which case we are not to be found in the path.
19923 if test "x$as_myself" = x; then
19924 as_myself=$0
19926 if test ! -f "$as_myself"; then
19927 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19928 exit 1
19931 # Unset variables that we do not need and which cause bugs (e.g. in
19932 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19933 # suppresses any "Segmentation fault" message there. '((' could
19934 # trigger a bug in pdksh 5.2.14.
19935 for as_var in BASH_ENV ENV MAIL MAILPATH
19936 do eval test x\${$as_var+set} = xset \
19937 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19938 done
19939 PS1='$ '
19940 PS2='> '
19941 PS4='+ '
19943 # NLS nuisances.
19944 LC_ALL=C
19945 export LC_ALL
19946 LANGUAGE=C
19947 export LANGUAGE
19949 # CDPATH.
19950 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19953 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19954 # ----------------------------------------
19955 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19956 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19957 # script with STATUS, using 1 if that was 0.
19958 as_fn_error ()
19960 as_status=$1; test $as_status -eq 0 && as_status=1
19961 if test "$4"; then
19962 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19963 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19965 $as_echo "$as_me: error: $2" >&2
19966 as_fn_exit $as_status
19967 } # as_fn_error
19970 # as_fn_set_status STATUS
19971 # -----------------------
19972 # Set $? to STATUS, without forking.
19973 as_fn_set_status ()
19975 return $1
19976 } # as_fn_set_status
19978 # as_fn_exit STATUS
19979 # -----------------
19980 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19981 as_fn_exit ()
19983 set +e
19984 as_fn_set_status $1
19985 exit $1
19986 } # as_fn_exit
19988 # as_fn_unset VAR
19989 # ---------------
19990 # Portably unset VAR.
19991 as_fn_unset ()
19993 { eval $1=; unset $1;}
19995 as_unset=as_fn_unset
19996 # as_fn_append VAR VALUE
19997 # ----------------------
19998 # Append the text in VALUE to the end of the definition contained in VAR. Take
19999 # advantage of any shell optimizations that allow amortized linear growth over
20000 # repeated appends, instead of the typical quadratic growth present in naive
20001 # implementations.
20002 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20003 eval 'as_fn_append ()
20005 eval $1+=\$2
20007 else
20008 as_fn_append ()
20010 eval $1=\$$1\$2
20012 fi # as_fn_append
20014 # as_fn_arith ARG...
20015 # ------------------
20016 # Perform arithmetic evaluation on the ARGs, and store the result in the
20017 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20018 # must be portable across $(()) and expr.
20019 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20020 eval 'as_fn_arith ()
20022 as_val=$(( $* ))
20024 else
20025 as_fn_arith ()
20027 as_val=`expr "$@" || test $? -eq 1`
20029 fi # as_fn_arith
20032 if expr a : '\(a\)' >/dev/null 2>&1 &&
20033 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20034 as_expr=expr
20035 else
20036 as_expr=false
20039 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20040 as_basename=basename
20041 else
20042 as_basename=false
20045 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20046 as_dirname=dirname
20047 else
20048 as_dirname=false
20051 as_me=`$as_basename -- "$0" ||
20052 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20053 X"$0" : 'X\(//\)$' \| \
20054 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20055 $as_echo X/"$0" |
20056 sed '/^.*\/\([^/][^/]*\)\/*$/{
20057 s//\1/
20060 /^X\/\(\/\/\)$/{
20061 s//\1/
20064 /^X\/\(\/\).*/{
20065 s//\1/
20068 s/.*/./; q'`
20070 # Avoid depending upon Character Ranges.
20071 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20072 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20073 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20074 as_cr_digits='0123456789'
20075 as_cr_alnum=$as_cr_Letters$as_cr_digits
20077 ECHO_C= ECHO_N= ECHO_T=
20078 case `echo -n x` in #(((((
20079 -n*)
20080 case `echo 'xy\c'` in
20081 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20082 xy) ECHO_C='\c';;
20083 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20084 ECHO_T=' ';;
20085 esac;;
20087 ECHO_N='-n';;
20088 esac
20090 rm -f conf$$ conf$$.exe conf$$.file
20091 if test -d conf$$.dir; then
20092 rm -f conf$$.dir/conf$$.file
20093 else
20094 rm -f conf$$.dir
20095 mkdir conf$$.dir 2>/dev/null
20097 if (echo >conf$$.file) 2>/dev/null; then
20098 if ln -s conf$$.file conf$$ 2>/dev/null; then
20099 as_ln_s='ln -s'
20100 # ... but there are two gotchas:
20101 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20102 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20103 # In both cases, we have to default to `cp -pR'.
20104 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20105 as_ln_s='cp -pR'
20106 elif ln conf$$.file conf$$ 2>/dev/null; then
20107 as_ln_s=ln
20108 else
20109 as_ln_s='cp -pR'
20111 else
20112 as_ln_s='cp -pR'
20114 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20115 rmdir conf$$.dir 2>/dev/null
20118 # as_fn_mkdir_p
20119 # -------------
20120 # Create "$as_dir" as a directory, including parents if necessary.
20121 as_fn_mkdir_p ()
20124 case $as_dir in #(
20125 -*) as_dir=./$as_dir;;
20126 esac
20127 test -d "$as_dir" || eval $as_mkdir_p || {
20128 as_dirs=
20129 while :; do
20130 case $as_dir in #(
20131 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20132 *) as_qdir=$as_dir;;
20133 esac
20134 as_dirs="'$as_qdir' $as_dirs"
20135 as_dir=`$as_dirname -- "$as_dir" ||
20136 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20137 X"$as_dir" : 'X\(//\)[^/]' \| \
20138 X"$as_dir" : 'X\(//\)$' \| \
20139 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20140 $as_echo X"$as_dir" |
20141 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20142 s//\1/
20145 /^X\(\/\/\)[^/].*/{
20146 s//\1/
20149 /^X\(\/\/\)$/{
20150 s//\1/
20153 /^X\(\/\).*/{
20154 s//\1/
20157 s/.*/./; q'`
20158 test -d "$as_dir" && break
20159 done
20160 test -z "$as_dirs" || eval "mkdir $as_dirs"
20161 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20164 } # as_fn_mkdir_p
20165 if mkdir -p . 2>/dev/null; then
20166 as_mkdir_p='mkdir -p "$as_dir"'
20167 else
20168 test -d ./-p && rmdir ./-p
20169 as_mkdir_p=false
20173 # as_fn_executable_p FILE
20174 # -----------------------
20175 # Test if FILE is an executable regular file.
20176 as_fn_executable_p ()
20178 test -f "$1" && test -x "$1"
20179 } # as_fn_executable_p
20180 as_test_x='test -x'
20181 as_executable_p=as_fn_executable_p
20183 # Sed expression to map a string onto a valid CPP name.
20184 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20186 # Sed expression to map a string onto a valid variable name.
20187 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20190 exec 6>&1
20191 ## ----------------------------------- ##
20192 ## Main body of $CONFIG_STATUS script. ##
20193 ## ----------------------------------- ##
20194 _ASEOF
20195 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20197 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20198 # Save the log message, to keep $0 and so on meaningful, and to
20199 # report actual input values of CONFIG_FILES etc. instead of their
20200 # values after options handling.
20201 ac_log="
20202 This file was extended by PostgreSQL $as_me 15devel, which was
20203 generated by GNU Autoconf 2.69. Invocation command line was
20205 CONFIG_FILES = $CONFIG_FILES
20206 CONFIG_HEADERS = $CONFIG_HEADERS
20207 CONFIG_LINKS = $CONFIG_LINKS
20208 CONFIG_COMMANDS = $CONFIG_COMMANDS
20209 $ $0 $@
20211 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20214 _ACEOF
20216 case $ac_config_files in *"
20217 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20218 esac
20220 case $ac_config_headers in *"
20221 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20222 esac
20225 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20226 # Files that config.status was made for.
20227 config_files="$ac_config_files"
20228 config_headers="$ac_config_headers"
20229 config_links="$ac_config_links"
20230 config_commands="$ac_config_commands"
20232 _ACEOF
20234 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20235 ac_cs_usage="\
20236 \`$as_me' instantiates files and other configuration actions
20237 from templates according to the current configuration. Unless the files
20238 and actions are specified as TAGs, all are instantiated by default.
20240 Usage: $0 [OPTION]... [TAG]...
20242 -h, --help print this help, then exit
20243 -V, --version print version number and configuration settings, then exit
20244 --config print configuration, then exit
20245 -q, --quiet, --silent
20246 do not print progress messages
20247 -d, --debug don't remove temporary files
20248 --recheck update $as_me by reconfiguring in the same conditions
20249 --file=FILE[:TEMPLATE]
20250 instantiate the configuration file FILE
20251 --header=FILE[:TEMPLATE]
20252 instantiate the configuration header FILE
20254 Configuration files:
20255 $config_files
20257 Configuration headers:
20258 $config_headers
20260 Configuration links:
20261 $config_links
20263 Configuration commands:
20264 $config_commands
20266 Report bugs to <pgsql-bugs@lists.postgresql.org>.
20267 PostgreSQL home page: <https://www.postgresql.org/>."
20269 _ACEOF
20270 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20271 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20272 ac_cs_version="\\
20273 PostgreSQL config.status 15devel
20274 configured by $0, generated by GNU Autoconf 2.69,
20275 with options \\"\$ac_cs_config\\"
20277 Copyright (C) 2012 Free Software Foundation, Inc.
20278 This config.status script is free software; the Free Software Foundation
20279 gives unlimited permission to copy, distribute and modify it."
20281 ac_pwd='$ac_pwd'
20282 srcdir='$srcdir'
20283 INSTALL='$INSTALL'
20284 MKDIR_P='$MKDIR_P'
20285 AWK='$AWK'
20286 test -n "\$AWK" || AWK=awk
20287 _ACEOF
20289 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20290 # The default lists apply if the user does not specify any file.
20291 ac_need_defaults=:
20292 while test $# != 0
20294 case $1 in
20295 --*=?*)
20296 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20297 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20298 ac_shift=:
20300 --*=)
20301 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20302 ac_optarg=
20303 ac_shift=:
20306 ac_option=$1
20307 ac_optarg=$2
20308 ac_shift=shift
20310 esac
20312 case $ac_option in
20313 # Handling of the options.
20314 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20315 ac_cs_recheck=: ;;
20316 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20317 $as_echo "$ac_cs_version"; exit ;;
20318 --config | --confi | --conf | --con | --co | --c )
20319 $as_echo "$ac_cs_config"; exit ;;
20320 --debug | --debu | --deb | --de | --d | -d )
20321 debug=: ;;
20322 --file | --fil | --fi | --f )
20323 $ac_shift
20324 case $ac_optarg in
20325 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20326 '') as_fn_error $? "missing file argument" ;;
20327 esac
20328 as_fn_append CONFIG_FILES " '$ac_optarg'"
20329 ac_need_defaults=false;;
20330 --header | --heade | --head | --hea )
20331 $ac_shift
20332 case $ac_optarg in
20333 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20334 esac
20335 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20336 ac_need_defaults=false;;
20337 --he | --h)
20338 # Conflict between --help and --header
20339 as_fn_error $? "ambiguous option: \`$1'
20340 Try \`$0 --help' for more information.";;
20341 --help | --hel | -h )
20342 $as_echo "$ac_cs_usage"; exit ;;
20343 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20344 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20345 ac_cs_silent=: ;;
20347 # This is an error.
20348 -*) as_fn_error $? "unrecognized option: \`$1'
20349 Try \`$0 --help' for more information." ;;
20351 *) as_fn_append ac_config_targets " $1"
20352 ac_need_defaults=false ;;
20354 esac
20355 shift
20356 done
20358 ac_configure_extra_args=
20360 if $ac_cs_silent; then
20361 exec 6>/dev/null
20362 ac_configure_extra_args="$ac_configure_extra_args --silent"
20365 _ACEOF
20366 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20367 if \$ac_cs_recheck; then
20368 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20369 shift
20370 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20371 CONFIG_SHELL='$SHELL'
20372 export CONFIG_SHELL
20373 exec "\$@"
20376 _ACEOF
20377 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20378 exec 5>>config.log
20380 echo
20381 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20382 ## Running $as_me. ##
20383 _ASBOX
20384 $as_echo "$ac_log"
20385 } >&5
20387 _ACEOF
20388 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20389 _ACEOF
20391 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20393 # Handling of arguments.
20394 for ac_config_target in $ac_config_targets
20396 case $ac_config_target in
20397 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20398 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20399 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20400 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20401 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20402 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20403 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20404 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20405 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20406 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20407 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20409 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20410 esac
20411 done
20414 # If the user did not use the arguments to specify the items to instantiate,
20415 # then the envvar interface is used. Set only those that are not.
20416 # We use the long form for the default assignment because of an extremely
20417 # bizarre bug on SunOS 4.1.3.
20418 if $ac_need_defaults; then
20419 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20420 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20421 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20422 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20425 # Have a temporary directory for convenience. Make it in the build tree
20426 # simply because there is no reason against having it here, and in addition,
20427 # creating and moving files from /tmp can sometimes cause problems.
20428 # Hook for its removal unless debugging.
20429 # Note that there is a small window in which the directory will not be cleaned:
20430 # after its creation but before its name has been assigned to `$tmp'.
20431 $debug ||
20433 tmp= ac_tmp=
20434 trap 'exit_status=$?
20435 : "${ac_tmp:=$tmp}"
20436 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20438 trap 'as_fn_exit 1' 1 2 13 15
20440 # Create a (secure) tmp directory for tmp files.
20443 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20444 test -d "$tmp"
20445 } ||
20447 tmp=./conf$$-$RANDOM
20448 (umask 077 && mkdir "$tmp")
20449 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20450 ac_tmp=$tmp
20452 # Set up the scripts for CONFIG_FILES section.
20453 # No need to generate them if there are no CONFIG_FILES.
20454 # This happens for instance with `./config.status config.h'.
20455 if test -n "$CONFIG_FILES"; then
20458 ac_cr=`echo X | tr X '\015'`
20459 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20460 # But we know of no other shell where ac_cr would be empty at this
20461 # point, so we can use a bashism as a fallback.
20462 if test "x$ac_cr" = x; then
20463 eval ac_cr=\$\'\\r\'
20465 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20466 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20467 ac_cs_awk_cr='\\r'
20468 else
20469 ac_cs_awk_cr=$ac_cr
20472 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20473 _ACEOF
20477 echo "cat >conf$$subs.awk <<_ACEOF" &&
20478 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20479 echo "_ACEOF"
20480 } >conf$$subs.sh ||
20481 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20482 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20483 ac_delim='%!_!# '
20484 for ac_last_try in false false false false false :; do
20485 . ./conf$$subs.sh ||
20486 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20488 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20489 if test $ac_delim_n = $ac_delim_num; then
20490 break
20491 elif $ac_last_try; then
20492 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20493 else
20494 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20496 done
20497 rm -f conf$$subs.sh
20499 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20500 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20501 _ACEOF
20502 sed -n '
20504 s/^/S["/; s/!.*/"]=/
20507 s/^[^!]*!//
20508 :repl
20509 t repl
20510 s/'"$ac_delim"'$//
20511 t delim
20514 s/\(.\{148\}\)..*/\1/
20515 t more1
20516 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20519 b repl
20520 :more1
20521 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20524 s/.\{148\}//
20525 t nl
20526 :delim
20528 s/\(.\{148\}\)..*/\1/
20529 t more2
20530 s/["\\]/\\&/g; s/^/"/; s/$/"/
20533 :more2
20534 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20537 s/.\{148\}//
20538 t delim
20539 ' <conf$$subs.awk | sed '
20540 /^[^""]/{
20542 s/\n//
20544 ' >>$CONFIG_STATUS || ac_write_fail=1
20545 rm -f conf$$subs.awk
20546 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20547 _ACAWK
20548 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20549 for (key in S) S_is_set[key] = 1
20550 FS = "\a"
20554 line = $ 0
20555 nfields = split(line, field, "@")
20556 substed = 0
20557 len = length(field[1])
20558 for (i = 2; i < nfields; i++) {
20559 key = field[i]
20560 keylen = length(key)
20561 if (S_is_set[key]) {
20562 value = S[key]
20563 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20564 len += length(value) + length(field[++i])
20565 substed = 1
20566 } else
20567 len += 1 + keylen
20570 print line
20573 _ACAWK
20574 _ACEOF
20575 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20576 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20577 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20578 else
20580 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20581 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20582 _ACEOF
20584 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20585 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20586 # trailing colons and then remove the whole line if VPATH becomes empty
20587 # (actually we leave an empty line to preserve line numbers).
20588 if test "x$srcdir" = x.; then
20589 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20591 s///
20592 s/^/:/
20593 s/[ ]*$/:/
20594 s/:\$(srcdir):/:/g
20595 s/:\${srcdir}:/:/g
20596 s/:@srcdir@:/:/g
20597 s/^:*//
20598 s/:*$//
20600 s/\(=[ ]*\).*/\1/
20602 s/\n//
20603 s/^[^=]*=[ ]*$//
20607 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20608 fi # test -n "$CONFIG_FILES"
20610 # Set up the scripts for CONFIG_HEADERS section.
20611 # No need to generate them if there are no CONFIG_HEADERS.
20612 # This happens for instance with `./config.status Makefile'.
20613 if test -n "$CONFIG_HEADERS"; then
20614 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20615 BEGIN {
20616 _ACEOF
20618 # Transform confdefs.h into an awk script `defines.awk', embedded as
20619 # here-document in config.status, that substitutes the proper values into
20620 # config.h.in to produce config.h.
20622 # Create a delimiter string that does not exist in confdefs.h, to ease
20623 # handling of long lines.
20624 ac_delim='%!_!# '
20625 for ac_last_try in false false :; do
20626 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20627 if test -z "$ac_tt"; then
20628 break
20629 elif $ac_last_try; then
20630 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20631 else
20632 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20634 done
20636 # For the awk script, D is an array of macro values keyed by name,
20637 # likewise P contains macro parameters if any. Preserve backslash
20638 # newline sequences.
20640 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20641 sed -n '
20642 s/.\{148\}/&'"$ac_delim"'/g
20643 t rset
20644 :rset
20645 s/^[ ]*#[ ]*define[ ][ ]*/ /
20646 t def
20648 :def
20649 s/\\$//
20650 t bsnl
20651 s/["\\]/\\&/g
20652 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20653 D["\1"]=" \3"/p
20654 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20656 :bsnl
20657 s/["\\]/\\&/g
20658 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20659 D["\1"]=" \3\\\\\\n"\\/p
20660 t cont
20661 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20662 t cont
20664 :cont
20666 s/.\{148\}/&'"$ac_delim"'/g
20667 t clear
20668 :clear
20669 s/\\$//
20670 t bsnlc
20671 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20673 :bsnlc
20674 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20675 b cont
20676 ' <confdefs.h | sed '
20677 s/'"$ac_delim"'/"\\\
20678 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20680 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20681 for (key in D) D_is_set[key] = 1
20682 FS = "\a"
20684 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20685 line = \$ 0
20686 split(line, arg, " ")
20687 if (arg[1] == "#") {
20688 defundef = arg[2]
20689 mac1 = arg[3]
20690 } else {
20691 defundef = substr(arg[1], 2)
20692 mac1 = arg[2]
20694 split(mac1, mac2, "(") #)
20695 macro = mac2[1]
20696 prefix = substr(line, 1, index(line, defundef) - 1)
20697 if (D_is_set[macro]) {
20698 # Preserve the white space surrounding the "#".
20699 print prefix "define", macro P[macro] D[macro]
20700 next
20701 } else {
20702 # Replace #undef with comments. This is necessary, for example,
20703 # in the case of _POSIX_SOURCE, which is predefined and required
20704 # on some systems where configure will not decide to define it.
20705 if (defundef == "undef") {
20706 print "/*", prefix defundef, macro, "*/"
20707 next
20711 { print }
20712 _ACAWK
20713 _ACEOF
20714 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20715 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20716 fi # test -n "$CONFIG_HEADERS"
20719 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20720 shift
20721 for ac_tag
20723 case $ac_tag in
20724 :[FHLC]) ac_mode=$ac_tag; continue;;
20725 esac
20726 case $ac_mode$ac_tag in
20727 :[FHL]*:*);;
20728 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20729 :[FH]-) ac_tag=-:-;;
20730 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20731 esac
20732 ac_save_IFS=$IFS
20733 IFS=:
20734 set x $ac_tag
20735 IFS=$ac_save_IFS
20736 shift
20737 ac_file=$1
20738 shift
20740 case $ac_mode in
20741 :L) ac_source=$1;;
20742 :[FH])
20743 ac_file_inputs=
20744 for ac_f
20746 case $ac_f in
20747 -) ac_f="$ac_tmp/stdin";;
20748 *) # Look for the file first in the build tree, then in the source tree
20749 # (if the path is not absolute). The absolute path cannot be DOS-style,
20750 # because $ac_f cannot contain `:'.
20751 test -f "$ac_f" ||
20752 case $ac_f in
20753 [\\/$]*) false;;
20754 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20755 esac ||
20756 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20757 esac
20758 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20759 as_fn_append ac_file_inputs " '$ac_f'"
20760 done
20762 # Let's still pretend it is `configure' which instantiates (i.e., don't
20763 # use $as_me), people would be surprised to read:
20764 # /* config.h. Generated by config.status. */
20765 configure_input='Generated from '`
20766 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20767 `' by configure.'
20768 if test x"$ac_file" != x-; then
20769 configure_input="$ac_file. $configure_input"
20770 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20771 $as_echo "$as_me: creating $ac_file" >&6;}
20773 # Neutralize special characters interpreted by sed in replacement strings.
20774 case $configure_input in #(
20775 *\&* | *\|* | *\\* )
20776 ac_sed_conf_input=`$as_echo "$configure_input" |
20777 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20778 *) ac_sed_conf_input=$configure_input;;
20779 esac
20781 case $ac_tag in
20782 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20783 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20784 esac
20786 esac
20788 ac_dir=`$as_dirname -- "$ac_file" ||
20789 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20790 X"$ac_file" : 'X\(//\)[^/]' \| \
20791 X"$ac_file" : 'X\(//\)$' \| \
20792 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20793 $as_echo X"$ac_file" |
20794 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20795 s//\1/
20798 /^X\(\/\/\)[^/].*/{
20799 s//\1/
20802 /^X\(\/\/\)$/{
20803 s//\1/
20806 /^X\(\/\).*/{
20807 s//\1/
20810 s/.*/./; q'`
20811 as_dir="$ac_dir"; as_fn_mkdir_p
20812 ac_builddir=.
20814 case "$ac_dir" in
20815 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20817 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20818 # A ".." for each directory in $ac_dir_suffix.
20819 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20820 case $ac_top_builddir_sub in
20821 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20822 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20823 esac ;;
20824 esac
20825 ac_abs_top_builddir=$ac_pwd
20826 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20827 # for backward compatibility:
20828 ac_top_builddir=$ac_top_build_prefix
20830 case $srcdir in
20831 .) # We are building in place.
20832 ac_srcdir=.
20833 ac_top_srcdir=$ac_top_builddir_sub
20834 ac_abs_top_srcdir=$ac_pwd ;;
20835 [\\/]* | ?:[\\/]* ) # Absolute name.
20836 ac_srcdir=$srcdir$ac_dir_suffix;
20837 ac_top_srcdir=$srcdir
20838 ac_abs_top_srcdir=$srcdir ;;
20839 *) # Relative name.
20840 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20841 ac_top_srcdir=$ac_top_build_prefix$srcdir
20842 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20843 esac
20844 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20847 case $ac_mode in
20850 # CONFIG_FILE
20853 case $INSTALL in
20854 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20855 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20856 esac
20857 ac_MKDIR_P=$MKDIR_P
20858 case $MKDIR_P in
20859 [\\/$]* | ?:[\\/]* ) ;;
20860 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20861 esac
20862 _ACEOF
20864 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20865 # If the template does not know about datarootdir, expand it.
20866 # FIXME: This hack should be removed a few years after 2.60.
20867 ac_datarootdir_hack=; ac_datarootdir_seen=
20868 ac_sed_dataroot='
20869 /datarootdir/ {
20873 /@datadir@/p
20874 /@docdir@/p
20875 /@infodir@/p
20876 /@localedir@/p
20877 /@mandir@/p'
20878 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20879 *datarootdir*) ac_datarootdir_seen=yes;;
20880 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20882 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20883 _ACEOF
20884 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20885 ac_datarootdir_hack='
20886 s&@datadir@&$datadir&g
20887 s&@docdir@&$docdir&g
20888 s&@infodir@&$infodir&g
20889 s&@localedir@&$localedir&g
20890 s&@mandir@&$mandir&g
20891 s&\\\${datarootdir}&$datarootdir&g' ;;
20892 esac
20893 _ACEOF
20895 # Neutralize VPATH when `$srcdir' = `.'.
20896 # Shell code in configure.ac might set extrasub.
20897 # FIXME: do we really want to maintain this feature?
20898 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20899 ac_sed_extra="$ac_vpsub
20900 $extrasub
20901 _ACEOF
20902 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20904 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20905 s|@configure_input@|$ac_sed_conf_input|;t t
20906 s&@top_builddir@&$ac_top_builddir_sub&;t t
20907 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20908 s&@srcdir@&$ac_srcdir&;t t
20909 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20910 s&@top_srcdir@&$ac_top_srcdir&;t t
20911 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20912 s&@builddir@&$ac_builddir&;t t
20913 s&@abs_builddir@&$ac_abs_builddir&;t t
20914 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20915 s&@INSTALL@&$ac_INSTALL&;t t
20916 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20917 $ac_datarootdir_hack
20919 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20920 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20922 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20923 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20924 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20925 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20927 which seems to be undefined. Please make sure it is defined" >&5
20928 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20929 which seems to be undefined. Please make sure it is defined" >&2;}
20931 rm -f "$ac_tmp/stdin"
20932 case $ac_file in
20933 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20934 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20935 esac \
20936 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20940 # CONFIG_HEADER
20942 if test x"$ac_file" != x-; then
20944 $as_echo "/* $configure_input */" \
20945 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20946 } >"$ac_tmp/config.h" \
20947 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20948 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20949 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20950 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20951 else
20952 rm -f "$ac_file"
20953 mv "$ac_tmp/config.h" "$ac_file" \
20954 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20956 else
20957 $as_echo "/* $configure_input */" \
20958 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20959 || as_fn_error $? "could not create -" "$LINENO" 5
20964 # CONFIG_LINK
20967 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20969 else
20970 # Prefer the file from the source tree if names are identical.
20971 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20972 ac_source=$srcdir/$ac_source
20975 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20976 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20978 if test ! -r "$ac_source"; then
20979 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20981 rm -f "$ac_file"
20983 # Try a relative symlink, then a hard link, then a copy.
20984 case $ac_source in
20985 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20986 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20987 esac
20988 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20989 ln "$ac_source" "$ac_file" 2>/dev/null ||
20990 cp -p "$ac_source" "$ac_file" ||
20991 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20994 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20995 $as_echo "$as_me: executing $ac_file commands" >&6;}
20997 esac
21000 case $ac_file$ac_mode in
21001 "check_win32_symlinks":C)
21002 # Links sometimes fail undetected on Mingw -
21003 # so here we detect it and warn the user
21004 for FILE in $CONFIG_LINKS
21006 # test -e works for symlinks in the MinGW console
21007 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
21008 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
21009 done
21011 "src/include/pg_config.h":H)
21012 # Update timestamp for pg_config.h (see Makefile.global)
21013 echo >src/include/stamp-h
21015 "src/include/pg_config_ext.h":H)
21016 # Update timestamp for pg_config_ext.h (see Makefile.global)
21017 echo >src/include/stamp-ext-h
21019 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
21021 esac
21022 done # for ac_tag
21025 as_fn_exit 0
21026 _ACEOF
21027 ac_clean_files=$ac_clean_files_save
21029 test $ac_write_fail = 0 ||
21030 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21033 # configure is writing to config.log, and then calls config.status.
21034 # config.status does its own redirection, appending to config.log.
21035 # Unfortunately, on DOS this fails, as config.log is still kept open
21036 # by configure, so config.status won't be able to write to it; its
21037 # output is simply discarded. So we exec the FD to /dev/null,
21038 # effectively closing config.log, so it can be properly (re)opened and
21039 # appended to by config.status. When coming back to configure, we
21040 # need to make the FD available again.
21041 if test "$no_create" != yes; then
21042 ac_cs_success=:
21043 ac_config_status_args=
21044 test "$silent" = yes &&
21045 ac_config_status_args="$ac_config_status_args --quiet"
21046 exec 5>/dev/null
21047 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21048 exec 5>>config.log
21049 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21050 # would make configure fail if this is the last instruction.
21051 $ac_cs_success || as_fn_exit 1
21053 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21055 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}