Add SQL function array_reverse()
[pgsql.git] / configure
blob268ac94ae69f96e525f340aca81ef07d12c49551
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 18devel.
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
14 # Copyright (c) 1996-2024, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
34 esac
38 as_nl='
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54 else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
86 # IFS
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" "" $as_nl"
93 # Find who we are. Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
104 IFS=$as_save_IFS
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111 as_myself=$0
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there. '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139 # Use a proper internal environment variable to ensure we don't fall
140 # into an infinite loop, continuously re-executing ourselves.
141 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142 _as_can_reexec=no; export _as_can_reexec;
143 # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151 *v*x* | *x*v* ) as_opts=-vx ;;
152 *v* ) as_opts=-v ;;
153 *x* ) as_opts=-x ;;
154 * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
162 # We don't want this to propagate to other subprocesses.
163 { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 emulate sh
167 NULLCMD=:
168 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169 # is contrary to our usage. Disable this feature.
170 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 setopt NO_GLOB_SUBST
172 else
173 case \`(set -o) 2>/dev/null\` in #(
174 *posix*) :
175 set -o posix ;; #(
176 *) :
178 esac
181 as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
194 else
195 exitcode=1; echo positional parameters were not saved.
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204 if (eval "$as_required") 2>/dev/null; then :
205 as_have_required=yes
206 else
207 as_have_required=no
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
211 else
212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
221 for as_base in sh bash ksh sh5; do
222 # Try only shells that exist, to save several forks.
223 as_shell=$as_dir/$as_base
224 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 CONFIG_SHELL=$as_shell as_have_required=yes
227 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228 break 2
231 done;;
232 esac
233 as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237 CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
242 if test "x$CONFIG_SHELL" != x; then :
243 export CONFIG_SHELL
244 # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252 *v*x* | *x*v* ) as_opts=-vx ;;
253 *v* ) as_opts=-v ;;
254 *x* ) as_opts=-x ;;
255 * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
264 if test x$as_have_required = xno; then :
265 $as_echo "$0: This script requires a shell more modern than all"
266 $as_echo "$0: the shells that I found on your system."
267 if test x${ZSH_VERSION+set} = xset ; then
268 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270 else
271 $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@lists.postgresql.org about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
277 exit 1
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
295 { eval $1=; unset $1;}
297 as_unset=as_fn_unset
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
304 return $1
305 } # as_fn_set_status
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
323 case $as_dir in #(
324 -*) as_dir=./$as_dir;;
325 esac
326 test -d "$as_dir" || eval $as_mkdir_p || {
327 as_dirs=
328 while :; do
329 case $as_dir in #(
330 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 *) as_qdir=$as_dir;;
332 esac
333 as_dirs="'$as_qdir' $as_dirs"
334 as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336 X"$as_dir" : 'X\(//\)[^/]' \| \
337 X"$as_dir" : 'X\(//\)$' \| \
338 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341 s//\1/
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
348 /^X\(\/\/\)$/{
349 s//\1/
352 /^X\(\/\).*/{
353 s//\1/
356 s/.*/./; q'`
357 test -d "$as_dir" && break
358 done
359 test -z "$as_dirs" || eval "mkdir $as_dirs"
360 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 } # as_fn_mkdir_p
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
370 test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379 eval 'as_fn_append ()
381 eval $1+=\$2
383 else
384 as_fn_append ()
386 eval $1=\$$1\$2
388 fi # as_fn_append
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396 eval 'as_fn_arith ()
398 as_val=$(( $* ))
400 else
401 as_fn_arith ()
403 as_val=`expr "$@" || test $? -eq 1`
405 fi # as_fn_arith
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
415 as_status=$1; test $as_status -eq 0 && as_status=1
416 if test "$4"; then
417 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422 } # as_fn_error
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425 test "X`expr 00001 : '.*\(...\)'`" = X001; then
426 as_expr=expr
427 else
428 as_expr=false
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 as_basename=basename
433 else
434 as_basename=false
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438 as_dirname=dirname
439 else
440 as_dirname=false
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445 X"$0" : 'X\(//\)$' \| \
446 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448 sed '/^.*\/\([^/][^/]*\)\/*$/{
449 s//\1/
452 /^X\/\(\/\/\)$/{
453 s//\1/
456 /^X\/\(\/\).*/{
457 s//\1/
460 s/.*/./; q'`
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
470 as_lineno_1=$LINENO as_lineno_1a=$LINENO
471 as_lineno_2=$LINENO as_lineno_2a=$LINENO
472 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
475 sed -n '
477 /[$]LINENO/=
478 ' <$as_myself |
479 sed '
480 s/[$]LINENO.*/&-/
481 t lineno
483 :lineno
485 :loop
486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487 t loop
488 s/-\n.*//
489 ' >$as_me.lineno &&
490 chmod +x "$as_me.lineno" ||
491 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
493 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494 # already done that, so ensure we don't try to do so again and fall
495 # in an infinite loop. This has already happened in practice.
496 _as_can_reexec=no; export _as_can_reexec
497 # Don't try to exec as it changes $[0], causing all sort of problems
498 # (the dirname of $[0] is not the place where we might find the
499 # original and so on. Autoconf is especially sensitive to this).
500 . "./$as_me.lineno"
501 # Exit status is that of the last command.
502 exit
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508 case `echo 'xy\c'` in
509 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
510 xy) ECHO_C='\c';;
511 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
512 ECHO_T=' ';;
513 esac;;
515 ECHO_N='-n';;
516 esac
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520 rm -f conf$$.dir/conf$$.file
521 else
522 rm -f conf$$.dir
523 mkdir conf$$.dir 2>/dev/null
525 if (echo >conf$$.file) 2>/dev/null; then
526 if ln -s conf$$.file conf$$ 2>/dev/null; then
527 as_ln_s='ln -s'
528 # ... but there are two gotchas:
529 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531 # In both cases, we have to default to `cp -pR'.
532 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533 as_ln_s='cp -pR'
534 elif ln conf$$.file conf$$ 2>/dev/null; then
535 as_ln_s=ln
536 else
537 as_ln_s='cp -pR'
539 else
540 as_ln_s='cp -pR'
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
545 if mkdir -p . 2>/dev/null; then
546 as_mkdir_p='mkdir -p "$as_dir"'
547 else
548 test -d ./-p && rmdir ./-p
549 as_mkdir_p=false
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 # Initializations.
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='18devel'
586 PACKAGE_STRING='PostgreSQL 18devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 LDFLAGS_EX_BE
633 PROVE
634 DBTOEPUB
636 XSLTPROC
637 XMLLINT
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_CRC
650 PG_POPCNT_OBJS
651 CFLAGS_POPCNT
652 CFLAGS_XSAVE
653 LIBOBJS
654 OPENSSL
655 ZSTD
657 UUID_LIBS
658 LDAP_LIBS_BE
659 LDAP_LIBS_FE
660 with_ssl
661 PTHREAD_CFLAGS
662 PTHREAD_LIBS
663 PTHREAD_CC
664 ax_pthread_config
665 EGREP
666 GREP
669 python_additional_libs
670 python_libspec
671 python_libdir
672 python_includespec
673 python_version
674 python_majorversion
675 PYTHON
676 perl_embed_ldflags
677 perl_embed_ccflags
678 perl_includespec
679 perl_useshrplib
680 perl_privlibexp
681 perl_archlibexp
682 PERL
683 FLEXFLAGS
684 FLEX
685 BISONFLAGS
686 BISON
687 MKDIR_P
688 LN_S
690 install_bin
691 INSTALL_DATA
692 INSTALL_SCRIPT
693 INSTALL_PROGRAM
694 WINDRES
696 STRIP_SHARED_LIB
697 STRIP_STATIC_LIB
698 STRIP
699 LDFLAGS_SL
700 LDFLAGS_EX
701 ZSTD_LIBS
702 ZSTD_CFLAGS
703 with_zstd
704 LZ4_LIBS
705 LZ4_CFLAGS
706 with_lz4
707 with_zlib
708 with_system_tzdata
709 with_libxslt
710 XML2_LIBS
711 XML2_CFLAGS
712 XML2_CONFIG
713 with_libxml
714 with_uuid
715 with_readline
716 with_systemd
717 with_selinux
718 with_ldap
719 with_krb_srvnam
720 krb_srvtab
721 with_gssapi
722 with_python
723 with_perl
724 with_tcl
725 ICU_LIBS
726 ICU_CFLAGS
727 with_icu
728 INCLUDES
729 autodepend
730 PKG_CONFIG_LIBDIR
731 PKG_CONFIG_PATH
732 PKG_CONFIG
733 DLSUFFIX
737 CFLAGS_SL
738 BITCODE_CXXFLAGS
739 BITCODE_CFLAGS
740 CXXFLAGS_SL_MODULE
741 CFLAGS_SL_MODULE
742 CFLAGS_VECTORIZE
743 CFLAGS_UNROLL_LOOPS
744 PERMIT_MISSING_VARIABLE_DECLARATIONS
745 PERMIT_DECLARATION_AFTER_STATEMENT
746 LLVM_BINPATH
747 LLVM_CXXFLAGS
748 LLVM_CFLAGS
749 LLVM_CPPFLAGS
750 LLVM_LIBS
751 CLANG
752 LLVM_CONFIG
754 with_llvm
755 SUN_STUDIO_CC
756 ac_ct_CXX
757 CXXFLAGS
759 OBJEXT
760 EXEEXT
761 ac_ct_CC
762 CPPFLAGS
763 LDFLAGS
764 CFLAGS
766 enable_injection_points
767 enable_tap_tests
768 enable_dtrace
769 DTRACEFLAGS
770 DTRACE
771 enable_coverage
772 GENHTML
773 LCOV
774 GCOV
775 enable_debug
776 enable_rpath
777 default_port
778 WANTED_LANGUAGES
779 enable_nls
780 PORTNAME
781 host_os
782 host_vendor
783 host_cpu
784 host
785 build_os
786 build_vendor
787 build_cpu
788 build
789 PG_MAJORVERSION
790 target_alias
791 host_alias
792 build_alias
793 LIBS
794 ECHO_T
795 ECHO_N
796 ECHO_C
797 DEFS
798 mandir
799 localedir
800 libdir
801 psdir
802 pdfdir
803 dvidir
804 htmldir
805 infodir
806 docdir
807 oldincludedir
808 includedir
809 localstatedir
810 sharedstatedir
811 sysconfdir
812 datadir
813 datarootdir
814 libexecdir
815 sbindir
816 bindir
817 program_transform_name
818 prefix
819 exec_prefix
820 PACKAGE_URL
821 PACKAGE_BUGREPORT
822 PACKAGE_STRING
823 PACKAGE_VERSION
824 PACKAGE_TARNAME
825 PACKAGE_NAME
826 PATH_SEPARATOR
827 SHELL'
828 ac_subst_files=''
829 ac_user_opts='
830 enable_option_checking
831 with_extra_version
832 with_template
833 with_includes
834 with_libraries
835 with_libs
836 enable_integer_datetimes
837 enable_nls
838 with_pgport
839 enable_rpath
840 enable_debug
841 enable_profiling
842 enable_coverage
843 enable_dtrace
844 enable_tap_tests
845 enable_injection_points
846 with_blocksize
847 with_segsize
848 with_segsize_blocks
849 with_wal_blocksize
850 with_llvm
851 enable_depend
852 enable_cassert
853 with_icu
854 with_tcl
855 with_tclconfig
856 with_perl
857 with_python
858 with_gssapi
859 with_krb_srvnam
860 with_pam
861 with_bsd_auth
862 with_ldap
863 with_bonjour
864 with_selinux
865 with_systemd
866 with_readline
867 with_libedit_preferred
868 with_uuid
869 with_ossp_uuid
870 with_libxml
871 with_libxslt
872 with_system_tzdata
873 with_zlib
874 with_lz4
875 with_zstd
876 with_ssl
877 with_openssl
878 enable_largefile
880 ac_precious_vars='build_alias
881 host_alias
882 target_alias
884 CFLAGS
885 LDFLAGS
886 LIBS
887 CPPFLAGS
889 CXXFLAGS
891 LLVM_CONFIG
892 CLANG
894 PKG_CONFIG
895 PKG_CONFIG_PATH
896 PKG_CONFIG_LIBDIR
897 ICU_CFLAGS
898 ICU_LIBS
899 XML2_CONFIG
900 XML2_CFLAGS
901 XML2_LIBS
902 LZ4_CFLAGS
903 LZ4_LIBS
904 ZSTD_CFLAGS
905 ZSTD_LIBS
906 LDFLAGS_EX
907 LDFLAGS_SL
908 PERL
909 PYTHON
910 MSGFMT
911 TCLSH'
914 # Initialize some variables set by options.
915 ac_init_help=
916 ac_init_version=false
917 ac_unrecognized_opts=
918 ac_unrecognized_sep=
919 # The variables have the same names as the options, with
920 # dashes changed to underlines.
921 cache_file=/dev/null
922 exec_prefix=NONE
923 no_create=
924 no_recursion=
925 prefix=NONE
926 program_prefix=NONE
927 program_suffix=NONE
928 program_transform_name=s,x,x,
929 silent=
930 site=
931 srcdir=
932 verbose=
933 x_includes=NONE
934 x_libraries=NONE
936 # Installation directory options.
937 # These are left unexpanded so users can "make install exec_prefix=/foo"
938 # and all the variables that are supposed to be based on exec_prefix
939 # by default will actually change.
940 # Use braces instead of parens because sh, perl, etc. also accept them.
941 # (The list follows the same order as the GNU Coding Standards.)
942 bindir='${exec_prefix}/bin'
943 sbindir='${exec_prefix}/sbin'
944 libexecdir='${exec_prefix}/libexec'
945 datarootdir='${prefix}/share'
946 datadir='${datarootdir}'
947 sysconfdir='${prefix}/etc'
948 sharedstatedir='${prefix}/com'
949 localstatedir='${prefix}/var'
950 includedir='${prefix}/include'
951 oldincludedir='/usr/include'
952 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
953 infodir='${datarootdir}/info'
954 htmldir='${docdir}'
955 dvidir='${docdir}'
956 pdfdir='${docdir}'
957 psdir='${docdir}'
958 libdir='${exec_prefix}/lib'
959 localedir='${datarootdir}/locale'
960 mandir='${datarootdir}/man'
962 ac_prev=
963 ac_dashdash=
964 for ac_option
966 # If the previous option needs an argument, assign it.
967 if test -n "$ac_prev"; then
968 eval $ac_prev=\$ac_option
969 ac_prev=
970 continue
973 case $ac_option in
974 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
975 *=) ac_optarg= ;;
976 *) ac_optarg=yes ;;
977 esac
979 # Accept the important Cygnus configure options, so we can diagnose typos.
981 case $ac_dashdash$ac_option in
983 ac_dashdash=yes ;;
985 -bindir | --bindir | --bindi | --bind | --bin | --bi)
986 ac_prev=bindir ;;
987 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
988 bindir=$ac_optarg ;;
990 -build | --build | --buil | --bui | --bu)
991 ac_prev=build_alias ;;
992 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
993 build_alias=$ac_optarg ;;
995 -cache-file | --cache-file | --cache-fil | --cache-fi \
996 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
997 ac_prev=cache_file ;;
998 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
999 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1000 cache_file=$ac_optarg ;;
1002 --config-cache | -C)
1003 cache_file=config.cache ;;
1005 -datadir | --datadir | --datadi | --datad)
1006 ac_prev=datadir ;;
1007 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1008 datadir=$ac_optarg ;;
1010 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1011 | --dataroo | --dataro | --datar)
1012 ac_prev=datarootdir ;;
1013 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1014 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1015 datarootdir=$ac_optarg ;;
1017 -disable-* | --disable-*)
1018 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1019 # Reject names that are not valid shell variable names.
1020 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1021 as_fn_error $? "invalid feature name: $ac_useropt"
1022 ac_useropt_orig=$ac_useropt
1023 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1024 case $ac_user_opts in
1026 "enable_$ac_useropt"
1027 "*) ;;
1028 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1029 ac_unrecognized_sep=', ';;
1030 esac
1031 eval enable_$ac_useropt=no ;;
1033 -docdir | --docdir | --docdi | --doc | --do)
1034 ac_prev=docdir ;;
1035 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1036 docdir=$ac_optarg ;;
1038 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1039 ac_prev=dvidir ;;
1040 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1041 dvidir=$ac_optarg ;;
1043 -enable-* | --enable-*)
1044 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1045 # Reject names that are not valid shell variable names.
1046 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1047 as_fn_error $? "invalid feature name: $ac_useropt"
1048 ac_useropt_orig=$ac_useropt
1049 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1050 case $ac_user_opts in
1052 "enable_$ac_useropt"
1053 "*) ;;
1054 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1055 ac_unrecognized_sep=', ';;
1056 esac
1057 eval enable_$ac_useropt=\$ac_optarg ;;
1059 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1060 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1061 | --exec | --exe | --ex)
1062 ac_prev=exec_prefix ;;
1063 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1064 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1065 | --exec=* | --exe=* | --ex=*)
1066 exec_prefix=$ac_optarg ;;
1068 -gas | --gas | --ga | --g)
1069 # Obsolete; use --with-gas.
1070 with_gas=yes ;;
1072 -help | --help | --hel | --he | -h)
1073 ac_init_help=long ;;
1074 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1075 ac_init_help=recursive ;;
1076 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1077 ac_init_help=short ;;
1079 -host | --host | --hos | --ho)
1080 ac_prev=host_alias ;;
1081 -host=* | --host=* | --hos=* | --ho=*)
1082 host_alias=$ac_optarg ;;
1084 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1085 ac_prev=htmldir ;;
1086 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1087 | --ht=*)
1088 htmldir=$ac_optarg ;;
1090 -includedir | --includedir | --includedi | --included | --include \
1091 | --includ | --inclu | --incl | --inc)
1092 ac_prev=includedir ;;
1093 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1094 | --includ=* | --inclu=* | --incl=* | --inc=*)
1095 includedir=$ac_optarg ;;
1097 -infodir | --infodir | --infodi | --infod | --info | --inf)
1098 ac_prev=infodir ;;
1099 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1100 infodir=$ac_optarg ;;
1102 -libdir | --libdir | --libdi | --libd)
1103 ac_prev=libdir ;;
1104 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1105 libdir=$ac_optarg ;;
1107 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1108 | --libexe | --libex | --libe)
1109 ac_prev=libexecdir ;;
1110 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1111 | --libexe=* | --libex=* | --libe=*)
1112 libexecdir=$ac_optarg ;;
1114 -localedir | --localedir | --localedi | --localed | --locale)
1115 ac_prev=localedir ;;
1116 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1117 localedir=$ac_optarg ;;
1119 -localstatedir | --localstatedir | --localstatedi | --localstated \
1120 | --localstate | --localstat | --localsta | --localst | --locals)
1121 ac_prev=localstatedir ;;
1122 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1123 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1124 localstatedir=$ac_optarg ;;
1126 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1127 ac_prev=mandir ;;
1128 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1129 mandir=$ac_optarg ;;
1131 -nfp | --nfp | --nf)
1132 # Obsolete; use --without-fp.
1133 with_fp=no ;;
1135 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1136 | --no-cr | --no-c | -n)
1137 no_create=yes ;;
1139 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1140 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1141 no_recursion=yes ;;
1143 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1144 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1145 | --oldin | --oldi | --old | --ol | --o)
1146 ac_prev=oldincludedir ;;
1147 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1148 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1149 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1150 oldincludedir=$ac_optarg ;;
1152 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1153 ac_prev=prefix ;;
1154 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1155 prefix=$ac_optarg ;;
1157 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1158 | --program-pre | --program-pr | --program-p)
1159 ac_prev=program_prefix ;;
1160 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1161 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1162 program_prefix=$ac_optarg ;;
1164 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1165 | --program-suf | --program-su | --program-s)
1166 ac_prev=program_suffix ;;
1167 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1168 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1169 program_suffix=$ac_optarg ;;
1171 -program-transform-name | --program-transform-name \
1172 | --program-transform-nam | --program-transform-na \
1173 | --program-transform-n | --program-transform- \
1174 | --program-transform | --program-transfor \
1175 | --program-transfo | --program-transf \
1176 | --program-trans | --program-tran \
1177 | --progr-tra | --program-tr | --program-t)
1178 ac_prev=program_transform_name ;;
1179 -program-transform-name=* | --program-transform-name=* \
1180 | --program-transform-nam=* | --program-transform-na=* \
1181 | --program-transform-n=* | --program-transform-=* \
1182 | --program-transform=* | --program-transfor=* \
1183 | --program-transfo=* | --program-transf=* \
1184 | --program-trans=* | --program-tran=* \
1185 | --progr-tra=* | --program-tr=* | --program-t=*)
1186 program_transform_name=$ac_optarg ;;
1188 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1189 ac_prev=pdfdir ;;
1190 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1191 pdfdir=$ac_optarg ;;
1193 -psdir | --psdir | --psdi | --psd | --ps)
1194 ac_prev=psdir ;;
1195 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1196 psdir=$ac_optarg ;;
1198 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1199 | -silent | --silent | --silen | --sile | --sil)
1200 silent=yes ;;
1202 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1203 ac_prev=sbindir ;;
1204 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1205 | --sbi=* | --sb=*)
1206 sbindir=$ac_optarg ;;
1208 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1209 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1210 | --sharedst | --shareds | --shared | --share | --shar \
1211 | --sha | --sh)
1212 ac_prev=sharedstatedir ;;
1213 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1214 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1215 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1216 | --sha=* | --sh=*)
1217 sharedstatedir=$ac_optarg ;;
1219 -site | --site | --sit)
1220 ac_prev=site ;;
1221 -site=* | --site=* | --sit=*)
1222 site=$ac_optarg ;;
1224 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1225 ac_prev=srcdir ;;
1226 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1227 srcdir=$ac_optarg ;;
1229 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1230 | --syscon | --sysco | --sysc | --sys | --sy)
1231 ac_prev=sysconfdir ;;
1232 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1233 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1234 sysconfdir=$ac_optarg ;;
1236 -target | --target | --targe | --targ | --tar | --ta | --t)
1237 ac_prev=target_alias ;;
1238 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1239 target_alias=$ac_optarg ;;
1241 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1242 verbose=yes ;;
1244 -version | --version | --versio | --versi | --vers | -V)
1245 ac_init_version=: ;;
1247 -with-* | --with-*)
1248 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1249 # Reject names that are not valid shell variable names.
1250 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1251 as_fn_error $? "invalid package name: $ac_useropt"
1252 ac_useropt_orig=$ac_useropt
1253 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1254 case $ac_user_opts in
1256 "with_$ac_useropt"
1257 "*) ;;
1258 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1259 ac_unrecognized_sep=', ';;
1260 esac
1261 eval with_$ac_useropt=\$ac_optarg ;;
1263 -without-* | --without-*)
1264 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1265 # Reject names that are not valid shell variable names.
1266 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1267 as_fn_error $? "invalid package name: $ac_useropt"
1268 ac_useropt_orig=$ac_useropt
1269 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1270 case $ac_user_opts in
1272 "with_$ac_useropt"
1273 "*) ;;
1274 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1275 ac_unrecognized_sep=', ';;
1276 esac
1277 eval with_$ac_useropt=no ;;
1279 --x)
1280 # Obsolete; use --with-x.
1281 with_x=yes ;;
1283 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1284 | --x-incl | --x-inc | --x-in | --x-i)
1285 ac_prev=x_includes ;;
1286 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1287 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1288 x_includes=$ac_optarg ;;
1290 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1291 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1292 ac_prev=x_libraries ;;
1293 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1294 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1295 x_libraries=$ac_optarg ;;
1297 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1298 Try \`$0 --help' for more information"
1301 *=*)
1302 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1303 # Reject names that are not valid shell variable names.
1304 case $ac_envvar in #(
1305 '' | [0-9]* | *[!_$as_cr_alnum]* )
1306 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1307 esac
1308 eval $ac_envvar=\$ac_optarg
1309 export $ac_envvar ;;
1312 # FIXME: should be removed in autoconf 3.0.
1313 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1314 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1315 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1316 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1319 esac
1320 done
1322 if test -n "$ac_prev"; then
1323 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1324 as_fn_error $? "missing argument to $ac_option"
1327 if test -n "$ac_unrecognized_opts"; then
1328 case $enable_option_checking in
1329 no) ;;
1330 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1331 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1332 esac
1335 # Check all directory arguments for consistency.
1336 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1337 datadir sysconfdir sharedstatedir localstatedir includedir \
1338 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1339 libdir localedir mandir
1341 eval ac_val=\$$ac_var
1342 # Remove trailing slashes.
1343 case $ac_val in
1344 */ )
1345 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1346 eval $ac_var=\$ac_val;;
1347 esac
1348 # Be sure to have absolute directory names.
1349 case $ac_val in
1350 [\\/$]* | ?:[\\/]* ) continue;;
1351 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1352 esac
1353 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1354 done
1356 # There might be people who depend on the old broken behavior: `$host'
1357 # used to hold the argument of --host etc.
1358 # FIXME: To remove some day.
1359 build=$build_alias
1360 host=$host_alias
1361 target=$target_alias
1363 # FIXME: To remove some day.
1364 if test "x$host_alias" != x; then
1365 if test "x$build_alias" = x; then
1366 cross_compiling=maybe
1367 elif test "x$build_alias" != "x$host_alias"; then
1368 cross_compiling=yes
1372 ac_tool_prefix=
1373 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1375 test "$silent" = yes && exec 6>/dev/null
1378 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1379 ac_ls_di=`ls -di .` &&
1380 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1381 as_fn_error $? "working directory cannot be determined"
1382 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1383 as_fn_error $? "pwd does not report name of working directory"
1386 # Find the source files, if location was not specified.
1387 if test -z "$srcdir"; then
1388 ac_srcdir_defaulted=yes
1389 # Try the directory containing this script, then the parent directory.
1390 ac_confdir=`$as_dirname -- "$as_myself" ||
1391 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1392 X"$as_myself" : 'X\(//\)[^/]' \| \
1393 X"$as_myself" : 'X\(//\)$' \| \
1394 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1395 $as_echo X"$as_myself" |
1396 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1397 s//\1/
1400 /^X\(\/\/\)[^/].*/{
1401 s//\1/
1404 /^X\(\/\/\)$/{
1405 s//\1/
1408 /^X\(\/\).*/{
1409 s//\1/
1412 s/.*/./; q'`
1413 srcdir=$ac_confdir
1414 if test ! -r "$srcdir/$ac_unique_file"; then
1415 srcdir=..
1417 else
1418 ac_srcdir_defaulted=no
1420 if test ! -r "$srcdir/$ac_unique_file"; then
1421 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1422 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1424 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1425 ac_abs_confdir=`(
1426 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1427 pwd)`
1428 # When building in place, set srcdir=.
1429 if test "$ac_abs_confdir" = "$ac_pwd"; then
1430 srcdir=.
1432 # Remove unnecessary trailing slashes from srcdir.
1433 # Double slashes in file names in object file debugging info
1434 # mess up M-x gdb in Emacs.
1435 case $srcdir in
1436 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1437 esac
1438 for ac_var in $ac_precious_vars; do
1439 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1440 eval ac_env_${ac_var}_value=\$${ac_var}
1441 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1442 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1443 done
1446 # Report the --help message.
1448 if test "$ac_init_help" = "long"; then
1449 # Omit some internal or obsolete options to make the list less imposing.
1450 # This message is too long to be a string in the A/UX 3.1 sh.
1451 cat <<_ACEOF
1452 \`configure' configures PostgreSQL 18devel to adapt to many kinds of systems.
1454 Usage: $0 [OPTION]... [VAR=VALUE]...
1456 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1457 VAR=VALUE. See below for descriptions of some of the useful variables.
1459 Defaults for the options are specified in brackets.
1461 Configuration:
1462 -h, --help display this help and exit
1463 --help=short display options specific to this package
1464 --help=recursive display the short help of all the included packages
1465 -V, --version display version information and exit
1466 -q, --quiet, --silent do not print \`checking ...' messages
1467 --cache-file=FILE cache test results in FILE [disabled]
1468 -C, --config-cache alias for \`--cache-file=config.cache'
1469 -n, --no-create do not create output files
1470 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1472 Installation directories:
1473 --prefix=PREFIX install architecture-independent files in PREFIX
1474 [$ac_default_prefix]
1475 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1476 [PREFIX]
1478 By default, \`make install' will install all the files in
1479 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1480 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1481 for instance \`--prefix=\$HOME'.
1483 For better control, use the options below.
1485 Fine tuning of the installation directories:
1486 --bindir=DIR user executables [EPREFIX/bin]
1487 --sbindir=DIR system admin executables [EPREFIX/sbin]
1488 --libexecdir=DIR program executables [EPREFIX/libexec]
1489 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1490 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1491 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1492 --libdir=DIR object code libraries [EPREFIX/lib]
1493 --includedir=DIR C header files [PREFIX/include]
1494 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1495 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1496 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1497 --infodir=DIR info documentation [DATAROOTDIR/info]
1498 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1499 --mandir=DIR man documentation [DATAROOTDIR/man]
1500 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1501 --htmldir=DIR html documentation [DOCDIR]
1502 --dvidir=DIR dvi documentation [DOCDIR]
1503 --pdfdir=DIR pdf documentation [DOCDIR]
1504 --psdir=DIR ps documentation [DOCDIR]
1505 _ACEOF
1507 cat <<\_ACEOF
1509 System types:
1510 --build=BUILD configure for building on BUILD [guessed]
1511 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1512 _ACEOF
1515 if test -n "$ac_init_help"; then
1516 case $ac_init_help in
1517 short | recursive ) echo "Configuration of PostgreSQL 18devel:";;
1518 esac
1519 cat <<\_ACEOF
1521 Optional Features:
1522 --disable-option-checking ignore unrecognized --enable/--with options
1523 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1524 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1525 --disable-integer-datetimes
1526 obsolete option, no longer supported
1527 --enable-nls[=LANGUAGES]
1528 enable Native Language Support
1529 --disable-rpath do not embed shared library search path in
1530 executables
1531 --enable-debug build with debugging symbols (-g)
1532 --enable-profiling build with profiling enabled
1533 --enable-coverage build with coverage testing instrumentation
1534 --enable-dtrace build with DTrace support
1535 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1536 --enable-injection-points
1537 enable injection points (for testing)
1538 --enable-depend turn on automatic dependency tracking
1539 --enable-cassert enable assertion checks (for debugging)
1540 --disable-largefile omit support for large files
1542 Optional Packages:
1543 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1544 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1545 --with-extra-version=STRING
1546 append STRING to version
1547 --with-template=NAME override operating system template
1548 --with-includes=DIRS look for additional header files in DIRS
1549 --with-libraries=DIRS look for additional libraries in DIRS
1550 --with-libs=DIRS alternative spelling of --with-libraries
1551 --with-pgport=PORTNUM set default port number [5432]
1552 --with-blocksize=BLOCKSIZE
1553 set table block size in kB [8]
1554 --with-segsize=SEGSIZE set table segment size in GB [1]
1555 --with-segsize-blocks=SEGSIZE_BLOCKS
1556 set table segment size in blocks [0]
1557 --with-wal-blocksize=BLOCKSIZE
1558 set WAL block size in kB [8]
1559 --with-llvm build with LLVM based JIT support
1560 --without-icu build without ICU support
1561 --with-tcl build Tcl modules (PL/Tcl)
1562 --with-tclconfig=DIR tclConfig.sh is in DIR
1563 --with-perl build Perl modules (PL/Perl)
1564 --with-python build Python modules (PL/Python)
1565 --with-gssapi build with GSSAPI support
1566 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1567 [postgres]
1568 --with-pam build with PAM support
1569 --with-bsd-auth build with BSD Authentication support
1570 --with-ldap build with LDAP support
1571 --with-bonjour build with Bonjour support
1572 --with-selinux build with SELinux support
1573 --with-systemd build with systemd support
1574 --without-readline do not use GNU Readline nor BSD Libedit for editing
1575 --with-libedit-preferred
1576 prefer BSD Libedit over GNU Readline
1577 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1578 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1579 --with-libxml build with XML support
1580 --with-libxslt use XSLT support when building contrib/xml2
1581 --with-system-tzdata=DIR
1582 use system time zone data in DIR
1583 --without-zlib do not use Zlib
1584 --with-lz4 build with LZ4 support
1585 --with-zstd build with ZSTD support
1586 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1587 --with-openssl obsolete spelling of --with-ssl=openssl
1589 Some influential environment variables:
1590 CC C compiler command
1591 CFLAGS C compiler flags
1592 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1593 nonstandard directory <lib dir>
1594 LIBS libraries to pass to the linker, e.g. -l<library>
1595 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1596 you have headers in a nonstandard directory <include dir>
1597 CXX C++ compiler command
1598 CXXFLAGS C++ compiler flags
1599 LLVM_CONFIG path to llvm-config command
1600 CLANG path to clang compiler to generate bitcode
1601 CPP C preprocessor
1602 PKG_CONFIG path to pkg-config utility
1603 PKG_CONFIG_PATH
1604 directories to add to pkg-config's search path
1605 PKG_CONFIG_LIBDIR
1606 path overriding pkg-config's built-in search path
1607 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1608 ICU_LIBS linker flags for ICU, overriding pkg-config
1609 XML2_CONFIG path to xml2-config utility
1610 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1611 XML2_LIBS linker flags for XML2, overriding pkg-config
1612 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1613 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1614 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1615 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1616 LDFLAGS_EX extra linker flags for linking executables only
1617 LDFLAGS_SL extra linker flags for linking shared libraries only
1618 PERL Perl program
1619 PYTHON Python program
1620 MSGFMT msgfmt program for NLS
1621 TCLSH Tcl interpreter program (tclsh)
1623 Use these variables to override the choices made by `configure' or to help
1624 it to find libraries and programs with nonstandard names/locations.
1626 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1627 PostgreSQL home page: <https://www.postgresql.org/>.
1628 _ACEOF
1629 ac_status=$?
1632 if test "$ac_init_help" = "recursive"; then
1633 # If there are subdirs, report their specific --help.
1634 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1635 test -d "$ac_dir" ||
1636 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1637 continue
1638 ac_builddir=.
1640 case "$ac_dir" in
1641 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1643 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1644 # A ".." for each directory in $ac_dir_suffix.
1645 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1646 case $ac_top_builddir_sub in
1647 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1648 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1649 esac ;;
1650 esac
1651 ac_abs_top_builddir=$ac_pwd
1652 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1653 # for backward compatibility:
1654 ac_top_builddir=$ac_top_build_prefix
1656 case $srcdir in
1657 .) # We are building in place.
1658 ac_srcdir=.
1659 ac_top_srcdir=$ac_top_builddir_sub
1660 ac_abs_top_srcdir=$ac_pwd ;;
1661 [\\/]* | ?:[\\/]* ) # Absolute name.
1662 ac_srcdir=$srcdir$ac_dir_suffix;
1663 ac_top_srcdir=$srcdir
1664 ac_abs_top_srcdir=$srcdir ;;
1665 *) # Relative name.
1666 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1667 ac_top_srcdir=$ac_top_build_prefix$srcdir
1668 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1669 esac
1670 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1672 cd "$ac_dir" || { ac_status=$?; continue; }
1673 # Check for guested configure.
1674 if test -f "$ac_srcdir/configure.gnu"; then
1675 echo &&
1676 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1677 elif test -f "$ac_srcdir/configure"; then
1678 echo &&
1679 $SHELL "$ac_srcdir/configure" --help=recursive
1680 else
1681 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1682 fi || ac_status=$?
1683 cd "$ac_pwd" || { ac_status=$?; break; }
1684 done
1687 test -n "$ac_init_help" && exit $ac_status
1688 if $ac_init_version; then
1689 cat <<\_ACEOF
1690 PostgreSQL configure 18devel
1691 generated by GNU Autoconf 2.69
1693 Copyright (C) 2012 Free Software Foundation, Inc.
1694 This configure script is free software; the Free Software Foundation
1695 gives unlimited permission to copy, distribute and modify it.
1697 Copyright (c) 1996-2024, PostgreSQL Global Development Group
1698 _ACEOF
1699 exit
1702 ## ------------------------ ##
1703 ## Autoconf initialization. ##
1704 ## ------------------------ ##
1706 # ac_fn_c_try_compile LINENO
1707 # --------------------------
1708 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1709 ac_fn_c_try_compile ()
1711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712 rm -f conftest.$ac_objext
1713 if { { ac_try="$ac_compile"
1714 case "(($ac_try" in
1715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1716 *) ac_try_echo=$ac_try;;
1717 esac
1718 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1719 $as_echo "$ac_try_echo"; } >&5
1720 (eval "$ac_compile") 2>conftest.err
1721 ac_status=$?
1722 if test -s conftest.err; then
1723 grep -v '^ *+' conftest.err >conftest.er1
1724 cat conftest.er1 >&5
1725 mv -f conftest.er1 conftest.err
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; } && {
1729 test -z "$ac_c_werror_flag" ||
1730 test ! -s conftest.err
1731 } && test -s conftest.$ac_objext; then :
1732 ac_retval=0
1733 else
1734 $as_echo "$as_me: failed program was:" >&5
1735 sed 's/^/| /' conftest.$ac_ext >&5
1737 ac_retval=1
1739 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1740 as_fn_set_status $ac_retval
1742 } # ac_fn_c_try_compile
1744 # ac_fn_cxx_try_compile LINENO
1745 # ----------------------------
1746 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1747 ac_fn_cxx_try_compile ()
1749 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750 rm -f conftest.$ac_objext
1751 if { { ac_try="$ac_compile"
1752 case "(($ac_try" in
1753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1754 *) ac_try_echo=$ac_try;;
1755 esac
1756 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1757 $as_echo "$ac_try_echo"; } >&5
1758 (eval "$ac_compile") 2>conftest.err
1759 ac_status=$?
1760 if test -s conftest.err; then
1761 grep -v '^ *+' conftest.err >conftest.er1
1762 cat conftest.er1 >&5
1763 mv -f conftest.er1 conftest.err
1765 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1766 test $ac_status = 0; } && {
1767 test -z "$ac_cxx_werror_flag" ||
1768 test ! -s conftest.err
1769 } && test -s conftest.$ac_objext; then :
1770 ac_retval=0
1771 else
1772 $as_echo "$as_me: failed program was:" >&5
1773 sed 's/^/| /' conftest.$ac_ext >&5
1775 ac_retval=1
1777 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1778 as_fn_set_status $ac_retval
1780 } # ac_fn_cxx_try_compile
1782 # ac_fn_c_try_link LINENO
1783 # -----------------------
1784 # Try to link conftest.$ac_ext, and return whether this succeeded.
1785 ac_fn_c_try_link ()
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1788 rm -f conftest.$ac_objext conftest$ac_exeext
1789 if { { ac_try="$ac_link"
1790 case "(($ac_try" in
1791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792 *) ac_try_echo=$ac_try;;
1793 esac
1794 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795 $as_echo "$ac_try_echo"; } >&5
1796 (eval "$ac_link") 2>conftest.err
1797 ac_status=$?
1798 if test -s conftest.err; then
1799 grep -v '^ *+' conftest.err >conftest.er1
1800 cat conftest.er1 >&5
1801 mv -f conftest.er1 conftest.err
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; } && {
1805 test -z "$ac_c_werror_flag" ||
1806 test ! -s conftest.err
1807 } && test -s conftest$ac_exeext && {
1808 test "$cross_compiling" = yes ||
1809 test -x conftest$ac_exeext
1810 }; then :
1811 ac_retval=0
1812 else
1813 $as_echo "$as_me: failed program was:" >&5
1814 sed 's/^/| /' conftest.$ac_ext >&5
1816 ac_retval=1
1818 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1819 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1820 # interfere with the next link command; also delete a directory that is
1821 # left behind by Apple's compiler. We do this before executing the actions.
1822 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1823 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1824 as_fn_set_status $ac_retval
1826 } # ac_fn_c_try_link
1828 # ac_fn_c_try_cpp LINENO
1829 # ----------------------
1830 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1831 ac_fn_c_try_cpp ()
1833 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1834 if { { ac_try="$ac_cpp conftest.$ac_ext"
1835 case "(($ac_try" in
1836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1837 *) ac_try_echo=$ac_try;;
1838 esac
1839 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1840 $as_echo "$ac_try_echo"; } >&5
1841 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1842 ac_status=$?
1843 if test -s conftest.err; then
1844 grep -v '^ *+' conftest.err >conftest.er1
1845 cat conftest.er1 >&5
1846 mv -f conftest.er1 conftest.err
1848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1849 test $ac_status = 0; } > conftest.i && {
1850 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1851 test ! -s conftest.err
1852 }; then :
1853 ac_retval=0
1854 else
1855 $as_echo "$as_me: failed program was:" >&5
1856 sed 's/^/| /' conftest.$ac_ext >&5
1858 ac_retval=1
1860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1861 as_fn_set_status $ac_retval
1863 } # ac_fn_c_try_cpp
1865 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1866 # -------------------------------------------------------
1867 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1868 # the include files in INCLUDES and setting the cache variable VAR
1869 # accordingly.
1870 ac_fn_c_check_header_mongrel ()
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 if eval \${$3+:} false; then :
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875 $as_echo_n "checking for $2... " >&6; }
1876 if eval \${$3+:} false; then :
1877 $as_echo_n "(cached) " >&6
1879 eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881 $as_echo "$ac_res" >&6; }
1882 else
1883 # Is the header compilable?
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1885 $as_echo_n "checking $2 usability... " >&6; }
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887 /* end confdefs.h. */
1889 #include <$2>
1890 _ACEOF
1891 if ac_fn_c_try_compile "$LINENO"; then :
1892 ac_header_compiler=yes
1893 else
1894 ac_header_compiler=no
1896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1898 $as_echo "$ac_header_compiler" >&6; }
1900 # Is the header present?
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1902 $as_echo_n "checking $2 presence... " >&6; }
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904 /* end confdefs.h. */
1905 #include <$2>
1906 _ACEOF
1907 if ac_fn_c_try_cpp "$LINENO"; then :
1908 ac_header_preproc=yes
1909 else
1910 ac_header_preproc=no
1912 rm -f conftest.err conftest.i conftest.$ac_ext
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1914 $as_echo "$ac_header_preproc" >&6; }
1916 # So? What about this header?
1917 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1918 yes:no: )
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1920 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1922 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1924 no:yes:* )
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1926 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1928 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1930 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1932 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1934 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1935 ( $as_echo "## ---------------------------------------------- ##
1936 ## Report this to pgsql-bugs@lists.postgresql.org ##
1937 ## ---------------------------------------------- ##"
1938 ) | sed "s/^/$as_me: WARNING: /" >&2
1940 esac
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942 $as_echo_n "checking for $2... " >&6; }
1943 if eval \${$3+:} false; then :
1944 $as_echo_n "(cached) " >&6
1945 else
1946 eval "$3=\$ac_header_compiler"
1948 eval ac_res=\$$3
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1950 $as_echo "$ac_res" >&6; }
1952 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1954 } # ac_fn_c_check_header_mongrel
1956 # ac_fn_c_try_run LINENO
1957 # ----------------------
1958 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1959 # that executables *can* be run.
1960 ac_fn_c_try_run ()
1962 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963 if { { ac_try="$ac_link"
1964 case "(($ac_try" in
1965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1966 *) ac_try_echo=$ac_try;;
1967 esac
1968 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1969 $as_echo "$ac_try_echo"; } >&5
1970 (eval "$ac_link") 2>&5
1971 ac_status=$?
1972 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1973 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1974 { { case "(($ac_try" in
1975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1976 *) ac_try_echo=$ac_try;;
1977 esac
1978 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1979 $as_echo "$ac_try_echo"; } >&5
1980 (eval "$ac_try") 2>&5
1981 ac_status=$?
1982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1983 test $ac_status = 0; }; }; then :
1984 ac_retval=0
1985 else
1986 $as_echo "$as_me: program exited with status $ac_status" >&5
1987 $as_echo "$as_me: failed program was:" >&5
1988 sed 's/^/| /' conftest.$ac_ext >&5
1990 ac_retval=$ac_status
1992 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1993 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1994 as_fn_set_status $ac_retval
1996 } # ac_fn_c_try_run
1998 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1999 # -------------------------------------------------------
2000 # Tests whether HEADER exists and can be compiled using the include files in
2001 # INCLUDES, setting the cache variable VAR accordingly.
2002 ac_fn_c_check_header_compile ()
2004 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2006 $as_echo_n "checking for $2... " >&6; }
2007 if eval \${$3+:} false; then :
2008 $as_echo_n "(cached) " >&6
2009 else
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011 /* end confdefs.h. */
2013 #include <$2>
2014 _ACEOF
2015 if ac_fn_c_try_compile "$LINENO"; then :
2016 eval "$3=yes"
2017 else
2018 eval "$3=no"
2020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022 eval ac_res=\$$3
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024 $as_echo "$ac_res" >&6; }
2025 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2027 } # ac_fn_c_check_header_compile
2029 # ac_fn_c_check_func LINENO FUNC VAR
2030 # ----------------------------------
2031 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2032 ac_fn_c_check_func ()
2034 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2036 $as_echo_n "checking for $2... " >&6; }
2037 if eval \${$3+:} false; then :
2038 $as_echo_n "(cached) " >&6
2039 else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041 /* end confdefs.h. */
2042 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2043 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2044 #define $2 innocuous_$2
2046 /* System header to define __stub macros and hopefully few prototypes,
2047 which can conflict with char $2 (); below.
2048 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2049 <limits.h> exists even on freestanding compilers. */
2051 #ifdef __STDC__
2052 # include <limits.h>
2053 #else
2054 # include <assert.h>
2055 #endif
2057 #undef $2
2059 /* Override any GCC internal prototype to avoid an error.
2060 Use char because int might match the return type of a GCC
2061 builtin and then its argument prototype would still apply. */
2062 #ifdef __cplusplus
2063 extern "C"
2064 #endif
2065 char $2 ();
2066 /* The GNU C library defines this for functions which it implements
2067 to always fail with ENOSYS. Some functions are actually named
2068 something starting with __ and the normal name is an alias. */
2069 #if defined __stub_$2 || defined __stub___$2
2070 choke me
2071 #endif
2074 main ()
2076 return $2 ();
2078 return 0;
2080 _ACEOF
2081 if ac_fn_c_try_link "$LINENO"; then :
2082 eval "$3=yes"
2083 else
2084 eval "$3=no"
2086 rm -f core conftest.err conftest.$ac_objext \
2087 conftest$ac_exeext conftest.$ac_ext
2089 eval ac_res=\$$3
2090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2091 $as_echo "$ac_res" >&6; }
2092 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2094 } # ac_fn_c_check_func
2096 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2097 # -------------------------------------------
2098 # Tests whether TYPE exists after having included INCLUDES, setting cache
2099 # variable VAR accordingly.
2100 ac_fn_c_check_type ()
2102 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2104 $as_echo_n "checking for $2... " >&6; }
2105 if eval \${$3+:} false; then :
2106 $as_echo_n "(cached) " >&6
2107 else
2108 eval "$3=no"
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110 /* end confdefs.h. */
2113 main ()
2115 if (sizeof ($2))
2116 return 0;
2118 return 0;
2120 _ACEOF
2121 if ac_fn_c_try_compile "$LINENO"; then :
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123 /* end confdefs.h. */
2126 main ()
2128 if (sizeof (($2)))
2129 return 0;
2131 return 0;
2133 _ACEOF
2134 if ac_fn_c_try_compile "$LINENO"; then :
2136 else
2137 eval "$3=yes"
2139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 eval ac_res=\$$3
2144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2145 $as_echo "$ac_res" >&6; }
2146 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2148 } # ac_fn_c_check_type
2150 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2151 # ----------------------------------------------------
2152 # Tries to find if the field MEMBER exists in type AGGR, after including
2153 # INCLUDES, setting cache variable VAR accordingly.
2154 ac_fn_c_check_member ()
2156 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2158 $as_echo_n "checking for $2.$3... " >&6; }
2159 if eval \${$4+:} false; then :
2160 $as_echo_n "(cached) " >&6
2161 else
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163 /* end confdefs.h. */
2166 main ()
2168 static $2 ac_aggr;
2169 if (ac_aggr.$3)
2170 return 0;
2172 return 0;
2174 _ACEOF
2175 if ac_fn_c_try_compile "$LINENO"; then :
2176 eval "$4=yes"
2177 else
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179 /* end confdefs.h. */
2182 main ()
2184 static $2 ac_aggr;
2185 if (sizeof ac_aggr.$3)
2186 return 0;
2188 return 0;
2190 _ACEOF
2191 if ac_fn_c_try_compile "$LINENO"; then :
2192 eval "$4=yes"
2193 else
2194 eval "$4=no"
2196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 eval ac_res=\$$4
2201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2202 $as_echo "$ac_res" >&6; }
2203 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2205 } # ac_fn_c_check_member
2207 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2208 # --------------------------------------------
2209 # Tries to find the compile-time value of EXPR in a program that includes
2210 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2211 # computed
2212 ac_fn_c_compute_int ()
2214 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2215 if test "$cross_compiling" = yes; then
2216 # Depending upon the size, compute the lo and hi bounds.
2217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218 /* end confdefs.h. */
2221 main ()
2223 static int test_array [1 - 2 * !(($2) >= 0)];
2224 test_array [0] = 0;
2225 return test_array [0];
2228 return 0;
2230 _ACEOF
2231 if ac_fn_c_try_compile "$LINENO"; then :
2232 ac_lo=0 ac_mid=0
2233 while :; do
2234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235 /* end confdefs.h. */
2238 main ()
2240 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2241 test_array [0] = 0;
2242 return test_array [0];
2245 return 0;
2247 _ACEOF
2248 if ac_fn_c_try_compile "$LINENO"; then :
2249 ac_hi=$ac_mid; break
2250 else
2251 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2252 if test $ac_lo -le $ac_mid; then
2253 ac_lo= ac_hi=
2254 break
2256 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2259 done
2260 else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262 /* end confdefs.h. */
2265 main ()
2267 static int test_array [1 - 2 * !(($2) < 0)];
2268 test_array [0] = 0;
2269 return test_array [0];
2272 return 0;
2274 _ACEOF
2275 if ac_fn_c_try_compile "$LINENO"; then :
2276 ac_hi=-1 ac_mid=-1
2277 while :; do
2278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279 /* end confdefs.h. */
2282 main ()
2284 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2285 test_array [0] = 0;
2286 return test_array [0];
2289 return 0;
2291 _ACEOF
2292 if ac_fn_c_try_compile "$LINENO"; then :
2293 ac_lo=$ac_mid; break
2294 else
2295 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2296 if test $ac_mid -le $ac_hi; then
2297 ac_lo= ac_hi=
2298 break
2300 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2303 done
2304 else
2305 ac_lo= ac_hi=
2307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310 # Binary search between lo and hi bounds.
2311 while test "x$ac_lo" != "x$ac_hi"; do
2312 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314 /* end confdefs.h. */
2317 main ()
2319 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2320 test_array [0] = 0;
2321 return test_array [0];
2324 return 0;
2326 _ACEOF
2327 if ac_fn_c_try_compile "$LINENO"; then :
2328 ac_hi=$ac_mid
2329 else
2330 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333 done
2334 case $ac_lo in #((
2335 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2336 '') ac_retval=1 ;;
2337 esac
2338 else
2339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2340 /* end confdefs.h. */
2342 static long int longval () { return $2; }
2343 static unsigned long int ulongval () { return $2; }
2344 #include <stdio.h>
2345 #include <stdlib.h>
2347 main ()
2350 FILE *f = fopen ("conftest.val", "w");
2351 if (! f)
2352 return 1;
2353 if (($2) < 0)
2355 long int i = longval ();
2356 if (i != ($2))
2357 return 1;
2358 fprintf (f, "%ld", i);
2360 else
2362 unsigned long int i = ulongval ();
2363 if (i != ($2))
2364 return 1;
2365 fprintf (f, "%lu", i);
2367 /* Do not output a trailing newline, as this causes \r\n confusion
2368 on some platforms. */
2369 return ferror (f) || fclose (f) != 0;
2372 return 0;
2374 _ACEOF
2375 if ac_fn_c_try_run "$LINENO"; then :
2376 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2377 else
2378 ac_retval=1
2380 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2381 conftest.$ac_objext conftest.beam conftest.$ac_ext
2382 rm -f conftest.val
2385 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2386 as_fn_set_status $ac_retval
2388 } # ac_fn_c_compute_int
2390 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2391 # ---------------------------------------------
2392 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2393 # accordingly.
2394 ac_fn_c_check_decl ()
2396 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2398 as_decl_name=`echo $2|sed 's/ *(.*//'`
2399 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2401 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2402 if eval \${$3+:} false; then :
2403 $as_echo_n "(cached) " >&6
2404 else
2405 ac_save_werror_flag=$ac_c_werror_flag
2406 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2408 /* end confdefs.h. */
2411 main ()
2413 #ifndef $as_decl_name
2414 #ifdef __cplusplus
2415 (void) $as_decl_use;
2416 #else
2417 (void) $as_decl_name;
2418 #endif
2419 #endif
2422 return 0;
2424 _ACEOF
2425 if ac_fn_c_try_compile "$LINENO"; then :
2426 eval "$3=yes"
2427 else
2428 eval "$3=no"
2430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2431 ac_c_werror_flag=$ac_save_werror_flag
2433 eval ac_res=\$$3
2434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2435 $as_echo "$ac_res" >&6; }
2436 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2438 } # ac_fn_c_check_decl
2439 cat >config.log <<_ACEOF
2440 This file contains any messages produced by compilers while
2441 running configure, to aid debugging if configure makes a mistake.
2443 It was created by PostgreSQL $as_me 18devel, which was
2444 generated by GNU Autoconf 2.69. Invocation command line was
2446 $ $0 $@
2448 _ACEOF
2449 exec 5>>config.log
2451 cat <<_ASUNAME
2452 ## --------- ##
2453 ## Platform. ##
2454 ## --------- ##
2456 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2457 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2458 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2459 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2460 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2462 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2463 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2465 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2466 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2467 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2468 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2469 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2470 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2471 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2473 _ASUNAME
2475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2476 for as_dir in $PATH
2478 IFS=$as_save_IFS
2479 test -z "$as_dir" && as_dir=.
2480 $as_echo "PATH: $as_dir"
2481 done
2482 IFS=$as_save_IFS
2484 } >&5
2486 cat >&5 <<_ACEOF
2489 ## ----------- ##
2490 ## Core tests. ##
2491 ## ----------- ##
2493 _ACEOF
2496 # Keep a trace of the command line.
2497 # Strip out --no-create and --no-recursion so they do not pile up.
2498 # Strip out --silent because we don't want to record it for future runs.
2499 # Also quote any args containing shell meta-characters.
2500 # Make two passes to allow for proper duplicate-argument suppression.
2501 ac_configure_args=
2502 ac_configure_args0=
2503 ac_configure_args1=
2504 ac_must_keep_next=false
2505 for ac_pass in 1 2
2507 for ac_arg
2509 case $ac_arg in
2510 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2511 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2512 | -silent | --silent | --silen | --sile | --sil)
2513 continue ;;
2514 *\'*)
2515 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2516 esac
2517 case $ac_pass in
2518 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2520 as_fn_append ac_configure_args1 " '$ac_arg'"
2521 if test $ac_must_keep_next = true; then
2522 ac_must_keep_next=false # Got value, back to normal.
2523 else
2524 case $ac_arg in
2525 *=* | --config-cache | -C | -disable-* | --disable-* \
2526 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2527 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2528 | -with-* | --with-* | -without-* | --without-* | --x)
2529 case "$ac_configure_args0 " in
2530 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2531 esac
2533 -* ) ac_must_keep_next=true ;;
2534 esac
2536 as_fn_append ac_configure_args " '$ac_arg'"
2538 esac
2539 done
2540 done
2541 { ac_configure_args0=; unset ac_configure_args0;}
2542 { ac_configure_args1=; unset ac_configure_args1;}
2544 # When interrupted or exit'd, cleanup temporary files, and complete
2545 # config.log. We remove comments because anyway the quotes in there
2546 # would cause problems or look ugly.
2547 # WARNING: Use '\'' to represent an apostrophe within the trap.
2548 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2549 trap 'exit_status=$?
2550 # Save into config.log some information that might help in debugging.
2552 echo
2554 $as_echo "## ---------------- ##
2555 ## Cache variables. ##
2556 ## ---------------- ##"
2557 echo
2558 # The following way of writing the cache mishandles newlines in values,
2560 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2561 eval ac_val=\$$ac_var
2562 case $ac_val in #(
2563 *${as_nl}*)
2564 case $ac_var in #(
2565 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2566 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2567 esac
2568 case $ac_var in #(
2569 _ | IFS | as_nl) ;; #(
2570 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2571 *) { eval $ac_var=; unset $ac_var;} ;;
2572 esac ;;
2573 esac
2574 done
2575 (set) 2>&1 |
2576 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2577 *${as_nl}ac_space=\ *)
2578 sed -n \
2579 "s/'\''/'\''\\\\'\'''\''/g;
2580 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2581 ;; #(
2583 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2585 esac |
2586 sort
2588 echo
2590 $as_echo "## ----------------- ##
2591 ## Output variables. ##
2592 ## ----------------- ##"
2593 echo
2594 for ac_var in $ac_subst_vars
2596 eval ac_val=\$$ac_var
2597 case $ac_val in
2598 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2599 esac
2600 $as_echo "$ac_var='\''$ac_val'\''"
2601 done | sort
2602 echo
2604 if test -n "$ac_subst_files"; then
2605 $as_echo "## ------------------- ##
2606 ## File substitutions. ##
2607 ## ------------------- ##"
2608 echo
2609 for ac_var in $ac_subst_files
2611 eval ac_val=\$$ac_var
2612 case $ac_val in
2613 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2614 esac
2615 $as_echo "$ac_var='\''$ac_val'\''"
2616 done | sort
2617 echo
2620 if test -s confdefs.h; then
2621 $as_echo "## ----------- ##
2622 ## confdefs.h. ##
2623 ## ----------- ##"
2624 echo
2625 cat confdefs.h
2626 echo
2628 test "$ac_signal" != 0 &&
2629 $as_echo "$as_me: caught signal $ac_signal"
2630 $as_echo "$as_me: exit $exit_status"
2631 } >&5
2632 rm -f core *.core core.conftest.* &&
2633 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2634 exit $exit_status
2636 for ac_signal in 1 2 13 15; do
2637 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2638 done
2639 ac_signal=0
2641 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2642 rm -f -r conftest* confdefs.h
2644 $as_echo "/* confdefs.h */" > confdefs.h
2646 # Predefined preprocessor variables.
2648 cat >>confdefs.h <<_ACEOF
2649 #define PACKAGE_NAME "$PACKAGE_NAME"
2650 _ACEOF
2652 cat >>confdefs.h <<_ACEOF
2653 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2654 _ACEOF
2656 cat >>confdefs.h <<_ACEOF
2657 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2658 _ACEOF
2660 cat >>confdefs.h <<_ACEOF
2661 #define PACKAGE_STRING "$PACKAGE_STRING"
2662 _ACEOF
2664 cat >>confdefs.h <<_ACEOF
2665 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2666 _ACEOF
2668 cat >>confdefs.h <<_ACEOF
2669 #define PACKAGE_URL "$PACKAGE_URL"
2670 _ACEOF
2673 # Let the site file select an alternate cache file if it wants to.
2674 # Prefer an explicitly selected file to automatically selected ones.
2675 ac_site_file1=NONE
2676 ac_site_file2=NONE
2677 if test -n "$CONFIG_SITE"; then
2678 # We do not want a PATH search for config.site.
2679 case $CONFIG_SITE in #((
2680 -*) ac_site_file1=./$CONFIG_SITE;;
2681 */*) ac_site_file1=$CONFIG_SITE;;
2682 *) ac_site_file1=./$CONFIG_SITE;;
2683 esac
2684 elif test "x$prefix" != xNONE; then
2685 ac_site_file1=$prefix/share/config.site
2686 ac_site_file2=$prefix/etc/config.site
2687 else
2688 ac_site_file1=$ac_default_prefix/share/config.site
2689 ac_site_file2=$ac_default_prefix/etc/config.site
2691 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2693 test "x$ac_site_file" = xNONE && continue
2694 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2696 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2697 sed 's/^/| /' "$ac_site_file" >&5
2698 . "$ac_site_file" \
2699 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2700 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2701 as_fn_error $? "failed to load site script $ac_site_file
2702 See \`config.log' for more details" "$LINENO" 5; }
2704 done
2706 if test -r "$cache_file"; then
2707 # Some versions of bash will fail to source /dev/null (special files
2708 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2709 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2711 $as_echo "$as_me: loading cache $cache_file" >&6;}
2712 case $cache_file in
2713 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2714 *) . "./$cache_file";;
2715 esac
2717 else
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2719 $as_echo "$as_me: creating cache $cache_file" >&6;}
2720 >$cache_file
2723 # Check that the precious variables saved in the cache have kept the same
2724 # value.
2725 ac_cache_corrupted=false
2726 for ac_var in $ac_precious_vars; do
2727 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2728 eval ac_new_set=\$ac_env_${ac_var}_set
2729 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2730 eval ac_new_val=\$ac_env_${ac_var}_value
2731 case $ac_old_set,$ac_new_set in
2732 set,)
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2734 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2735 ac_cache_corrupted=: ;;
2736 ,set)
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2738 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2739 ac_cache_corrupted=: ;;
2740 ,);;
2742 if test "x$ac_old_val" != "x$ac_new_val"; then
2743 # differences in whitespace do not lead to failure.
2744 ac_old_val_w=`echo x $ac_old_val`
2745 ac_new_val_w=`echo x $ac_new_val`
2746 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2748 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2749 ac_cache_corrupted=:
2750 else
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2752 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2753 eval $ac_var=\$ac_old_val
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2756 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2758 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2759 fi;;
2760 esac
2761 # Pass precious variables to config.status.
2762 if test "$ac_new_set" = set; then
2763 case $ac_new_val in
2764 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2765 *) ac_arg=$ac_var=$ac_new_val ;;
2766 esac
2767 case " $ac_configure_args " in
2768 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2769 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2770 esac
2772 done
2773 if $ac_cache_corrupted; then
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2775 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2777 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2778 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2780 ## -------------------- ##
2781 ## Main body of script. ##
2782 ## -------------------- ##
2784 ac_ext=c
2785 ac_cpp='$CPP $CPPFLAGS'
2786 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2787 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2788 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2795 ac_aux_dir=
2796 for ac_dir in config "$srcdir"/config; do
2797 if test -f "$ac_dir/install-sh"; then
2798 ac_aux_dir=$ac_dir
2799 ac_install_sh="$ac_aux_dir/install-sh -c"
2800 break
2801 elif test -f "$ac_dir/install.sh"; then
2802 ac_aux_dir=$ac_dir
2803 ac_install_sh="$ac_aux_dir/install.sh -c"
2804 break
2805 elif test -f "$ac_dir/shtool"; then
2806 ac_aux_dir=$ac_dir
2807 ac_install_sh="$ac_aux_dir/shtool install -c"
2808 break
2810 done
2811 if test -z "$ac_aux_dir"; then
2812 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2815 # These three variables are undocumented and unsupported,
2816 # and are intended to be withdrawn in a future Autoconf release.
2817 # They can cause serious problems if a builder's source tree is in a directory
2818 # whose full name contains unusual characters.
2819 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2820 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2821 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2826 cat >>confdefs.h <<_ACEOF
2827 #define CONFIGURE_ARGS "$ac_configure_args"
2828 _ACEOF
2831 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2832 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2833 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2836 cat >>confdefs.h <<_ACEOF
2837 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2838 _ACEOF
2841 cat >>confdefs.h <<_ACEOF
2842 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2843 _ACEOF
2846 cat >>confdefs.h <<_ACEOF
2847 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2848 _ACEOF
2854 # Check whether --with-extra-version was given.
2855 if test "${with_extra_version+set}" = set; then :
2856 withval=$with_extra_version;
2857 case $withval in
2858 yes)
2859 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2862 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2865 PG_VERSION="$PACKAGE_VERSION$withval"
2867 esac
2869 else
2870 PG_VERSION="$PACKAGE_VERSION"
2875 cat >>confdefs.h <<_ACEOF
2876 #define PG_VERSION "$PG_VERSION"
2877 _ACEOF
2880 # Make sure we can run config.sub.
2881 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2882 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2885 $as_echo_n "checking build system type... " >&6; }
2886 if ${ac_cv_build+:} false; then :
2887 $as_echo_n "(cached) " >&6
2888 else
2889 ac_build_alias=$build_alias
2890 test "x$ac_build_alias" = x &&
2891 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2892 test "x$ac_build_alias" = x &&
2893 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2894 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2895 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2899 $as_echo "$ac_cv_build" >&6; }
2900 case $ac_cv_build in
2901 *-*-*) ;;
2902 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2903 esac
2904 build=$ac_cv_build
2905 ac_save_IFS=$IFS; IFS='-'
2906 set x $ac_cv_build
2907 shift
2908 build_cpu=$1
2909 build_vendor=$2
2910 shift; shift
2911 # Remember, the first character of IFS is used to create $*,
2912 # except with old shells:
2913 build_os=$*
2914 IFS=$ac_save_IFS
2915 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2919 $as_echo_n "checking host system type... " >&6; }
2920 if ${ac_cv_host+:} false; then :
2921 $as_echo_n "(cached) " >&6
2922 else
2923 if test "x$host_alias" = x; then
2924 ac_cv_host=$ac_cv_build
2925 else
2926 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2927 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2932 $as_echo "$ac_cv_host" >&6; }
2933 case $ac_cv_host in
2934 *-*-*) ;;
2935 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2936 esac
2937 host=$ac_cv_host
2938 ac_save_IFS=$IFS; IFS='-'
2939 set x $ac_cv_host
2940 shift
2941 host_cpu=$1
2942 host_vendor=$2
2943 shift; shift
2944 # Remember, the first character of IFS is used to create $*,
2945 # except with old shells:
2946 host_os=$*
2947 IFS=$ac_save_IFS
2948 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2952 template=
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2954 $as_echo_n "checking which template to use... " >&6; }
2959 # Check whether --with-template was given.
2960 if test "${with_template+set}" = set; then :
2961 withval=$with_template;
2962 case $withval in
2963 yes)
2964 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2967 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2971 case $withval in
2972 list) echo; ls "$srcdir/src/template"; exit;;
2973 *) if test -f "$srcdir/src/template/$with_template" ; then
2974 template=$withval
2975 else
2976 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2977 fi;;
2978 esac
2981 esac
2983 else
2985 # --with-template not given
2987 case $host_os in
2988 cygwin*|msys*) template=cygwin ;;
2989 darwin*) template=darwin ;;
2990 dragonfly*) template=netbsd ;;
2991 freebsd*) template=freebsd ;;
2992 linux*|gnu*|k*bsd*-gnu)
2993 template=linux ;;
2994 mingw*) template=win32 ;;
2995 netbsd*) template=netbsd ;;
2996 openbsd*) template=openbsd ;;
2997 solaris*) template=solaris ;;
2998 esac
3000 if test x"$template" = x"" ; then
3001 as_fn_error $? "
3002 *******************************************************************
3003 PostgreSQL has apparently not been ported to your platform yet.
3004 To try a manual configuration, look into the src/template directory
3005 for a similar platform and use the '--with-template=' option.
3007 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3008 rectifying this. Include the above 'checking host system type...'
3009 line.
3010 *******************************************************************
3011 " "$LINENO" 5
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3020 $as_echo "$template" >&6; }
3022 PORTNAME=$template
3025 # Initialize default assumption that we do not need separate assembly code
3026 # for TAS (test-and-set). This can be overridden by the template file
3027 # when it's executed.
3028 need_tas=no
3029 tas_file=dummy.s
3031 # Default, works for most platforms, override in template file if needed
3032 DLSUFFIX=".so"
3037 ## Command line options
3041 # Add non-standard directories to the include path
3046 # Check whether --with-includes was given.
3047 if test "${with_includes+set}" = set; then :
3048 withval=$with_includes;
3049 case $withval in
3050 yes)
3051 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3054 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3059 esac
3067 # Add non-standard directories to the library search path
3072 # Check whether --with-libraries was given.
3073 if test "${with_libraries+set}" = set; then :
3074 withval=$with_libraries;
3075 case $withval in
3076 yes)
3077 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3080 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3083 LIBRARY_DIRS=$withval
3085 esac
3094 # Check whether --with-libs was given.
3095 if test "${with_libs+set}" = set; then :
3096 withval=$with_libs;
3097 case $withval in
3098 yes)
3099 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3102 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3105 LIBRARY_DIRS=$withval
3107 esac
3115 # 64-bit integer date/time storage is now the only option, but to avoid
3116 # unnecessary breakage of build scripts, continue to accept an explicit
3117 # "--enable-integer-datetimes" switch.
3121 # Check whether --enable-integer-datetimes was given.
3122 if test "${enable_integer_datetimes+set}" = set; then :
3123 enableval=$enable_integer_datetimes;
3124 case $enableval in
3125 yes)
3129 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3132 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3134 esac
3136 else
3137 enable_integer_datetimes=yes
3145 # NLS
3147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3148 $as_echo_n "checking whether NLS is wanted... " >&6; }
3151 # Check whether --enable-nls was given.
3152 if test "${enable_nls+set}" = set; then :
3153 enableval=$enable_nls;
3154 case $enableval in
3155 yes)
3162 enable_nls=yes
3163 WANTED_LANGUAGES=$enableval
3165 esac
3167 else
3168 enable_nls=no
3173 if test "$enable_nls" = yes; then
3175 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3180 $as_echo "$enable_nls" >&6; }
3185 # Default port number (--with-pgport), default 5432
3187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3188 $as_echo_n "checking for default port number... " >&6; }
3192 # Check whether --with-pgport was given.
3193 if test "${with_pgport+set}" = set; then :
3194 withval=$with_pgport;
3195 case $withval in
3196 yes)
3197 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3200 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3203 default_port=$withval
3205 esac
3207 else
3208 default_port=5432
3212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3213 $as_echo "$default_port" >&6; }
3214 # Need both of these because some places want an integer and some a string
3216 cat >>confdefs.h <<_ACEOF
3217 #define DEF_PGPORT ${default_port}
3218 _ACEOF
3221 cat >>confdefs.h <<_ACEOF
3222 #define DEF_PGPORT_STR "${default_port}"
3223 _ACEOF
3227 # It's worth validating port; you can get very confusing errors otherwise
3228 if test x"$default_port" = x""; then
3229 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3230 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3231 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3232 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3233 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3234 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3235 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3239 # '-rpath'-like feature can be disabled
3243 # Check whether --enable-rpath was given.
3244 if test "${enable_rpath+set}" = set; then :
3245 enableval=$enable_rpath;
3246 case $enableval in
3247 yes)
3254 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3256 esac
3258 else
3259 enable_rpath=yes
3267 # --enable-debug adds -g to compiler flags
3271 # Check whether --enable-debug was given.
3272 if test "${enable_debug+set}" = set; then :
3273 enableval=$enable_debug;
3274 case $enableval in
3275 yes)
3282 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3284 esac
3286 else
3287 enable_debug=no
3295 # --enable-profiling enables gcc profiling
3299 # Check whether --enable-profiling was given.
3300 if test "${enable_profiling+set}" = set; then :
3301 enableval=$enable_profiling;
3302 case $enableval in
3303 yes)
3310 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3312 esac
3314 else
3315 enable_profiling=no
3322 # --enable-coverage enables generation of code coverage metrics with gcov
3326 # Check whether --enable-coverage was given.
3327 if test "${enable_coverage+set}" = set; then :
3328 enableval=$enable_coverage;
3329 case $enableval in
3330 yes)
3331 if test -z "$GCOV"; then
3332 for ac_prog in gcov
3334 # Extract the first word of "$ac_prog", so it can be a program name with args.
3335 set dummy $ac_prog; ac_word=$2
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3337 $as_echo_n "checking for $ac_word... " >&6; }
3338 if ${ac_cv_path_GCOV+:} false; then :
3339 $as_echo_n "(cached) " >&6
3340 else
3341 case $GCOV in
3342 [\\/]* | ?:[\\/]*)
3343 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3347 for as_dir in $PATH
3349 IFS=$as_save_IFS
3350 test -z "$as_dir" && as_dir=.
3351 for ac_exec_ext in '' $ac_executable_extensions; do
3352 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3353 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3355 break 2
3357 done
3358 done
3359 IFS=$as_save_IFS
3362 esac
3364 GCOV=$ac_cv_path_GCOV
3365 if test -n "$GCOV"; then
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3367 $as_echo "$GCOV" >&6; }
3368 else
3369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3370 $as_echo "no" >&6; }
3374 test -n "$GCOV" && break
3375 done
3377 else
3378 # Report the value of GCOV in configure's output in all cases.
3379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3380 $as_echo_n "checking for GCOV... " >&6; }
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3382 $as_echo "$GCOV" >&6; }
3385 if test -z "$GCOV"; then
3386 as_fn_error $? "gcov not found" "$LINENO" 5
3388 if test -z "$LCOV"; then
3389 for ac_prog in lcov
3391 # Extract the first word of "$ac_prog", so it can be a program name with args.
3392 set dummy $ac_prog; ac_word=$2
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3394 $as_echo_n "checking for $ac_word... " >&6; }
3395 if ${ac_cv_path_LCOV+:} false; then :
3396 $as_echo_n "(cached) " >&6
3397 else
3398 case $LCOV in
3399 [\\/]* | ?:[\\/]*)
3400 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3404 for as_dir in $PATH
3406 IFS=$as_save_IFS
3407 test -z "$as_dir" && as_dir=.
3408 for ac_exec_ext in '' $ac_executable_extensions; do
3409 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3410 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3412 break 2
3414 done
3415 done
3416 IFS=$as_save_IFS
3419 esac
3421 LCOV=$ac_cv_path_LCOV
3422 if test -n "$LCOV"; then
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3424 $as_echo "$LCOV" >&6; }
3425 else
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3427 $as_echo "no" >&6; }
3431 test -n "$LCOV" && break
3432 done
3434 else
3435 # Report the value of LCOV in configure's output in all cases.
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3437 $as_echo_n "checking for LCOV... " >&6; }
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3439 $as_echo "$LCOV" >&6; }
3442 if test -z "$LCOV"; then
3443 as_fn_error $? "lcov not found" "$LINENO" 5
3445 if test -z "$GENHTML"; then
3446 for ac_prog in genhtml
3448 # Extract the first word of "$ac_prog", so it can be a program name with args.
3449 set dummy $ac_prog; ac_word=$2
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451 $as_echo_n "checking for $ac_word... " >&6; }
3452 if ${ac_cv_path_GENHTML+:} false; then :
3453 $as_echo_n "(cached) " >&6
3454 else
3455 case $GENHTML in
3456 [\\/]* | ?:[\\/]*)
3457 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3461 for as_dir in $PATH
3463 IFS=$as_save_IFS
3464 test -z "$as_dir" && as_dir=.
3465 for ac_exec_ext in '' $ac_executable_extensions; do
3466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3467 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3469 break 2
3471 done
3472 done
3473 IFS=$as_save_IFS
3476 esac
3478 GENHTML=$ac_cv_path_GENHTML
3479 if test -n "$GENHTML"; then
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3481 $as_echo "$GENHTML" >&6; }
3482 else
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3484 $as_echo "no" >&6; }
3488 test -n "$GENHTML" && break
3489 done
3491 else
3492 # Report the value of GENHTML in configure's output in all cases.
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3494 $as_echo_n "checking for GENHTML... " >&6; }
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3496 $as_echo "$GENHTML" >&6; }
3499 if test -z "$GENHTML"; then
3500 as_fn_error $? "genhtml not found" "$LINENO" 5
3507 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3509 esac
3511 else
3512 enable_coverage=no
3520 # DTrace
3524 # Check whether --enable-dtrace was given.
3525 if test "${enable_dtrace+set}" = set; then :
3526 enableval=$enable_dtrace;
3527 case $enableval in
3528 yes)
3529 if test -z "$DTRACE"; then
3530 for ac_prog in dtrace
3532 # Extract the first word of "$ac_prog", so it can be a program name with args.
3533 set dummy $ac_prog; ac_word=$2
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3535 $as_echo_n "checking for $ac_word... " >&6; }
3536 if ${ac_cv_path_DTRACE+:} false; then :
3537 $as_echo_n "(cached) " >&6
3538 else
3539 case $DTRACE in
3540 [\\/]* | ?:[\\/]*)
3541 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3545 for as_dir in $PATH
3547 IFS=$as_save_IFS
3548 test -z "$as_dir" && as_dir=.
3549 for ac_exec_ext in '' $ac_executable_extensions; do
3550 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3551 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3553 break 2
3555 done
3556 done
3557 IFS=$as_save_IFS
3560 esac
3562 DTRACE=$ac_cv_path_DTRACE
3563 if test -n "$DTRACE"; then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3565 $as_echo "$DTRACE" >&6; }
3566 else
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3568 $as_echo "no" >&6; }
3572 test -n "$DTRACE" && break
3573 done
3575 else
3576 # Report the value of DTRACE in configure's output in all cases.
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3578 $as_echo_n "checking for DTRACE... " >&6; }
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3580 $as_echo "$DTRACE" >&6; }
3583 if test -z "$DTRACE"; then
3584 as_fn_error $? "dtrace not found" "$LINENO" 5
3592 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3594 esac
3596 else
3597 enable_dtrace=no
3605 # TAP tests
3609 # Check whether --enable-tap-tests was given.
3610 if test "${enable_tap_tests+set}" = set; then :
3611 enableval=$enable_tap_tests;
3612 case $enableval in
3613 yes)
3620 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3622 esac
3624 else
3625 enable_tap_tests=no
3633 # Injection points
3637 # Check whether --enable-injection-points was given.
3638 if test "${enable_injection_points+set}" = set; then :
3639 enableval=$enable_injection_points;
3640 case $enableval in
3641 yes)
3643 $as_echo "#define USE_INJECTION_POINTS 1" >>confdefs.h
3650 as_fn_error $? "no argument expected for --enable-injection-points option" "$LINENO" 5
3652 esac
3654 else
3655 enable_injection_points=no
3663 # Block size
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3666 $as_echo_n "checking for block size... " >&6; }
3670 # Check whether --with-blocksize was given.
3671 if test "${with_blocksize+set}" = set; then :
3672 withval=$with_blocksize;
3673 case $withval in
3674 yes)
3675 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3678 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3681 blocksize=$withval
3683 esac
3685 else
3686 blocksize=8
3690 case ${blocksize} in
3691 1) BLCKSZ=1024;;
3692 2) BLCKSZ=2048;;
3693 4) BLCKSZ=4096;;
3694 8) BLCKSZ=8192;;
3695 16) BLCKSZ=16384;;
3696 32) BLCKSZ=32768;;
3697 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3698 esac
3699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3700 $as_echo "${blocksize}kB" >&6; }
3703 cat >>confdefs.h <<_ACEOF
3704 #define BLCKSZ ${BLCKSZ}
3705 _ACEOF
3709 # Relation segment size
3714 # Check whether --with-segsize was given.
3715 if test "${with_segsize+set}" = set; then :
3716 withval=$with_segsize;
3717 case $withval in
3718 yes)
3719 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3722 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3725 segsize=$withval
3727 esac
3729 else
3730 segsize=1
3737 # Check whether --with-segsize-blocks was given.
3738 if test "${with_segsize_blocks+set}" = set; then :
3739 withval=$with_segsize_blocks;
3740 case $withval in
3741 yes)
3742 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3745 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3748 segsize_blocks=$withval
3750 esac
3752 else
3753 segsize_blocks=0
3758 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3759 # otherwise. segsize-blocks is only really useful for developers wanting to
3760 # test segment related code. Warn if both are used.
3761 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3763 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3767 $as_echo_n "checking for segment size... " >&6; }
3768 if test $segsize_blocks -eq 0; then
3769 # this expression is set up to avoid unnecessary integer overflow
3770 # blocksize is already guaranteed to be a factor of 1024
3771 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3772 test $? -eq 0 || exit 1
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3774 $as_echo "${segsize}GB" >&6; }
3775 else
3776 RELSEG_SIZE=$segsize_blocks
3777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3778 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3782 cat >>confdefs.h <<_ACEOF
3783 #define RELSEG_SIZE ${RELSEG_SIZE}
3784 _ACEOF
3788 # WAL block size
3790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3791 $as_echo_n "checking for WAL block size... " >&6; }
3795 # Check whether --with-wal-blocksize was given.
3796 if test "${with_wal_blocksize+set}" = set; then :
3797 withval=$with_wal_blocksize;
3798 case $withval in
3799 yes)
3800 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3803 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3806 wal_blocksize=$withval
3808 esac
3810 else
3811 wal_blocksize=8
3815 case ${wal_blocksize} in
3816 1) XLOG_BLCKSZ=1024;;
3817 2) XLOG_BLCKSZ=2048;;
3818 4) XLOG_BLCKSZ=4096;;
3819 8) XLOG_BLCKSZ=8192;;
3820 16) XLOG_BLCKSZ=16384;;
3821 32) XLOG_BLCKSZ=32768;;
3822 64) XLOG_BLCKSZ=65536;;
3823 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3824 esac
3825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3826 $as_echo "${wal_blocksize}kB" >&6; }
3829 cat >>confdefs.h <<_ACEOF
3830 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3831 _ACEOF
3835 # C compiler
3838 # If you don't specify a list of compilers to test, the AC_PROG_CC and
3839 # AC_PROG_CXX macros test for a long list of unsupported compilers.
3840 pgac_cc_list="gcc cc"
3841 pgac_cxx_list="g++ c++"
3843 ac_ext=c
3844 ac_cpp='$CPP $CPPFLAGS'
3845 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3846 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3848 if test -n "$ac_tool_prefix"; then
3849 for ac_prog in $pgac_cc_list
3851 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3852 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3854 $as_echo_n "checking for $ac_word... " >&6; }
3855 if ${ac_cv_prog_CC+:} false; then :
3856 $as_echo_n "(cached) " >&6
3857 else
3858 if test -n "$CC"; then
3859 ac_cv_prog_CC="$CC" # Let the user override the test.
3860 else
3861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3862 for as_dir in $PATH
3864 IFS=$as_save_IFS
3865 test -z "$as_dir" && as_dir=.
3866 for ac_exec_ext in '' $ac_executable_extensions; do
3867 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3868 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3869 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3870 break 2
3872 done
3873 done
3874 IFS=$as_save_IFS
3878 CC=$ac_cv_prog_CC
3879 if test -n "$CC"; then
3880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3881 $as_echo "$CC" >&6; }
3882 else
3883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3884 $as_echo "no" >&6; }
3888 test -n "$CC" && break
3889 done
3891 if test -z "$CC"; then
3892 ac_ct_CC=$CC
3893 for ac_prog in $pgac_cc_list
3895 # Extract the first word of "$ac_prog", so it can be a program name with args.
3896 set dummy $ac_prog; ac_word=$2
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3898 $as_echo_n "checking for $ac_word... " >&6; }
3899 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3900 $as_echo_n "(cached) " >&6
3901 else
3902 if test -n "$ac_ct_CC"; then
3903 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3904 else
3905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3906 for as_dir in $PATH
3908 IFS=$as_save_IFS
3909 test -z "$as_dir" && as_dir=.
3910 for ac_exec_ext in '' $ac_executable_extensions; do
3911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3912 ac_cv_prog_ac_ct_CC="$ac_prog"
3913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3914 break 2
3916 done
3917 done
3918 IFS=$as_save_IFS
3922 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3923 if test -n "$ac_ct_CC"; then
3924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3925 $as_echo "$ac_ct_CC" >&6; }
3926 else
3927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3928 $as_echo "no" >&6; }
3932 test -n "$ac_ct_CC" && break
3933 done
3935 if test "x$ac_ct_CC" = x; then
3936 CC=""
3937 else
3938 case $cross_compiling:$ac_tool_warned in
3939 yes:)
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3941 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3942 ac_tool_warned=yes ;;
3943 esac
3944 CC=$ac_ct_CC
3949 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3950 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3951 as_fn_error $? "no acceptable C compiler found in \$PATH
3952 See \`config.log' for more details" "$LINENO" 5; }
3954 # Provide some information about the compiler.
3955 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3956 set X $ac_compile
3957 ac_compiler=$2
3958 for ac_option in --version -v -V -qversion; do
3959 { { ac_try="$ac_compiler $ac_option >&5"
3960 case "(($ac_try" in
3961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3962 *) ac_try_echo=$ac_try;;
3963 esac
3964 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3965 $as_echo "$ac_try_echo"; } >&5
3966 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3967 ac_status=$?
3968 if test -s conftest.err; then
3969 sed '10a\
3970 ... rest of stderr output deleted ...
3971 10q' conftest.err >conftest.er1
3972 cat conftest.er1 >&5
3974 rm -f conftest.er1 conftest.err
3975 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3976 test $ac_status = 0; }
3977 done
3979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3980 /* end confdefs.h. */
3983 main ()
3987 return 0;
3989 _ACEOF
3990 ac_clean_files_save=$ac_clean_files
3991 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3992 # Try to create an executable without -o first, disregard a.out.
3993 # It will help us diagnose broken compilers, and finding out an intuition
3994 # of exeext.
3995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3996 $as_echo_n "checking whether the C compiler works... " >&6; }
3997 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3999 # The possible output files:
4000 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4002 ac_rmfiles=
4003 for ac_file in $ac_files
4005 case $ac_file in
4006 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4007 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4008 esac
4009 done
4010 rm -f $ac_rmfiles
4012 if { { ac_try="$ac_link_default"
4013 case "(($ac_try" in
4014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015 *) ac_try_echo=$ac_try;;
4016 esac
4017 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4018 $as_echo "$ac_try_echo"; } >&5
4019 (eval "$ac_link_default") 2>&5
4020 ac_status=$?
4021 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4022 test $ac_status = 0; }; then :
4023 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4024 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4025 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4026 # so that the user can short-circuit this test for compilers unknown to
4027 # Autoconf.
4028 for ac_file in $ac_files ''
4030 test -f "$ac_file" || continue
4031 case $ac_file in
4032 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4034 [ab].out )
4035 # We found the default executable, but exeext='' is most
4036 # certainly right.
4037 break;;
4038 *.* )
4039 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4040 then :; else
4041 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4043 # We set ac_cv_exeext here because the later test for it is not
4044 # safe: cross compilers may not add the suffix if given an `-o'
4045 # argument, so we may need to know it at that point already.
4046 # Even if this section looks crufty: it has the advantage of
4047 # actually working.
4048 break;;
4050 break;;
4051 esac
4052 done
4053 test "$ac_cv_exeext" = no && ac_cv_exeext=
4055 else
4056 ac_file=''
4058 if test -z "$ac_file"; then :
4059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4060 $as_echo "no" >&6; }
4061 $as_echo "$as_me: failed program was:" >&5
4062 sed 's/^/| /' conftest.$ac_ext >&5
4064 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4065 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4066 as_fn_error 77 "C compiler cannot create executables
4067 See \`config.log' for more details" "$LINENO" 5; }
4068 else
4069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4070 $as_echo "yes" >&6; }
4072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4073 $as_echo_n "checking for C compiler default output file name... " >&6; }
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4075 $as_echo "$ac_file" >&6; }
4076 ac_exeext=$ac_cv_exeext
4078 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4079 ac_clean_files=$ac_clean_files_save
4080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4081 $as_echo_n "checking for suffix of executables... " >&6; }
4082 if { { ac_try="$ac_link"
4083 case "(($ac_try" in
4084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4085 *) ac_try_echo=$ac_try;;
4086 esac
4087 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4088 $as_echo "$ac_try_echo"; } >&5
4089 (eval "$ac_link") 2>&5
4090 ac_status=$?
4091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4092 test $ac_status = 0; }; then :
4093 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4094 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4095 # work properly (i.e., refer to `conftest.exe'), while it won't with
4096 # `rm'.
4097 for ac_file in conftest.exe conftest conftest.*; do
4098 test -f "$ac_file" || continue
4099 case $ac_file in
4100 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4101 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4102 break;;
4103 * ) break;;
4104 esac
4105 done
4106 else
4107 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4108 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4109 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4110 See \`config.log' for more details" "$LINENO" 5; }
4112 rm -f conftest conftest$ac_cv_exeext
4113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4114 $as_echo "$ac_cv_exeext" >&6; }
4116 rm -f conftest.$ac_ext
4117 EXEEXT=$ac_cv_exeext
4118 ac_exeext=$EXEEXT
4119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4120 /* end confdefs.h. */
4121 #include <stdio.h>
4123 main ()
4125 FILE *f = fopen ("conftest.out", "w");
4126 return ferror (f) || fclose (f) != 0;
4129 return 0;
4131 _ACEOF
4132 ac_clean_files="$ac_clean_files conftest.out"
4133 # Check that the compiler produces executables we can run. If not, either
4134 # the compiler is broken, or we cross compile.
4135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4136 $as_echo_n "checking whether we are cross compiling... " >&6; }
4137 if test "$cross_compiling" != yes; then
4138 { { ac_try="$ac_link"
4139 case "(($ac_try" in
4140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4141 *) ac_try_echo=$ac_try;;
4142 esac
4143 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4144 $as_echo "$ac_try_echo"; } >&5
4145 (eval "$ac_link") 2>&5
4146 ac_status=$?
4147 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4148 test $ac_status = 0; }
4149 if { ac_try='./conftest$ac_cv_exeext'
4150 { { case "(($ac_try" in
4151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4152 *) ac_try_echo=$ac_try;;
4153 esac
4154 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4155 $as_echo "$ac_try_echo"; } >&5
4156 (eval "$ac_try") 2>&5
4157 ac_status=$?
4158 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4159 test $ac_status = 0; }; }; then
4160 cross_compiling=no
4161 else
4162 if test "$cross_compiling" = maybe; then
4163 cross_compiling=yes
4164 else
4165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4166 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4167 as_fn_error $? "cannot run C compiled programs.
4168 If you meant to cross compile, use \`--host'.
4169 See \`config.log' for more details" "$LINENO" 5; }
4173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4174 $as_echo "$cross_compiling" >&6; }
4176 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4177 ac_clean_files=$ac_clean_files_save
4178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4179 $as_echo_n "checking for suffix of object files... " >&6; }
4180 if ${ac_cv_objext+:} false; then :
4181 $as_echo_n "(cached) " >&6
4182 else
4183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4184 /* end confdefs.h. */
4187 main ()
4191 return 0;
4193 _ACEOF
4194 rm -f conftest.o conftest.obj
4195 if { { ac_try="$ac_compile"
4196 case "(($ac_try" in
4197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4198 *) ac_try_echo=$ac_try;;
4199 esac
4200 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4201 $as_echo "$ac_try_echo"; } >&5
4202 (eval "$ac_compile") 2>&5
4203 ac_status=$?
4204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4205 test $ac_status = 0; }; then :
4206 for ac_file in conftest.o conftest.obj conftest.*; do
4207 test -f "$ac_file" || continue;
4208 case $ac_file in
4209 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4210 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4211 break;;
4212 esac
4213 done
4214 else
4215 $as_echo "$as_me: failed program was:" >&5
4216 sed 's/^/| /' conftest.$ac_ext >&5
4218 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4219 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4220 as_fn_error $? "cannot compute suffix of object files: cannot compile
4221 See \`config.log' for more details" "$LINENO" 5; }
4223 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4226 $as_echo "$ac_cv_objext" >&6; }
4227 OBJEXT=$ac_cv_objext
4228 ac_objext=$OBJEXT
4229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4230 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4231 if ${ac_cv_c_compiler_gnu+:} false; then :
4232 $as_echo_n "(cached) " >&6
4233 else
4234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235 /* end confdefs.h. */
4238 main ()
4240 #ifndef __GNUC__
4241 choke me
4242 #endif
4245 return 0;
4247 _ACEOF
4248 if ac_fn_c_try_compile "$LINENO"; then :
4249 ac_compiler_gnu=yes
4250 else
4251 ac_compiler_gnu=no
4253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4258 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4259 if test $ac_compiler_gnu = yes; then
4260 GCC=yes
4261 else
4262 GCC=
4264 ac_test_CFLAGS=${CFLAGS+set}
4265 ac_save_CFLAGS=$CFLAGS
4266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4267 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4268 if ${ac_cv_prog_cc_g+:} false; then :
4269 $as_echo_n "(cached) " >&6
4270 else
4271 ac_save_c_werror_flag=$ac_c_werror_flag
4272 ac_c_werror_flag=yes
4273 ac_cv_prog_cc_g=no
4274 CFLAGS="-g"
4275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4276 /* end confdefs.h. */
4279 main ()
4283 return 0;
4285 _ACEOF
4286 if ac_fn_c_try_compile "$LINENO"; then :
4287 ac_cv_prog_cc_g=yes
4288 else
4289 CFLAGS=""
4290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4291 /* end confdefs.h. */
4294 main ()
4298 return 0;
4300 _ACEOF
4301 if ac_fn_c_try_compile "$LINENO"; then :
4303 else
4304 ac_c_werror_flag=$ac_save_c_werror_flag
4305 CFLAGS="-g"
4306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4307 /* end confdefs.h. */
4310 main ()
4314 return 0;
4316 _ACEOF
4317 if ac_fn_c_try_compile "$LINENO"; then :
4318 ac_cv_prog_cc_g=yes
4320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4325 ac_c_werror_flag=$ac_save_c_werror_flag
4327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4328 $as_echo "$ac_cv_prog_cc_g" >&6; }
4329 if test "$ac_test_CFLAGS" = set; then
4330 CFLAGS=$ac_save_CFLAGS
4331 elif test $ac_cv_prog_cc_g = yes; then
4332 if test "$GCC" = yes; then
4333 CFLAGS="-g -O2"
4334 else
4335 CFLAGS="-g"
4337 else
4338 if test "$GCC" = yes; then
4339 CFLAGS="-O2"
4340 else
4341 CFLAGS=
4344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4345 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4346 if ${ac_cv_prog_cc_c89+:} false; then :
4347 $as_echo_n "(cached) " >&6
4348 else
4349 ac_cv_prog_cc_c89=no
4350 ac_save_CC=$CC
4351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352 /* end confdefs.h. */
4353 #include <stdarg.h>
4354 #include <stdio.h>
4355 struct stat;
4356 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4357 struct buf { int x; };
4358 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4359 static char *e (p, i)
4360 char **p;
4361 int i;
4363 return p[i];
4365 static char *f (char * (*g) (char **, int), char **p, ...)
4367 char *s;
4368 va_list v;
4369 va_start (v,p);
4370 s = g (p, va_arg (v,int));
4371 va_end (v);
4372 return s;
4375 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4376 function prototypes and stuff, but not '\xHH' hex character constants.
4377 These don't provoke an error unfortunately, instead are silently treated
4378 as 'x'. The following induces an error, until -std is added to get
4379 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4380 array size at least. It's necessary to write '\x00'==0 to get something
4381 that's true only with -std. */
4382 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4384 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4385 inside strings and character constants. */
4386 #define FOO(x) 'x'
4387 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4389 int test (int i, double x);
4390 struct s1 {int (*f) (int a);};
4391 struct s2 {int (*f) (double a);};
4392 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4393 int argc;
4394 char **argv;
4396 main ()
4398 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4400 return 0;
4402 _ACEOF
4403 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4404 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4406 CC="$ac_save_CC $ac_arg"
4407 if ac_fn_c_try_compile "$LINENO"; then :
4408 ac_cv_prog_cc_c89=$ac_arg
4410 rm -f core conftest.err conftest.$ac_objext
4411 test "x$ac_cv_prog_cc_c89" != "xno" && break
4412 done
4413 rm -f conftest.$ac_ext
4414 CC=$ac_save_CC
4417 # AC_CACHE_VAL
4418 case "x$ac_cv_prog_cc_c89" in
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4421 $as_echo "none needed" >&6; } ;;
4422 xno)
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4424 $as_echo "unsupported" >&6; } ;;
4426 CC="$CC $ac_cv_prog_cc_c89"
4427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4428 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4429 esac
4430 if test "x$ac_cv_prog_cc_c89" != xno; then :
4434 ac_ext=c
4435 ac_cpp='$CPP $CPPFLAGS'
4436 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4437 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4438 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4441 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4442 if ${ac_cv_prog_cc_c99+:} false; then :
4443 $as_echo_n "(cached) " >&6
4444 else
4445 ac_cv_prog_cc_c99=no
4446 ac_save_CC=$CC
4447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4448 /* end confdefs.h. */
4449 #include <stdarg.h>
4450 #include <stdbool.h>
4451 #include <stdlib.h>
4452 #include <wchar.h>
4453 #include <stdio.h>
4455 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4456 #define debug(...) fprintf (stderr, __VA_ARGS__)
4457 #define showlist(...) puts (#__VA_ARGS__)
4458 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4459 static void
4460 test_varargs_macros (void)
4462 int x = 1234;
4463 int y = 5678;
4464 debug ("Flag");
4465 debug ("X = %d\n", x);
4466 showlist (The first, second, and third items.);
4467 report (x>y, "x is %d but y is %d", x, y);
4470 // Check long long types.
4471 #define BIG64 18446744073709551615ull
4472 #define BIG32 4294967295ul
4473 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4474 #if !BIG_OK
4475 your preprocessor is broken;
4476 #endif
4477 #if BIG_OK
4478 #else
4479 your preprocessor is broken;
4480 #endif
4481 static long long int bignum = -9223372036854775807LL;
4482 static unsigned long long int ubignum = BIG64;
4484 struct incomplete_array
4486 int datasize;
4487 double data[];
4490 struct named_init {
4491 int number;
4492 const wchar_t *name;
4493 double average;
4496 typedef const char *ccp;
4498 static inline int
4499 test_restrict (ccp restrict text)
4501 // See if C++-style comments work.
4502 // Iterate through items via the restricted pointer.
4503 // Also check for declarations in for loops.
4504 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4505 continue;
4506 return 0;
4509 // Check varargs and va_copy.
4510 static void
4511 test_varargs (const char *format, ...)
4513 va_list args;
4514 va_start (args, format);
4515 va_list args_copy;
4516 va_copy (args_copy, args);
4518 const char *str;
4519 int number;
4520 float fnumber;
4522 while (*format)
4524 switch (*format++)
4526 case 's': // string
4527 str = va_arg (args_copy, const char *);
4528 break;
4529 case 'd': // int
4530 number = va_arg (args_copy, int);
4531 break;
4532 case 'f': // float
4533 fnumber = va_arg (args_copy, double);
4534 break;
4535 default:
4536 break;
4539 va_end (args_copy);
4540 va_end (args);
4544 main ()
4547 // Check bool.
4548 _Bool success = false;
4550 // Check restrict.
4551 if (test_restrict ("String literal") == 0)
4552 success = true;
4553 char *restrict newvar = "Another string";
4555 // Check varargs.
4556 test_varargs ("s, d' f .", "string", 65, 34.234);
4557 test_varargs_macros ();
4559 // Check flexible array members.
4560 struct incomplete_array *ia =
4561 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4562 ia->datasize = 10;
4563 for (int i = 0; i < ia->datasize; ++i)
4564 ia->data[i] = i * 1.234;
4566 // Check named initializers.
4567 struct named_init ni = {
4568 .number = 34,
4569 .name = L"Test wide string",
4570 .average = 543.34343,
4573 ni.number = 58;
4575 int dynamic_array[ni.number];
4576 dynamic_array[ni.number - 1] = 543;
4578 // work around unused variable warnings
4579 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4580 || dynamic_array[ni.number - 1] != 543);
4583 return 0;
4585 _ACEOF
4586 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4588 CC="$ac_save_CC $ac_arg"
4589 if ac_fn_c_try_compile "$LINENO"; then :
4590 ac_cv_prog_cc_c99=$ac_arg
4592 rm -f core conftest.err conftest.$ac_objext
4593 test "x$ac_cv_prog_cc_c99" != "xno" && break
4594 done
4595 rm -f conftest.$ac_ext
4596 CC=$ac_save_CC
4599 # AC_CACHE_VAL
4600 case "x$ac_cv_prog_cc_c99" in
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4603 $as_echo "none needed" >&6; } ;;
4604 xno)
4605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4606 $as_echo "unsupported" >&6; } ;;
4608 CC="$CC $ac_cv_prog_cc_c99"
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4610 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4611 esac
4612 if test "x$ac_cv_prog_cc_c99" != xno; then :
4618 # Error out if the compiler does not support C99, as the codebase
4619 # relies on that.
4620 if test "$ac_cv_prog_cc_c99" = no; then
4621 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4624 ac_ext=cpp
4625 ac_cpp='$CXXCPP $CPPFLAGS'
4626 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4627 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4628 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4629 if test -z "$CXX"; then
4630 if test -n "$CCC"; then
4631 CXX=$CCC
4632 else
4633 if test -n "$ac_tool_prefix"; then
4634 for ac_prog in $pgac_cxx_list
4636 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4637 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4639 $as_echo_n "checking for $ac_word... " >&6; }
4640 if ${ac_cv_prog_CXX+:} false; then :
4641 $as_echo_n "(cached) " >&6
4642 else
4643 if test -n "$CXX"; then
4644 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4645 else
4646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4647 for as_dir in $PATH
4649 IFS=$as_save_IFS
4650 test -z "$as_dir" && as_dir=.
4651 for ac_exec_ext in '' $ac_executable_extensions; do
4652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4653 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4655 break 2
4657 done
4658 done
4659 IFS=$as_save_IFS
4663 CXX=$ac_cv_prog_CXX
4664 if test -n "$CXX"; then
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4666 $as_echo "$CXX" >&6; }
4667 else
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4669 $as_echo "no" >&6; }
4673 test -n "$CXX" && break
4674 done
4676 if test -z "$CXX"; then
4677 ac_ct_CXX=$CXX
4678 for ac_prog in $pgac_cxx_list
4680 # Extract the first word of "$ac_prog", so it can be a program name with args.
4681 set dummy $ac_prog; ac_word=$2
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4683 $as_echo_n "checking for $ac_word... " >&6; }
4684 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4685 $as_echo_n "(cached) " >&6
4686 else
4687 if test -n "$ac_ct_CXX"; then
4688 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4689 else
4690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691 for as_dir in $PATH
4693 IFS=$as_save_IFS
4694 test -z "$as_dir" && as_dir=.
4695 for ac_exec_ext in '' $ac_executable_extensions; do
4696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4697 ac_cv_prog_ac_ct_CXX="$ac_prog"
4698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699 break 2
4701 done
4702 done
4703 IFS=$as_save_IFS
4707 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4708 if test -n "$ac_ct_CXX"; then
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4710 $as_echo "$ac_ct_CXX" >&6; }
4711 else
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713 $as_echo "no" >&6; }
4717 test -n "$ac_ct_CXX" && break
4718 done
4720 if test "x$ac_ct_CXX" = x; then
4721 CXX="g++"
4722 else
4723 case $cross_compiling:$ac_tool_warned in
4724 yes:)
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4726 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4727 ac_tool_warned=yes ;;
4728 esac
4729 CXX=$ac_ct_CXX
4735 # Provide some information about the compiler.
4736 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4737 set X $ac_compile
4738 ac_compiler=$2
4739 for ac_option in --version -v -V -qversion; do
4740 { { ac_try="$ac_compiler $ac_option >&5"
4741 case "(($ac_try" in
4742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4743 *) ac_try_echo=$ac_try;;
4744 esac
4745 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4746 $as_echo "$ac_try_echo"; } >&5
4747 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4748 ac_status=$?
4749 if test -s conftest.err; then
4750 sed '10a\
4751 ... rest of stderr output deleted ...
4752 10q' conftest.err >conftest.er1
4753 cat conftest.er1 >&5
4755 rm -f conftest.er1 conftest.err
4756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4757 test $ac_status = 0; }
4758 done
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4761 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4762 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4763 $as_echo_n "(cached) " >&6
4764 else
4765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766 /* end confdefs.h. */
4769 main ()
4771 #ifndef __GNUC__
4772 choke me
4773 #endif
4776 return 0;
4778 _ACEOF
4779 if ac_fn_cxx_try_compile "$LINENO"; then :
4780 ac_compiler_gnu=yes
4781 else
4782 ac_compiler_gnu=no
4784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4785 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4789 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4790 if test $ac_compiler_gnu = yes; then
4791 GXX=yes
4792 else
4793 GXX=
4795 ac_test_CXXFLAGS=${CXXFLAGS+set}
4796 ac_save_CXXFLAGS=$CXXFLAGS
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4798 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4799 if ${ac_cv_prog_cxx_g+:} false; then :
4800 $as_echo_n "(cached) " >&6
4801 else
4802 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4803 ac_cxx_werror_flag=yes
4804 ac_cv_prog_cxx_g=no
4805 CXXFLAGS="-g"
4806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4807 /* end confdefs.h. */
4810 main ()
4814 return 0;
4816 _ACEOF
4817 if ac_fn_cxx_try_compile "$LINENO"; then :
4818 ac_cv_prog_cxx_g=yes
4819 else
4820 CXXFLAGS=""
4821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4822 /* end confdefs.h. */
4825 main ()
4829 return 0;
4831 _ACEOF
4832 if ac_fn_cxx_try_compile "$LINENO"; then :
4834 else
4835 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4836 CXXFLAGS="-g"
4837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4838 /* end confdefs.h. */
4841 main ()
4845 return 0;
4847 _ACEOF
4848 if ac_fn_cxx_try_compile "$LINENO"; then :
4849 ac_cv_prog_cxx_g=yes
4851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4856 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4859 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4860 if test "$ac_test_CXXFLAGS" = set; then
4861 CXXFLAGS=$ac_save_CXXFLAGS
4862 elif test $ac_cv_prog_cxx_g = yes; then
4863 if test "$GXX" = yes; then
4864 CXXFLAGS="-g -O2"
4865 else
4866 CXXFLAGS="-g"
4868 else
4869 if test "$GXX" = yes; then
4870 CXXFLAGS="-O2"
4871 else
4872 CXXFLAGS=
4875 ac_ext=c
4876 ac_cpp='$CPP $CPPFLAGS'
4877 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4878 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4879 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4882 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4883 # but has idiosyncrasies of its own. We assume icc will define
4884 # __INTEL_COMPILER regardless of CFLAGS.
4886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4887 /* end confdefs.h. */
4890 main ()
4892 #ifndef __INTEL_COMPILER
4893 choke me
4894 #endif
4896 return 0;
4898 _ACEOF
4899 if ac_fn_c_try_compile "$LINENO"; then :
4900 ICC=yes
4901 else
4902 ICC=no
4904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4906 # Check if it's Sun Studio compiler. We assume that
4907 # __SUNPRO_C will be defined for Sun Studio compilers
4908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4909 /* end confdefs.h. */
4912 main ()
4914 #ifndef __SUNPRO_C
4915 choke me
4916 #endif
4918 return 0;
4920 _ACEOF
4921 if ac_fn_c_try_compile "$LINENO"; then :
4922 SUN_STUDIO_CC=yes
4923 else
4924 SUN_STUDIO_CC=no
4926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4932 # LLVM
4934 # Checked early because subsequent tests depend on it.
4938 # Check whether --with-llvm was given.
4939 if test "${with_llvm+set}" = set; then :
4940 withval=$with_llvm;
4941 case $withval in
4942 yes)
4944 $as_echo "#define USE_LLVM 1" >>confdefs.h
4951 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4953 esac
4955 else
4956 with_llvm=no
4962 for ac_prog in gawk mawk nawk awk
4964 # Extract the first word of "$ac_prog", so it can be a program name with args.
4965 set dummy $ac_prog; ac_word=$2
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4967 $as_echo_n "checking for $ac_word... " >&6; }
4968 if ${ac_cv_prog_AWK+:} false; then :
4969 $as_echo_n "(cached) " >&6
4970 else
4971 if test -n "$AWK"; then
4972 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4973 else
4974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975 for as_dir in $PATH
4977 IFS=$as_save_IFS
4978 test -z "$as_dir" && as_dir=.
4979 for ac_exec_ext in '' $ac_executable_extensions; do
4980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4981 ac_cv_prog_AWK="$ac_prog"
4982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4983 break 2
4985 done
4986 done
4987 IFS=$as_save_IFS
4991 AWK=$ac_cv_prog_AWK
4992 if test -n "$AWK"; then
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4994 $as_echo "$AWK" >&6; }
4995 else
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4997 $as_echo "no" >&6; }
5001 test -n "$AWK" && break
5002 done
5004 if test "$with_llvm" = yes; then :
5010 if test -z "$LLVM_CONFIG"; then
5011 for ac_prog in llvm-config
5013 # Extract the first word of "$ac_prog", so it can be a program name with args.
5014 set dummy $ac_prog; ac_word=$2
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5016 $as_echo_n "checking for $ac_word... " >&6; }
5017 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5018 $as_echo_n "(cached) " >&6
5019 else
5020 case $LLVM_CONFIG in
5021 [\\/]* | ?:[\\/]*)
5022 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5026 for as_dir in $PATH
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
5030 for ac_exec_ext in '' $ac_executable_extensions; do
5031 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5032 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5034 break 2
5036 done
5037 done
5038 IFS=$as_save_IFS
5041 esac
5043 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5044 if test -n "$LLVM_CONFIG"; then
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5046 $as_echo "$LLVM_CONFIG" >&6; }
5047 else
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5049 $as_echo "no" >&6; }
5053 test -n "$LLVM_CONFIG" && break
5054 done
5056 else
5057 # Report the value of LLVM_CONFIG in configure's output in all cases.
5058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5059 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5061 $as_echo "$LLVM_CONFIG" >&6; }
5065 # no point continuing if llvm wasn't found
5066 if test -z "$LLVM_CONFIG"; then
5067 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5069 # check if detected $LLVM_CONFIG is executable
5070 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5071 if test "x$pgac_llvm_version" = "xno"; then
5072 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5074 # and whether the version is supported
5075 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 14) exit 1; else exit 0;}';then
5076 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 14 is required" "$LINENO" 5
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5079 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5081 # need clang to create some bitcode files
5083 if test -z "$CLANG"; then
5084 for ac_prog in clang
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"
5844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5845 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5846 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5847 $as_echo_n "(cached) " >&6
5848 else
5849 pgac_save_CFLAGS=$CFLAGS
5850 pgac_save_CC=$CC
5851 CC=${CC}
5852 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5853 ac_save_c_werror_flag=$ac_c_werror_flag
5854 ac_c_werror_flag=yes
5855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5856 /* end confdefs.h. */
5859 main ()
5863 return 0;
5865 _ACEOF
5866 if ac_fn_c_try_compile "$LINENO"; then :
5867 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5868 else
5869 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5872 ac_c_werror_flag=$ac_save_c_werror_flag
5873 CFLAGS="$pgac_save_CFLAGS"
5874 CC="$pgac_save_CC"
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5877 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5878 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5879 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5884 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5885 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5886 $as_echo_n "(cached) " >&6
5887 else
5888 pgac_save_CXXFLAGS=$CXXFLAGS
5889 pgac_save_CXX=$CXX
5890 CXX=${CXX}
5891 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5892 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5893 ac_cxx_werror_flag=yes
5894 ac_ext=cpp
5895 ac_cpp='$CXXCPP $CPPFLAGS'
5896 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5897 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5898 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5901 /* end confdefs.h. */
5904 main ()
5908 return 0;
5910 _ACEOF
5911 if ac_fn_cxx_try_compile "$LINENO"; then :
5912 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5913 else
5914 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5917 ac_ext=c
5918 ac_cpp='$CPP $CPPFLAGS'
5919 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5920 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5921 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5923 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5924 CXXFLAGS="$pgac_save_CXXFLAGS"
5925 CXX="$pgac_save_CXX"
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5928 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5929 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5930 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5934 # This was included in -Wall/-Wformat in older GCC versions
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5937 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5938 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5939 $as_echo_n "(cached) " >&6
5940 else
5941 pgac_save_CFLAGS=$CFLAGS
5942 pgac_save_CC=$CC
5943 CC=${CC}
5944 CFLAGS="${CFLAGS} -Wformat-security"
5945 ac_save_c_werror_flag=$ac_c_werror_flag
5946 ac_c_werror_flag=yes
5947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5948 /* end confdefs.h. */
5951 main ()
5955 return 0;
5957 _ACEOF
5958 if ac_fn_c_try_compile "$LINENO"; then :
5959 pgac_cv_prog_CC_cflags__Wformat_security=yes
5960 else
5961 pgac_cv_prog_CC_cflags__Wformat_security=no
5963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5964 ac_c_werror_flag=$ac_save_c_werror_flag
5965 CFLAGS="$pgac_save_CFLAGS"
5966 CC="$pgac_save_CC"
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5969 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5970 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5971 CFLAGS="${CFLAGS} -Wformat-security"
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5976 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5977 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5978 $as_echo_n "(cached) " >&6
5979 else
5980 pgac_save_CXXFLAGS=$CXXFLAGS
5981 pgac_save_CXX=$CXX
5982 CXX=${CXX}
5983 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5984 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5985 ac_cxx_werror_flag=yes
5986 ac_ext=cpp
5987 ac_cpp='$CXXCPP $CPPFLAGS'
5988 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5989 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5990 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5993 /* end confdefs.h. */
5996 main ()
6000 return 0;
6002 _ACEOF
6003 if ac_fn_cxx_try_compile "$LINENO"; then :
6004 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6005 else
6006 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6009 ac_ext=c
6010 ac_cpp='$CPP $CPPFLAGS'
6011 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6012 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6013 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6015 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6016 CXXFLAGS="$pgac_save_CXXFLAGS"
6017 CXX="$pgac_save_CXX"
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6020 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6021 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6022 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6026 # gcc 14+, clang for a while
6027 # (Supported in C++ by clang but not gcc. For consistency, omit in C++.)
6028 save_CFLAGS=$CFLAGS
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS" >&5
6031 $as_echo_n "checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS... " >&6; }
6032 if ${pgac_cv_prog_CC_cflags__Wmissing_variable_declarations+:} false; then :
6033 $as_echo_n "(cached) " >&6
6034 else
6035 pgac_save_CFLAGS=$CFLAGS
6036 pgac_save_CC=$CC
6037 CC=${CC}
6038 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6039 ac_save_c_werror_flag=$ac_c_werror_flag
6040 ac_c_werror_flag=yes
6041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6042 /* end confdefs.h. */
6045 main ()
6049 return 0;
6051 _ACEOF
6052 if ac_fn_c_try_compile "$LINENO"; then :
6053 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=yes
6054 else
6055 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=no
6057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6058 ac_c_werror_flag=$ac_save_c_werror_flag
6059 CFLAGS="$pgac_save_CFLAGS"
6060 CC="$pgac_save_CC"
6062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&5
6063 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&6; }
6064 if test x"$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" = x"yes"; then
6065 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6069 PERMIT_MISSING_VARIABLE_DECLARATIONS=
6070 if test x"$save_CFLAGS" != x"$CFLAGS"; then
6071 PERMIT_MISSING_VARIABLE_DECLARATIONS=-Wno-missing-variable-declarations
6074 # Disable strict-aliasing rules; needed for gcc 3.3+
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6077 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6078 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6079 $as_echo_n "(cached) " >&6
6080 else
6081 pgac_save_CFLAGS=$CFLAGS
6082 pgac_save_CC=$CC
6083 CC=${CC}
6084 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6085 ac_save_c_werror_flag=$ac_c_werror_flag
6086 ac_c_werror_flag=yes
6087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6088 /* end confdefs.h. */
6091 main ()
6095 return 0;
6097 _ACEOF
6098 if ac_fn_c_try_compile "$LINENO"; then :
6099 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6100 else
6101 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6104 ac_c_werror_flag=$ac_save_c_werror_flag
6105 CFLAGS="$pgac_save_CFLAGS"
6106 CC="$pgac_save_CC"
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6109 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6110 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6111 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6116 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6117 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119 else
6120 pgac_save_CXXFLAGS=$CXXFLAGS
6121 pgac_save_CXX=$CXX
6122 CXX=${CXX}
6123 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6124 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6125 ac_cxx_werror_flag=yes
6126 ac_ext=cpp
6127 ac_cpp='$CXXCPP $CPPFLAGS'
6128 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6129 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6130 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133 /* end confdefs.h. */
6136 main ()
6140 return 0;
6142 _ACEOF
6143 if ac_fn_cxx_try_compile "$LINENO"; then :
6144 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6145 else
6146 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6149 ac_ext=c
6150 ac_cpp='$CPP $CPPFLAGS'
6151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6155 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6156 CXXFLAGS="$pgac_save_CXXFLAGS"
6157 CXX="$pgac_save_CXX"
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6160 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6161 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6162 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6166 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6169 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6170 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6171 $as_echo_n "(cached) " >&6
6172 else
6173 pgac_save_CFLAGS=$CFLAGS
6174 pgac_save_CC=$CC
6175 CC=${CC}
6176 CFLAGS="${CFLAGS} -fwrapv"
6177 ac_save_c_werror_flag=$ac_c_werror_flag
6178 ac_c_werror_flag=yes
6179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6180 /* end confdefs.h. */
6183 main ()
6187 return 0;
6189 _ACEOF
6190 if ac_fn_c_try_compile "$LINENO"; then :
6191 pgac_cv_prog_CC_cflags__fwrapv=yes
6192 else
6193 pgac_cv_prog_CC_cflags__fwrapv=no
6195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6196 ac_c_werror_flag=$ac_save_c_werror_flag
6197 CFLAGS="$pgac_save_CFLAGS"
6198 CC="$pgac_save_CC"
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6201 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6202 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6203 CFLAGS="${CFLAGS} -fwrapv"
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6208 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6209 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6210 $as_echo_n "(cached) " >&6
6211 else
6212 pgac_save_CXXFLAGS=$CXXFLAGS
6213 pgac_save_CXX=$CXX
6214 CXX=${CXX}
6215 CXXFLAGS="${CXXFLAGS} -fwrapv"
6216 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6217 ac_cxx_werror_flag=yes
6218 ac_ext=cpp
6219 ac_cpp='$CXXCPP $CPPFLAGS'
6220 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6221 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6222 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6225 /* end confdefs.h. */
6228 main ()
6232 return 0;
6234 _ACEOF
6235 if ac_fn_cxx_try_compile "$LINENO"; then :
6236 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6237 else
6238 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6241 ac_ext=c
6242 ac_cpp='$CPP $CPPFLAGS'
6243 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6244 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6245 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6247 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6248 CXXFLAGS="$pgac_save_CXXFLAGS"
6249 CXX="$pgac_save_CXX"
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6252 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6253 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6254 CXXFLAGS="${CXXFLAGS} -fwrapv"
6258 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6261 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6262 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6263 $as_echo_n "(cached) " >&6
6264 else
6265 pgac_save_CFLAGS=$CFLAGS
6266 pgac_save_CC=$CC
6267 CC=${CC}
6268 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6269 ac_save_c_werror_flag=$ac_c_werror_flag
6270 ac_c_werror_flag=yes
6271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6272 /* end confdefs.h. */
6275 main ()
6279 return 0;
6281 _ACEOF
6282 if ac_fn_c_try_compile "$LINENO"; then :
6283 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6284 else
6285 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6288 ac_c_werror_flag=$ac_save_c_werror_flag
6289 CFLAGS="$pgac_save_CFLAGS"
6290 CC="$pgac_save_CC"
6292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6293 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6294 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6295 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6300 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6301 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6302 $as_echo_n "(cached) " >&6
6303 else
6304 pgac_save_CXXFLAGS=$CXXFLAGS
6305 pgac_save_CXX=$CXX
6306 CXX=${CXX}
6307 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6308 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6309 ac_cxx_werror_flag=yes
6310 ac_ext=cpp
6311 ac_cpp='$CXXCPP $CPPFLAGS'
6312 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6313 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6314 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6317 /* end confdefs.h. */
6320 main ()
6324 return 0;
6326 _ACEOF
6327 if ac_fn_cxx_try_compile "$LINENO"; then :
6328 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6329 else
6330 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6333 ac_ext=c
6334 ac_cpp='$CPP $CPPFLAGS'
6335 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6336 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6337 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6339 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6340 CXXFLAGS="$pgac_save_CXXFLAGS"
6341 CXX="$pgac_save_CXX"
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6344 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6345 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6346 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6350 # Optimization flags for specific files that benefit from loop unrolling
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6352 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6353 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6354 $as_echo_n "(cached) " >&6
6355 else
6356 pgac_save_CFLAGS=$CFLAGS
6357 pgac_save_CC=$CC
6358 CC=${CC}
6359 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6360 ac_save_c_werror_flag=$ac_c_werror_flag
6361 ac_c_werror_flag=yes
6362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6363 /* end confdefs.h. */
6366 main ()
6370 return 0;
6372 _ACEOF
6373 if ac_fn_c_try_compile "$LINENO"; then :
6374 pgac_cv_prog_CC_cflags__funroll_loops=yes
6375 else
6376 pgac_cv_prog_CC_cflags__funroll_loops=no
6378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6379 ac_c_werror_flag=$ac_save_c_werror_flag
6380 CFLAGS="$pgac_save_CFLAGS"
6381 CC="$pgac_save_CC"
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6384 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6385 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6386 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6390 # Optimization flags for specific files that benefit from vectorization
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6392 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6393 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6394 $as_echo_n "(cached) " >&6
6395 else
6396 pgac_save_CFLAGS=$CFLAGS
6397 pgac_save_CC=$CC
6398 CC=${CC}
6399 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6400 ac_save_c_werror_flag=$ac_c_werror_flag
6401 ac_c_werror_flag=yes
6402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6403 /* end confdefs.h. */
6406 main ()
6410 return 0;
6412 _ACEOF
6413 if ac_fn_c_try_compile "$LINENO"; then :
6414 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6415 else
6416 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419 ac_c_werror_flag=$ac_save_c_werror_flag
6420 CFLAGS="$pgac_save_CFLAGS"
6421 CC="$pgac_save_CC"
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6424 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6425 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6426 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6431 # The following tests want to suppress various unhelpful warnings by adding
6432 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6433 # switches, so we have to test for the positive form and if that works,
6434 # add the negative form. Note that tests of this form typically need to
6435 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6437 # Suppress clang's unhelpful unused-command-line-argument warnings.
6438 NOT_THE_CFLAGS=""
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6440 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6441 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6442 $as_echo_n "(cached) " >&6
6443 else
6444 pgac_save_CFLAGS=$CFLAGS
6445 pgac_save_CC=$CC
6446 CC=${CC}
6447 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6448 ac_save_c_werror_flag=$ac_c_werror_flag
6449 ac_c_werror_flag=yes
6450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6451 /* end confdefs.h. */
6454 main ()
6458 return 0;
6460 _ACEOF
6461 if ac_fn_c_try_compile "$LINENO"; then :
6462 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6463 else
6464 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6467 ac_c_werror_flag=$ac_save_c_werror_flag
6468 CFLAGS="$pgac_save_CFLAGS"
6469 CC="$pgac_save_CC"
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6472 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6473 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6474 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6478 if test -n "$NOT_THE_CFLAGS"; then
6479 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6481 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6482 # of warnings when building plperl because of usages in the Perl headers.
6483 NOT_THE_CFLAGS=""
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6485 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6486 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6487 $as_echo_n "(cached) " >&6
6488 else
6489 pgac_save_CFLAGS=$CFLAGS
6490 pgac_save_CC=$CC
6491 CC=${CC}
6492 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6493 ac_save_c_werror_flag=$ac_c_werror_flag
6494 ac_c_werror_flag=yes
6495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6496 /* end confdefs.h. */
6499 main ()
6503 return 0;
6505 _ACEOF
6506 if ac_fn_c_try_compile "$LINENO"; then :
6507 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6508 else
6509 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6512 ac_c_werror_flag=$ac_save_c_werror_flag
6513 CFLAGS="$pgac_save_CFLAGS"
6514 CC="$pgac_save_CC"
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6517 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6518 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6519 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6523 if test -n "$NOT_THE_CFLAGS"; then
6524 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6526 # Similarly disable useless truncation warnings from gcc 8+
6527 NOT_THE_CFLAGS=""
6528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6529 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6530 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6531 $as_echo_n "(cached) " >&6
6532 else
6533 pgac_save_CFLAGS=$CFLAGS
6534 pgac_save_CC=$CC
6535 CC=${CC}
6536 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6537 ac_save_c_werror_flag=$ac_c_werror_flag
6538 ac_c_werror_flag=yes
6539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6540 /* end confdefs.h. */
6543 main ()
6547 return 0;
6549 _ACEOF
6550 if ac_fn_c_try_compile "$LINENO"; then :
6551 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6552 else
6553 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6556 ac_c_werror_flag=$ac_save_c_werror_flag
6557 CFLAGS="$pgac_save_CFLAGS"
6558 CC="$pgac_save_CC"
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6561 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6562 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6563 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6567 if test -n "$NOT_THE_CFLAGS"; then
6568 CFLAGS="$CFLAGS -Wno-format-truncation"
6570 NOT_THE_CFLAGS=""
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6572 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6573 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6574 $as_echo_n "(cached) " >&6
6575 else
6576 pgac_save_CFLAGS=$CFLAGS
6577 pgac_save_CC=$CC
6578 CC=${CC}
6579 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6580 ac_save_c_werror_flag=$ac_c_werror_flag
6581 ac_c_werror_flag=yes
6582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6583 /* end confdefs.h. */
6586 main ()
6590 return 0;
6592 _ACEOF
6593 if ac_fn_c_try_compile "$LINENO"; then :
6594 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6595 else
6596 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6599 ac_c_werror_flag=$ac_save_c_werror_flag
6600 CFLAGS="$pgac_save_CFLAGS"
6601 CC="$pgac_save_CC"
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6604 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6605 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6606 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6610 if test -n "$NOT_THE_CFLAGS"; then
6611 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6613 # Suppress clang 16's strict warnings about function casts
6614 NOT_THE_CFLAGS=""
6615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6616 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6617 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6618 $as_echo_n "(cached) " >&6
6619 else
6620 pgac_save_CFLAGS=$CFLAGS
6621 pgac_save_CC=$CC
6622 CC=${CC}
6623 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6624 ac_save_c_werror_flag=$ac_c_werror_flag
6625 ac_c_werror_flag=yes
6626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6627 /* end confdefs.h. */
6630 main ()
6634 return 0;
6636 _ACEOF
6637 if ac_fn_c_try_compile "$LINENO"; then :
6638 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6639 else
6640 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6643 ac_c_werror_flag=$ac_save_c_werror_flag
6644 CFLAGS="$pgac_save_CFLAGS"
6645 CC="$pgac_save_CC"
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6648 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6649 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6650 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6654 if test -n "$NOT_THE_CFLAGS"; then
6655 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6657 elif test "$ICC" = yes; then
6658 # Intel's compiler has a bug/misoptimization in checking for
6659 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6662 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6663 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6664 $as_echo_n "(cached) " >&6
6665 else
6666 pgac_save_CFLAGS=$CFLAGS
6667 pgac_save_CC=$CC
6668 CC=${CC}
6669 CFLAGS="${CFLAGS} -mp1"
6670 ac_save_c_werror_flag=$ac_c_werror_flag
6671 ac_c_werror_flag=yes
6672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6673 /* end confdefs.h. */
6676 main ()
6680 return 0;
6682 _ACEOF
6683 if ac_fn_c_try_compile "$LINENO"; then :
6684 pgac_cv_prog_CC_cflags__mp1=yes
6685 else
6686 pgac_cv_prog_CC_cflags__mp1=no
6688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6689 ac_c_werror_flag=$ac_save_c_werror_flag
6690 CFLAGS="$pgac_save_CFLAGS"
6691 CC="$pgac_save_CC"
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6694 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6695 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6696 CFLAGS="${CFLAGS} -mp1"
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6701 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6702 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6703 $as_echo_n "(cached) " >&6
6704 else
6705 pgac_save_CXXFLAGS=$CXXFLAGS
6706 pgac_save_CXX=$CXX
6707 CXX=${CXX}
6708 CXXFLAGS="${CXXFLAGS} -mp1"
6709 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6710 ac_cxx_werror_flag=yes
6711 ac_ext=cpp
6712 ac_cpp='$CXXCPP $CPPFLAGS'
6713 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6714 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6715 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6718 /* end confdefs.h. */
6721 main ()
6725 return 0;
6727 _ACEOF
6728 if ac_fn_cxx_try_compile "$LINENO"; then :
6729 pgac_cv_prog_CXX_cxxflags__mp1=yes
6730 else
6731 pgac_cv_prog_CXX_cxxflags__mp1=no
6733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6734 ac_ext=c
6735 ac_cpp='$CPP $CPPFLAGS'
6736 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6737 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6740 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6741 CXXFLAGS="$pgac_save_CXXFLAGS"
6742 CXX="$pgac_save_CXX"
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6745 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6746 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6747 CXXFLAGS="${CXXFLAGS} -mp1"
6751 # Make sure strict aliasing is off (though this is said to be the default)
6753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6754 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6755 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6756 $as_echo_n "(cached) " >&6
6757 else
6758 pgac_save_CFLAGS=$CFLAGS
6759 pgac_save_CC=$CC
6760 CC=${CC}
6761 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6762 ac_save_c_werror_flag=$ac_c_werror_flag
6763 ac_c_werror_flag=yes
6764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6765 /* end confdefs.h. */
6768 main ()
6772 return 0;
6774 _ACEOF
6775 if ac_fn_c_try_compile "$LINENO"; then :
6776 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6777 else
6778 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6781 ac_c_werror_flag=$ac_save_c_werror_flag
6782 CFLAGS="$pgac_save_CFLAGS"
6783 CC="$pgac_save_CC"
6785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6786 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6787 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6788 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6793 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6794 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6795 $as_echo_n "(cached) " >&6
6796 else
6797 pgac_save_CXXFLAGS=$CXXFLAGS
6798 pgac_save_CXX=$CXX
6799 CXX=${CXX}
6800 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6801 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6802 ac_cxx_werror_flag=yes
6803 ac_ext=cpp
6804 ac_cpp='$CXXCPP $CPPFLAGS'
6805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6806 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6810 /* end confdefs.h. */
6813 main ()
6817 return 0;
6819 _ACEOF
6820 if ac_fn_cxx_try_compile "$LINENO"; then :
6821 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6822 else
6823 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6826 ac_ext=c
6827 ac_cpp='$CPP $CPPFLAGS'
6828 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6829 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6830 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6832 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6833 CXXFLAGS="$pgac_save_CXXFLAGS"
6834 CXX="$pgac_save_CXX"
6836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6837 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6838 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6839 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6845 # If the compiler knows how to hide symbols, add the switch needed for that to
6846 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6848 # This is done separately from the above because -fvisibility is supported by
6849 # quite a few different compilers, making the required repetition bothersome.
6851 # We might need to add a separate test to check if
6852 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6853 # compiler that supports one of the supported variants of -fvisibility=hidden
6854 # but uses a different syntax to mark a symbol as exported.
6855 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6857 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6858 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
6859 $as_echo_n "(cached) " >&6
6860 else
6861 pgac_save_CFLAGS=$CFLAGS
6862 pgac_save_CC=$CC
6863 CC=${CC}
6864 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6865 ac_save_c_werror_flag=$ac_c_werror_flag
6866 ac_c_werror_flag=yes
6867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6868 /* end confdefs.h. */
6871 main ()
6875 return 0;
6877 _ACEOF
6878 if ac_fn_c_try_compile "$LINENO"; then :
6879 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
6880 else
6881 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
6883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6884 ac_c_werror_flag=$ac_save_c_werror_flag
6885 CFLAGS="$pgac_save_CFLAGS"
6886 CC="$pgac_save_CC"
6888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
6889 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
6890 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
6891 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6895 # For C++ we additionally want -fvisibility-inlines-hidden
6896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
6897 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6898 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
6899 $as_echo_n "(cached) " >&6
6900 else
6901 pgac_save_CXXFLAGS=$CXXFLAGS
6902 pgac_save_CXX=$CXX
6903 CXX=${CXX}
6904 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6905 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6906 ac_cxx_werror_flag=yes
6907 ac_ext=cpp
6908 ac_cpp='$CXXCPP $CPPFLAGS'
6909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6914 /* end confdefs.h. */
6917 main ()
6921 return 0;
6923 _ACEOF
6924 if ac_fn_cxx_try_compile "$LINENO"; then :
6925 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
6926 else
6927 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
6929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6930 ac_ext=c
6931 ac_cpp='$CPP $CPPFLAGS'
6932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6936 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6937 CXXFLAGS="$pgac_save_CXXFLAGS"
6938 CXX="$pgac_save_CXX"
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
6941 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
6942 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
6943 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
6947 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6948 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
6949 $as_echo_n "(cached) " >&6
6950 else
6951 pgac_save_CXXFLAGS=$CXXFLAGS
6952 pgac_save_CXX=$CXX
6953 CXX=${CXX}
6954 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6955 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6956 ac_cxx_werror_flag=yes
6957 ac_ext=cpp
6958 ac_cpp='$CXXCPP $CPPFLAGS'
6959 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6960 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6961 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6964 /* end confdefs.h. */
6967 main ()
6971 return 0;
6973 _ACEOF
6974 if ac_fn_cxx_try_compile "$LINENO"; then :
6975 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
6976 else
6977 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
6979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6980 ac_ext=c
6981 ac_cpp='$CPP $CPPFLAGS'
6982 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6983 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6984 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6986 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6987 CXXFLAGS="$pgac_save_CXXFLAGS"
6988 CXX="$pgac_save_CXX"
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
6991 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
6992 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
6993 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6996 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
6999 if test "$have_visibility_attribute" = "yes"; then
7001 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7010 # Determine flags used to emit bitcode for JIT inlining.
7011 # 1. We must duplicate any behaviour-changing compiler flags used above,
7012 # to keep compatibility with the compiler used for normal Postgres code.
7013 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7014 # warning in the main build is enough.
7015 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7016 if test "$with_llvm" = yes ; then
7017 CLANGXX="$CLANG -xc++"
7019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7020 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7021 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7022 $as_echo_n "(cached) " >&6
7023 else
7024 pgac_save_CFLAGS=$CFLAGS
7025 pgac_save_CC=$CC
7026 CC=${CLANG}
7027 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7028 ac_save_c_werror_flag=$ac_c_werror_flag
7029 ac_c_werror_flag=yes
7030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7031 /* end confdefs.h. */
7034 main ()
7038 return 0;
7040 _ACEOF
7041 if ac_fn_c_try_compile "$LINENO"; then :
7042 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7043 else
7044 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7047 ac_c_werror_flag=$ac_save_c_werror_flag
7048 CFLAGS="$pgac_save_CFLAGS"
7049 CC="$pgac_save_CC"
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7052 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7053 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7054 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7058 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7059 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7060 $as_echo_n "(cached) " >&6
7061 else
7062 pgac_save_CXXFLAGS=$CXXFLAGS
7063 pgac_save_CXX=$CXX
7064 CXX=${CLANGXX}
7065 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7066 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7067 ac_cxx_werror_flag=yes
7068 ac_ext=cpp
7069 ac_cpp='$CXXCPP $CPPFLAGS'
7070 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7071 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7072 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7075 /* end confdefs.h. */
7078 main ()
7082 return 0;
7084 _ACEOF
7085 if ac_fn_cxx_try_compile "$LINENO"; then :
7086 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7087 else
7088 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7091 ac_ext=c
7092 ac_cpp='$CPP $CPPFLAGS'
7093 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7094 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7095 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7097 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7098 CXXFLAGS="$pgac_save_CXXFLAGS"
7099 CXX="$pgac_save_CXX"
7101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7102 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7103 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7104 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7108 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7109 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7110 $as_echo_n "(cached) " >&6
7111 else
7112 pgac_save_CFLAGS=$CFLAGS
7113 pgac_save_CC=$CC
7114 CC=${CLANG}
7115 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7116 ac_save_c_werror_flag=$ac_c_werror_flag
7117 ac_c_werror_flag=yes
7118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7119 /* end confdefs.h. */
7122 main ()
7126 return 0;
7128 _ACEOF
7129 if ac_fn_c_try_compile "$LINENO"; then :
7130 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7131 else
7132 pgac_cv_prog_CLANG_cflags__fwrapv=no
7134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7135 ac_c_werror_flag=$ac_save_c_werror_flag
7136 CFLAGS="$pgac_save_CFLAGS"
7137 CC="$pgac_save_CC"
7139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7140 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7141 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7142 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7146 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7147 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7148 $as_echo_n "(cached) " >&6
7149 else
7150 pgac_save_CXXFLAGS=$CXXFLAGS
7151 pgac_save_CXX=$CXX
7152 CXX=${CLANGXX}
7153 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7154 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7155 ac_cxx_werror_flag=yes
7156 ac_ext=cpp
7157 ac_cpp='$CXXCPP $CPPFLAGS'
7158 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7159 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7160 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7163 /* end confdefs.h. */
7166 main ()
7170 return 0;
7172 _ACEOF
7173 if ac_fn_cxx_try_compile "$LINENO"; then :
7174 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7175 else
7176 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7179 ac_ext=c
7180 ac_cpp='$CPP $CPPFLAGS'
7181 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7182 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7183 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7185 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7186 CXXFLAGS="$pgac_save_CXXFLAGS"
7187 CXX="$pgac_save_CXX"
7189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7190 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7191 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7192 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7196 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7197 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7198 $as_echo_n "(cached) " >&6
7199 else
7200 pgac_save_CFLAGS=$CFLAGS
7201 pgac_save_CC=$CC
7202 CC=${CLANG}
7203 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7204 ac_save_c_werror_flag=$ac_c_werror_flag
7205 ac_c_werror_flag=yes
7206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7207 /* end confdefs.h. */
7210 main ()
7214 return 0;
7216 _ACEOF
7217 if ac_fn_c_try_compile "$LINENO"; then :
7218 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7219 else
7220 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7223 ac_c_werror_flag=$ac_save_c_werror_flag
7224 CFLAGS="$pgac_save_CFLAGS"
7225 CC="$pgac_save_CC"
7227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7228 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7229 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7230 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7234 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7235 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7236 $as_echo_n "(cached) " >&6
7237 else
7238 pgac_save_CXXFLAGS=$CXXFLAGS
7239 pgac_save_CXX=$CXX
7240 CXX=${CLANGXX}
7241 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7242 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7243 ac_cxx_werror_flag=yes
7244 ac_ext=cpp
7245 ac_cpp='$CXXCPP $CPPFLAGS'
7246 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7247 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7248 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7251 /* end confdefs.h. */
7254 main ()
7258 return 0;
7260 _ACEOF
7261 if ac_fn_cxx_try_compile "$LINENO"; then :
7262 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7263 else
7264 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7267 ac_ext=c
7268 ac_cpp='$CPP $CPPFLAGS'
7269 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7270 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7271 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7273 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7274 CXXFLAGS="$pgac_save_CXXFLAGS"
7275 CXX="$pgac_save_CXX"
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7278 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7279 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7280 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7284 NOT_THE_CFLAGS=""
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7286 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7287 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7288 $as_echo_n "(cached) " >&6
7289 else
7290 pgac_save_CFLAGS=$CFLAGS
7291 pgac_save_CC=$CC
7292 CC=${CLANG}
7293 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7294 ac_save_c_werror_flag=$ac_c_werror_flag
7295 ac_c_werror_flag=yes
7296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7297 /* end confdefs.h. */
7300 main ()
7304 return 0;
7306 _ACEOF
7307 if ac_fn_c_try_compile "$LINENO"; then :
7308 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7309 else
7310 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7313 ac_c_werror_flag=$ac_save_c_werror_flag
7314 CFLAGS="$pgac_save_CFLAGS"
7315 CC="$pgac_save_CC"
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7318 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7319 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7320 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7323 if test -n "$NOT_THE_CFLAGS"; then
7324 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7326 NOT_THE_CFLAGS=""
7327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7328 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7329 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7330 $as_echo_n "(cached) " >&6
7331 else
7332 pgac_save_CFLAGS=$CFLAGS
7333 pgac_save_CC=$CC
7334 CC=${CLANG}
7335 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7336 ac_save_c_werror_flag=$ac_c_werror_flag
7337 ac_c_werror_flag=yes
7338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7339 /* end confdefs.h. */
7342 main ()
7346 return 0;
7348 _ACEOF
7349 if ac_fn_c_try_compile "$LINENO"; then :
7350 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7351 else
7352 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7355 ac_c_werror_flag=$ac_save_c_werror_flag
7356 CFLAGS="$pgac_save_CFLAGS"
7357 CC="$pgac_save_CC"
7359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7360 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7361 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7362 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7365 if test -n "$NOT_THE_CFLAGS"; then
7366 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7368 NOT_THE_CFLAGS=""
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7370 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7371 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7372 $as_echo_n "(cached) " >&6
7373 else
7374 pgac_save_CFLAGS=$CFLAGS
7375 pgac_save_CC=$CC
7376 CC=${CLANG}
7377 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7378 ac_save_c_werror_flag=$ac_c_werror_flag
7379 ac_c_werror_flag=yes
7380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7381 /* end confdefs.h. */
7384 main ()
7388 return 0;
7390 _ACEOF
7391 if ac_fn_c_try_compile "$LINENO"; then :
7392 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7393 else
7394 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397 ac_c_werror_flag=$ac_save_c_werror_flag
7398 CFLAGS="$pgac_save_CFLAGS"
7399 CC="$pgac_save_CC"
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7402 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7403 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7404 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7407 if test -n "$NOT_THE_CFLAGS"; then
7408 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7410 NOT_THE_CFLAGS=""
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7412 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7413 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7414 $as_echo_n "(cached) " >&6
7415 else
7416 pgac_save_CFLAGS=$CFLAGS
7417 pgac_save_CC=$CC
7418 CC=${CLANG}
7419 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7420 ac_save_c_werror_flag=$ac_c_werror_flag
7421 ac_c_werror_flag=yes
7422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7423 /* end confdefs.h. */
7426 main ()
7430 return 0;
7432 _ACEOF
7433 if ac_fn_c_try_compile "$LINENO"; then :
7434 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7435 else
7436 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7439 ac_c_werror_flag=$ac_save_c_werror_flag
7440 CFLAGS="$pgac_save_CFLAGS"
7441 CC="$pgac_save_CC"
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7444 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7445 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7446 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7449 if test -n "$NOT_THE_CFLAGS"; then
7450 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7454 # supply -g if --enable-debug
7455 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7456 CFLAGS="$CFLAGS -g"
7459 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7460 CXXFLAGS="$CXXFLAGS -g"
7463 # enable code coverage if --enable-coverage
7464 if test "$enable_coverage" = yes; then
7465 if test "$GCC" = yes; then
7466 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7467 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7468 else
7469 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7473 # enable profiling if --enable-profiling
7474 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7475 if test "$GCC" = yes; then
7477 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7479 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7480 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7481 else
7482 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7486 # On Solaris, we need this #define to get POSIX-conforming versions
7487 # of many interfaces (sigwait, getpwuid_r, ...).
7488 if test "$PORTNAME" = "solaris"; then
7489 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7492 # We already have this in Makefile.win32, but configure needs it too
7493 if test "$PORTNAME" = "win32"; then
7494 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7497 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7498 # user-specified flags (if any) at the end. This lets users override
7499 # the automatic additions.
7500 CFLAGS="$CFLAGS $user_CFLAGS"
7501 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7502 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7503 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7508 # The template file must set up CFLAGS_SL; we don't support user override
7511 # Check if the compiler still works with the final flag settings
7512 # (note, we're not checking that for CXX, which is optional)
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7514 $as_echo_n "checking whether the C compiler still works... " >&6; }
7515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7516 /* end confdefs.h. */
7519 main ()
7521 return 0;
7523 return 0;
7525 _ACEOF
7526 if ac_fn_c_try_link "$LINENO"; then :
7527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7528 $as_echo "yes" >&6; }
7529 else
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7531 $as_echo "no" >&6; }
7532 as_fn_error $? "cannot proceed" "$LINENO" 5
7534 rm -f core conftest.err conftest.$ac_objext \
7535 conftest$ac_exeext conftest.$ac_ext
7537 # Defend against gcc -ffast-math
7538 if test "$GCC" = yes; then
7539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7540 /* end confdefs.h. */
7543 main ()
7545 #ifdef __FAST_MATH__
7546 choke me
7547 #endif
7549 return 0;
7551 _ACEOF
7552 if ac_fn_c_try_compile "$LINENO"; then :
7554 else
7555 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7560 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7561 # versions of clang do not understand -fexcess-precision=standard, the use of
7562 # x87 floating point operations leads to problems like isinf possibly returning
7563 # false for a value that is infinite when converted from the 80bit register to
7564 # the 8byte memory representation.
7566 # Only perform the test if the compiler doesn't understand
7567 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7568 # automatically.
7569 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7571 /* end confdefs.h. */
7574 main ()
7577 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7578 choke me
7579 #endif
7582 return 0;
7584 _ACEOF
7585 if ac_fn_c_try_compile "$LINENO"; then :
7587 else
7588 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7593 ac_ext=c
7594 ac_cpp='$CPP $CPPFLAGS'
7595 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7596 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7597 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7599 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7600 # On Suns, sometimes $CPP names a directory.
7601 if test -n "$CPP" && test -d "$CPP"; then
7602 CPP=
7604 if test -z "$CPP"; then
7605 if ${ac_cv_prog_CPP+:} false; then :
7606 $as_echo_n "(cached) " >&6
7607 else
7608 # Double quotes because CPP needs to be expanded
7609 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7611 ac_preproc_ok=false
7612 for ac_c_preproc_warn_flag in '' yes
7614 # Use a header file that comes with gcc, so configuring glibc
7615 # with a fresh cross-compiler works.
7616 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7617 # <limits.h> exists even on freestanding compilers.
7618 # On the NeXT, cc -E runs the code through the compiler's parser,
7619 # not just through cpp. "Syntax error" is here to catch this case.
7620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7621 /* end confdefs.h. */
7622 #ifdef __STDC__
7623 # include <limits.h>
7624 #else
7625 # include <assert.h>
7626 #endif
7627 Syntax error
7628 _ACEOF
7629 if ac_fn_c_try_cpp "$LINENO"; then :
7631 else
7632 # Broken: fails on valid input.
7633 continue
7635 rm -f conftest.err conftest.i conftest.$ac_ext
7637 # OK, works on sane cases. Now check whether nonexistent headers
7638 # can be detected and how.
7639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640 /* end confdefs.h. */
7641 #include <ac_nonexistent.h>
7642 _ACEOF
7643 if ac_fn_c_try_cpp "$LINENO"; then :
7644 # Broken: success on invalid input.
7645 continue
7646 else
7647 # Passes both tests.
7648 ac_preproc_ok=:
7649 break
7651 rm -f conftest.err conftest.i conftest.$ac_ext
7653 done
7654 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7655 rm -f conftest.i conftest.err conftest.$ac_ext
7656 if $ac_preproc_ok; then :
7657 break
7660 done
7661 ac_cv_prog_CPP=$CPP
7664 CPP=$ac_cv_prog_CPP
7665 else
7666 ac_cv_prog_CPP=$CPP
7668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7669 $as_echo "$CPP" >&6; }
7670 ac_preproc_ok=false
7671 for ac_c_preproc_warn_flag in '' yes
7673 # Use a header file that comes with gcc, so configuring glibc
7674 # with a fresh cross-compiler works.
7675 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7676 # <limits.h> exists even on freestanding compilers.
7677 # On the NeXT, cc -E runs the code through the compiler's parser,
7678 # not just through cpp. "Syntax error" is here to catch this case.
7679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7680 /* end confdefs.h. */
7681 #ifdef __STDC__
7682 # include <limits.h>
7683 #else
7684 # include <assert.h>
7685 #endif
7686 Syntax error
7687 _ACEOF
7688 if ac_fn_c_try_cpp "$LINENO"; then :
7690 else
7691 # Broken: fails on valid input.
7692 continue
7694 rm -f conftest.err conftest.i conftest.$ac_ext
7696 # OK, works on sane cases. Now check whether nonexistent headers
7697 # can be detected and how.
7698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7699 /* end confdefs.h. */
7700 #include <ac_nonexistent.h>
7701 _ACEOF
7702 if ac_fn_c_try_cpp "$LINENO"; then :
7703 # Broken: success on invalid input.
7704 continue
7705 else
7706 # Passes both tests.
7707 ac_preproc_ok=:
7708 break
7710 rm -f conftest.err conftest.i conftest.$ac_ext
7712 done
7713 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7714 rm -f conftest.i conftest.err conftest.$ac_ext
7715 if $ac_preproc_ok; then :
7717 else
7718 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7719 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7720 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7721 See \`config.log' for more details" "$LINENO" 5; }
7724 ac_ext=c
7725 ac_cpp='$CPP $CPPFLAGS'
7726 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7727 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7728 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7734 # Set up TAS assembly code if needed; the template file has now had its
7735 # chance to request this.
7737 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7740 if test "$need_tas" = yes ; then
7741 TAS=tas.o
7742 else
7743 TAS=""
7748 cat >>confdefs.h <<_ACEOF
7749 #define DLSUFFIX "$DLSUFFIX"
7750 _ACEOF
7754 # Set up pkg_config in case we need it below
7763 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7764 if test -n "$ac_tool_prefix"; then
7765 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7766 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7768 $as_echo_n "checking for $ac_word... " >&6; }
7769 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7770 $as_echo_n "(cached) " >&6
7771 else
7772 case $PKG_CONFIG in
7773 [\\/]* | ?:[\\/]*)
7774 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7778 for as_dir in $PATH
7780 IFS=$as_save_IFS
7781 test -z "$as_dir" && as_dir=.
7782 for ac_exec_ext in '' $ac_executable_extensions; do
7783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7784 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7786 break 2
7788 done
7789 done
7790 IFS=$as_save_IFS
7793 esac
7795 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7796 if test -n "$PKG_CONFIG"; then
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7798 $as_echo "$PKG_CONFIG" >&6; }
7799 else
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7801 $as_echo "no" >&6; }
7806 if test -z "$ac_cv_path_PKG_CONFIG"; then
7807 ac_pt_PKG_CONFIG=$PKG_CONFIG
7808 # Extract the first word of "pkg-config", so it can be a program name with args.
7809 set dummy pkg-config; ac_word=$2
7810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7811 $as_echo_n "checking for $ac_word... " >&6; }
7812 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7813 $as_echo_n "(cached) " >&6
7814 else
7815 case $ac_pt_PKG_CONFIG in
7816 [\\/]* | ?:[\\/]*)
7817 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7821 for as_dir in $PATH
7823 IFS=$as_save_IFS
7824 test -z "$as_dir" && as_dir=.
7825 for ac_exec_ext in '' $ac_executable_extensions; do
7826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7827 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7829 break 2
7831 done
7832 done
7833 IFS=$as_save_IFS
7836 esac
7838 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7839 if test -n "$ac_pt_PKG_CONFIG"; then
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7841 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7842 else
7843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7844 $as_echo "no" >&6; }
7847 if test "x$ac_pt_PKG_CONFIG" = x; then
7848 PKG_CONFIG=""
7849 else
7850 case $cross_compiling:$ac_tool_warned in
7851 yes:)
7852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7853 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7854 ac_tool_warned=yes ;;
7855 esac
7856 PKG_CONFIG=$ac_pt_PKG_CONFIG
7858 else
7859 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7863 if test -n "$PKG_CONFIG"; then
7864 _pkg_min_version=0.9.0
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7866 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7867 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7869 $as_echo "yes" >&6; }
7870 else
7871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7872 $as_echo "no" >&6; }
7873 PKG_CONFIG=""
7878 # Automatic dependency tracking
7882 # Check whether --enable-depend was given.
7883 if test "${enable_depend+set}" = set; then :
7884 enableval=$enable_depend;
7885 case $enableval in
7886 yes)
7887 autodepend=yes
7893 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7895 esac
7897 else
7898 enable_depend=no
7907 # Enable assert checks
7911 # Check whether --enable-cassert was given.
7912 if test "${enable_cassert+set}" = set; then :
7913 enableval=$enable_cassert;
7914 case $enableval in
7915 yes)
7917 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7924 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7926 esac
7928 else
7929 enable_cassert=no
7937 # Include directories
7939 ac_save_IFS=$IFS
7940 IFS="${IFS}${PATH_SEPARATOR}"
7941 # SRCH_INC comes from the template file
7942 for dir in $with_includes $SRCH_INC; do
7943 if test -d "$dir"; then
7944 INCLUDES="$INCLUDES -I$dir"
7945 else
7946 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7947 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7949 done
7950 IFS=$ac_save_IFS
7955 # Library directories
7957 ac_save_IFS=$IFS
7958 IFS="${IFS}${PATH_SEPARATOR}"
7959 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7960 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7961 if test -d "$dir"; then
7962 LIBDIRS="$LIBDIRS -L$dir"
7963 else
7964 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7965 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7967 done
7968 IFS=$ac_save_IFS
7971 # ICU
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7974 $as_echo_n "checking whether to build with ICU support... " >&6; }
7978 # Check whether --with-icu was given.
7979 if test "${with_icu+set}" = set; then :
7980 withval=$with_icu;
7981 case $withval in
7982 yes)
7984 $as_echo "#define USE_ICU 1" >>confdefs.h
7991 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7993 esac
7995 else
7996 with_icu=yes
7998 $as_echo "#define USE_ICU 1" >>confdefs.h
8003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8004 $as_echo "$with_icu" >&6; }
8007 if test "$with_icu" = yes; then
8009 pkg_failed=no
8010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8011 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8013 if test -n "$ICU_CFLAGS"; then
8014 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8015 elif test -n "$PKG_CONFIG"; then
8016 if test -n "$PKG_CONFIG" && \
8017 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8018 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8019 ac_status=$?
8020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8021 test $ac_status = 0; }; then
8022 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8023 test "x$?" != "x0" && pkg_failed=yes
8024 else
8025 pkg_failed=yes
8027 else
8028 pkg_failed=untried
8030 if test -n "$ICU_LIBS"; then
8031 pkg_cv_ICU_LIBS="$ICU_LIBS"
8032 elif test -n "$PKG_CONFIG"; then
8033 if test -n "$PKG_CONFIG" && \
8034 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8035 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8036 ac_status=$?
8037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8038 test $ac_status = 0; }; then
8039 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8040 test "x$?" != "x0" && pkg_failed=yes
8041 else
8042 pkg_failed=yes
8044 else
8045 pkg_failed=untried
8050 if test $pkg_failed = yes; then
8051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8052 $as_echo "no" >&6; }
8054 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8055 _pkg_short_errors_supported=yes
8056 else
8057 _pkg_short_errors_supported=no
8059 if test $_pkg_short_errors_supported = yes; then
8060 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8061 else
8062 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8064 # Put the nasty error message in config.log where it belongs
8065 echo "$ICU_PKG_ERRORS" >&5
8067 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8069 $ICU_PKG_ERRORS
8071 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8072 installed software in a non-standard prefix.
8074 Alternatively, you may set the environment variables ICU_CFLAGS
8075 and ICU_LIBS to avoid the need to call pkg-config.
8076 See the pkg-config man page for more details." "$LINENO" 5
8077 elif test $pkg_failed = untried; then
8078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8079 $as_echo "no" >&6; }
8080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8081 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8082 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8083 is in your PATH or set the PKG_CONFIG environment variable to the full
8084 path to pkg-config.
8086 Alternatively, you may set the environment variables ICU_CFLAGS
8087 and ICU_LIBS to avoid the need to call pkg-config.
8088 See the pkg-config man page for more details.
8090 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8091 See \`config.log' for more details" "$LINENO" 5; }
8092 else
8093 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8094 ICU_LIBS=$pkg_cv_ICU_LIBS
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8096 $as_echo "yes" >&6; }
8102 # Optionally build Tcl modules (PL/Tcl)
8104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8105 $as_echo_n "checking whether to build with Tcl... " >&6; }
8109 # Check whether --with-tcl was given.
8110 if test "${with_tcl+set}" = set; then :
8111 withval=$with_tcl;
8112 case $withval in
8113 yes)
8120 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8122 esac
8124 else
8125 with_tcl=no
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8131 $as_echo "$with_tcl" >&6; }
8134 # We see if the path to the Tcl/Tk configuration scripts is specified.
8135 # This will override the use of tclsh to find the paths to search.
8140 # Check whether --with-tclconfig was given.
8141 if test "${with_tclconfig+set}" = set; then :
8142 withval=$with_tclconfig;
8143 case $withval in
8144 yes)
8145 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8148 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8153 esac
8160 # Optionally build Perl modules (PL/Perl)
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8163 $as_echo_n "checking whether to build Perl modules... " >&6; }
8167 # Check whether --with-perl was given.
8168 if test "${with_perl+set}" = set; then :
8169 withval=$with_perl;
8170 case $withval in
8171 yes)
8178 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8180 esac
8182 else
8183 with_perl=no
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8189 $as_echo "$with_perl" >&6; }
8193 # Optionally build Python modules (PL/Python)
8195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8196 $as_echo_n "checking whether to build Python modules... " >&6; }
8200 # Check whether --with-python was given.
8201 if test "${with_python+set}" = set; then :
8202 withval=$with_python;
8203 case $withval in
8204 yes)
8211 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8213 esac
8215 else
8216 with_python=no
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8222 $as_echo "$with_python" >&6; }
8226 # GSSAPI
8228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8229 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8233 # Check whether --with-gssapi was given.
8234 if test "${with_gssapi+set}" = set; then :
8235 withval=$with_gssapi;
8236 case $withval in
8237 yes)
8240 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8242 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8249 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8251 esac
8253 else
8254 with_gssapi=no
8259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8260 $as_echo "$with_gssapi" >&6; }
8268 # Kerberos configuration parameters
8273 # Check whether --with-krb-srvnam was given.
8274 if test "${with_krb_srvnam+set}" = set; then :
8275 withval=$with_krb_srvnam;
8276 case $withval in
8277 yes)
8278 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8281 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8286 esac
8288 else
8289 with_krb_srvnam="postgres"
8295 cat >>confdefs.h <<_ACEOF
8296 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8297 _ACEOF
8302 # PAM
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8305 $as_echo_n "checking whether to build with PAM support... " >&6; }
8309 # Check whether --with-pam was given.
8310 if test "${with_pam+set}" = set; then :
8311 withval=$with_pam;
8312 case $withval in
8313 yes)
8315 $as_echo "#define USE_PAM 1" >>confdefs.h
8322 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8324 esac
8326 else
8327 with_pam=no
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8333 $as_echo "$with_pam" >&6; }
8337 # BSD AUTH
8339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8340 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8344 # Check whether --with-bsd-auth was given.
8345 if test "${with_bsd_auth+set}" = set; then :
8346 withval=$with_bsd_auth;
8347 case $withval in
8348 yes)
8350 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8357 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8359 esac
8361 else
8362 with_bsd_auth=no
8367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8368 $as_echo "$with_bsd_auth" >&6; }
8372 # LDAP
8374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8375 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8379 # Check whether --with-ldap was given.
8380 if test "${with_ldap+set}" = set; then :
8381 withval=$with_ldap;
8382 case $withval in
8383 yes)
8385 $as_echo "#define USE_LDAP 1" >>confdefs.h
8392 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8394 esac
8396 else
8397 with_ldap=no
8402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8403 $as_echo "$with_ldap" >&6; }
8408 # Bonjour
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8411 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8415 # Check whether --with-bonjour was given.
8416 if test "${with_bonjour+set}" = set; then :
8417 withval=$with_bonjour;
8418 case $withval in
8419 yes)
8421 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8428 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8430 esac
8432 else
8433 with_bonjour=no
8438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8439 $as_echo "$with_bonjour" >&6; }
8443 # SELinux
8445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8446 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8450 # Check whether --with-selinux was given.
8451 if test "${with_selinux+set}" = set; then :
8452 withval=$with_selinux;
8453 case $withval in
8454 yes)
8461 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8463 esac
8465 else
8466 with_selinux=no
8472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8473 $as_echo "$with_selinux" >&6; }
8476 # Systemd
8478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8479 $as_echo_n "checking whether to build with systemd support... " >&6; }
8483 # Check whether --with-systemd was given.
8484 if test "${with_systemd+set}" = set; then :
8485 withval=$with_systemd;
8486 case $withval in
8487 yes)
8489 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8496 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8498 esac
8500 else
8501 with_systemd=no
8507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8508 $as_echo "$with_systemd" >&6; }
8511 # Readline
8516 # Check whether --with-readline was given.
8517 if test "${with_readline+set}" = set; then :
8518 withval=$with_readline;
8519 case $withval in
8520 yes)
8527 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8529 esac
8531 else
8532 with_readline=yes
8537 # readline on MinGW has problems with backslashes in psql and other bugs.
8538 # This is particularly a problem with non-US code pages.
8539 # Therefore disable its use until we understand the cause. 2004-07-20
8540 if test "$PORTNAME" = "win32"; then
8541 if test "$with_readline" = yes; then
8542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8543 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8544 with_readline=no
8551 # Prefer libedit
8556 # Check whether --with-libedit-preferred was given.
8557 if test "${with_libedit_preferred+set}" = set; then :
8558 withval=$with_libedit_preferred;
8559 case $withval in
8560 yes)
8567 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8569 esac
8571 else
8572 with_libedit_preferred=no
8580 # UUID library
8582 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8583 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8584 # UUID library. More than one of these might be present on a given platform,
8585 # so we make the user say which one she wants.
8590 # Check whether --with-uuid was given.
8591 if test "${with_uuid+set}" = set; then :
8592 withval=$with_uuid;
8593 case $withval in
8594 yes)
8595 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8598 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8603 esac
8608 if test x"$with_uuid" = x"" ; then
8609 with_uuid=no
8614 # Check whether --with-ossp-uuid was given.
8615 if test "${with_ossp_uuid+set}" = set; then :
8616 withval=$with_ossp_uuid;
8617 case $withval in
8618 yes)
8625 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8627 esac
8629 else
8630 with_ossp_uuid=no
8635 if test "$with_ossp_uuid" = yes ; then
8636 with_uuid=ossp
8639 if test "$with_uuid" != no ; then
8640 if test "$with_uuid" = bsd ; then
8642 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8644 elif test "$with_uuid" = e2fs ; then
8646 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8648 elif test "$with_uuid" = ossp ; then
8650 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8652 else
8653 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8660 # XML
8662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8663 $as_echo_n "checking whether to build with XML support... " >&6; }
8667 # Check whether --with-libxml was given.
8668 if test "${with_libxml+set}" = set; then :
8669 withval=$with_libxml;
8670 case $withval in
8671 yes)
8673 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8680 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8682 esac
8684 else
8685 with_libxml=no
8690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8691 $as_echo "$with_libxml" >&6; }
8694 if test "$with_libxml" = yes ; then
8695 # Check pkg-config, then xml2-config. But for backwards compatibility,
8696 # setting XML2_CONFIG overrides pkg-config.
8697 have_libxml2_pkg_config=no
8698 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8700 pkg_failed=no
8701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8702 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8704 if test -n "$XML2_CFLAGS"; then
8705 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8706 elif test -n "$PKG_CONFIG"; then
8707 if test -n "$PKG_CONFIG" && \
8708 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8709 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8710 ac_status=$?
8711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8712 test $ac_status = 0; }; then
8713 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8714 test "x$?" != "x0" && pkg_failed=yes
8715 else
8716 pkg_failed=yes
8718 else
8719 pkg_failed=untried
8721 if test -n "$XML2_LIBS"; then
8722 pkg_cv_XML2_LIBS="$XML2_LIBS"
8723 elif test -n "$PKG_CONFIG"; then
8724 if test -n "$PKG_CONFIG" && \
8725 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8726 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8727 ac_status=$?
8728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8729 test $ac_status = 0; }; then
8730 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8731 test "x$?" != "x0" && pkg_failed=yes
8732 else
8733 pkg_failed=yes
8735 else
8736 pkg_failed=untried
8741 if test $pkg_failed = yes; then
8742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8743 $as_echo "no" >&6; }
8745 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8746 _pkg_short_errors_supported=yes
8747 else
8748 _pkg_short_errors_supported=no
8750 if test $_pkg_short_errors_supported = yes; then
8751 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8752 else
8753 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8755 # Put the nasty error message in config.log where it belongs
8756 echo "$XML2_PKG_ERRORS" >&5
8758 # do nothing
8759 elif test $pkg_failed = untried; then
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8761 $as_echo "no" >&6; }
8762 # do nothing
8763 else
8764 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8765 XML2_LIBS=$pkg_cv_XML2_LIBS
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8767 $as_echo "yes" >&6; }
8768 have_libxml2_pkg_config=yes
8771 if test "$have_libxml2_pkg_config" = no ; then
8772 if test -z "$XML2_CONFIG"; then
8773 for ac_prog in xml2-config
8775 # Extract the first word of "$ac_prog", so it can be a program name with args.
8776 set dummy $ac_prog; ac_word=$2
8777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8778 $as_echo_n "checking for $ac_word... " >&6; }
8779 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8780 $as_echo_n "(cached) " >&6
8781 else
8782 case $XML2_CONFIG in
8783 [\\/]* | ?:[\\/]*)
8784 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8788 for as_dir in $PATH
8790 IFS=$as_save_IFS
8791 test -z "$as_dir" && as_dir=.
8792 for ac_exec_ext in '' $ac_executable_extensions; do
8793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8794 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8796 break 2
8798 done
8799 done
8800 IFS=$as_save_IFS
8803 esac
8805 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8806 if test -n "$XML2_CONFIG"; then
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8808 $as_echo "$XML2_CONFIG" >&6; }
8809 else
8810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8811 $as_echo "no" >&6; }
8815 test -n "$XML2_CONFIG" && break
8816 done
8818 else
8819 # Report the value of XML2_CONFIG in configure's output in all cases.
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8821 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8823 $as_echo "$XML2_CONFIG" >&6; }
8826 if test -n "$XML2_CONFIG"; then
8827 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8828 XML2_LIBS=`$XML2_CONFIG --libs`
8831 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8832 for pgac_option in $XML2_CFLAGS; do
8833 case $pgac_option in
8834 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8835 esac
8836 done
8837 for pgac_option in $XML2_LIBS; do
8838 case $pgac_option in
8839 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8840 esac
8841 done
8846 # XSLT
8851 # Check whether --with-libxslt was given.
8852 if test "${with_libxslt+set}" = set; then :
8853 withval=$with_libxslt;
8854 case $withval in
8855 yes)
8857 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8864 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8866 esac
8868 else
8869 with_libxslt=no
8879 # tzdata
8884 # Check whether --with-system-tzdata was given.
8885 if test "${with_system_tzdata+set}" = set; then :
8886 withval=$with_system_tzdata;
8887 case $withval in
8888 yes)
8889 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8892 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8897 esac
8905 # Zlib
8910 # Check whether --with-zlib was given.
8911 if test "${with_zlib+set}" = set; then :
8912 withval=$with_zlib;
8913 case $withval in
8914 yes)
8921 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8923 esac
8925 else
8926 with_zlib=yes
8934 # LZ4
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
8937 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
8941 # Check whether --with-lz4 was given.
8942 if test "${with_lz4+set}" = set; then :
8943 withval=$with_lz4;
8944 case $withval in
8945 yes)
8947 $as_echo "#define USE_LZ4 1" >>confdefs.h
8954 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
8956 esac
8958 else
8959 with_lz4=no
8964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
8965 $as_echo "$with_lz4" >&6; }
8968 if test "$with_lz4" = yes; then
8970 pkg_failed=no
8971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
8972 $as_echo_n "checking for liblz4... " >&6; }
8974 if test -n "$LZ4_CFLAGS"; then
8975 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
8976 elif test -n "$PKG_CONFIG"; then
8977 if test -n "$PKG_CONFIG" && \
8978 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8979 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8980 ac_status=$?
8981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8982 test $ac_status = 0; }; then
8983 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
8984 test "x$?" != "x0" && pkg_failed=yes
8985 else
8986 pkg_failed=yes
8988 else
8989 pkg_failed=untried
8991 if test -n "$LZ4_LIBS"; then
8992 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
8993 elif test -n "$PKG_CONFIG"; then
8994 if test -n "$PKG_CONFIG" && \
8995 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8996 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8997 ac_status=$?
8998 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8999 test $ac_status = 0; }; then
9000 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9001 test "x$?" != "x0" && pkg_failed=yes
9002 else
9003 pkg_failed=yes
9005 else
9006 pkg_failed=untried
9011 if test $pkg_failed = yes; then
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9013 $as_echo "no" >&6; }
9015 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9016 _pkg_short_errors_supported=yes
9017 else
9018 _pkg_short_errors_supported=no
9020 if test $_pkg_short_errors_supported = yes; then
9021 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9022 else
9023 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9025 # Put the nasty error message in config.log where it belongs
9026 echo "$LZ4_PKG_ERRORS" >&5
9028 as_fn_error $? "Package requirements (liblz4) were not met:
9030 $LZ4_PKG_ERRORS
9032 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9033 installed software in a non-standard prefix.
9035 Alternatively, you may set the environment variables LZ4_CFLAGS
9036 and LZ4_LIBS to avoid the need to call pkg-config.
9037 See the pkg-config man page for more details." "$LINENO" 5
9038 elif test $pkg_failed = untried; then
9039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9040 $as_echo "no" >&6; }
9041 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9042 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9043 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9044 is in your PATH or set the PKG_CONFIG environment variable to the full
9045 path to pkg-config.
9047 Alternatively, you may set the environment variables LZ4_CFLAGS
9048 and LZ4_LIBS to avoid the need to call pkg-config.
9049 See the pkg-config man page for more details.
9051 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9052 See \`config.log' for more details" "$LINENO" 5; }
9053 else
9054 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9055 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9057 $as_echo "yes" >&6; }
9060 # We only care about -I, -D, and -L switches;
9061 # note that -llz4 will be added by AC_CHECK_LIB below.
9062 for pgac_option in $LZ4_CFLAGS; do
9063 case $pgac_option in
9064 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9065 esac
9066 done
9067 for pgac_option in $LZ4_LIBS; do
9068 case $pgac_option in
9069 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9070 esac
9071 done
9075 # ZSTD
9077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9078 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9082 # Check whether --with-zstd was given.
9083 if test "${with_zstd+set}" = set; then :
9084 withval=$with_zstd;
9085 case $withval in
9086 yes)
9088 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9095 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9097 esac
9099 else
9100 with_zstd=no
9105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9106 $as_echo "$with_zstd" >&6; }
9109 if test "$with_zstd" = yes; then
9111 pkg_failed=no
9112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9113 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9115 if test -n "$ZSTD_CFLAGS"; then
9116 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9117 elif test -n "$PKG_CONFIG"; then
9118 if test -n "$PKG_CONFIG" && \
9119 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9120 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9121 ac_status=$?
9122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9123 test $ac_status = 0; }; then
9124 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9125 test "x$?" != "x0" && pkg_failed=yes
9126 else
9127 pkg_failed=yes
9129 else
9130 pkg_failed=untried
9132 if test -n "$ZSTD_LIBS"; then
9133 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9134 elif test -n "$PKG_CONFIG"; then
9135 if test -n "$PKG_CONFIG" && \
9136 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9137 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9138 ac_status=$?
9139 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9140 test $ac_status = 0; }; then
9141 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9142 test "x$?" != "x0" && pkg_failed=yes
9143 else
9144 pkg_failed=yes
9146 else
9147 pkg_failed=untried
9152 if test $pkg_failed = yes; then
9153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9154 $as_echo "no" >&6; }
9156 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9157 _pkg_short_errors_supported=yes
9158 else
9159 _pkg_short_errors_supported=no
9161 if test $_pkg_short_errors_supported = yes; then
9162 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9163 else
9164 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9166 # Put the nasty error message in config.log where it belongs
9167 echo "$ZSTD_PKG_ERRORS" >&5
9169 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9171 $ZSTD_PKG_ERRORS
9173 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9174 installed software in a non-standard prefix.
9176 Alternatively, you may set the environment variables ZSTD_CFLAGS
9177 and ZSTD_LIBS to avoid the need to call pkg-config.
9178 See the pkg-config man page for more details." "$LINENO" 5
9179 elif test $pkg_failed = untried; then
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9181 $as_echo "no" >&6; }
9182 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9183 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9184 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9185 is in your PATH or set the PKG_CONFIG environment variable to the full
9186 path to pkg-config.
9188 Alternatively, you may set the environment variables ZSTD_CFLAGS
9189 and ZSTD_LIBS to avoid the need to call pkg-config.
9190 See the pkg-config man page for more details.
9192 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9193 See \`config.log' for more details" "$LINENO" 5; }
9194 else
9195 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9196 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9198 $as_echo "yes" >&6; }
9201 # We only care about -I, -D, and -L switches;
9202 # note that -lzstd will be added by AC_CHECK_LIB below.
9203 for pgac_option in $ZSTD_CFLAGS; do
9204 case $pgac_option in
9205 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9206 esac
9207 done
9208 for pgac_option in $ZSTD_LIBS; do
9209 case $pgac_option in
9210 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9211 esac
9212 done
9215 # Assignments
9218 CPPFLAGS="$CPPFLAGS $INCLUDES"
9219 LDFLAGS="$LDFLAGS $LIBDIRS"
9225 if test -n "$ac_tool_prefix"; then
9226 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9227 set dummy ${ac_tool_prefix}strip; ac_word=$2
9228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9229 $as_echo_n "checking for $ac_word... " >&6; }
9230 if ${ac_cv_prog_STRIP+:} false; then :
9231 $as_echo_n "(cached) " >&6
9232 else
9233 if test -n "$STRIP"; then
9234 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9235 else
9236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9237 for as_dir in $PATH
9239 IFS=$as_save_IFS
9240 test -z "$as_dir" && as_dir=.
9241 for ac_exec_ext in '' $ac_executable_extensions; do
9242 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9243 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9245 break 2
9247 done
9248 done
9249 IFS=$as_save_IFS
9253 STRIP=$ac_cv_prog_STRIP
9254 if test -n "$STRIP"; then
9255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9256 $as_echo "$STRIP" >&6; }
9257 else
9258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259 $as_echo "no" >&6; }
9264 if test -z "$ac_cv_prog_STRIP"; then
9265 ac_ct_STRIP=$STRIP
9266 # Extract the first word of "strip", so it can be a program name with args.
9267 set dummy strip; ac_word=$2
9268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9269 $as_echo_n "checking for $ac_word... " >&6; }
9270 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9271 $as_echo_n "(cached) " >&6
9272 else
9273 if test -n "$ac_ct_STRIP"; then
9274 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9275 else
9276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9277 for as_dir in $PATH
9279 IFS=$as_save_IFS
9280 test -z "$as_dir" && as_dir=.
9281 for ac_exec_ext in '' $ac_executable_extensions; do
9282 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9283 ac_cv_prog_ac_ct_STRIP="strip"
9284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9285 break 2
9287 done
9288 done
9289 IFS=$as_save_IFS
9293 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9294 if test -n "$ac_ct_STRIP"; then
9295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9296 $as_echo "$ac_ct_STRIP" >&6; }
9297 else
9298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9299 $as_echo "no" >&6; }
9302 if test "x$ac_ct_STRIP" = x; then
9303 STRIP=":"
9304 else
9305 case $cross_compiling:$ac_tool_warned in
9306 yes:)
9307 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9308 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9309 ac_tool_warned=yes ;;
9310 esac
9311 STRIP=$ac_ct_STRIP
9313 else
9314 STRIP="$ac_cv_prog_STRIP"
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9319 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9320 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9321 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9322 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9324 $as_echo "yes" >&6; }
9325 else
9326 case $host_os in
9327 darwin*)
9328 STRIP="$STRIP -x"
9329 STRIP_STATIC_LIB=$STRIP
9330 STRIP_SHARED_LIB=$STRIP
9331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9332 $as_echo "yes" >&6; }
9335 STRIP_STATIC_LIB=:
9336 STRIP_SHARED_LIB=:
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338 $as_echo "no" >&6; }
9340 esac
9345 if test -n "$ac_tool_prefix"; then
9346 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9347 set dummy ${ac_tool_prefix}ar; ac_word=$2
9348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9349 $as_echo_n "checking for $ac_word... " >&6; }
9350 if ${ac_cv_prog_AR+:} false; then :
9351 $as_echo_n "(cached) " >&6
9352 else
9353 if test -n "$AR"; then
9354 ac_cv_prog_AR="$AR" # Let the user override the test.
9355 else
9356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9357 for as_dir in $PATH
9359 IFS=$as_save_IFS
9360 test -z "$as_dir" && as_dir=.
9361 for ac_exec_ext in '' $ac_executable_extensions; do
9362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9363 ac_cv_prog_AR="${ac_tool_prefix}ar"
9364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9365 break 2
9367 done
9368 done
9369 IFS=$as_save_IFS
9373 AR=$ac_cv_prog_AR
9374 if test -n "$AR"; then
9375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9376 $as_echo "$AR" >&6; }
9377 else
9378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9379 $as_echo "no" >&6; }
9384 if test -z "$ac_cv_prog_AR"; then
9385 ac_ct_AR=$AR
9386 # Extract the first word of "ar", so it can be a program name with args.
9387 set dummy ar; ac_word=$2
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9389 $as_echo_n "checking for $ac_word... " >&6; }
9390 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9391 $as_echo_n "(cached) " >&6
9392 else
9393 if test -n "$ac_ct_AR"; then
9394 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9395 else
9396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9397 for as_dir in $PATH
9399 IFS=$as_save_IFS
9400 test -z "$as_dir" && as_dir=.
9401 for ac_exec_ext in '' $ac_executable_extensions; do
9402 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9403 ac_cv_prog_ac_ct_AR="ar"
9404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9405 break 2
9407 done
9408 done
9409 IFS=$as_save_IFS
9413 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9414 if test -n "$ac_ct_AR"; then
9415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9416 $as_echo "$ac_ct_AR" >&6; }
9417 else
9418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9419 $as_echo "no" >&6; }
9422 if test "x$ac_ct_AR" = x; then
9423 AR="ar"
9424 else
9425 case $cross_compiling:$ac_tool_warned in
9426 yes:)
9427 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9428 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9429 ac_tool_warned=yes ;;
9430 esac
9431 AR=$ac_ct_AR
9433 else
9434 AR="$ac_cv_prog_AR"
9437 if test "$PORTNAME" = "win32"; then
9438 if test -n "$ac_tool_prefix"; then
9439 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9440 set dummy ${ac_tool_prefix}windres; ac_word=$2
9441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9442 $as_echo_n "checking for $ac_word... " >&6; }
9443 if ${ac_cv_prog_WINDRES+:} false; then :
9444 $as_echo_n "(cached) " >&6
9445 else
9446 if test -n "$WINDRES"; then
9447 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9448 else
9449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9450 for as_dir in $PATH
9452 IFS=$as_save_IFS
9453 test -z "$as_dir" && as_dir=.
9454 for ac_exec_ext in '' $ac_executable_extensions; do
9455 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9456 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9457 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9458 break 2
9460 done
9461 done
9462 IFS=$as_save_IFS
9466 WINDRES=$ac_cv_prog_WINDRES
9467 if test -n "$WINDRES"; then
9468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9469 $as_echo "$WINDRES" >&6; }
9470 else
9471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9472 $as_echo "no" >&6; }
9477 if test -z "$ac_cv_prog_WINDRES"; then
9478 ac_ct_WINDRES=$WINDRES
9479 # Extract the first word of "windres", so it can be a program name with args.
9480 set dummy windres; ac_word=$2
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9482 $as_echo_n "checking for $ac_word... " >&6; }
9483 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9484 $as_echo_n "(cached) " >&6
9485 else
9486 if test -n "$ac_ct_WINDRES"; then
9487 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9488 else
9489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9490 for as_dir in $PATH
9492 IFS=$as_save_IFS
9493 test -z "$as_dir" && as_dir=.
9494 for ac_exec_ext in '' $ac_executable_extensions; do
9495 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9496 ac_cv_prog_ac_ct_WINDRES="windres"
9497 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9498 break 2
9500 done
9501 done
9502 IFS=$as_save_IFS
9506 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9507 if test -n "$ac_ct_WINDRES"; then
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9509 $as_echo "$ac_ct_WINDRES" >&6; }
9510 else
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9512 $as_echo "no" >&6; }
9515 if test "x$ac_ct_WINDRES" = x; then
9516 WINDRES="windres"
9517 else
9518 case $cross_compiling:$ac_tool_warned in
9519 yes:)
9520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9521 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9522 ac_tool_warned=yes ;;
9523 esac
9524 WINDRES=$ac_ct_WINDRES
9526 else
9527 WINDRES="$ac_cv_prog_WINDRES"
9532 # Find a good install program. We prefer a C program (faster),
9533 # so one script is as good as another. But avoid the broken or
9534 # incompatible versions:
9535 # SysV /etc/install, /usr/sbin/install
9536 # SunOS /usr/etc/install
9537 # IRIX /sbin/install
9538 # AIX /bin/install
9539 # AmigaOS /C/install, which installs bootblocks on floppy discs
9540 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9541 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9542 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9543 # OS/2's system install, which has a completely different semantic
9544 # ./install, which can be erroneously created by make from ./install.sh.
9545 # Reject install programs that cannot install multiple files.
9546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9547 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9548 if test -z "$INSTALL"; then
9549 if ${ac_cv_path_install+:} false; then :
9550 $as_echo_n "(cached) " >&6
9551 else
9552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9553 for as_dir in $PATH
9555 IFS=$as_save_IFS
9556 test -z "$as_dir" && as_dir=.
9557 # Account for people who put trailing slashes in PATH elements.
9558 case $as_dir/ in #((
9559 ./ | .// | /[cC]/* | \
9560 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9561 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9562 /usr/ucb/* ) ;;
9564 # OSF1 and SCO ODT 3.0 have their own names for install.
9565 # Don't use installbsd from OSF since it installs stuff as root
9566 # by default.
9567 for ac_prog in ginstall scoinst install; do
9568 for ac_exec_ext in '' $ac_executable_extensions; do
9569 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9570 if test $ac_prog = install &&
9571 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9572 # AIX install. It has an incompatible calling convention.
9574 elif test $ac_prog = install &&
9575 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9576 # program-specific install script used by HP pwplus--don't use.
9578 else
9579 rm -rf conftest.one conftest.two conftest.dir
9580 echo one > conftest.one
9581 echo two > conftest.two
9582 mkdir conftest.dir
9583 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9584 test -s conftest.one && test -s conftest.two &&
9585 test -s conftest.dir/conftest.one &&
9586 test -s conftest.dir/conftest.two
9587 then
9588 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9589 break 3
9593 done
9594 done
9596 esac
9598 done
9599 IFS=$as_save_IFS
9601 rm -rf conftest.one conftest.two conftest.dir
9604 if test "${ac_cv_path_install+set}" = set; then
9605 INSTALL=$ac_cv_path_install
9606 else
9607 # As a last resort, use the slow shell script. Don't cache a
9608 # value for INSTALL within a source directory, because that will
9609 # break other packages using the cache if that directory is
9610 # removed, or if the value is a relative name.
9611 INSTALL=$ac_install_sh
9614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9615 $as_echo "$INSTALL" >&6; }
9617 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9618 # It thinks the first close brace ends the variable substitution.
9619 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9621 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9623 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9625 # When Autoconf chooses install-sh as install program it tries to generate
9626 # a relative path to it in each makefile where it substitutes it. This clashes
9627 # with our Makefile.global concept. This workaround helps.
9628 case $INSTALL in
9629 *install-sh*) install_bin='';;
9630 *) install_bin=$INSTALL;;
9631 esac
9634 if test -z "$TAR"; then
9635 for ac_prog in tar
9637 # Extract the first word of "$ac_prog", so it can be a program name with args.
9638 set dummy $ac_prog; 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_path_TAR+:} false; then :
9642 $as_echo_n "(cached) " >&6
9643 else
9644 case $TAR in
9645 [\\/]* | ?:[\\/]*)
9646 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9650 for as_dir in $PATH
9652 IFS=$as_save_IFS
9653 test -z "$as_dir" && as_dir=.
9654 for ac_exec_ext in '' $ac_executable_extensions; do
9655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9656 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9658 break 2
9660 done
9661 done
9662 IFS=$as_save_IFS
9665 esac
9667 TAR=$ac_cv_path_TAR
9668 if test -n "$TAR"; then
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9670 $as_echo "$TAR" >&6; }
9671 else
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9673 $as_echo "no" >&6; }
9677 test -n "$TAR" && break
9678 done
9680 else
9681 # Report the value of TAR in configure's output in all cases.
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9683 $as_echo_n "checking for TAR... " >&6; }
9684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9685 $as_echo "$TAR" >&6; }
9688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9689 $as_echo_n "checking whether ln -s works... " >&6; }
9690 LN_S=$as_ln_s
9691 if test "$LN_S" = "ln -s"; then
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9693 $as_echo "yes" >&6; }
9694 else
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9696 $as_echo "no, using $LN_S" >&6; }
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9700 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9701 if test -z "$MKDIR_P"; then
9702 if ${ac_cv_path_mkdir+:} false; then :
9703 $as_echo_n "(cached) " >&6
9704 else
9705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9706 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9708 IFS=$as_save_IFS
9709 test -z "$as_dir" && as_dir=.
9710 for ac_prog in mkdir gmkdir; do
9711 for ac_exec_ext in '' $ac_executable_extensions; do
9712 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9713 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9714 'mkdir (GNU coreutils) '* | \
9715 'mkdir (coreutils) '* | \
9716 'mkdir (fileutils) '4.1*)
9717 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9718 break 3;;
9719 esac
9720 done
9721 done
9722 done
9723 IFS=$as_save_IFS
9727 test -d ./--version && rmdir ./--version
9728 if test "${ac_cv_path_mkdir+set}" = set; then
9729 MKDIR_P="$ac_cv_path_mkdir -p"
9730 else
9731 # As a last resort, use the slow shell script. Don't cache a
9732 # value for MKDIR_P within a source directory, because that will
9733 # break other packages using the cache if that directory is
9734 # removed, or if the value is a relative name.
9735 MKDIR_P="$ac_install_sh -d"
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9739 $as_echo "$MKDIR_P" >&6; }
9741 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9742 # a relative path to it in each makefile where it substitutes it. This clashes
9743 # with our Makefile.global concept. This workaround helps.
9744 case $MKDIR_P in
9745 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9746 esac
9748 if test -z "$BISON"; then
9749 for ac_prog in bison
9751 # Extract the first word of "$ac_prog", so it can be a program name with args.
9752 set dummy $ac_prog; ac_word=$2
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9754 $as_echo_n "checking for $ac_word... " >&6; }
9755 if ${ac_cv_path_BISON+:} false; then :
9756 $as_echo_n "(cached) " >&6
9757 else
9758 case $BISON in
9759 [\\/]* | ?:[\\/]*)
9760 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9764 for as_dir in $PATH
9766 IFS=$as_save_IFS
9767 test -z "$as_dir" && as_dir=.
9768 for ac_exec_ext in '' $ac_executable_extensions; do
9769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9770 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9772 break 2
9774 done
9775 done
9776 IFS=$as_save_IFS
9779 esac
9781 BISON=$ac_cv_path_BISON
9782 if test -n "$BISON"; then
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9784 $as_echo "$BISON" >&6; }
9785 else
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9787 $as_echo "no" >&6; }
9791 test -n "$BISON" && break
9792 done
9794 else
9795 # Report the value of BISON in configure's output in all cases.
9796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9797 $as_echo_n "checking for BISON... " >&6; }
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9799 $as_echo "$BISON" >&6; }
9803 if test "$BISON"; then
9804 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9806 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9807 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
9808 then
9809 as_fn_error $? "
9810 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9811 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
9813 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9814 # of the now preferred %name-prefix "base_yy", but the latter
9815 # doesn't work with Bison 2.3 or less. So for now we silence the
9816 # deprecation warnings.
9817 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9818 then
9819 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9823 if test -z "$BISON"; then
9824 as_fn_error $? "bison not found" "$LINENO" 5
9828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9829 $as_echo_n "checking for flex... " >&6; }
9830 if ${pgac_cv_path_flex+:} false; then :
9831 $as_echo_n "(cached) " >&6
9832 else
9833 # Let the user override the test
9834 if test -n "$FLEX"; then
9835 pgac_cv_path_flex=$FLEX
9836 else
9837 pgac_save_IFS=$IFS
9838 IFS=$PATH_SEPARATOR
9839 for pgac_dir in $PATH; do
9840 IFS=$pgac_save_IFS
9841 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9842 pgac_dir=`pwd`
9844 for pgac_prog in flex lex; do
9845 pgac_candidate="$pgac_dir/$pgac_prog"
9846 if test -f "$pgac_candidate" \
9847 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9848 then
9849 echo '%%' > conftest.l
9850 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9851 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9852 if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 35))) exit 0; else exit 1;}'
9853 then
9854 pgac_cv_path_flex=$pgac_candidate
9855 break 2
9856 else
9857 as_fn_error $? "
9858 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9859 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." "$LINENO" 5
9863 done
9864 done
9865 rm -f conftest.l lex.yy.c
9866 : ${pgac_cv_path_flex=no}
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9871 $as_echo "$pgac_cv_path_flex" >&6; }
9872 if test x"$pgac_cv_path_flex" = x"no"; then
9873 as_fn_error $? "flex not found" "$LINENO" 5
9874 else
9875 FLEX=$pgac_cv_path_flex
9876 pgac_flex_version=`$FLEX --version 2>/dev/null`
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9878 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9885 if test -z "$PERL"; then
9886 for ac_prog in perl
9888 # Extract the first word of "$ac_prog", so it can be a program name with args.
9889 set dummy $ac_prog; ac_word=$2
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9891 $as_echo_n "checking for $ac_word... " >&6; }
9892 if ${ac_cv_path_PERL+:} false; then :
9893 $as_echo_n "(cached) " >&6
9894 else
9895 case $PERL in
9896 [\\/]* | ?:[\\/]*)
9897 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9901 for as_dir in $PATH
9903 IFS=$as_save_IFS
9904 test -z "$as_dir" && as_dir=.
9905 for ac_exec_ext in '' $ac_executable_extensions; do
9906 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9907 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9908 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9909 break 2
9911 done
9912 done
9913 IFS=$as_save_IFS
9916 esac
9918 PERL=$ac_cv_path_PERL
9919 if test -n "$PERL"; then
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9921 $as_echo "$PERL" >&6; }
9922 else
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9924 $as_echo "no" >&6; }
9928 test -n "$PERL" && break
9929 done
9931 else
9932 # Report the value of PERL in configure's output in all cases.
9933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9934 $as_echo_n "checking for PERL... " >&6; }
9935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9936 $as_echo "$PERL" >&6; }
9940 if test "$PERL"; then
9941 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'`
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9943 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9944 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9945 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
9946 then
9947 as_fn_error $? "
9948 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9949 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
9953 if test -z "$PERL"; then
9954 as_fn_error $? "Perl not found" "$LINENO" 5
9957 if test "$with_perl" = yes; then
9958 if test -z "$PERL"; then
9959 as_fn_error $? "Perl not found" "$LINENO" 5
9962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9963 $as_echo_n "checking for Perl archlibexp... " >&6; }
9964 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9965 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9967 $as_echo "$perl_archlibexp" >&6; }
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9969 $as_echo_n "checking for Perl privlibexp... " >&6; }
9970 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9971 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9973 $as_echo "$perl_privlibexp" >&6; }
9974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9975 $as_echo_n "checking for Perl useshrplib... " >&6; }
9976 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9977 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9979 $as_echo "$perl_useshrplib" >&6; }
9980 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9981 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9982 You might have to rebuild your Perl installation. Refer to the
9983 documentation for details. Use --without-perl to disable building
9984 PL/Perl." "$LINENO" 5
9986 # On most platforms, archlibexp is also where the Perl include files live ...
9987 perl_includespec="-I$perl_archlibexp/CORE"
9988 # ... but on newer macOS versions, we must use -iwithsysroot to look
9989 # under $PG_SYSROOT
9990 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9991 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9992 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9997 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9998 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10000 $as_echo "$perl_ccflags" >&6; }
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10002 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10003 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10005 $as_echo "$perl_embed_ccflags" >&6; }
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10009 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10010 if test "$PORTNAME" = "win32" ; then
10011 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10012 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10013 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10014 else
10015 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10016 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10017 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10020 else
10021 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10022 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10023 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10025 if test -z "$perl_embed_ldflags" ; then
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027 $as_echo "no" >&6; }
10028 as_fn_error $? "could not determine flags for linking embedded Perl.
10029 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10030 installed." "$LINENO" 5
10031 else
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10033 $as_echo "$perl_embed_ldflags" >&6; }
10038 if test "$with_python" = yes; then
10039 if test -z "$PYTHON"; then
10040 for ac_prog in python3 python
10042 # Extract the first word of "$ac_prog", so it can be a program name with args.
10043 set dummy $ac_prog; ac_word=$2
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10045 $as_echo_n "checking for $ac_word... " >&6; }
10046 if ${ac_cv_path_PYTHON+:} false; then :
10047 $as_echo_n "(cached) " >&6
10048 else
10049 case $PYTHON in
10050 [\\/]* | ?:[\\/]*)
10051 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10055 for as_dir in $PATH
10057 IFS=$as_save_IFS
10058 test -z "$as_dir" && as_dir=.
10059 for ac_exec_ext in '' $ac_executable_extensions; do
10060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10061 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10063 break 2
10065 done
10066 done
10067 IFS=$as_save_IFS
10070 esac
10072 PYTHON=$ac_cv_path_PYTHON
10073 if test -n "$PYTHON"; then
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10075 $as_echo "$PYTHON" >&6; }
10076 else
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10078 $as_echo "no" >&6; }
10082 test -n "$PYTHON" && break
10083 done
10085 else
10086 # Report the value of PYTHON in configure's output in all cases.
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10088 $as_echo_n "checking for PYTHON... " >&6; }
10089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10090 $as_echo "$PYTHON" >&6; }
10093 if test x"$PYTHON" = x""; then
10094 as_fn_error $? "Python not found" "$LINENO" 5
10098 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10100 $as_echo "$as_me: using python $python_fullversion" >&6;}
10101 # python_fullversion is typically n.n.n plus some trailing junk
10102 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10103 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10104 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10105 # Reject unsupported Python versions as soon as practical.
10106 if test "$python_majorversion" -lt 3; then
10107 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10111 $as_echo_n "checking for Python sysconfig module... " >&6; }
10112 if "${PYTHON}" -c 'import sysconfig' 2>&5
10113 then
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10115 $as_echo "yes" >&6; }
10116 else
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118 $as_echo "no" >&6; }
10119 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10123 $as_echo_n "checking Python configuration directory... " >&6; }
10124 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10126 $as_echo "$python_configdir" >&6; }
10128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10129 $as_echo_n "checking Python include directory... " >&6; }
10130 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10131 if test "$PORTNAME" = win32 ; then
10132 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10135 $as_echo "$python_includespec" >&6; }
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10140 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10142 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10143 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10145 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10146 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10147 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10148 then
10149 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10150 found_shlib=1
10151 else
10152 # Otherwise, guess the base name of the shlib.
10153 # LDVERSION was added in Python 3.2, before that use VERSION,
10154 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10155 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10156 if test x"${python_ldversion}" != x""; then
10157 ldlibrary="python${python_ldversion}"
10158 else
10159 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10160 if test x"${python_version_var}" != x""; then
10161 ldlibrary="python${python_version_var}"
10162 else
10163 ldlibrary="python${python_version}"
10166 # Search for a likely-looking file.
10167 found_shlib=0
10168 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10170 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10171 python_libdir="$d"
10172 found_shlib=1
10173 break 2
10175 done
10176 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10177 # (".so.n.n") as well. However, check this only after failing to find
10178 # ".so" anywhere, because yet other platforms (Debian) put the .so
10179 # symlink in a different directory from the underlying versioned shlib.
10180 if test "$found_shlib" != 1; then
10181 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10183 for f in "$d/lib${ldlibrary}.so."* ; do
10184 if test -e "$f"; then
10185 python_libdir="$d"
10186 found_shlib=1
10187 break 2
10189 done
10190 done
10192 # As usual, Windows has its own ideas. Possible default library
10193 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10194 # and the "lib" prefix might not be there.
10195 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10196 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10198 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10199 if test -e "$f"; then
10200 python_libdir="$d"
10201 found_shlib=1
10202 break 2
10204 done
10205 done
10208 if test "$found_shlib" != 1; then
10209 as_fn_error $? "could not find shared library for Python
10210 You might have to rebuild your Python installation. Refer to the
10211 documentation for details. Use --without-python to disable building
10212 PL/Python." "$LINENO" 5
10214 python_libspec="-L${python_libdir} -l${ldlibrary}"
10216 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10219 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10225 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10226 if test -z "$ZIC"; then
10227 for ac_prog in zic
10229 # Extract the first word of "$ac_prog", so it can be a program name with args.
10230 set dummy $ac_prog; ac_word=$2
10231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10232 $as_echo_n "checking for $ac_word... " >&6; }
10233 if ${ac_cv_path_ZIC+:} false; then :
10234 $as_echo_n "(cached) " >&6
10235 else
10236 case $ZIC in
10237 [\\/]* | ?:[\\/]*)
10238 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10242 for as_dir in $PATH
10244 IFS=$as_save_IFS
10245 test -z "$as_dir" && as_dir=.
10246 for ac_exec_ext in '' $ac_executable_extensions; do
10247 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10248 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10249 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10250 break 2
10252 done
10253 done
10254 IFS=$as_save_IFS
10257 esac
10259 ZIC=$ac_cv_path_ZIC
10260 if test -n "$ZIC"; then
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10262 $as_echo "$ZIC" >&6; }
10263 else
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10265 $as_echo "no" >&6; }
10269 test -n "$ZIC" && break
10270 done
10272 else
10273 # Report the value of ZIC in configure's output in all cases.
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10275 $as_echo_n "checking for ZIC... " >&6; }
10276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10277 $as_echo "$ZIC" >&6; }
10280 if test -z "$ZIC"; then
10281 as_fn_error $? "
10282 When cross-compiling, either use the option --with-system-tzdata to use
10283 existing time-zone data, or set the environment variable ZIC to a zic
10284 program to use during the build." "$LINENO" 5
10289 # Pthreads
10291 # For each platform, we need to know about any special compile and link
10292 # libraries, and whether the normal C function names are thread-safe.
10293 # WIN32 doesn't need the pthread tests; it always uses threads
10295 # These tests are run before the library-tests, because linking with the
10296 # other libraries can pull in the pthread functions as a side-effect. We
10297 # want to use the -pthread or similar flags directly, and not rely on
10298 # the side-effects of linking with some other library.
10300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10301 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10302 if ${ac_cv_path_SED+:} false; then :
10303 $as_echo_n "(cached) " >&6
10304 else
10305 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10306 for ac_i in 1 2 3 4 5 6 7; do
10307 ac_script="$ac_script$as_nl$ac_script"
10308 done
10309 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10310 { ac_script=; unset ac_script;}
10311 if test -z "$SED"; then
10312 ac_path_SED_found=false
10313 # Loop through the user's path and test for each of PROGNAME-LIST
10314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10315 for as_dir in $PATH
10317 IFS=$as_save_IFS
10318 test -z "$as_dir" && as_dir=.
10319 for ac_prog in sed gsed; do
10320 for ac_exec_ext in '' $ac_executable_extensions; do
10321 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10322 as_fn_executable_p "$ac_path_SED" || continue
10323 # Check for GNU ac_path_SED and select it if it is found.
10324 # Check for GNU $ac_path_SED
10325 case `"$ac_path_SED" --version 2>&1` in
10326 *GNU*)
10327 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10329 ac_count=0
10330 $as_echo_n 0123456789 >"conftest.in"
10331 while :
10333 cat "conftest.in" "conftest.in" >"conftest.tmp"
10334 mv "conftest.tmp" "conftest.in"
10335 cp "conftest.in" "conftest.nl"
10336 $as_echo '' >> "conftest.nl"
10337 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10338 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10339 as_fn_arith $ac_count + 1 && ac_count=$as_val
10340 if test $ac_count -gt ${ac_path_SED_max-0}; then
10341 # Best one so far, save it but keep looking for a better one
10342 ac_cv_path_SED="$ac_path_SED"
10343 ac_path_SED_max=$ac_count
10345 # 10*(2^10) chars as input seems more than enough
10346 test $ac_count -gt 10 && break
10347 done
10348 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10349 esac
10351 $ac_path_SED_found && break 3
10352 done
10353 done
10354 done
10355 IFS=$as_save_IFS
10356 if test -z "$ac_cv_path_SED"; then
10357 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10359 else
10360 ac_cv_path_SED=$SED
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10365 $as_echo "$ac_cv_path_SED" >&6; }
10366 SED="$ac_cv_path_SED"
10367 rm -f conftest.sed
10370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10371 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10372 if ${ac_cv_path_GREP+:} false; then :
10373 $as_echo_n "(cached) " >&6
10374 else
10375 if test -z "$GREP"; then
10376 ac_path_GREP_found=false
10377 # Loop through the user's path and test for each of PROGNAME-LIST
10378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10379 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10381 IFS=$as_save_IFS
10382 test -z "$as_dir" && as_dir=.
10383 for ac_prog in grep ggrep; do
10384 for ac_exec_ext in '' $ac_executable_extensions; do
10385 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10386 as_fn_executable_p "$ac_path_GREP" || continue
10387 # Check for GNU ac_path_GREP and select it if it is found.
10388 # Check for GNU $ac_path_GREP
10389 case `"$ac_path_GREP" --version 2>&1` in
10390 *GNU*)
10391 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10393 ac_count=0
10394 $as_echo_n 0123456789 >"conftest.in"
10395 while :
10397 cat "conftest.in" "conftest.in" >"conftest.tmp"
10398 mv "conftest.tmp" "conftest.in"
10399 cp "conftest.in" "conftest.nl"
10400 $as_echo 'GREP' >> "conftest.nl"
10401 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10402 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10403 as_fn_arith $ac_count + 1 && ac_count=$as_val
10404 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10405 # Best one so far, save it but keep looking for a better one
10406 ac_cv_path_GREP="$ac_path_GREP"
10407 ac_path_GREP_max=$ac_count
10409 # 10*(2^10) chars as input seems more than enough
10410 test $ac_count -gt 10 && break
10411 done
10412 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10413 esac
10415 $ac_path_GREP_found && break 3
10416 done
10417 done
10418 done
10419 IFS=$as_save_IFS
10420 if test -z "$ac_cv_path_GREP"; then
10421 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10423 else
10424 ac_cv_path_GREP=$GREP
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10429 $as_echo "$ac_cv_path_GREP" >&6; }
10430 GREP="$ac_cv_path_GREP"
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10434 $as_echo_n "checking for egrep... " >&6; }
10435 if ${ac_cv_path_EGREP+:} false; then :
10436 $as_echo_n "(cached) " >&6
10437 else
10438 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10439 then ac_cv_path_EGREP="$GREP -E"
10440 else
10441 if test -z "$EGREP"; then
10442 ac_path_EGREP_found=false
10443 # Loop through the user's path and test for each of PROGNAME-LIST
10444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10445 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10447 IFS=$as_save_IFS
10448 test -z "$as_dir" && as_dir=.
10449 for ac_prog in egrep; do
10450 for ac_exec_ext in '' $ac_executable_extensions; do
10451 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10452 as_fn_executable_p "$ac_path_EGREP" || continue
10453 # Check for GNU ac_path_EGREP and select it if it is found.
10454 # Check for GNU $ac_path_EGREP
10455 case `"$ac_path_EGREP" --version 2>&1` in
10456 *GNU*)
10457 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10459 ac_count=0
10460 $as_echo_n 0123456789 >"conftest.in"
10461 while :
10463 cat "conftest.in" "conftest.in" >"conftest.tmp"
10464 mv "conftest.tmp" "conftest.in"
10465 cp "conftest.in" "conftest.nl"
10466 $as_echo 'EGREP' >> "conftest.nl"
10467 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10468 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10469 as_fn_arith $ac_count + 1 && ac_count=$as_val
10470 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10471 # Best one so far, save it but keep looking for a better one
10472 ac_cv_path_EGREP="$ac_path_EGREP"
10473 ac_path_EGREP_max=$ac_count
10475 # 10*(2^10) chars as input seems more than enough
10476 test $ac_count -gt 10 && break
10477 done
10478 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10479 esac
10481 $ac_path_EGREP_found && break 3
10482 done
10483 done
10484 done
10485 IFS=$as_save_IFS
10486 if test -z "$ac_cv_path_EGREP"; then
10487 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10489 else
10490 ac_cv_path_EGREP=$EGREP
10495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10496 $as_echo "$ac_cv_path_EGREP" >&6; }
10497 EGREP="$ac_cv_path_EGREP"
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10501 $as_echo_n "checking for ANSI C header files... " >&6; }
10502 if ${ac_cv_header_stdc+:} false; then :
10503 $as_echo_n "(cached) " >&6
10504 else
10505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10506 /* end confdefs.h. */
10507 #include <stdlib.h>
10508 #include <stdarg.h>
10509 #include <string.h>
10510 #include <float.h>
10513 main ()
10517 return 0;
10519 _ACEOF
10520 if ac_fn_c_try_compile "$LINENO"; then :
10521 ac_cv_header_stdc=yes
10522 else
10523 ac_cv_header_stdc=no
10525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10527 if test $ac_cv_header_stdc = yes; then
10528 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10530 /* end confdefs.h. */
10531 #include <string.h>
10533 _ACEOF
10534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10535 $EGREP "memchr" >/dev/null 2>&1; then :
10537 else
10538 ac_cv_header_stdc=no
10540 rm -f conftest*
10544 if test $ac_cv_header_stdc = yes; then
10545 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10547 /* end confdefs.h. */
10548 #include <stdlib.h>
10550 _ACEOF
10551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10552 $EGREP "free" >/dev/null 2>&1; then :
10554 else
10555 ac_cv_header_stdc=no
10557 rm -f conftest*
10561 if test $ac_cv_header_stdc = yes; then
10562 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10563 if test "$cross_compiling" = yes; then :
10565 else
10566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10567 /* end confdefs.h. */
10568 #include <ctype.h>
10569 #include <stdlib.h>
10570 #if ((' ' & 0x0FF) == 0x020)
10571 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10572 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10573 #else
10574 # define ISLOWER(c) \
10575 (('a' <= (c) && (c) <= 'i') \
10576 || ('j' <= (c) && (c) <= 'r') \
10577 || ('s' <= (c) && (c) <= 'z'))
10578 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10579 #endif
10581 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10583 main ()
10585 int i;
10586 for (i = 0; i < 256; i++)
10587 if (XOR (islower (i), ISLOWER (i))
10588 || toupper (i) != TOUPPER (i))
10589 return 2;
10590 return 0;
10592 _ACEOF
10593 if ac_fn_c_try_run "$LINENO"; then :
10595 else
10596 ac_cv_header_stdc=no
10598 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10599 conftest.$ac_objext conftest.beam conftest.$ac_ext
10604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10605 $as_echo "$ac_cv_header_stdc" >&6; }
10606 if test $ac_cv_header_stdc = yes; then
10608 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10612 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10613 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10614 inttypes.h stdint.h unistd.h
10615 do :
10616 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10617 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10619 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10620 cat >>confdefs.h <<_ACEOF
10621 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10622 _ACEOF
10626 done
10629 if test "$PORTNAME" != "win32"; then :
10630 # then
10635 ac_ext=c
10636 ac_cpp='$CPP $CPPFLAGS'
10637 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10638 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10639 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10641 ax_pthread_ok=no
10643 # We used to check for pthread.h first, but this fails if pthread.h
10644 # requires special compiler flags (e.g. on Tru64 or Sequent).
10645 # It gets checked for in the link test anyway.
10647 # First of all, check if the user has set any of the PTHREAD_LIBS,
10648 # etcetera environment variables, and if threads linking works using
10649 # them:
10650 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10651 ax_pthread_save_CC="$CC"
10652 ax_pthread_save_CFLAGS="$CFLAGS"
10653 ax_pthread_save_LIBS="$LIBS"
10654 if test "x$PTHREAD_CC" != "x"; then :
10655 CC="$PTHREAD_CC"
10657 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10658 LIBS="$PTHREAD_LIBS $LIBS"
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10660 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10662 /* end confdefs.h. */
10664 /* Override any GCC internal prototype to avoid an error.
10665 Use char because int might match the return type of a GCC
10666 builtin and then its argument prototype would still apply. */
10667 #ifdef __cplusplus
10668 extern "C"
10669 #endif
10670 char pthread_join ();
10672 main ()
10674 return pthread_join ();
10676 return 0;
10678 _ACEOF
10679 if ac_fn_c_try_link "$LINENO"; then :
10680 ax_pthread_ok=yes
10682 rm -f core conftest.err conftest.$ac_objext \
10683 conftest$ac_exeext conftest.$ac_ext
10684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10685 $as_echo "$ax_pthread_ok" >&6; }
10686 if test "x$ax_pthread_ok" = "xno"; then
10687 PTHREAD_LIBS=""
10688 PTHREAD_CFLAGS=""
10690 CC="$ax_pthread_save_CC"
10691 CFLAGS="$ax_pthread_save_CFLAGS"
10692 LIBS="$ax_pthread_save_LIBS"
10695 # We must check for the threads library under a number of different
10696 # names; the ordering is very important because some systems
10697 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10698 # libraries is broken (non-POSIX).
10700 # Create a list of thread flags to try. Items starting with a "-" are
10701 # C compiler flags, and other items are library names, except for "none"
10702 # which indicates that we try without any flags at all, and "pthread-config"
10703 # which is a program returning the flags for the Pth emulation library.
10705 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10707 # The ordering *is* (sometimes) important. Some notes on the
10708 # individual items follow:
10710 # pthreads: AIX (must check this before -lpthread)
10711 # none: in case threads are in libc; should be tried before -Kthread and
10712 # other compiler flags to prevent continual compiler warnings
10713 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10714 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10715 # (Note: HP C rejects this with "bad form for `-t' option")
10716 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10717 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10718 # doesn't hurt to check since this sometimes defines pthreads and
10719 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10720 # is present but should not be used directly; and before -mthreads,
10721 # because the compiler interprets this as "-mt" + "-hreads")
10722 # -mthreads: Mingw32/gcc, Lynx/gcc
10723 # pthread: Linux, etcetera
10724 # --thread-safe: KAI C++
10725 # pthread-config: use pthread-config program (for GNU Pth library)
10727 case $host_os in
10729 freebsd*)
10731 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10732 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10734 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10737 hpux*)
10739 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10740 # multi-threading and also sets -lpthread."
10742 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10745 openedition*)
10747 # IBM z/OS requires a feature-test macro to be defined in order to
10748 # enable POSIX threads at all, so give the user a hint if this is
10749 # not set. (We don't define these ourselves, as they can affect
10750 # other portions of the system API in unpredictable ways.)
10752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10753 /* end confdefs.h. */
10755 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10756 AX_PTHREAD_ZOS_MISSING
10757 # endif
10759 _ACEOF
10760 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10761 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10763 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10765 rm -f conftest*
10769 solaris*)
10771 # On Solaris (at least, for some versions), libc contains stubbed
10772 # (non-functional) versions of the pthreads routines, so link-based
10773 # tests will erroneously succeed. (N.B.: The stubs are missing
10774 # pthread_cleanup_push, or rather a function called by this macro,
10775 # so we could check for that, but who knows whether they'll stub
10776 # that too in a future libc.) So we'll check first for the
10777 # standard Solaris way of linking pthreads (-mt -lpthread).
10779 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10781 esac
10783 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10785 if test "x$GCC" = "xyes"; then :
10786 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10789 # The presence of a feature test macro requesting re-entrant function
10790 # definitions is, on some systems, a strong hint that pthreads support is
10791 # correctly enabled
10793 case $host_os in
10794 darwin* | hpux* | linux* | osf* | solaris*)
10795 ax_pthread_check_macro="_REENTRANT"
10798 aix*)
10799 ax_pthread_check_macro="_THREAD_SAFE"
10803 ax_pthread_check_macro="--"
10805 esac
10806 if test "x$ax_pthread_check_macro" = "x--"; then :
10807 ax_pthread_check_cond=0
10808 else
10809 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10812 # Are we compiling with Clang?
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10815 $as_echo_n "checking whether $CC is Clang... " >&6; }
10816 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10817 $as_echo_n "(cached) " >&6
10818 else
10819 ax_cv_PTHREAD_CLANG=no
10820 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10821 if test "x$GCC" = "xyes"; then
10822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10823 /* end confdefs.h. */
10824 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10825 # if defined(__clang__) && defined(__llvm__)
10826 AX_PTHREAD_CC_IS_CLANG
10827 # endif
10829 _ACEOF
10830 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10831 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10832 ax_cv_PTHREAD_CLANG=yes
10834 rm -f conftest*
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10840 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10841 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10843 ax_pthread_clang_warning=no
10845 # Clang needs special handling, because older versions handle the -pthread
10846 # option in a rather... idiosyncratic way
10848 if test "x$ax_pthread_clang" = "xyes"; then
10850 # Clang takes -pthread; it has never supported any other flag
10852 # (Note 1: This will need to be revisited if a system that Clang
10853 # supports has POSIX threads in a separate library. This tends not
10854 # to be the way of modern systems, but it's conceivable.)
10856 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10857 # to get POSIX threads support; the API is always present and
10858 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10859 # -pthread does define _REENTRANT, and while the Darwin headers
10860 # ignore this macro, third-party headers might not.)
10862 PTHREAD_CFLAGS="-pthread"
10863 PTHREAD_LIBS=
10865 ax_pthread_ok=yes
10867 # However, older versions of Clang make a point of warning the user
10868 # that, in an invocation where only linking and no compilation is
10869 # taking place, the -pthread option has no effect ("argument unused
10870 # during compilation"). They expect -pthread to be passed in only
10871 # when source code is being compiled.
10873 # Problem is, this is at odds with the way Automake and most other
10874 # C build frameworks function, which is that the same flags used in
10875 # compilation (CFLAGS) are also used in linking. Many systems
10876 # supported by AX_PTHREAD require exactly this for POSIX threads
10877 # support, and in fact it is often not straightforward to specify a
10878 # flag that is used only in the compilation phase and not in
10879 # linking. Such a scenario is extremely rare in practice.
10881 # Even though use of the -pthread flag in linking would only print
10882 # a warning, this can be a nuisance for well-run software projects
10883 # that build with -Werror. So if the active version of Clang has
10884 # this misfeature, we search for an option to squash it.
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10887 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10888 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10889 $as_echo_n "(cached) " >&6
10890 else
10891 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10892 # Create an alternate version of $ac_link that compiles and
10893 # links in two steps (.c -> .o, .o -> exe) instead of one
10894 # (.c -> exe), because the warning occurs only in the second
10895 # step
10896 ax_pthread_save_ac_link="$ac_link"
10897 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10898 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10899 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10900 ax_pthread_save_CFLAGS="$CFLAGS"
10901 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10902 if test "x$ax_pthread_try" = "xunknown"; then :
10903 break
10905 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10906 ac_link="$ax_pthread_save_ac_link"
10907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10908 /* end confdefs.h. */
10909 int main(void){return 0;}
10910 _ACEOF
10911 if ac_fn_c_try_link "$LINENO"; then :
10912 ac_link="$ax_pthread_2step_ac_link"
10913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10914 /* end confdefs.h. */
10915 int main(void){return 0;}
10916 _ACEOF
10917 if ac_fn_c_try_link "$LINENO"; then :
10918 break
10920 rm -f core conftest.err conftest.$ac_objext \
10921 conftest$ac_exeext conftest.$ac_ext
10924 rm -f core conftest.err conftest.$ac_objext \
10925 conftest$ac_exeext conftest.$ac_ext
10926 done
10927 ac_link="$ax_pthread_save_ac_link"
10928 CFLAGS="$ax_pthread_save_CFLAGS"
10929 if test "x$ax_pthread_try" = "x"; then :
10930 ax_pthread_try=no
10932 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10936 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10938 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10939 no | unknown) ;;
10940 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10941 esac
10943 fi # $ax_pthread_clang = yes
10945 if test "x$ax_pthread_ok" = "xno"; then
10946 for ax_pthread_try_flag in $ax_pthread_flags; do
10948 case $ax_pthread_try_flag in
10949 none)
10950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10951 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10954 -mt,pthread)
10955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10956 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10957 PTHREAD_CFLAGS="-mt"
10958 PTHREAD_LIBS="-lpthread"
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10963 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10964 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10967 pthread-config)
10968 # Extract the first word of "pthread-config", so it can be a program name with args.
10969 set dummy pthread-config; ac_word=$2
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10971 $as_echo_n "checking for $ac_word... " >&6; }
10972 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10973 $as_echo_n "(cached) " >&6
10974 else
10975 if test -n "$ax_pthread_config"; then
10976 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10977 else
10978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10979 for as_dir in $PATH
10981 IFS=$as_save_IFS
10982 test -z "$as_dir" && as_dir=.
10983 for ac_exec_ext in '' $ac_executable_extensions; do
10984 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10985 ac_cv_prog_ax_pthread_config="yes"
10986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10987 break 2
10989 done
10990 done
10991 IFS=$as_save_IFS
10993 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10996 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10997 if test -n "$ax_pthread_config"; then
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10999 $as_echo "$ax_pthread_config" >&6; }
11000 else
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11002 $as_echo "no" >&6; }
11006 if test "x$ax_pthread_config" = "xno"; then :
11007 continue
11009 PTHREAD_CFLAGS="`pthread-config --cflags`"
11010 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11015 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11016 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11018 esac
11020 ax_pthread_save_CFLAGS="$CFLAGS"
11021 ax_pthread_save_LIBS="$LIBS"
11022 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11023 LIBS="$PTHREAD_LIBS $LIBS"
11025 # Check for various functions. We must include pthread.h,
11026 # since some functions may be macros. (On the Sequent, we
11027 # need a special flag -Kthread to make this header compile.)
11028 # We check for pthread_join because it is in -lpthread on IRIX
11029 # while pthread_create is in libc. We check for pthread_attr_init
11030 # due to DEC craziness with -lpthreads. We check for
11031 # pthread_cleanup_push because it is one of the few pthread
11032 # functions on Solaris that doesn't have a non-functional libc stub.
11033 # We try pthread_create on general principles.
11035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11036 /* end confdefs.h. */
11037 #include <pthread.h>
11038 # if $ax_pthread_check_cond
11039 # error "$ax_pthread_check_macro must be defined"
11040 # endif
11041 static void routine(void *a) { a = 0; }
11042 static void *start_routine(void *a) { return a; }
11044 main ()
11046 pthread_t th; pthread_attr_t attr;
11047 pthread_create(&th, 0, start_routine, 0);
11048 pthread_join(th, 0);
11049 pthread_attr_init(&attr);
11050 pthread_cleanup_push(routine, 0);
11051 pthread_cleanup_pop(0) /* ; */
11053 return 0;
11055 _ACEOF
11056 if ac_fn_c_try_link "$LINENO"; then :
11057 ax_pthread_ok=yes
11059 rm -f core conftest.err conftest.$ac_objext \
11060 conftest$ac_exeext conftest.$ac_ext
11062 CFLAGS="$ax_pthread_save_CFLAGS"
11063 LIBS="$ax_pthread_save_LIBS"
11065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11066 $as_echo "$ax_pthread_ok" >&6; }
11067 if test "x$ax_pthread_ok" = "xyes"; then :
11068 break
11071 PTHREAD_LIBS=""
11072 PTHREAD_CFLAGS=""
11073 done
11076 # Various other checks:
11077 if test "x$ax_pthread_ok" = "xyes"; then
11078 ax_pthread_save_CFLAGS="$CFLAGS"
11079 ax_pthread_save_LIBS="$LIBS"
11080 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11081 LIBS="$PTHREAD_LIBS $LIBS"
11083 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11085 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11086 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11087 $as_echo_n "(cached) " >&6
11088 else
11089 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11090 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11092 /* end confdefs.h. */
11093 #include <pthread.h>
11095 main ()
11097 int attr = $ax_pthread_attr; return attr /* ; */
11099 return 0;
11101 _ACEOF
11102 if ac_fn_c_try_link "$LINENO"; then :
11103 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11105 rm -f core conftest.err conftest.$ac_objext \
11106 conftest$ac_exeext conftest.$ac_ext
11107 done
11110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11111 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11112 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11113 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11114 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11116 cat >>confdefs.h <<_ACEOF
11117 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11118 _ACEOF
11120 ax_pthread_joinable_attr_defined=yes
11124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11125 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11126 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11127 $as_echo_n "(cached) " >&6
11128 else
11129 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11130 case $host_os in
11131 solaris*)
11132 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11134 esac
11137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11138 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11139 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11140 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11141 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11142 ax_pthread_special_flags_added=yes
11145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11146 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11147 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11148 $as_echo_n "(cached) " >&6
11149 else
11150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11151 /* end confdefs.h. */
11152 #include <pthread.h>
11154 main ()
11156 int i = PTHREAD_PRIO_INHERIT;
11158 return 0;
11160 _ACEOF
11161 if ac_fn_c_try_link "$LINENO"; then :
11162 ax_cv_PTHREAD_PRIO_INHERIT=yes
11163 else
11164 ax_cv_PTHREAD_PRIO_INHERIT=no
11166 rm -f core conftest.err conftest.$ac_objext \
11167 conftest$ac_exeext conftest.$ac_ext
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11171 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11172 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11173 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11175 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11177 ax_pthread_prio_inherit_defined=yes
11181 CFLAGS="$ax_pthread_save_CFLAGS"
11182 LIBS="$ax_pthread_save_LIBS"
11184 # More AIX lossage: compile with *_r variant
11185 if test "x$GCC" != "xyes"; then
11186 case $host_os in
11187 aix*)
11188 case "x/$CC" in #(
11189 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11190 #handle absolute path differently from PATH based program lookup
11191 case "x$CC" in #(
11192 x/*) :
11193 if as_fn_executable_p ${CC}_r; then :
11194 PTHREAD_CC="${CC}_r"
11195 fi ;; #(
11196 *) :
11197 for ac_prog in ${CC}_r
11199 # Extract the first word of "$ac_prog", so it can be a program name with args.
11200 set dummy $ac_prog; ac_word=$2
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11202 $as_echo_n "checking for $ac_word... " >&6; }
11203 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11204 $as_echo_n "(cached) " >&6
11205 else
11206 if test -n "$PTHREAD_CC"; then
11207 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11208 else
11209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11210 for as_dir in $PATH
11212 IFS=$as_save_IFS
11213 test -z "$as_dir" && as_dir=.
11214 for ac_exec_ext in '' $ac_executable_extensions; do
11215 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11216 ac_cv_prog_PTHREAD_CC="$ac_prog"
11217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11218 break 2
11220 done
11221 done
11222 IFS=$as_save_IFS
11226 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11227 if test -n "$PTHREAD_CC"; then
11228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11229 $as_echo "$PTHREAD_CC" >&6; }
11230 else
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11232 $as_echo "no" >&6; }
11236 test -n "$PTHREAD_CC" && break
11237 done
11238 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11240 esac ;; #(
11241 *) :
11243 esac
11245 esac
11249 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11255 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11256 if test "x$ax_pthread_ok" = "xyes"; then
11258 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11261 else
11262 ax_pthread_ok=no
11265 ac_ext=c
11266 ac_cpp='$CPP $CPPFLAGS'
11267 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11268 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11269 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11271 # set thread flags
11273 # Some platforms use these, so just define them. They can't hurt if they
11274 # are not supported.
11275 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11277 # Check for *_r functions
11278 _CFLAGS="$CFLAGS"
11279 _LIBS="$LIBS"
11280 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11281 LIBS="$LIBS $PTHREAD_LIBS"
11283 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11284 if test "x$ac_cv_header_pthread_h" = xyes; then :
11286 else
11287 as_fn_error $? "
11288 pthread.h not found" "$LINENO" 5
11293 for ac_func in strerror_r
11294 do :
11295 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11296 if test "x$ac_cv_func_strerror_r" = xyes; then :
11297 cat >>confdefs.h <<_ACEOF
11298 #define HAVE_STRERROR_R 1
11299 _ACEOF
11302 done
11305 # Do test here with the proper thread flags
11306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11307 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11308 if ${pgac_cv_func_strerror_r_int+:} false; then :
11309 $as_echo_n "(cached) " >&6
11310 else
11311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11312 /* end confdefs.h. */
11313 #include <string.h>
11315 main ()
11317 char buf[100];
11318 switch (strerror_r(1, buf, sizeof(buf)))
11319 { case 0: break; default: break; }
11322 return 0;
11324 _ACEOF
11325 if ac_fn_c_try_compile "$LINENO"; then :
11326 pgac_cv_func_strerror_r_int=yes
11327 else
11328 pgac_cv_func_strerror_r_int=no
11330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11333 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11334 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11336 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11341 CFLAGS="$_CFLAGS"
11342 LIBS="$_LIBS"
11345 else
11346 # else
11347 # do not use values from template file
11348 PTHREAD_CFLAGS=
11349 PTHREAD_LIBS=
11351 fi # fi
11358 ## Libraries
11360 ## Most libraries are included only if they demonstrably provide a function
11361 ## we need, but libm is an exception: always include it, because there are
11362 ## too many compilers that play cute optimization games that will break
11363 ## probes for standard functions such as pow().
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11367 $as_echo_n "checking for main in -lm... " >&6; }
11368 if ${ac_cv_lib_m_main+:} false; then :
11369 $as_echo_n "(cached) " >&6
11370 else
11371 ac_check_lib_save_LIBS=$LIBS
11372 LIBS="-lm $LIBS"
11373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11374 /* end confdefs.h. */
11378 main ()
11380 return main ();
11382 return 0;
11384 _ACEOF
11385 if ac_fn_c_try_link "$LINENO"; then :
11386 ac_cv_lib_m_main=yes
11387 else
11388 ac_cv_lib_m_main=no
11390 rm -f core conftest.err conftest.$ac_objext \
11391 conftest$ac_exeext conftest.$ac_ext
11392 LIBS=$ac_check_lib_save_LIBS
11394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11395 $as_echo "$ac_cv_lib_m_main" >&6; }
11396 if test "x$ac_cv_lib_m_main" = xyes; then :
11397 cat >>confdefs.h <<_ACEOF
11398 #define HAVE_LIBM 1
11399 _ACEOF
11401 LIBS="-lm $LIBS"
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11406 $as_echo_n "checking for library containing setproctitle... " >&6; }
11407 if ${ac_cv_search_setproctitle+:} false; then :
11408 $as_echo_n "(cached) " >&6
11409 else
11410 ac_func_search_save_LIBS=$LIBS
11411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11412 /* end confdefs.h. */
11414 /* Override any GCC internal prototype to avoid an error.
11415 Use char because int might match the return type of a GCC
11416 builtin and then its argument prototype would still apply. */
11417 #ifdef __cplusplus
11418 extern "C"
11419 #endif
11420 char setproctitle ();
11422 main ()
11424 return setproctitle ();
11426 return 0;
11428 _ACEOF
11429 for ac_lib in '' util; do
11430 if test -z "$ac_lib"; then
11431 ac_res="none required"
11432 else
11433 ac_res=-l$ac_lib
11434 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11436 if ac_fn_c_try_link "$LINENO"; then :
11437 ac_cv_search_setproctitle=$ac_res
11439 rm -f core conftest.err conftest.$ac_objext \
11440 conftest$ac_exeext
11441 if ${ac_cv_search_setproctitle+:} false; then :
11442 break
11444 done
11445 if ${ac_cv_search_setproctitle+:} false; then :
11447 else
11448 ac_cv_search_setproctitle=no
11450 rm conftest.$ac_ext
11451 LIBS=$ac_func_search_save_LIBS
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11454 $as_echo "$ac_cv_search_setproctitle" >&6; }
11455 ac_res=$ac_cv_search_setproctitle
11456 if test "$ac_res" != no; then :
11457 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11461 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11462 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11463 # required. Just checking for dlsym() ought to suffice.
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11465 $as_echo_n "checking for library containing dlsym... " >&6; }
11466 if ${ac_cv_search_dlsym+:} false; then :
11467 $as_echo_n "(cached) " >&6
11468 else
11469 ac_func_search_save_LIBS=$LIBS
11470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11471 /* end confdefs.h. */
11473 /* Override any GCC internal prototype to avoid an error.
11474 Use char because int might match the return type of a GCC
11475 builtin and then its argument prototype would still apply. */
11476 #ifdef __cplusplus
11477 extern "C"
11478 #endif
11479 char dlsym ();
11481 main ()
11483 return dlsym ();
11485 return 0;
11487 _ACEOF
11488 for ac_lib in '' dl; do
11489 if test -z "$ac_lib"; then
11490 ac_res="none required"
11491 else
11492 ac_res=-l$ac_lib
11493 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11495 if ac_fn_c_try_link "$LINENO"; then :
11496 ac_cv_search_dlsym=$ac_res
11498 rm -f core conftest.err conftest.$ac_objext \
11499 conftest$ac_exeext
11500 if ${ac_cv_search_dlsym+:} false; then :
11501 break
11503 done
11504 if ${ac_cv_search_dlsym+:} false; then :
11506 else
11507 ac_cv_search_dlsym=no
11509 rm conftest.$ac_ext
11510 LIBS=$ac_func_search_save_LIBS
11512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11513 $as_echo "$ac_cv_search_dlsym" >&6; }
11514 ac_res=$ac_cv_search_dlsym
11515 if test "$ac_res" != no; then :
11516 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11521 $as_echo_n "checking for library containing socket... " >&6; }
11522 if ${ac_cv_search_socket+:} false; then :
11523 $as_echo_n "(cached) " >&6
11524 else
11525 ac_func_search_save_LIBS=$LIBS
11526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11527 /* end confdefs.h. */
11529 /* Override any GCC internal prototype to avoid an error.
11530 Use char because int might match the return type of a GCC
11531 builtin and then its argument prototype would still apply. */
11532 #ifdef __cplusplus
11533 extern "C"
11534 #endif
11535 char socket ();
11537 main ()
11539 return socket ();
11541 return 0;
11543 _ACEOF
11544 for ac_lib in '' socket ws2_32; do
11545 if test -z "$ac_lib"; then
11546 ac_res="none required"
11547 else
11548 ac_res=-l$ac_lib
11549 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11551 if ac_fn_c_try_link "$LINENO"; then :
11552 ac_cv_search_socket=$ac_res
11554 rm -f core conftest.err conftest.$ac_objext \
11555 conftest$ac_exeext
11556 if ${ac_cv_search_socket+:} false; then :
11557 break
11559 done
11560 if ${ac_cv_search_socket+:} false; then :
11562 else
11563 ac_cv_search_socket=no
11565 rm conftest.$ac_ext
11566 LIBS=$ac_func_search_save_LIBS
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11569 $as_echo "$ac_cv_search_socket" >&6; }
11570 ac_res=$ac_cv_search_socket
11571 if test "$ac_res" != no; then :
11572 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11577 $as_echo_n "checking for library containing getopt_long... " >&6; }
11578 if ${ac_cv_search_getopt_long+:} false; then :
11579 $as_echo_n "(cached) " >&6
11580 else
11581 ac_func_search_save_LIBS=$LIBS
11582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11583 /* end confdefs.h. */
11585 /* Override any GCC internal prototype to avoid an error.
11586 Use char because int might match the return type of a GCC
11587 builtin and then its argument prototype would still apply. */
11588 #ifdef __cplusplus
11589 extern "C"
11590 #endif
11591 char getopt_long ();
11593 main ()
11595 return getopt_long ();
11597 return 0;
11599 _ACEOF
11600 for ac_lib in '' getopt gnugetopt; do
11601 if test -z "$ac_lib"; then
11602 ac_res="none required"
11603 else
11604 ac_res=-l$ac_lib
11605 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11607 if ac_fn_c_try_link "$LINENO"; then :
11608 ac_cv_search_getopt_long=$ac_res
11610 rm -f core conftest.err conftest.$ac_objext \
11611 conftest$ac_exeext
11612 if ${ac_cv_search_getopt_long+:} false; then :
11613 break
11615 done
11616 if ${ac_cv_search_getopt_long+:} false; then :
11618 else
11619 ac_cv_search_getopt_long=no
11621 rm conftest.$ac_ext
11622 LIBS=$ac_func_search_save_LIBS
11624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11625 $as_echo "$ac_cv_search_getopt_long" >&6; }
11626 ac_res=$ac_cv_search_getopt_long
11627 if test "$ac_res" != no; then :
11628 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11633 $as_echo_n "checking for library containing shm_open... " >&6; }
11634 if ${ac_cv_search_shm_open+:} false; then :
11635 $as_echo_n "(cached) " >&6
11636 else
11637 ac_func_search_save_LIBS=$LIBS
11638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11639 /* end confdefs.h. */
11641 /* Override any GCC internal prototype to avoid an error.
11642 Use char because int might match the return type of a GCC
11643 builtin and then its argument prototype would still apply. */
11644 #ifdef __cplusplus
11645 extern "C"
11646 #endif
11647 char shm_open ();
11649 main ()
11651 return shm_open ();
11653 return 0;
11655 _ACEOF
11656 for ac_lib in '' rt; do
11657 if test -z "$ac_lib"; then
11658 ac_res="none required"
11659 else
11660 ac_res=-l$ac_lib
11661 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11663 if ac_fn_c_try_link "$LINENO"; then :
11664 ac_cv_search_shm_open=$ac_res
11666 rm -f core conftest.err conftest.$ac_objext \
11667 conftest$ac_exeext
11668 if ${ac_cv_search_shm_open+:} false; then :
11669 break
11671 done
11672 if ${ac_cv_search_shm_open+:} false; then :
11674 else
11675 ac_cv_search_shm_open=no
11677 rm conftest.$ac_ext
11678 LIBS=$ac_func_search_save_LIBS
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11681 $as_echo "$ac_cv_search_shm_open" >&6; }
11682 ac_res=$ac_cv_search_shm_open
11683 if test "$ac_res" != no; then :
11684 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11689 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11690 if ${ac_cv_search_shm_unlink+:} false; then :
11691 $as_echo_n "(cached) " >&6
11692 else
11693 ac_func_search_save_LIBS=$LIBS
11694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11695 /* end confdefs.h. */
11697 /* Override any GCC internal prototype to avoid an error.
11698 Use char because int might match the return type of a GCC
11699 builtin and then its argument prototype would still apply. */
11700 #ifdef __cplusplus
11701 extern "C"
11702 #endif
11703 char shm_unlink ();
11705 main ()
11707 return shm_unlink ();
11709 return 0;
11711 _ACEOF
11712 for ac_lib in '' rt; do
11713 if test -z "$ac_lib"; then
11714 ac_res="none required"
11715 else
11716 ac_res=-l$ac_lib
11717 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11719 if ac_fn_c_try_link "$LINENO"; then :
11720 ac_cv_search_shm_unlink=$ac_res
11722 rm -f core conftest.err conftest.$ac_objext \
11723 conftest$ac_exeext
11724 if ${ac_cv_search_shm_unlink+:} false; then :
11725 break
11727 done
11728 if ${ac_cv_search_shm_unlink+:} false; then :
11730 else
11731 ac_cv_search_shm_unlink=no
11733 rm conftest.$ac_ext
11734 LIBS=$ac_func_search_save_LIBS
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11737 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11738 ac_res=$ac_cv_search_shm_unlink
11739 if test "$ac_res" != no; then :
11740 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11745 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11746 if ${ac_cv_search_clock_gettime+:} false; then :
11747 $as_echo_n "(cached) " >&6
11748 else
11749 ac_func_search_save_LIBS=$LIBS
11750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11751 /* end confdefs.h. */
11753 /* Override any GCC internal prototype to avoid an error.
11754 Use char because int might match the return type of a GCC
11755 builtin and then its argument prototype would still apply. */
11756 #ifdef __cplusplus
11757 extern "C"
11758 #endif
11759 char clock_gettime ();
11761 main ()
11763 return clock_gettime ();
11765 return 0;
11767 _ACEOF
11768 for ac_lib in '' rt; do
11769 if test -z "$ac_lib"; then
11770 ac_res="none required"
11771 else
11772 ac_res=-l$ac_lib
11773 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11775 if ac_fn_c_try_link "$LINENO"; then :
11776 ac_cv_search_clock_gettime=$ac_res
11778 rm -f core conftest.err conftest.$ac_objext \
11779 conftest$ac_exeext
11780 if ${ac_cv_search_clock_gettime+:} false; then :
11781 break
11783 done
11784 if ${ac_cv_search_clock_gettime+:} false; then :
11786 else
11787 ac_cv_search_clock_gettime=no
11789 rm conftest.$ac_ext
11790 LIBS=$ac_func_search_save_LIBS
11792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11793 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11794 ac_res=$ac_cv_search_clock_gettime
11795 if test "$ac_res" != no; then :
11796 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11800 # Cygwin:
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11802 $as_echo_n "checking for library containing shmget... " >&6; }
11803 if ${ac_cv_search_shmget+:} false; then :
11804 $as_echo_n "(cached) " >&6
11805 else
11806 ac_func_search_save_LIBS=$LIBS
11807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11808 /* end confdefs.h. */
11810 /* Override any GCC internal prototype to avoid an error.
11811 Use char because int might match the return type of a GCC
11812 builtin and then its argument prototype would still apply. */
11813 #ifdef __cplusplus
11814 extern "C"
11815 #endif
11816 char shmget ();
11818 main ()
11820 return shmget ();
11822 return 0;
11824 _ACEOF
11825 for ac_lib in '' cygipc; do
11826 if test -z "$ac_lib"; then
11827 ac_res="none required"
11828 else
11829 ac_res=-l$ac_lib
11830 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11832 if ac_fn_c_try_link "$LINENO"; then :
11833 ac_cv_search_shmget=$ac_res
11835 rm -f core conftest.err conftest.$ac_objext \
11836 conftest$ac_exeext
11837 if ${ac_cv_search_shmget+:} false; then :
11838 break
11840 done
11841 if ${ac_cv_search_shmget+:} false; then :
11843 else
11844 ac_cv_search_shmget=no
11846 rm conftest.$ac_ext
11847 LIBS=$ac_func_search_save_LIBS
11849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11850 $as_echo "$ac_cv_search_shmget" >&6; }
11851 ac_res=$ac_cv_search_shmget
11852 if test "$ac_res" != no; then :
11853 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11857 # *BSD:
11858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
11859 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
11860 if ${ac_cv_search_backtrace_symbols+:} false; then :
11861 $as_echo_n "(cached) " >&6
11862 else
11863 ac_func_search_save_LIBS=$LIBS
11864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11865 /* end confdefs.h. */
11867 /* Override any GCC internal prototype to avoid an error.
11868 Use char because int might match the return type of a GCC
11869 builtin and then its argument prototype would still apply. */
11870 #ifdef __cplusplus
11871 extern "C"
11872 #endif
11873 char backtrace_symbols ();
11875 main ()
11877 return backtrace_symbols ();
11879 return 0;
11881 _ACEOF
11882 for ac_lib in '' execinfo; do
11883 if test -z "$ac_lib"; then
11884 ac_res="none required"
11885 else
11886 ac_res=-l$ac_lib
11887 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11889 if ac_fn_c_try_link "$LINENO"; then :
11890 ac_cv_search_backtrace_symbols=$ac_res
11892 rm -f core conftest.err conftest.$ac_objext \
11893 conftest$ac_exeext
11894 if ${ac_cv_search_backtrace_symbols+:} false; then :
11895 break
11897 done
11898 if ${ac_cv_search_backtrace_symbols+:} false; then :
11900 else
11901 ac_cv_search_backtrace_symbols=no
11903 rm conftest.$ac_ext
11904 LIBS=$ac_func_search_save_LIBS
11906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
11907 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
11908 ac_res=$ac_cv_search_backtrace_symbols
11909 if test "$ac_res" != no; then :
11910 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
11916 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
11917 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
11918 $as_echo_n "(cached) " >&6
11919 else
11920 ac_func_search_save_LIBS=$LIBS
11921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922 /* end confdefs.h. */
11924 /* Override any GCC internal prototype to avoid an error.
11925 Use char because int might match the return type of a GCC
11926 builtin and then its argument prototype would still apply. */
11927 #ifdef __cplusplus
11928 extern "C"
11929 #endif
11930 char pthread_barrier_wait ();
11932 main ()
11934 return pthread_barrier_wait ();
11936 return 0;
11938 _ACEOF
11939 for ac_lib in '' pthread; do
11940 if test -z "$ac_lib"; then
11941 ac_res="none required"
11942 else
11943 ac_res=-l$ac_lib
11944 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11946 if ac_fn_c_try_link "$LINENO"; then :
11947 ac_cv_search_pthread_barrier_wait=$ac_res
11949 rm -f core conftest.err conftest.$ac_objext \
11950 conftest$ac_exeext
11951 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
11952 break
11954 done
11955 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
11957 else
11958 ac_cv_search_pthread_barrier_wait=no
11960 rm conftest.$ac_ext
11961 LIBS=$ac_func_search_save_LIBS
11963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
11964 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
11965 ac_res=$ac_cv_search_pthread_barrier_wait
11966 if test "$ac_res" != no; then :
11967 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11972 if test "$with_readline" = yes; then
11975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11976 $as_echo_n "checking for library containing readline... " >&6; }
11977 if ${pgac_cv_check_readline+:} false; then :
11978 $as_echo_n "(cached) " >&6
11979 else
11980 pgac_cv_check_readline=no
11981 pgac_save_LIBS=$LIBS
11982 if test x"$with_libedit_preferred" != x"yes"
11983 then READLINE_ORDER="-lreadline -ledit"
11984 else READLINE_ORDER="-ledit -lreadline"
11986 for pgac_rllib in $READLINE_ORDER ; do
11987 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11988 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11990 /* end confdefs.h. */
11992 /* Override any GCC internal prototype to avoid an error.
11993 Use char because int might match the return type of a GCC
11994 builtin and then its argument prototype would still apply. */
11995 #ifdef __cplusplus
11996 extern "C"
11997 #endif
11998 char readline ();
12000 main ()
12002 return readline ();
12004 return 0;
12006 _ACEOF
12007 if ac_fn_c_try_link "$LINENO"; then :
12009 # Older NetBSD and OpenBSD have a broken linker that does not
12010 # recognize dependent libraries; assume curses is needed if we didn't
12011 # find any dependency.
12012 case $host_os in
12013 netbsd* | openbsd*)
12014 if test x"$pgac_lib" = x"" ; then
12015 pgac_lib=" -lcurses"
12016 fi ;;
12017 esac
12019 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12020 break
12023 rm -f core conftest.err conftest.$ac_objext \
12024 conftest$ac_exeext conftest.$ac_ext
12025 done
12026 if test "$pgac_cv_check_readline" != no ; then
12027 break
12029 done
12030 LIBS=$pgac_save_LIBS
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12034 $as_echo "$pgac_cv_check_readline" >&6; }
12035 if test "$pgac_cv_check_readline" != no ; then
12036 LIBS="$pgac_cv_check_readline $LIBS"
12038 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12043 if test x"$pgac_cv_check_readline" = x"no"; then
12044 as_fn_error $? "readline library not found
12045 If you have readline already installed, see config.log for details on the
12046 failure. It is possible the compiler isn't looking in the proper directory.
12047 Use --without-readline to disable readline support." "$LINENO" 5
12051 if test "$with_zlib" = yes; then
12052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12053 $as_echo_n "checking for inflate in -lz... " >&6; }
12054 if ${ac_cv_lib_z_inflate+:} false; then :
12055 $as_echo_n "(cached) " >&6
12056 else
12057 ac_check_lib_save_LIBS=$LIBS
12058 LIBS="-lz $LIBS"
12059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12060 /* end confdefs.h. */
12062 /* Override any GCC internal prototype to avoid an error.
12063 Use char because int might match the return type of a GCC
12064 builtin and then its argument prototype would still apply. */
12065 #ifdef __cplusplus
12066 extern "C"
12067 #endif
12068 char inflate ();
12070 main ()
12072 return inflate ();
12074 return 0;
12076 _ACEOF
12077 if ac_fn_c_try_link "$LINENO"; then :
12078 ac_cv_lib_z_inflate=yes
12079 else
12080 ac_cv_lib_z_inflate=no
12082 rm -f core conftest.err conftest.$ac_objext \
12083 conftest$ac_exeext conftest.$ac_ext
12084 LIBS=$ac_check_lib_save_LIBS
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12087 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12088 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12089 cat >>confdefs.h <<_ACEOF
12090 #define HAVE_LIBZ 1
12091 _ACEOF
12093 LIBS="-lz $LIBS"
12095 else
12096 as_fn_error $? "zlib library not found
12097 If you have zlib already installed, see config.log for details on the
12098 failure. It is possible the compiler isn't looking in the proper directory.
12099 Use --without-zlib to disable zlib support." "$LINENO" 5
12104 if test "$with_gssapi" = yes ; then
12105 if test "$PORTNAME" != "win32"; then
12106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12107 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12108 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12109 $as_echo_n "(cached) " >&6
12110 else
12111 ac_func_search_save_LIBS=$LIBS
12112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12113 /* end confdefs.h. */
12115 /* Override any GCC internal prototype to avoid an error.
12116 Use char because int might match the return type of a GCC
12117 builtin and then its argument prototype would still apply. */
12118 #ifdef __cplusplus
12119 extern "C"
12120 #endif
12121 char gss_store_cred_into ();
12123 main ()
12125 return gss_store_cred_into ();
12127 return 0;
12129 _ACEOF
12130 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12131 if test -z "$ac_lib"; then
12132 ac_res="none required"
12133 else
12134 ac_res=-l$ac_lib
12135 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12137 if ac_fn_c_try_link "$LINENO"; then :
12138 ac_cv_search_gss_store_cred_into=$ac_res
12140 rm -f core conftest.err conftest.$ac_objext \
12141 conftest$ac_exeext
12142 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12143 break
12145 done
12146 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12148 else
12149 ac_cv_search_gss_store_cred_into=no
12151 rm conftest.$ac_ext
12152 LIBS=$ac_func_search_save_LIBS
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12155 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12156 ac_res=$ac_cv_search_gss_store_cred_into
12157 if test "$ac_res" != no; then :
12158 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12160 else
12161 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12164 else
12165 LIBS="$LIBS -lgssapi32"
12170 # SSL Library
12172 # There is currently only one supported SSL/TLS library: OpenSSL.
12177 # Check whether --with-ssl was given.
12178 if test "${with_ssl+set}" = set; then :
12179 withval=$with_ssl;
12180 case $withval in
12181 yes)
12182 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12185 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12190 esac
12195 if test x"$with_ssl" = x"" ; then
12196 with_ssl=no
12201 # Check whether --with-openssl was given.
12202 if test "${with_openssl+set}" = set; then :
12203 withval=$with_openssl;
12204 case $withval in
12205 yes)
12212 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12214 esac
12216 else
12217 with_openssl=no
12222 if test "$with_openssl" = yes ; then
12223 with_ssl=openssl
12226 if test "$with_ssl" = openssl ; then
12227 # Minimum required OpenSSL version is 1.1.1
12229 $as_echo "#define OPENSSL_API_COMPAT 0x10101000L" >>confdefs.h
12231 if test "$PORTNAME" != "win32"; then
12232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12233 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12234 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12235 $as_echo_n "(cached) " >&6
12236 else
12237 ac_check_lib_save_LIBS=$LIBS
12238 LIBS="-lcrypto $LIBS"
12239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12240 /* end confdefs.h. */
12242 /* Override any GCC internal prototype to avoid an error.
12243 Use char because int might match the return type of a GCC
12244 builtin and then its argument prototype would still apply. */
12245 #ifdef __cplusplus
12246 extern "C"
12247 #endif
12248 char CRYPTO_new_ex_data ();
12250 main ()
12252 return CRYPTO_new_ex_data ();
12254 return 0;
12256 _ACEOF
12257 if ac_fn_c_try_link "$LINENO"; then :
12258 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12259 else
12260 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12262 rm -f core conftest.err conftest.$ac_objext \
12263 conftest$ac_exeext conftest.$ac_ext
12264 LIBS=$ac_check_lib_save_LIBS
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12267 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12268 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12269 cat >>confdefs.h <<_ACEOF
12270 #define HAVE_LIBCRYPTO 1
12271 _ACEOF
12273 LIBS="-lcrypto $LIBS"
12275 else
12276 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12280 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12281 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12282 $as_echo_n "(cached) " >&6
12283 else
12284 ac_check_lib_save_LIBS=$LIBS
12285 LIBS="-lssl $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 SSL_new ();
12297 main ()
12299 return SSL_new ();
12301 return 0;
12303 _ACEOF
12304 if ac_fn_c_try_link "$LINENO"; then :
12305 ac_cv_lib_ssl_SSL_new=yes
12306 else
12307 ac_cv_lib_ssl_SSL_new=no
12309 rm -f core conftest.err conftest.$ac_objext \
12310 conftest$ac_exeext conftest.$ac_ext
12311 LIBS=$ac_check_lib_save_LIBS
12313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12314 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12315 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12316 cat >>confdefs.h <<_ACEOF
12317 #define HAVE_LIBSSL 1
12318 _ACEOF
12320 LIBS="-lssl $LIBS"
12322 else
12323 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12326 else
12327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12328 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12329 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12330 $as_echo_n "(cached) " >&6
12331 else
12332 ac_func_search_save_LIBS=$LIBS
12333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12334 /* end confdefs.h. */
12336 /* Override any GCC internal prototype to avoid an error.
12337 Use char because int might match the return type of a GCC
12338 builtin and then its argument prototype would still apply. */
12339 #ifdef __cplusplus
12340 extern "C"
12341 #endif
12342 char CRYPTO_new_ex_data ();
12344 main ()
12346 return CRYPTO_new_ex_data ();
12348 return 0;
12350 _ACEOF
12351 for ac_lib in '' eay32 crypto; do
12352 if test -z "$ac_lib"; then
12353 ac_res="none required"
12354 else
12355 ac_res=-l$ac_lib
12356 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12358 if ac_fn_c_try_link "$LINENO"; then :
12359 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12361 rm -f core conftest.err conftest.$ac_objext \
12362 conftest$ac_exeext
12363 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12364 break
12366 done
12367 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12369 else
12370 ac_cv_search_CRYPTO_new_ex_data=no
12372 rm conftest.$ac_ext
12373 LIBS=$ac_func_search_save_LIBS
12375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12376 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12377 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12378 if test "$ac_res" != no; then :
12379 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12381 else
12382 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12386 $as_echo_n "checking for library containing SSL_new... " >&6; }
12387 if ${ac_cv_search_SSL_new+:} false; then :
12388 $as_echo_n "(cached) " >&6
12389 else
12390 ac_func_search_save_LIBS=$LIBS
12391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12392 /* end confdefs.h. */
12394 /* Override any GCC internal prototype to avoid an error.
12395 Use char because int might match the return type of a GCC
12396 builtin and then its argument prototype would still apply. */
12397 #ifdef __cplusplus
12398 extern "C"
12399 #endif
12400 char SSL_new ();
12402 main ()
12404 return SSL_new ();
12406 return 0;
12408 _ACEOF
12409 for ac_lib in '' ssleay32 ssl; do
12410 if test -z "$ac_lib"; then
12411 ac_res="none required"
12412 else
12413 ac_res=-l$ac_lib
12414 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12416 if ac_fn_c_try_link "$LINENO"; then :
12417 ac_cv_search_SSL_new=$ac_res
12419 rm -f core conftest.err conftest.$ac_objext \
12420 conftest$ac_exeext
12421 if ${ac_cv_search_SSL_new+:} false; then :
12422 break
12424 done
12425 if ${ac_cv_search_SSL_new+:} false; then :
12427 else
12428 ac_cv_search_SSL_new=no
12430 rm conftest.$ac_ext
12431 LIBS=$ac_func_search_save_LIBS
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12434 $as_echo "$ac_cv_search_SSL_new" >&6; }
12435 ac_res=$ac_cv_search_SSL_new
12436 if test "$ac_res" != no; then :
12437 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12439 else
12440 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12444 # Functions introduced in OpenSSL 1.1.1.
12445 for ac_func in SSL_CTX_set_ciphersuites
12446 do :
12447 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
12448 if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes; then :
12449 cat >>confdefs.h <<_ACEOF
12450 #define HAVE_SSL_CTX_SET_CIPHERSUITES 1
12451 _ACEOF
12453 else
12454 as_fn_error $? "OpenSSL version >= 1.1.1 is required for SSL support" "$LINENO" 5
12456 done
12458 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
12459 for ac_func in SSL_CTX_set_cert_cb
12460 do :
12461 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
12462 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
12463 cat >>confdefs.h <<_ACEOF
12464 #define HAVE_SSL_CTX_SET_CERT_CB 1
12465 _ACEOF
12468 done
12470 # Function introduced in OpenSSL 1.1.1, not in LibreSSL.
12471 for ac_func in X509_get_signature_info SSL_CTX_set_num_tickets
12472 do :
12473 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12474 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12475 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12476 cat >>confdefs.h <<_ACEOF
12477 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12478 _ACEOF
12481 done
12484 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12486 elif test "$with_ssl" != no ; then
12487 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12491 if test "$with_pam" = yes ; then
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12493 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12494 if ${ac_cv_lib_pam_pam_start+:} false; then :
12495 $as_echo_n "(cached) " >&6
12496 else
12497 ac_check_lib_save_LIBS=$LIBS
12498 LIBS="-lpam $LIBS"
12499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12500 /* end confdefs.h. */
12502 /* Override any GCC internal prototype to avoid an error.
12503 Use char because int might match the return type of a GCC
12504 builtin and then its argument prototype would still apply. */
12505 #ifdef __cplusplus
12506 extern "C"
12507 #endif
12508 char pam_start ();
12510 main ()
12512 return pam_start ();
12514 return 0;
12516 _ACEOF
12517 if ac_fn_c_try_link "$LINENO"; then :
12518 ac_cv_lib_pam_pam_start=yes
12519 else
12520 ac_cv_lib_pam_pam_start=no
12522 rm -f core conftest.err conftest.$ac_objext \
12523 conftest$ac_exeext conftest.$ac_ext
12524 LIBS=$ac_check_lib_save_LIBS
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12527 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12528 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12529 cat >>confdefs.h <<_ACEOF
12530 #define HAVE_LIBPAM 1
12531 _ACEOF
12533 LIBS="-lpam $LIBS"
12535 else
12536 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12541 if test "$with_libxml" = yes ; then
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12543 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12544 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12545 $as_echo_n "(cached) " >&6
12546 else
12547 ac_check_lib_save_LIBS=$LIBS
12548 LIBS="-lxml2 $LIBS"
12549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12550 /* end confdefs.h. */
12552 /* Override any GCC internal prototype to avoid an error.
12553 Use char because int might match the return type of a GCC
12554 builtin and then its argument prototype would still apply. */
12555 #ifdef __cplusplus
12556 extern "C"
12557 #endif
12558 char xmlSaveToBuffer ();
12560 main ()
12562 return xmlSaveToBuffer ();
12564 return 0;
12566 _ACEOF
12567 if ac_fn_c_try_link "$LINENO"; then :
12568 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12569 else
12570 ac_cv_lib_xml2_xmlSaveToBuffer=no
12572 rm -f core conftest.err conftest.$ac_objext \
12573 conftest$ac_exeext conftest.$ac_ext
12574 LIBS=$ac_check_lib_save_LIBS
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12577 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12578 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12579 cat >>confdefs.h <<_ACEOF
12580 #define HAVE_LIBXML2 1
12581 _ACEOF
12583 LIBS="-lxml2 $LIBS"
12585 else
12586 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12591 if test "$with_libxslt" = yes ; then
12592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12593 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12594 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12595 $as_echo_n "(cached) " >&6
12596 else
12597 ac_check_lib_save_LIBS=$LIBS
12598 LIBS="-lxslt $LIBS"
12599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12600 /* end confdefs.h. */
12602 /* Override any GCC internal prototype to avoid an error.
12603 Use char because int might match the return type of a GCC
12604 builtin and then its argument prototype would still apply. */
12605 #ifdef __cplusplus
12606 extern "C"
12607 #endif
12608 char xsltCleanupGlobals ();
12610 main ()
12612 return xsltCleanupGlobals ();
12614 return 0;
12616 _ACEOF
12617 if ac_fn_c_try_link "$LINENO"; then :
12618 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12619 else
12620 ac_cv_lib_xslt_xsltCleanupGlobals=no
12622 rm -f core conftest.err conftest.$ac_objext \
12623 conftest$ac_exeext conftest.$ac_ext
12624 LIBS=$ac_check_lib_save_LIBS
12626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12627 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12628 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12629 cat >>confdefs.h <<_ACEOF
12630 #define HAVE_LIBXSLT 1
12631 _ACEOF
12633 LIBS="-lxslt $LIBS"
12635 else
12636 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12641 if test "$with_lz4" = yes ; then
12642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
12643 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
12644 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
12645 $as_echo_n "(cached) " >&6
12646 else
12647 ac_check_lib_save_LIBS=$LIBS
12648 LIBS="-llz4 $LIBS"
12649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12650 /* end confdefs.h. */
12652 /* Override any GCC internal prototype to avoid an error.
12653 Use char because int might match the return type of a GCC
12654 builtin and then its argument prototype would still apply. */
12655 #ifdef __cplusplus
12656 extern "C"
12657 #endif
12658 char LZ4_compress_default ();
12660 main ()
12662 return LZ4_compress_default ();
12664 return 0;
12666 _ACEOF
12667 if ac_fn_c_try_link "$LINENO"; then :
12668 ac_cv_lib_lz4_LZ4_compress_default=yes
12669 else
12670 ac_cv_lib_lz4_LZ4_compress_default=no
12672 rm -f core conftest.err conftest.$ac_objext \
12673 conftest$ac_exeext conftest.$ac_ext
12674 LIBS=$ac_check_lib_save_LIBS
12676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
12677 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
12678 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
12679 cat >>confdefs.h <<_ACEOF
12680 #define HAVE_LIBLZ4 1
12681 _ACEOF
12683 LIBS="-llz4 $LIBS"
12685 else
12686 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
12691 if test "$with_zstd" = yes ; then
12692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
12693 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
12694 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
12695 $as_echo_n "(cached) " >&6
12696 else
12697 ac_check_lib_save_LIBS=$LIBS
12698 LIBS="-lzstd $LIBS"
12699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12700 /* end confdefs.h. */
12702 /* Override any GCC internal prototype to avoid an error.
12703 Use char because int might match the return type of a GCC
12704 builtin and then its argument prototype would still apply. */
12705 #ifdef __cplusplus
12706 extern "C"
12707 #endif
12708 char ZSTD_compress ();
12710 main ()
12712 return ZSTD_compress ();
12714 return 0;
12716 _ACEOF
12717 if ac_fn_c_try_link "$LINENO"; then :
12718 ac_cv_lib_zstd_ZSTD_compress=yes
12719 else
12720 ac_cv_lib_zstd_ZSTD_compress=no
12722 rm -f core conftest.err conftest.$ac_objext \
12723 conftest$ac_exeext conftest.$ac_ext
12724 LIBS=$ac_check_lib_save_LIBS
12726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
12727 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
12728 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
12729 cat >>confdefs.h <<_ACEOF
12730 #define HAVE_LIBZSTD 1
12731 _ACEOF
12733 LIBS="-lzstd $LIBS"
12735 else
12736 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
12741 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12742 if test "$with_ldap" = yes ; then
12743 _LIBS="$LIBS"
12744 if test "$PORTNAME" != "win32"; then
12745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12746 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12747 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12748 $as_echo_n "(cached) " >&6
12749 else
12750 ac_check_lib_save_LIBS=$LIBS
12751 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12753 /* end confdefs.h. */
12755 /* Override any GCC internal prototype to avoid an error.
12756 Use char because int might match the return type of a GCC
12757 builtin and then its argument prototype would still apply. */
12758 #ifdef __cplusplus
12759 extern "C"
12760 #endif
12761 char ldap_bind ();
12763 main ()
12765 return ldap_bind ();
12767 return 0;
12769 _ACEOF
12770 if ac_fn_c_try_link "$LINENO"; then :
12771 ac_cv_lib_ldap_ldap_bind=yes
12772 else
12773 ac_cv_lib_ldap_ldap_bind=no
12775 rm -f core conftest.err conftest.$ac_objext \
12776 conftest$ac_exeext conftest.$ac_ext
12777 LIBS=$ac_check_lib_save_LIBS
12779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12780 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12781 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12782 cat >>confdefs.h <<_ACEOF
12783 #define HAVE_LIBLDAP 1
12784 _ACEOF
12786 LIBS="-lldap $LIBS"
12788 else
12789 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12792 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12793 # This test is carried out against libldap.
12794 for ac_func in ldap_initialize
12795 do :
12796 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12797 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12798 cat >>confdefs.h <<_ACEOF
12799 #define HAVE_LDAP_INITIALIZE 1
12800 _ACEOF
12803 done
12805 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
12806 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
12807 # library from a separate OpenLDAP installation). The most reliable
12808 # way to check that is to check for a function introduced in 2.5.
12809 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
12810 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
12811 thread_safe_libldap=yes
12812 else
12813 thread_safe_libldap=no
12816 if test "$thread_safe_libldap" = no; then
12817 # Use ldap_r for FE if available, else assume ldap is thread-safe.
12818 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12819 LIBS="$_LIBS"
12820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12821 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12822 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12823 $as_echo_n "(cached) " >&6
12824 else
12825 ac_check_lib_save_LIBS=$LIBS
12826 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12828 /* end confdefs.h. */
12830 /* Override any GCC internal prototype to avoid an error.
12831 Use char because int might match the return type of a GCC
12832 builtin and then its argument prototype would still apply. */
12833 #ifdef __cplusplus
12834 extern "C"
12835 #endif
12836 char ldap_bind ();
12838 main ()
12840 return ldap_bind ();
12842 return 0;
12844 _ACEOF
12845 if ac_fn_c_try_link "$LINENO"; then :
12846 ac_cv_lib_ldap_r_ldap_bind=yes
12847 else
12848 ac_cv_lib_ldap_r_ldap_bind=no
12850 rm -f core conftest.err conftest.$ac_objext \
12851 conftest$ac_exeext conftest.$ac_ext
12852 LIBS=$ac_check_lib_save_LIBS
12854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12855 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12856 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12857 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12858 else
12859 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12862 else
12863 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12865 else
12866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12867 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12868 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12869 $as_echo_n "(cached) " >&6
12870 else
12871 ac_check_lib_save_LIBS=$LIBS
12872 LIBS="-lwldap32 $LIBS"
12873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12874 /* end confdefs.h. */
12876 /* Override any GCC internal prototype to avoid an error.
12877 Use char because int might match the return type of a GCC
12878 builtin and then its argument prototype would still apply. */
12879 #ifdef __cplusplus
12880 extern "C"
12881 #endif
12882 char ldap_bind ();
12884 main ()
12886 return ldap_bind ();
12888 return 0;
12890 _ACEOF
12891 if ac_fn_c_try_link "$LINENO"; then :
12892 ac_cv_lib_wldap32_ldap_bind=yes
12893 else
12894 ac_cv_lib_wldap32_ldap_bind=no
12896 rm -f core conftest.err conftest.$ac_objext \
12897 conftest$ac_exeext conftest.$ac_ext
12898 LIBS=$ac_check_lib_save_LIBS
12900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12901 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12902 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12903 cat >>confdefs.h <<_ACEOF
12904 #define HAVE_LIBWLDAP32 1
12905 _ACEOF
12907 LIBS="-lwldap32 $LIBS"
12909 else
12910 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12913 LDAP_LIBS_FE="-lwldap32"
12914 LDAP_LIBS_BE="-lwldap32"
12916 LIBS="$_LIBS"
12921 # for contrib/sepgsql
12922 if test "$with_selinux" = yes; then
12923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12924 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12925 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12926 $as_echo_n "(cached) " >&6
12927 else
12928 ac_check_lib_save_LIBS=$LIBS
12929 LIBS="-lselinux $LIBS"
12930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12931 /* end confdefs.h. */
12933 /* Override any GCC internal prototype to avoid an error.
12934 Use char because int might match the return type of a GCC
12935 builtin and then its argument prototype would still apply. */
12936 #ifdef __cplusplus
12937 extern "C"
12938 #endif
12939 char security_compute_create_name ();
12941 main ()
12943 return security_compute_create_name ();
12945 return 0;
12947 _ACEOF
12948 if ac_fn_c_try_link "$LINENO"; then :
12949 ac_cv_lib_selinux_security_compute_create_name=yes
12950 else
12951 ac_cv_lib_selinux_security_compute_create_name=no
12953 rm -f core conftest.err conftest.$ac_objext \
12954 conftest$ac_exeext conftest.$ac_ext
12955 LIBS=$ac_check_lib_save_LIBS
12957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12958 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12959 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12960 cat >>confdefs.h <<_ACEOF
12961 #define HAVE_LIBSELINUX 1
12962 _ACEOF
12964 LIBS="-lselinux $LIBS"
12966 else
12967 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12972 # for contrib/uuid-ossp
12973 if test "$with_uuid" = bsd ; then
12974 # On BSD, the UUID functions are in libc
12975 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12976 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12977 UUID_LIBS=""
12978 else
12979 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12982 elif test "$with_uuid" = e2fs ; then
12983 # On macOS, the UUID functions are in libc
12984 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12985 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12986 UUID_LIBS=""
12987 else
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12989 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12990 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12991 $as_echo_n "(cached) " >&6
12992 else
12993 ac_check_lib_save_LIBS=$LIBS
12994 LIBS="-luuid $LIBS"
12995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12996 /* end confdefs.h. */
12998 /* Override any GCC internal prototype to avoid an error.
12999 Use char because int might match the return type of a GCC
13000 builtin and then its argument prototype would still apply. */
13001 #ifdef __cplusplus
13002 extern "C"
13003 #endif
13004 char uuid_generate ();
13006 main ()
13008 return uuid_generate ();
13010 return 0;
13012 _ACEOF
13013 if ac_fn_c_try_link "$LINENO"; then :
13014 ac_cv_lib_uuid_uuid_generate=yes
13015 else
13016 ac_cv_lib_uuid_uuid_generate=no
13018 rm -f core conftest.err conftest.$ac_objext \
13019 conftest$ac_exeext conftest.$ac_ext
13020 LIBS=$ac_check_lib_save_LIBS
13022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13023 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13024 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13025 UUID_LIBS="-luuid"
13026 else
13027 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13032 elif test "$with_uuid" = ossp ; then
13033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13034 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13035 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13036 $as_echo_n "(cached) " >&6
13037 else
13038 ac_check_lib_save_LIBS=$LIBS
13039 LIBS="-lossp-uuid $LIBS"
13040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13041 /* end confdefs.h. */
13043 /* Override any GCC internal prototype to avoid an error.
13044 Use char because int might match the return type of a GCC
13045 builtin and then its argument prototype would still apply. */
13046 #ifdef __cplusplus
13047 extern "C"
13048 #endif
13049 char uuid_export ();
13051 main ()
13053 return uuid_export ();
13055 return 0;
13057 _ACEOF
13058 if ac_fn_c_try_link "$LINENO"; then :
13059 ac_cv_lib_ossp_uuid_uuid_export=yes
13060 else
13061 ac_cv_lib_ossp_uuid_uuid_export=no
13063 rm -f core conftest.err conftest.$ac_objext \
13064 conftest$ac_exeext conftest.$ac_ext
13065 LIBS=$ac_check_lib_save_LIBS
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13068 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13069 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13070 UUID_LIBS="-lossp-uuid"
13071 else
13072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13073 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13074 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13075 $as_echo_n "(cached) " >&6
13076 else
13077 ac_check_lib_save_LIBS=$LIBS
13078 LIBS="-luuid $LIBS"
13079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13080 /* end confdefs.h. */
13082 /* Override any GCC internal prototype to avoid an error.
13083 Use char because int might match the return type of a GCC
13084 builtin and then its argument prototype would still apply. */
13085 #ifdef __cplusplus
13086 extern "C"
13087 #endif
13088 char uuid_export ();
13090 main ()
13092 return uuid_export ();
13094 return 0;
13096 _ACEOF
13097 if ac_fn_c_try_link "$LINENO"; then :
13098 ac_cv_lib_uuid_uuid_export=yes
13099 else
13100 ac_cv_lib_uuid_uuid_export=no
13102 rm -f core conftest.err conftest.$ac_objext \
13103 conftest$ac_exeext conftest.$ac_ext
13104 LIBS=$ac_check_lib_save_LIBS
13106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13107 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13108 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13109 UUID_LIBS="-luuid"
13110 else
13111 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13121 ## Header files
13124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13125 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13126 if ${ac_cv_header_stdbool_h+:} false; then :
13127 $as_echo_n "(cached) " >&6
13128 else
13129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13130 /* end confdefs.h. */
13132 #include <stdbool.h>
13133 #ifndef bool
13134 "error: bool is not defined"
13135 #endif
13136 #ifndef false
13137 "error: false is not defined"
13138 #endif
13139 #if false
13140 "error: false is not 0"
13141 #endif
13142 #ifndef true
13143 "error: true is not defined"
13144 #endif
13145 #if true != 1
13146 "error: true is not 1"
13147 #endif
13148 #ifndef __bool_true_false_are_defined
13149 "error: __bool_true_false_are_defined is not defined"
13150 #endif
13152 struct s { _Bool s: 1; _Bool t; } s;
13154 char a[true == 1 ? 1 : -1];
13155 char b[false == 0 ? 1 : -1];
13156 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13157 char d[(bool) 0.5 == true ? 1 : -1];
13158 /* See body of main program for 'e'. */
13159 char f[(_Bool) 0.0 == false ? 1 : -1];
13160 char g[true];
13161 char h[sizeof (_Bool)];
13162 char i[sizeof s.t];
13163 enum { j = false, k = true, l = false * true, m = true * 256 };
13164 /* The following fails for
13165 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13166 _Bool n[m];
13167 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13168 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13169 /* Catch a bug in an HP-UX C compiler. See
13170 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13171 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13173 _Bool q = true;
13174 _Bool *pq = &q;
13177 main ()
13180 bool e = &s;
13181 *pq |= q;
13182 *pq |= ! q;
13183 /* Refer to every declared value, to avoid compiler optimizations. */
13184 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13185 + !m + !n + !o + !p + !q + !pq);
13188 return 0;
13190 _ACEOF
13191 if ac_fn_c_try_compile "$LINENO"; then :
13192 ac_cv_header_stdbool_h=yes
13193 else
13194 ac_cv_header_stdbool_h=no
13196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13199 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13200 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13201 if test "x$ac_cv_type__Bool" = xyes; then :
13203 cat >>confdefs.h <<_ACEOF
13204 #define HAVE__BOOL 1
13205 _ACEOF
13211 if test $ac_cv_header_stdbool_h = yes; then
13213 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13218 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h mbarrier.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h xlocale.h
13219 do :
13220 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13221 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13222 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13223 cat >>confdefs.h <<_ACEOF
13224 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13225 _ACEOF
13229 done
13232 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13233 for ac_header in readline/readline.h
13234 do :
13235 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13236 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13237 cat >>confdefs.h <<_ACEOF
13238 #define HAVE_READLINE_READLINE_H 1
13239 _ACEOF
13241 else
13242 for ac_header in readline.h
13243 do :
13244 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13245 if test "x$ac_cv_header_readline_h" = xyes; then :
13246 cat >>confdefs.h <<_ACEOF
13247 #define HAVE_READLINE_H 1
13248 _ACEOF
13250 else
13251 as_fn_error $? "readline header not found
13252 If you have readline already installed, see config.log for details on the
13253 failure. It is possible the compiler isn't looking in the proper directory.
13254 Use --without-readline to disable readline support." "$LINENO" 5
13257 done
13261 done
13263 for ac_header in readline/history.h
13264 do :
13265 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13266 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13267 cat >>confdefs.h <<_ACEOF
13268 #define HAVE_READLINE_HISTORY_H 1
13269 _ACEOF
13271 else
13272 for ac_header in history.h
13273 do :
13274 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13275 if test "x$ac_cv_header_history_h" = xyes; then :
13276 cat >>confdefs.h <<_ACEOF
13277 #define HAVE_HISTORY_H 1
13278 _ACEOF
13280 else
13281 as_fn_error $? "history header not found
13282 If you have readline already installed, see config.log for details on the
13283 failure. It is possible the compiler isn't looking in the proper directory.
13284 Use --without-readline to disable readline support." "$LINENO" 5
13287 done
13291 done
13295 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13296 # Some installations of libedit usurp /usr/include/readline/, which seems
13297 # bad practice, since in combined installations readline will have its headers
13298 # there. We might have to resort to AC_EGREP checks to make sure we found
13299 # the proper header...
13300 for ac_header in editline/readline.h
13301 do :
13302 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13303 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13304 cat >>confdefs.h <<_ACEOF
13305 #define HAVE_EDITLINE_READLINE_H 1
13306 _ACEOF
13308 else
13309 for ac_header in readline.h
13310 do :
13311 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13312 if test "x$ac_cv_header_readline_h" = xyes; then :
13313 cat >>confdefs.h <<_ACEOF
13314 #define HAVE_READLINE_H 1
13315 _ACEOF
13317 else
13318 for ac_header in readline/readline.h
13319 do :
13320 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13321 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13322 cat >>confdefs.h <<_ACEOF
13323 #define HAVE_READLINE_READLINE_H 1
13324 _ACEOF
13326 else
13327 as_fn_error $? "readline header not found
13328 If you have libedit already installed, see config.log for details on the
13329 failure. It is possible the compiler isn't looking in the proper directory.
13330 Use --without-readline to disable libedit support." "$LINENO" 5
13333 done
13337 done
13341 done
13343 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13344 # not be there at all. Hence, don't complain if not found. We must check
13345 # though, since in yet other versions it is an independent header.
13346 for ac_header in editline/history.h
13347 do :
13348 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13349 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13350 cat >>confdefs.h <<_ACEOF
13351 #define HAVE_EDITLINE_HISTORY_H 1
13352 _ACEOF
13354 else
13355 for ac_header in history.h
13356 do :
13357 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13358 if test "x$ac_cv_header_history_h" = xyes; then :
13359 cat >>confdefs.h <<_ACEOF
13360 #define HAVE_HISTORY_H 1
13361 _ACEOF
13363 else
13364 for ac_header in readline/history.h
13365 do :
13366 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13367 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13368 cat >>confdefs.h <<_ACEOF
13369 #define HAVE_READLINE_HISTORY_H 1
13370 _ACEOF
13374 done
13378 done
13382 done
13386 if test "$with_zlib" = yes; then
13387 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13388 if test "x$ac_cv_header_zlib_h" = xyes; then :
13390 else
13391 as_fn_error $? "zlib header not found
13392 If you have zlib already installed, see config.log for details on the
13393 failure. It is possible the compiler isn't looking in the proper directory.
13394 Use --without-zlib to disable zlib support." "$LINENO" 5
13400 if test -z "$LZ4"; then
13401 for ac_prog in lz4
13403 # Extract the first word of "$ac_prog", so it can be a program name with args.
13404 set dummy $ac_prog; ac_word=$2
13405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13406 $as_echo_n "checking for $ac_word... " >&6; }
13407 if ${ac_cv_path_LZ4+:} false; then :
13408 $as_echo_n "(cached) " >&6
13409 else
13410 case $LZ4 in
13411 [\\/]* | ?:[\\/]*)
13412 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13416 for as_dir in $PATH
13418 IFS=$as_save_IFS
13419 test -z "$as_dir" && as_dir=.
13420 for ac_exec_ext in '' $ac_executable_extensions; do
13421 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13422 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13423 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13424 break 2
13426 done
13427 done
13428 IFS=$as_save_IFS
13431 esac
13433 LZ4=$ac_cv_path_LZ4
13434 if test -n "$LZ4"; then
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13436 $as_echo "$LZ4" >&6; }
13437 else
13438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13439 $as_echo "no" >&6; }
13443 test -n "$LZ4" && break
13444 done
13446 else
13447 # Report the value of LZ4 in configure's output in all cases.
13448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13449 $as_echo_n "checking for LZ4... " >&6; }
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13451 $as_echo "$LZ4" >&6; }
13454 if test "$with_lz4" = yes; then
13455 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13456 if test "x$ac_cv_header_lz4_h" = xyes; then :
13458 else
13459 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13465 if test -z "$ZSTD"; then
13466 for ac_prog in zstd
13468 # Extract the first word of "$ac_prog", so it can be a program name with args.
13469 set dummy $ac_prog; ac_word=$2
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13471 $as_echo_n "checking for $ac_word... " >&6; }
13472 if ${ac_cv_path_ZSTD+:} false; then :
13473 $as_echo_n "(cached) " >&6
13474 else
13475 case $ZSTD in
13476 [\\/]* | ?:[\\/]*)
13477 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13481 for as_dir in $PATH
13483 IFS=$as_save_IFS
13484 test -z "$as_dir" && as_dir=.
13485 for ac_exec_ext in '' $ac_executable_extensions; do
13486 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13487 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13489 break 2
13491 done
13492 done
13493 IFS=$as_save_IFS
13496 esac
13498 ZSTD=$ac_cv_path_ZSTD
13499 if test -n "$ZSTD"; then
13500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13501 $as_echo "$ZSTD" >&6; }
13502 else
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13504 $as_echo "no" >&6; }
13508 test -n "$ZSTD" && break
13509 done
13511 else
13512 # Report the value of ZSTD in configure's output in all cases.
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13514 $as_echo_n "checking for ZSTD... " >&6; }
13515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13516 $as_echo "$ZSTD" >&6; }
13519 if test "$with_zstd" = yes; then
13520 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13521 if test "x$ac_cv_header_zstd_h" = xyes; then :
13523 else
13524 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13530 if test "$with_gssapi" = yes ; then
13531 for ac_header in gssapi/gssapi.h
13532 do :
13533 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13534 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13535 cat >>confdefs.h <<_ACEOF
13536 #define HAVE_GSSAPI_GSSAPI_H 1
13537 _ACEOF
13539 else
13540 for ac_header in gssapi.h
13541 do :
13542 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13543 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13544 cat >>confdefs.h <<_ACEOF
13545 #define HAVE_GSSAPI_H 1
13546 _ACEOF
13548 else
13549 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13552 done
13556 done
13558 for ac_header in gssapi/gssapi_ext.h
13559 do :
13560 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
13561 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
13562 cat >>confdefs.h <<_ACEOF
13563 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
13564 _ACEOF
13566 else
13567 for ac_header in gssapi_ext.h
13568 do :
13569 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
13570 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
13571 cat >>confdefs.h <<_ACEOF
13572 #define HAVE_GSSAPI_EXT_H 1
13573 _ACEOF
13575 else
13576 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
13579 done
13583 done
13587 if test -z "$OPENSSL"; then
13588 for ac_prog in openssl
13590 # Extract the first word of "$ac_prog", so it can be a program name with args.
13591 set dummy $ac_prog; ac_word=$2
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13593 $as_echo_n "checking for $ac_word... " >&6; }
13594 if ${ac_cv_path_OPENSSL+:} false; then :
13595 $as_echo_n "(cached) " >&6
13596 else
13597 case $OPENSSL in
13598 [\\/]* | ?:[\\/]*)
13599 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
13602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13603 for as_dir in $PATH
13605 IFS=$as_save_IFS
13606 test -z "$as_dir" && as_dir=.
13607 for ac_exec_ext in '' $ac_executable_extensions; do
13608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13609 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
13610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13611 break 2
13613 done
13614 done
13615 IFS=$as_save_IFS
13618 esac
13620 OPENSSL=$ac_cv_path_OPENSSL
13621 if test -n "$OPENSSL"; then
13622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13623 $as_echo "$OPENSSL" >&6; }
13624 else
13625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13626 $as_echo "no" >&6; }
13630 test -n "$OPENSSL" && break
13631 done
13633 else
13634 # Report the value of OPENSSL in configure's output in all cases.
13635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
13636 $as_echo_n "checking for OPENSSL... " >&6; }
13637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13638 $as_echo "$OPENSSL" >&6; }
13641 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
13642 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
13643 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
13644 if test "$with_ssl" = openssl ; then
13645 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13646 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13648 else
13649 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13653 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13654 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13656 else
13657 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13663 if test "$with_pam" = yes ; then
13664 for ac_header in security/pam_appl.h
13665 do :
13666 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13667 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13668 cat >>confdefs.h <<_ACEOF
13669 #define HAVE_SECURITY_PAM_APPL_H 1
13670 _ACEOF
13672 else
13673 for ac_header in pam/pam_appl.h
13674 do :
13675 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13676 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13677 cat >>confdefs.h <<_ACEOF
13678 #define HAVE_PAM_PAM_APPL_H 1
13679 _ACEOF
13681 else
13682 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13685 done
13689 done
13693 if test "$with_bsd_auth" = yes ; then
13694 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13695 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13697 else
13698 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13704 if test "$with_systemd" = yes ; then
13705 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13706 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13708 else
13709 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13715 if test "$with_libxml" = yes ; then
13716 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13717 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13719 else
13720 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13726 if test "$with_libxslt" = yes ; then
13727 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13728 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13730 else
13731 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13737 if test "$with_ldap" = yes ; then
13738 if test "$PORTNAME" != "win32"; then
13739 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13740 if test "x$ac_cv_header_ldap_h" = xyes; then :
13742 else
13743 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13748 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13749 if ${pgac_cv_ldap_safe+:} false; then :
13750 $as_echo_n "(cached) " >&6
13751 else
13752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13753 /* end confdefs.h. */
13754 #include <ldap.h>
13755 #if !defined(LDAP_VENDOR_VERSION) || \
13756 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13757 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13758 choke me
13759 #endif
13761 main ()
13765 return 0;
13767 _ACEOF
13768 if ac_fn_c_try_compile "$LINENO"; then :
13769 pgac_cv_ldap_safe=yes
13770 else
13771 pgac_cv_ldap_safe=no
13773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13776 $as_echo "$pgac_cv_ldap_safe" >&6; }
13778 if test "$pgac_cv_ldap_safe" != yes; then
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13780 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13781 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13782 *** also uses LDAP will crash on exit." >&5
13783 $as_echo "$as_me: WARNING:
13784 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13785 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13786 *** also uses LDAP will crash on exit." >&2;}
13788 else
13789 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13790 #include <windows.h>
13793 if test "x$ac_cv_header_winldap_h" = xyes; then :
13795 else
13796 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13803 if test "$with_bonjour" = yes ; then
13804 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13805 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13807 else
13808 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13814 # for contrib/uuid-ossp
13815 if test "$with_uuid" = bsd ; then
13816 for ac_header in uuid.h
13817 do :
13818 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13819 if test "x$ac_cv_header_uuid_h" = xyes; then :
13820 cat >>confdefs.h <<_ACEOF
13821 #define HAVE_UUID_H 1
13822 _ACEOF
13823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13824 /* end confdefs.h. */
13825 #include <uuid.h>
13827 _ACEOF
13828 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13829 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13831 else
13832 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13834 rm -f conftest*
13836 else
13837 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13840 done
13842 elif test "$with_uuid" = e2fs ; then
13843 for ac_header in uuid/uuid.h
13844 do :
13845 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13846 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13847 cat >>confdefs.h <<_ACEOF
13848 #define HAVE_UUID_UUID_H 1
13849 _ACEOF
13850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13851 /* end confdefs.h. */
13852 #include <uuid/uuid.h>
13854 _ACEOF
13855 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13856 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13858 else
13859 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13861 rm -f conftest*
13863 else
13864 for ac_header in uuid.h
13865 do :
13866 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13867 if test "x$ac_cv_header_uuid_h" = xyes; then :
13868 cat >>confdefs.h <<_ACEOF
13869 #define HAVE_UUID_H 1
13870 _ACEOF
13871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13872 /* end confdefs.h. */
13873 #include <uuid.h>
13875 _ACEOF
13876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13877 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13879 else
13880 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13882 rm -f conftest*
13884 else
13885 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13888 done
13892 done
13894 elif test "$with_uuid" = ossp ; then
13895 for ac_header in ossp/uuid.h
13896 do :
13897 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13898 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13899 cat >>confdefs.h <<_ACEOF
13900 #define HAVE_OSSP_UUID_H 1
13901 _ACEOF
13902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13903 /* end confdefs.h. */
13904 #include <ossp/uuid.h>
13906 _ACEOF
13907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13908 $EGREP "uuid_export" >/dev/null 2>&1; then :
13910 else
13911 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13913 rm -f conftest*
13915 else
13916 for ac_header in uuid.h
13917 do :
13918 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13919 if test "x$ac_cv_header_uuid_h" = xyes; then :
13920 cat >>confdefs.h <<_ACEOF
13921 #define HAVE_UUID_H 1
13922 _ACEOF
13923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13924 /* end confdefs.h. */
13925 #include <uuid.h>
13927 _ACEOF
13928 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13929 $EGREP "uuid_export" >/dev/null 2>&1; then :
13931 else
13932 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13934 rm -f conftest*
13936 else
13937 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13940 done
13944 done
13948 if test "$PORTNAME" = "win32" ; then
13949 for ac_header in crtdefs.h
13950 do :
13951 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13952 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13953 cat >>confdefs.h <<_ACEOF
13954 #define HAVE_CRTDEFS_H 1
13955 _ACEOF
13959 done
13964 ## Types, structures, compiler characteristics
13967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13968 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13969 if ${ac_cv_c_bigendian+:} false; then :
13970 $as_echo_n "(cached) " >&6
13971 else
13972 ac_cv_c_bigendian=unknown
13973 # See if we're dealing with a universal compiler.
13974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13975 /* end confdefs.h. */
13976 #ifndef __APPLE_CC__
13977 not a universal capable compiler
13978 #endif
13979 typedef int dummy;
13981 _ACEOF
13982 if ac_fn_c_try_compile "$LINENO"; then :
13984 # Check for potential -arch flags. It is not universal unless
13985 # there are at least two -arch flags with different values.
13986 ac_arch=
13987 ac_prev=
13988 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13989 if test -n "$ac_prev"; then
13990 case $ac_word in
13991 i?86 | x86_64 | ppc | ppc64)
13992 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13993 ac_arch=$ac_word
13994 else
13995 ac_cv_c_bigendian=universal
13996 break
13999 esac
14000 ac_prev=
14001 elif test "x$ac_word" = "x-arch"; then
14002 ac_prev=arch
14004 done
14006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14007 if test $ac_cv_c_bigendian = unknown; then
14008 # See if sys/param.h defines the BYTE_ORDER macro.
14009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14010 /* end confdefs.h. */
14011 #include <sys/types.h>
14012 #include <sys/param.h>
14015 main ()
14017 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14018 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14019 && LITTLE_ENDIAN)
14020 bogus endian macros
14021 #endif
14024 return 0;
14026 _ACEOF
14027 if ac_fn_c_try_compile "$LINENO"; then :
14028 # It does; now see whether it defined to BIG_ENDIAN or not.
14029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14030 /* end confdefs.h. */
14031 #include <sys/types.h>
14032 #include <sys/param.h>
14035 main ()
14037 #if BYTE_ORDER != BIG_ENDIAN
14038 not big endian
14039 #endif
14042 return 0;
14044 _ACEOF
14045 if ac_fn_c_try_compile "$LINENO"; then :
14046 ac_cv_c_bigendian=yes
14047 else
14048 ac_cv_c_bigendian=no
14050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14054 if test $ac_cv_c_bigendian = unknown; then
14055 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14057 /* end confdefs.h. */
14058 #include <limits.h>
14061 main ()
14063 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14064 bogus endian macros
14065 #endif
14068 return 0;
14070 _ACEOF
14071 if ac_fn_c_try_compile "$LINENO"; then :
14072 # It does; now see whether it defined to _BIG_ENDIAN or not.
14073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14074 /* end confdefs.h. */
14075 #include <limits.h>
14078 main ()
14080 #ifndef _BIG_ENDIAN
14081 not big endian
14082 #endif
14085 return 0;
14087 _ACEOF
14088 if ac_fn_c_try_compile "$LINENO"; then :
14089 ac_cv_c_bigendian=yes
14090 else
14091 ac_cv_c_bigendian=no
14093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14097 if test $ac_cv_c_bigendian = unknown; then
14098 # Compile a test program.
14099 if test "$cross_compiling" = yes; then :
14100 # Try to guess by grepping values from an object file.
14101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14102 /* end confdefs.h. */
14103 short int ascii_mm[] =
14104 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14105 short int ascii_ii[] =
14106 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14107 int use_ascii (int i) {
14108 return ascii_mm[i] + ascii_ii[i];
14110 short int ebcdic_ii[] =
14111 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14112 short int ebcdic_mm[] =
14113 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14114 int use_ebcdic (int i) {
14115 return ebcdic_mm[i] + ebcdic_ii[i];
14117 extern int foo;
14120 main ()
14122 return use_ascii (foo) == use_ebcdic (foo);
14124 return 0;
14126 _ACEOF
14127 if ac_fn_c_try_compile "$LINENO"; then :
14128 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14129 ac_cv_c_bigendian=yes
14131 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14132 if test "$ac_cv_c_bigendian" = unknown; then
14133 ac_cv_c_bigendian=no
14134 else
14135 # finding both strings is unlikely to happen, but who knows?
14136 ac_cv_c_bigendian=unknown
14140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14141 else
14142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14143 /* end confdefs.h. */
14144 $ac_includes_default
14146 main ()
14149 /* Are we little or big endian? From Harbison&Steele. */
14150 union
14152 long int l;
14153 char c[sizeof (long int)];
14154 } u;
14155 u.l = 1;
14156 return u.c[sizeof (long int) - 1] == 1;
14159 return 0;
14161 _ACEOF
14162 if ac_fn_c_try_run "$LINENO"; then :
14163 ac_cv_c_bigendian=no
14164 else
14165 ac_cv_c_bigendian=yes
14167 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14168 conftest.$ac_objext conftest.beam conftest.$ac_ext
14173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14174 $as_echo "$ac_cv_c_bigendian" >&6; }
14175 case $ac_cv_c_bigendian in #(
14176 yes)
14177 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14178 ;; #(
14180 ;; #(
14181 universal)
14183 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14185 ;; #(
14187 as_fn_error $? "unknown endianness
14188 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14189 esac
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14192 $as_echo_n "checking for inline... " >&6; }
14193 if ${ac_cv_c_inline+:} false; then :
14194 $as_echo_n "(cached) " >&6
14195 else
14196 ac_cv_c_inline=no
14197 for ac_kw in inline __inline__ __inline; do
14198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14199 /* end confdefs.h. */
14200 #ifndef __cplusplus
14201 typedef int foo_t;
14202 static $ac_kw foo_t static_foo () {return 0; }
14203 $ac_kw foo_t foo () {return 0; }
14204 #endif
14206 _ACEOF
14207 if ac_fn_c_try_compile "$LINENO"; then :
14208 ac_cv_c_inline=$ac_kw
14210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14211 test "$ac_cv_c_inline" != no && break
14212 done
14215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14216 $as_echo "$ac_cv_c_inline" >&6; }
14218 case $ac_cv_c_inline in
14219 inline | yes) ;;
14221 case $ac_cv_c_inline in
14222 no) ac_val=;;
14223 *) ac_val=$ac_cv_c_inline;;
14224 esac
14225 cat >>confdefs.h <<_ACEOF
14226 #ifndef __cplusplus
14227 #define inline $ac_val
14228 #endif
14229 _ACEOF
14231 esac
14233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14234 $as_echo_n "checking for printf format archetype... " >&6; }
14235 if ${pgac_cv_printf_archetype+:} false; then :
14236 $as_echo_n "(cached) " >&6
14237 else
14238 pgac_cv_printf_archetype=gnu_printf
14239 ac_save_c_werror_flag=$ac_c_werror_flag
14240 ac_c_werror_flag=yes
14241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14242 /* end confdefs.h. */
14243 extern void pgac_write(int ignore, const char *fmt,...)
14244 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14246 main ()
14248 pgac_write(0, "error %s: %m", "foo");
14250 return 0;
14252 _ACEOF
14253 if ac_fn_c_try_compile "$LINENO"; then :
14254 ac_archetype_ok=yes
14255 else
14256 ac_archetype_ok=no
14258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14259 ac_c_werror_flag=$ac_save_c_werror_flag
14261 if [ "$ac_archetype_ok" = no ]; then
14262 pgac_cv_printf_archetype=__syslog__
14263 ac_save_c_werror_flag=$ac_c_werror_flag
14264 ac_c_werror_flag=yes
14265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14266 /* end confdefs.h. */
14267 extern void pgac_write(int ignore, const char *fmt,...)
14268 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14270 main ()
14272 pgac_write(0, "error %s: %m", "foo");
14274 return 0;
14276 _ACEOF
14277 if ac_fn_c_try_compile "$LINENO"; then :
14278 ac_archetype_ok=yes
14279 else
14280 ac_archetype_ok=no
14282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14283 ac_c_werror_flag=$ac_save_c_werror_flag
14285 if [ "$ac_archetype_ok" = no ]; then
14286 pgac_cv_printf_archetype=printf
14290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14291 $as_echo "$pgac_cv_printf_archetype" >&6; }
14293 cat >>confdefs.h <<_ACEOF
14294 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14295 _ACEOF
14298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14299 $as_echo_n "checking for _Static_assert... " >&6; }
14300 if ${pgac_cv__static_assert+:} false; then :
14301 $as_echo_n "(cached) " >&6
14302 else
14303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14304 /* end confdefs.h. */
14307 main ()
14309 ({ _Static_assert(1, "foo"); })
14311 return 0;
14313 _ACEOF
14314 if ac_fn_c_try_link "$LINENO"; then :
14315 pgac_cv__static_assert=yes
14316 else
14317 pgac_cv__static_assert=no
14319 rm -f core conftest.err conftest.$ac_objext \
14320 conftest$ac_exeext conftest.$ac_ext
14322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14323 $as_echo "$pgac_cv__static_assert" >&6; }
14324 if test x"$pgac_cv__static_assert" = xyes ; then
14326 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14330 $as_echo_n "checking for typeof... " >&6; }
14331 if ${pgac_cv_c_typeof+:} false; then :
14332 $as_echo_n "(cached) " >&6
14333 else
14334 pgac_cv_c_typeof=no
14335 for pgac_kw in typeof __typeof__ decltype; do
14336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14337 /* end confdefs.h. */
14340 main ()
14342 int x = 0;
14343 $pgac_kw(x) y;
14344 y = x;
14345 return y;
14347 return 0;
14349 _ACEOF
14350 if ac_fn_c_try_compile "$LINENO"; then :
14351 pgac_cv_c_typeof=$pgac_kw
14353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14354 test "$pgac_cv_c_typeof" != no && break
14355 done
14357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14358 $as_echo "$pgac_cv_c_typeof" >&6; }
14359 if test "$pgac_cv_c_typeof" != no; then
14361 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14363 if test "$pgac_cv_c_typeof" != typeof; then
14365 cat >>confdefs.h <<_ACEOF
14366 #define typeof $pgac_cv_c_typeof
14367 _ACEOF
14371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14372 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14373 if ${pgac_cv__types_compatible+:} false; then :
14374 $as_echo_n "(cached) " >&6
14375 else
14376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377 /* end confdefs.h. */
14380 main ()
14382 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14384 return 0;
14386 _ACEOF
14387 if ac_fn_c_try_compile "$LINENO"; then :
14388 pgac_cv__types_compatible=yes
14389 else
14390 pgac_cv__types_compatible=no
14392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14395 $as_echo "$pgac_cv__types_compatible" >&6; }
14396 if test x"$pgac_cv__types_compatible" = xyes ; then
14398 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14402 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14403 if ${pgac_cv__builtin_constant_p+:} false; then :
14404 $as_echo_n "(cached) " >&6
14405 else
14406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14407 /* end confdefs.h. */
14408 static int x;
14409 static int y[__builtin_constant_p(x) ? x : 1];
14410 static int z[__builtin_constant_p("string literal") ? 1 : x];
14413 _ACEOF
14414 if ac_fn_c_try_compile "$LINENO"; then :
14415 pgac_cv__builtin_constant_p=yes
14416 else
14417 pgac_cv__builtin_constant_p=no
14419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14422 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14423 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14425 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14429 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14430 if ${pgac_cv__builtin_unreachable+:} false; then :
14431 $as_echo_n "(cached) " >&6
14432 else
14433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14434 /* end confdefs.h. */
14437 main ()
14439 __builtin_unreachable();
14441 return 0;
14443 _ACEOF
14444 if ac_fn_c_try_link "$LINENO"; then :
14445 pgac_cv__builtin_unreachable=yes
14446 else
14447 pgac_cv__builtin_unreachable=no
14449 rm -f core conftest.err conftest.$ac_objext \
14450 conftest$ac_exeext conftest.$ac_ext
14452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14453 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14454 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14456 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14460 $as_echo_n "checking for computed goto support... " >&6; }
14461 if ${pgac_cv_computed_goto+:} false; then :
14462 $as_echo_n "(cached) " >&6
14463 else
14464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14465 /* end confdefs.h. */
14468 main ()
14470 void *labeladdrs[] = {&&my_label};
14471 goto *labeladdrs[0];
14472 my_label:
14473 return 1;
14476 return 0;
14478 _ACEOF
14479 if ac_fn_c_try_compile "$LINENO"; then :
14480 pgac_cv_computed_goto=yes
14481 else
14482 pgac_cv_computed_goto=no
14484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14487 $as_echo "$pgac_cv_computed_goto" >&6; }
14488 if test x"$pgac_cv_computed_goto" = xyes ; then
14490 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14493 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14494 #include <time.h>
14497 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14499 cat >>confdefs.h <<_ACEOF
14500 #define HAVE_STRUCT_TM_TM_ZONE 1
14501 _ACEOF
14507 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14508 #include <sys/ipc.h>
14509 #include <sys/sem.h>
14512 if test "x$ac_cv_type_union_semun" = xyes; then :
14514 cat >>confdefs.h <<_ACEOF
14515 #define HAVE_UNION_SEMUN 1
14516 _ACEOF
14521 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14523 if test "x$ac_cv_type_socklen_t" = xyes; then :
14525 cat >>confdefs.h <<_ACEOF
14526 #define HAVE_SOCKLEN_T 1
14527 _ACEOF
14532 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14533 #include <sys/socket.h>
14536 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14538 cat >>confdefs.h <<_ACEOF
14539 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14540 _ACEOF
14546 # MSVC doesn't cope well with defining restrict to __restrict, the
14547 # spelling it understands, because it conflicts with
14548 # __declspec(restrict). Therefore we define pg_restrict to the
14549 # appropriate definition, which presumably won't conflict.
14550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14551 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14552 if ${ac_cv_c_restrict+:} false; then :
14553 $as_echo_n "(cached) " >&6
14554 else
14555 ac_cv_c_restrict=no
14556 # The order here caters to the fact that C++ does not require restrict.
14557 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14559 /* end confdefs.h. */
14560 typedef int * int_ptr;
14561 int foo (int_ptr $ac_kw ip) {
14562 return ip[0];
14565 main ()
14567 int s[1];
14568 int * $ac_kw t = s;
14569 t[0] = 0;
14570 return foo(t)
14572 return 0;
14574 _ACEOF
14575 if ac_fn_c_try_compile "$LINENO"; then :
14576 ac_cv_c_restrict=$ac_kw
14578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14579 test "$ac_cv_c_restrict" != no && break
14580 done
14583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14584 $as_echo "$ac_cv_c_restrict" >&6; }
14586 case $ac_cv_c_restrict in
14587 restrict) ;;
14588 no) $as_echo "#define restrict /**/" >>confdefs.h
14590 *) cat >>confdefs.h <<_ACEOF
14591 #define restrict $ac_cv_c_restrict
14592 _ACEOF
14594 esac
14596 if test "$ac_cv_c_restrict" = "no"; then
14597 pg_restrict=""
14598 else
14599 pg_restrict="$ac_cv_c_restrict"
14602 cat >>confdefs.h <<_ACEOF
14603 #define pg_restrict $pg_restrict
14604 _ACEOF
14607 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14608 #include <getopt.h>
14609 #endif
14611 if test "x$ac_cv_type_struct_option" = xyes; then :
14613 cat >>confdefs.h <<_ACEOF
14614 #define HAVE_STRUCT_OPTION 1
14615 _ACEOF
14621 case $host_cpu in
14622 x86_64)
14623 # On x86_64, check if we can compile a popcntq instruction
14624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14625 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14626 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14627 $as_echo_n "(cached) " >&6
14628 else
14629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14630 /* end confdefs.h. */
14633 main ()
14635 long long x = 1; long long r;
14636 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14638 return 0;
14640 _ACEOF
14641 if ac_fn_c_try_compile "$LINENO"; then :
14642 pgac_cv_have_x86_64_popcntq=yes
14643 else
14644 pgac_cv_have_x86_64_popcntq=no
14646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14649 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14650 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14652 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14656 ppc*|powerpc*)
14657 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
14658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14659 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14660 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14661 $as_echo_n "(cached) " >&6
14662 else
14663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14664 /* end confdefs.h. */
14665 static inline int
14666 addi(int ra, int si)
14668 int res = 0;
14669 if (__builtin_constant_p(si))
14670 __asm__ __volatile__(
14671 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14672 return res;
14674 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14676 main ()
14680 return 0;
14682 _ACEOF
14683 if ac_fn_c_try_compile "$LINENO"; then :
14684 pgac_cv_have_i_constraint__builtin_constant_p=yes
14685 else
14686 pgac_cv_have_i_constraint__builtin_constant_p=no
14688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14691 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14692 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14694 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14698 esac
14700 # Check largefile support. You might think this is a system service not a
14701 # compiler characteristic, but you'd be wrong. We must check this before
14702 # probing existence of related functions such as fseeko, since the largefile
14703 # defines can affect what is generated for that.
14704 if test "$PORTNAME" != "win32"; then
14705 # Check whether --enable-largefile was given.
14706 if test "${enable_largefile+set}" = set; then :
14707 enableval=$enable_largefile;
14710 if test "$enable_largefile" != no; then
14712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14713 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14714 if ${ac_cv_sys_largefile_CC+:} false; then :
14715 $as_echo_n "(cached) " >&6
14716 else
14717 ac_cv_sys_largefile_CC=no
14718 if test "$GCC" != yes; then
14719 ac_save_CC=$CC
14720 while :; do
14721 # IRIX 6.2 and later do not support large files by default,
14722 # so use the C compiler's -n32 option if that helps.
14723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724 /* end confdefs.h. */
14725 #include <sys/types.h>
14726 /* Check that off_t can represent 2**63 - 1 correctly.
14727 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14728 since some C++ compilers masquerading as C compilers
14729 incorrectly reject 9223372036854775807. */
14730 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14731 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14732 && LARGE_OFF_T % 2147483647 == 1)
14733 ? 1 : -1];
14735 main ()
14739 return 0;
14741 _ACEOF
14742 if ac_fn_c_try_compile "$LINENO"; then :
14743 break
14745 rm -f core conftest.err conftest.$ac_objext
14746 CC="$CC -n32"
14747 if ac_fn_c_try_compile "$LINENO"; then :
14748 ac_cv_sys_largefile_CC=' -n32'; break
14750 rm -f core conftest.err conftest.$ac_objext
14751 break
14752 done
14753 CC=$ac_save_CC
14754 rm -f conftest.$ac_ext
14757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14758 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14759 if test "$ac_cv_sys_largefile_CC" != no; then
14760 CC=$CC$ac_cv_sys_largefile_CC
14763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14764 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14765 if ${ac_cv_sys_file_offset_bits+:} false; then :
14766 $as_echo_n "(cached) " >&6
14767 else
14768 while :; do
14769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14770 /* end confdefs.h. */
14771 #include <sys/types.h>
14772 /* Check that off_t can represent 2**63 - 1 correctly.
14773 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14774 since some C++ compilers masquerading as C compilers
14775 incorrectly reject 9223372036854775807. */
14776 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14777 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14778 && LARGE_OFF_T % 2147483647 == 1)
14779 ? 1 : -1];
14781 main ()
14785 return 0;
14787 _ACEOF
14788 if ac_fn_c_try_compile "$LINENO"; then :
14789 ac_cv_sys_file_offset_bits=no; break
14791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14793 /* end confdefs.h. */
14794 #define _FILE_OFFSET_BITS 64
14795 #include <sys/types.h>
14796 /* Check that off_t can represent 2**63 - 1 correctly.
14797 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14798 since some C++ compilers masquerading as C compilers
14799 incorrectly reject 9223372036854775807. */
14800 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14801 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14802 && LARGE_OFF_T % 2147483647 == 1)
14803 ? 1 : -1];
14805 main ()
14809 return 0;
14811 _ACEOF
14812 if ac_fn_c_try_compile "$LINENO"; then :
14813 ac_cv_sys_file_offset_bits=64; break
14815 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14816 ac_cv_sys_file_offset_bits=unknown
14817 break
14818 done
14820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14821 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14822 case $ac_cv_sys_file_offset_bits in #(
14823 no | unknown) ;;
14825 cat >>confdefs.h <<_ACEOF
14826 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14827 _ACEOF
14829 esac
14830 rm -rf conftest*
14831 if test $ac_cv_sys_file_offset_bits = unknown; then
14832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14833 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14834 if ${ac_cv_sys_large_files+:} false; then :
14835 $as_echo_n "(cached) " >&6
14836 else
14837 while :; do
14838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14839 /* end confdefs.h. */
14840 #include <sys/types.h>
14841 /* Check that off_t can represent 2**63 - 1 correctly.
14842 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14843 since some C++ compilers masquerading as C compilers
14844 incorrectly reject 9223372036854775807. */
14845 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14846 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14847 && LARGE_OFF_T % 2147483647 == 1)
14848 ? 1 : -1];
14850 main ()
14854 return 0;
14856 _ACEOF
14857 if ac_fn_c_try_compile "$LINENO"; then :
14858 ac_cv_sys_large_files=no; break
14860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14862 /* end confdefs.h. */
14863 #define _LARGE_FILES 1
14864 #include <sys/types.h>
14865 /* Check that off_t can represent 2**63 - 1 correctly.
14866 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14867 since some C++ compilers masquerading as C compilers
14868 incorrectly reject 9223372036854775807. */
14869 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14870 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14871 && LARGE_OFF_T % 2147483647 == 1)
14872 ? 1 : -1];
14874 main ()
14878 return 0;
14880 _ACEOF
14881 if ac_fn_c_try_compile "$LINENO"; then :
14882 ac_cv_sys_large_files=1; break
14884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14885 ac_cv_sys_large_files=unknown
14886 break
14887 done
14889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14890 $as_echo "$ac_cv_sys_large_files" >&6; }
14891 case $ac_cv_sys_large_files in #(
14892 no | unknown) ;;
14894 cat >>confdefs.h <<_ACEOF
14895 #define _LARGE_FILES $ac_cv_sys_large_files
14896 _ACEOF
14898 esac
14899 rm -rf conftest*
14908 # The cast to long int works around a bug in the HP C Compiler
14909 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14910 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14911 # This bug is HP SR number 8606223364.
14912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14913 $as_echo_n "checking size of off_t... " >&6; }
14914 if ${ac_cv_sizeof_off_t+:} false; then :
14915 $as_echo_n "(cached) " >&6
14916 else
14917 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
14919 else
14920 if test "$ac_cv_type_off_t" = yes; then
14921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14922 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14923 as_fn_error 77 "cannot compute sizeof (off_t)
14924 See \`config.log' for more details" "$LINENO" 5; }
14925 else
14926 ac_cv_sizeof_off_t=0
14931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14932 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14936 cat >>confdefs.h <<_ACEOF
14937 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14938 _ACEOF
14942 # If we don't have largefile support, can't handle segment size >= 2GB.
14943 if test "$ac_cv_sizeof_off_t" -lt 8; then
14944 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
14945 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14949 # The cast to long int works around a bug in the HP C Compiler
14950 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14951 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14952 # This bug is HP SR number 8606223364.
14953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14954 $as_echo_n "checking size of bool... " >&6; }
14955 if ${ac_cv_sizeof_bool+:} false; then :
14956 $as_echo_n "(cached) " >&6
14957 else
14958 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
14959 #include <stdbool.h>
14960 #endif
14961 "; then :
14963 else
14964 if test "$ac_cv_type_bool" = yes; then
14965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14966 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14967 as_fn_error 77 "cannot compute sizeof (bool)
14968 See \`config.log' for more details" "$LINENO" 5; }
14969 else
14970 ac_cv_sizeof_bool=0
14975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14976 $as_echo "$ac_cv_sizeof_bool" >&6; }
14980 cat >>confdefs.h <<_ACEOF
14981 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14982 _ACEOF
14986 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
14988 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
14994 ## Functions, global variables
14997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14998 $as_echo_n "checking for int timezone... " >&6; }
14999 if ${pgac_cv_var_int_timezone+:} false; then :
15000 $as_echo_n "(cached) " >&6
15001 else
15002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15003 /* end confdefs.h. */
15004 #include <time.h>
15005 int res;
15007 main ()
15009 #ifndef __CYGWIN__
15010 res = timezone / 60;
15011 #else
15012 res = _timezone / 60;
15013 #endif
15015 return 0;
15017 _ACEOF
15018 if ac_fn_c_try_link "$LINENO"; then :
15019 pgac_cv_var_int_timezone=yes
15020 else
15021 pgac_cv_var_int_timezone=no
15023 rm -f core conftest.err conftest.$ac_objext \
15024 conftest$ac_exeext conftest.$ac_ext
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15027 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15028 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15030 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15034 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15035 # symbols that that library has no business exposing to the world. Pending
15036 # acquisition of a clue by those developers, ignore libedit (including its
15037 # possible alias of libreadline) while checking for everything else.
15038 LIBS_including_readline="$LIBS"
15039 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15041 for ac_func in backtrace_symbols copyfile copy_file_range getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s posix_fallocate ppoll pthread_is_threaded_np setproctitle setproctitle_fast strchrnul strsignal syncfs sync_file_range uselocale wcstombs_l
15042 do :
15043 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15044 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15045 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15046 cat >>confdefs.h <<_ACEOF
15047 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15048 _ACEOF
15051 done
15054 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15056 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15057 if ${pgac_cv__builtin_bswap16+:} false; then :
15058 $as_echo_n "(cached) " >&6
15059 else
15060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15061 /* end confdefs.h. */
15064 call__builtin_bswap16(int x)
15066 return __builtin_bswap16(x);
15069 main ()
15073 return 0;
15075 _ACEOF
15076 if ac_fn_c_try_link "$LINENO"; then :
15077 pgac_cv__builtin_bswap16=yes
15078 else
15079 pgac_cv__builtin_bswap16=no
15081 rm -f core conftest.err conftest.$ac_objext \
15082 conftest$ac_exeext conftest.$ac_ext
15084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15085 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15086 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15088 cat >>confdefs.h <<_ACEOF
15089 #define HAVE__BUILTIN_BSWAP16 1
15090 _ACEOF
15093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15094 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15095 if ${pgac_cv__builtin_bswap32+:} false; then :
15096 $as_echo_n "(cached) " >&6
15097 else
15098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15099 /* end confdefs.h. */
15102 call__builtin_bswap32(int x)
15104 return __builtin_bswap32(x);
15107 main ()
15111 return 0;
15113 _ACEOF
15114 if ac_fn_c_try_link "$LINENO"; then :
15115 pgac_cv__builtin_bswap32=yes
15116 else
15117 pgac_cv__builtin_bswap32=no
15119 rm -f core conftest.err conftest.$ac_objext \
15120 conftest$ac_exeext conftest.$ac_ext
15122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15123 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15124 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15126 cat >>confdefs.h <<_ACEOF
15127 #define HAVE__BUILTIN_BSWAP32 1
15128 _ACEOF
15131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15132 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15133 if ${pgac_cv__builtin_bswap64+:} false; then :
15134 $as_echo_n "(cached) " >&6
15135 else
15136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15137 /* end confdefs.h. */
15140 call__builtin_bswap64(long int x)
15142 return __builtin_bswap64(x);
15145 main ()
15149 return 0;
15151 _ACEOF
15152 if ac_fn_c_try_link "$LINENO"; then :
15153 pgac_cv__builtin_bswap64=yes
15154 else
15155 pgac_cv__builtin_bswap64=no
15157 rm -f core conftest.err conftest.$ac_objext \
15158 conftest$ac_exeext conftest.$ac_ext
15160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15161 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15162 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15164 cat >>confdefs.h <<_ACEOF
15165 #define HAVE__BUILTIN_BSWAP64 1
15166 _ACEOF
15169 # We assume that we needn't test all widths of these explicitly:
15170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15171 $as_echo_n "checking for __builtin_clz... " >&6; }
15172 if ${pgac_cv__builtin_clz+:} false; then :
15173 $as_echo_n "(cached) " >&6
15174 else
15175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15176 /* end confdefs.h. */
15179 call__builtin_clz(unsigned int x)
15181 return __builtin_clz(x);
15184 main ()
15188 return 0;
15190 _ACEOF
15191 if ac_fn_c_try_link "$LINENO"; then :
15192 pgac_cv__builtin_clz=yes
15193 else
15194 pgac_cv__builtin_clz=no
15196 rm -f core conftest.err conftest.$ac_objext \
15197 conftest$ac_exeext conftest.$ac_ext
15199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15200 $as_echo "$pgac_cv__builtin_clz" >&6; }
15201 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15203 cat >>confdefs.h <<_ACEOF
15204 #define HAVE__BUILTIN_CLZ 1
15205 _ACEOF
15208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15209 $as_echo_n "checking for __builtin_ctz... " >&6; }
15210 if ${pgac_cv__builtin_ctz+:} false; then :
15211 $as_echo_n "(cached) " >&6
15212 else
15213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15214 /* end confdefs.h. */
15217 call__builtin_ctz(unsigned int x)
15219 return __builtin_ctz(x);
15222 main ()
15226 return 0;
15228 _ACEOF
15229 if ac_fn_c_try_link "$LINENO"; then :
15230 pgac_cv__builtin_ctz=yes
15231 else
15232 pgac_cv__builtin_ctz=no
15234 rm -f core conftest.err conftest.$ac_objext \
15235 conftest$ac_exeext conftest.$ac_ext
15237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15238 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15239 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15241 cat >>confdefs.h <<_ACEOF
15242 #define HAVE__BUILTIN_CTZ 1
15243 _ACEOF
15246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15247 $as_echo_n "checking for __builtin_popcount... " >&6; }
15248 if ${pgac_cv__builtin_popcount+:} false; then :
15249 $as_echo_n "(cached) " >&6
15250 else
15251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15252 /* end confdefs.h. */
15255 call__builtin_popcount(unsigned int x)
15257 return __builtin_popcount(x);
15260 main ()
15264 return 0;
15266 _ACEOF
15267 if ac_fn_c_try_link "$LINENO"; then :
15268 pgac_cv__builtin_popcount=yes
15269 else
15270 pgac_cv__builtin_popcount=no
15272 rm -f core conftest.err conftest.$ac_objext \
15273 conftest$ac_exeext conftest.$ac_ext
15275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15276 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15277 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15279 cat >>confdefs.h <<_ACEOF
15280 #define HAVE__BUILTIN_POPCOUNT 1
15281 _ACEOF
15284 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15285 # so it needs a different test function.
15286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15287 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15288 if ${pgac_cv__builtin_frame_address+:} false; then :
15289 $as_echo_n "(cached) " >&6
15290 else
15291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15292 /* end confdefs.h. */
15294 void *
15295 call__builtin_frame_address(void)
15297 return __builtin_frame_address(0);
15300 main ()
15304 return 0;
15306 _ACEOF
15307 if ac_fn_c_try_link "$LINENO"; then :
15308 pgac_cv__builtin_frame_address=yes
15309 else
15310 pgac_cv__builtin_frame_address=no
15312 rm -f core conftest.err conftest.$ac_objext \
15313 conftest$ac_exeext conftest.$ac_ext
15315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15316 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15317 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15319 cat >>confdefs.h <<_ACEOF
15320 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15321 _ACEOF
15325 # We require 64-bit fseeko() to be available, but run this check anyway
15326 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15328 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15329 if ${ac_cv_sys_largefile_source+:} false; then :
15330 $as_echo_n "(cached) " >&6
15331 else
15332 while :; do
15333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15334 /* end confdefs.h. */
15335 #include <sys/types.h> /* for off_t */
15336 #include <stdio.h>
15338 main ()
15340 int (*fp) (FILE *, off_t, int) = fseeko;
15341 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15343 return 0;
15345 _ACEOF
15346 if ac_fn_c_try_link "$LINENO"; then :
15347 ac_cv_sys_largefile_source=no; break
15349 rm -f core conftest.err conftest.$ac_objext \
15350 conftest$ac_exeext conftest.$ac_ext
15351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15352 /* end confdefs.h. */
15353 #define _LARGEFILE_SOURCE 1
15354 #include <sys/types.h> /* for off_t */
15355 #include <stdio.h>
15357 main ()
15359 int (*fp) (FILE *, off_t, int) = fseeko;
15360 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15362 return 0;
15364 _ACEOF
15365 if ac_fn_c_try_link "$LINENO"; then :
15366 ac_cv_sys_largefile_source=1; break
15368 rm -f core conftest.err conftest.$ac_objext \
15369 conftest$ac_exeext conftest.$ac_ext
15370 ac_cv_sys_largefile_source=unknown
15371 break
15372 done
15374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15375 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15376 case $ac_cv_sys_largefile_source in #(
15377 no | unknown) ;;
15379 cat >>confdefs.h <<_ACEOF
15380 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15381 _ACEOF
15383 esac
15384 rm -rf conftest*
15386 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15387 # in glibc 2.1.3, but that breaks too many other things.
15388 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15389 if test $ac_cv_sys_largefile_source != unknown; then
15391 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15396 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15397 # by calling it, 2009-04-02
15398 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15399 # The Clang compiler raises a warning for an undeclared identifier that matches
15400 # a compiler builtin function. All extant Clang versions are affected, as of
15401 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15402 # C and Objective C languages, but Clang does report an error under C++ and
15403 # Objective C++.
15405 # Passing -fno-builtin to the compiler would suppress this problem. That
15406 # strategy would have the advantage of being insensitive to stray warnings, but
15407 # it would make tests less realistic.
15408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15409 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15410 if ${ac_cv_c_decl_report+:} false; then :
15411 $as_echo_n "(cached) " >&6
15412 else
15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414 /* end confdefs.h. */
15417 main ()
15419 (void) strchr;
15421 return 0;
15423 _ACEOF
15424 if ac_fn_c_try_compile "$LINENO"; then :
15425 if test -s conftest.err; then :
15426 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15427 # valid AC_CHECK_DECL input. No library function is consistently available
15428 # on freestanding implementations, so test against a dummy declaration.
15429 # Include always-available headers on the off chance that they somehow
15430 # elicit warnings.
15431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15432 /* end confdefs.h. */
15433 #include <float.h>
15434 #include <limits.h>
15435 #include <stdarg.h>
15436 #include <stddef.h>
15437 extern void ac_decl (int, char *);
15439 main ()
15441 #ifdef __cplusplus
15442 (void) ac_decl ((int) 0, (char *) 0);
15443 (void) ac_decl;
15444 #else
15445 (void) ac_decl;
15446 #endif
15449 return 0;
15451 _ACEOF
15452 if ac_fn_c_try_compile "$LINENO"; then :
15453 if test -s conftest.err; then :
15454 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15455 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15456 as_fn_error $? "cannot detect from compiler exit status or warnings
15457 See \`config.log' for more details" "$LINENO" 5; }
15458 else
15459 ac_cv_c_decl_report=warning
15461 else
15462 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15463 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15464 as_fn_error $? "cannot compile a simple declaration test
15465 See \`config.log' for more details" "$LINENO" 5; }
15467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15468 else
15469 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15470 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15471 as_fn_error $? "compiler does not report undeclared identifiers
15472 See \`config.log' for more details" "$LINENO" 5; }
15474 else
15475 ac_cv_c_decl_report=error
15477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15480 $as_echo "$ac_cv_c_decl_report" >&6; }
15482 case $ac_cv_c_decl_report in
15483 warning) ac_c_decl_warn_flag=yes ;;
15484 *) ac_c_decl_warn_flag= ;;
15485 esac
15487 if test "$PORTNAME" != "solaris"; then :
15489 for ac_func in posix_fadvise
15490 do :
15491 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15492 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15493 cat >>confdefs.h <<_ACEOF
15494 #define HAVE_POSIX_FADVISE 1
15495 _ACEOF
15498 done
15500 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15502 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15503 ac_have_decl=1
15504 else
15505 ac_have_decl=0
15508 cat >>confdefs.h <<_ACEOF
15509 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15510 _ACEOF
15513 fi # fi
15515 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15517 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15518 ac_have_decl=1
15519 else
15520 ac_have_decl=0
15523 cat >>confdefs.h <<_ACEOF
15524 #define HAVE_DECL_FDATASYNC $ac_have_decl
15525 _ACEOF
15527 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15528 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15529 ac_have_decl=1
15530 else
15531 ac_have_decl=0
15534 cat >>confdefs.h <<_ACEOF
15535 #define HAVE_DECL_STRLCAT $ac_have_decl
15536 _ACEOF
15537 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15538 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15539 ac_have_decl=1
15540 else
15541 ac_have_decl=0
15544 cat >>confdefs.h <<_ACEOF
15545 #define HAVE_DECL_STRLCPY $ac_have_decl
15546 _ACEOF
15547 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15548 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15549 ac_have_decl=1
15550 else
15551 ac_have_decl=0
15554 cat >>confdefs.h <<_ACEOF
15555 #define HAVE_DECL_STRNLEN $ac_have_decl
15556 _ACEOF
15557 ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "$ac_includes_default"
15558 if test "x$ac_cv_have_decl_strsep" = xyes; then :
15559 ac_have_decl=1
15560 else
15561 ac_have_decl=0
15564 cat >>confdefs.h <<_ACEOF
15565 #define HAVE_DECL_STRSEP $ac_have_decl
15566 _ACEOF
15569 # We can't use AC_CHECK_FUNCS to detect these functions, because it
15570 # won't handle deployment target restrictions on macOS
15571 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
15573 if test "x$ac_cv_have_decl_preadv" = xyes; then :
15574 ac_have_decl=1
15575 else
15576 ac_have_decl=0
15579 cat >>confdefs.h <<_ACEOF
15580 #define HAVE_DECL_PREADV $ac_have_decl
15581 _ACEOF
15583 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
15585 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
15586 ac_have_decl=1
15587 else
15588 ac_have_decl=0
15591 cat >>confdefs.h <<_ACEOF
15592 #define HAVE_DECL_PWRITEV $ac_have_decl
15593 _ACEOF
15596 # This is probably only present on macOS, but may as well check always
15597 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15599 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15600 ac_have_decl=1
15601 else
15602 ac_have_decl=0
15605 cat >>confdefs.h <<_ACEOF
15606 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15607 _ACEOF
15610 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
15611 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
15612 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
15614 else
15615 case " $LIBOBJS " in
15616 *" explicit_bzero.$ac_objext "* ) ;;
15617 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
15619 esac
15623 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15624 if test "x$ac_cv_func_getopt" = xyes; then :
15625 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15627 else
15628 case " $LIBOBJS " in
15629 *" getopt.$ac_objext "* ) ;;
15630 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15632 esac
15636 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15637 if test "x$ac_cv_func_getpeereid" = xyes; then :
15638 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15640 else
15641 case " $LIBOBJS " in
15642 *" getpeereid.$ac_objext "* ) ;;
15643 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15645 esac
15649 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15650 if test "x$ac_cv_func_inet_aton" = xyes; then :
15651 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15653 else
15654 case " $LIBOBJS " in
15655 *" inet_aton.$ac_objext "* ) ;;
15656 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15658 esac
15662 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15663 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15664 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15666 else
15667 case " $LIBOBJS " in
15668 *" mkdtemp.$ac_objext "* ) ;;
15669 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15671 esac
15675 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15676 if test "x$ac_cv_func_strlcat" = xyes; then :
15677 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15679 else
15680 case " $LIBOBJS " in
15681 *" strlcat.$ac_objext "* ) ;;
15682 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15684 esac
15688 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15689 if test "x$ac_cv_func_strlcpy" = xyes; then :
15690 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15692 else
15693 case " $LIBOBJS " in
15694 *" strlcpy.$ac_objext "* ) ;;
15695 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15697 esac
15701 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15702 if test "x$ac_cv_func_strnlen" = xyes; then :
15703 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15705 else
15706 case " $LIBOBJS " in
15707 *" strnlen.$ac_objext "* ) ;;
15708 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15710 esac
15714 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
15715 if test "x$ac_cv_func_strsep" = xyes; then :
15716 $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
15718 else
15719 case " $LIBOBJS " in
15720 *" strsep.$ac_objext "* ) ;;
15721 *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
15723 esac
15729 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
15730 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
15731 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
15733 else
15734 case " $LIBOBJS " in
15735 *" pthread_barrier_wait.$ac_objext "* ) ;;
15736 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
15738 esac
15744 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
15745 # Cygwin and (apparently, based on test results) Mingw both
15746 # have a broken strtof(), so substitute its implementation.
15747 # That's not a perfect fix, since it doesn't avoid double-rounding,
15748 # but we have no better options.
15749 case " $LIBOBJS " in
15750 *" strtof.$ac_objext "* ) ;;
15751 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15753 esac
15755 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
15756 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
15759 # Similarly, use system's getopt_long() only if system provides struct option.
15760 if test x"$ac_cv_type_struct_option" = xyes ; then
15761 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15762 if test "x$ac_cv_func_getopt_long" = xyes; then :
15763 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15765 else
15766 case " $LIBOBJS " in
15767 *" getopt_long.$ac_objext "* ) ;;
15768 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15770 esac
15775 else
15776 case " $LIBOBJS " in
15777 *" getopt_long.$ac_objext "* ) ;;
15778 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15780 esac
15784 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15785 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15786 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15787 case " $LIBOBJS " in
15788 *" getopt.$ac_objext "* ) ;;
15789 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15791 esac
15795 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15796 # so always use our version on Windows.
15797 if test "$PORTNAME" = "win32"; then
15798 case " $LIBOBJS " in
15799 *" getopt.$ac_objext "* ) ;;
15800 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15802 esac
15804 case " $LIBOBJS " in
15805 *" getopt_long.$ac_objext "* ) ;;
15806 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15808 esac
15812 # Win32 (really MinGW) support
15813 if test "$PORTNAME" = "win32"; then
15814 for ac_func in _configthreadlocale
15815 do :
15816 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
15817 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
15818 cat >>confdefs.h <<_ACEOF
15819 #define HAVE__CONFIGTHREADLOCALE 1
15820 _ACEOF
15823 done
15825 case " $LIBOBJS " in
15826 *" dirmod.$ac_objext "* ) ;;
15827 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15829 esac
15831 case " $LIBOBJS " in
15832 *" kill.$ac_objext "* ) ;;
15833 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15835 esac
15837 case " $LIBOBJS " in
15838 *" open.$ac_objext "* ) ;;
15839 *) LIBOBJS="$LIBOBJS open.$ac_objext"
15841 esac
15843 case " $LIBOBJS " in
15844 *" system.$ac_objext "* ) ;;
15845 *) LIBOBJS="$LIBOBJS system.$ac_objext"
15847 esac
15849 case " $LIBOBJS " in
15850 *" win32common.$ac_objext "* ) ;;
15851 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
15853 esac
15855 case " $LIBOBJS " in
15856 *" win32dlopen.$ac_objext "* ) ;;
15857 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
15859 esac
15861 case " $LIBOBJS " in
15862 *" win32env.$ac_objext "* ) ;;
15863 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15865 esac
15867 case " $LIBOBJS " in
15868 *" win32error.$ac_objext "* ) ;;
15869 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15871 esac
15873 case " $LIBOBJS " in
15874 *" win32fdatasync.$ac_objext "* ) ;;
15875 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
15877 esac
15879 case " $LIBOBJS " in
15880 *" win32gai_strerror.$ac_objext "* ) ;;
15881 *) LIBOBJS="$LIBOBJS win32gai_strerror.$ac_objext"
15883 esac
15885 case " $LIBOBJS " in
15886 *" win32getrusage.$ac_objext "* ) ;;
15887 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
15889 esac
15891 case " $LIBOBJS " in
15892 *" win32link.$ac_objext "* ) ;;
15893 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
15895 esac
15897 case " $LIBOBJS " in
15898 *" win32ntdll.$ac_objext "* ) ;;
15899 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
15901 esac
15903 case " $LIBOBJS " in
15904 *" win32pread.$ac_objext "* ) ;;
15905 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
15907 esac
15909 case " $LIBOBJS " in
15910 *" win32pwrite.$ac_objext "* ) ;;
15911 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
15913 esac
15915 case " $LIBOBJS " in
15916 *" win32security.$ac_objext "* ) ;;
15917 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15919 esac
15921 case " $LIBOBJS " in
15922 *" win32setlocale.$ac_objext "* ) ;;
15923 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15925 esac
15927 case " $LIBOBJS " in
15928 *" win32stat.$ac_objext "* ) ;;
15929 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
15931 esac
15934 # Cygwin needs only a bit of that
15935 if test "$PORTNAME" = "cygwin"; then
15936 case " $LIBOBJS " in
15937 *" dirmod.$ac_objext "* ) ;;
15938 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15940 esac
15944 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15945 if test "x$ac_cv_func_syslog" = xyes; then :
15946 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15947 if test "x$ac_cv_header_syslog_h" = xyes; then :
15949 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15958 $as_echo_n "checking for opterr... " >&6; }
15959 if ${pgac_cv_var_int_opterr+:} false; then :
15960 $as_echo_n "(cached) " >&6
15961 else
15962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15963 /* end confdefs.h. */
15964 #include <unistd.h>
15966 main ()
15968 extern int opterr; opterr = 1;
15970 return 0;
15972 _ACEOF
15973 if ac_fn_c_try_link "$LINENO"; then :
15974 pgac_cv_var_int_opterr=yes
15975 else
15976 pgac_cv_var_int_opterr=no
15978 rm -f core conftest.err conftest.$ac_objext \
15979 conftest$ac_exeext conftest.$ac_ext
15981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15982 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15983 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15985 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15990 $as_echo_n "checking for optreset... " >&6; }
15991 if ${pgac_cv_var_int_optreset+:} false; then :
15992 $as_echo_n "(cached) " >&6
15993 else
15994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15995 /* end confdefs.h. */
15996 #include <unistd.h>
15998 main ()
16000 extern int optreset; optreset = 1;
16002 return 0;
16004 _ACEOF
16005 if ac_fn_c_try_link "$LINENO"; then :
16006 pgac_cv_var_int_optreset=yes
16007 else
16008 pgac_cv_var_int_optreset=no
16010 rm -f core conftest.err conftest.$ac_objext \
16011 conftest$ac_exeext conftest.$ac_ext
16013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16014 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16015 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16017 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16021 if test "$with_icu" = yes; then
16022 ac_save_CPPFLAGS=$CPPFLAGS
16023 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16025 # Verify we have ICU's header files
16026 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16027 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16029 else
16030 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16035 CPPFLAGS=$ac_save_CPPFLAGS
16038 if test "$with_llvm" = yes; then
16040 # Check which functionality is present
16041 SAVE_CPPFLAGS="$CPPFLAGS"
16042 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16043 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16045 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16046 ac_have_decl=1
16047 else
16048 ac_have_decl=0
16051 cat >>confdefs.h <<_ACEOF
16052 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16053 _ACEOF
16054 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16056 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16057 ac_have_decl=1
16058 else
16059 ac_have_decl=0
16062 cat >>confdefs.h <<_ACEOF
16063 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16064 _ACEOF
16066 CPPFLAGS="$SAVE_CPPFLAGS"
16070 # Lastly, restore full LIBS list and check for readline/libedit symbols
16071 LIBS="$LIBS_including_readline"
16073 if test "$with_readline" = yes; then
16074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16075 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16076 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16077 $as_echo_n "(cached) " >&6
16078 else
16079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16080 /* end confdefs.h. */
16081 #include <stdio.h>
16082 #if defined(HAVE_READLINE_READLINE_H)
16083 #include <readline/readline.h>
16084 #elif defined(HAVE_EDITLINE_READLINE_H)
16085 #include <editline/readline.h>
16086 #elif defined(HAVE_READLINE_H)
16087 #include <readline.h>
16088 #endif
16091 main ()
16093 rl_completion_suppress_quote = 1;
16095 return 0;
16097 _ACEOF
16098 if ac_fn_c_try_link "$LINENO"; then :
16099 pgac_cv_var_rl_completion_suppress_quote=yes
16100 else
16101 pgac_cv_var_rl_completion_suppress_quote=no
16103 rm -f core conftest.err conftest.$ac_objext \
16104 conftest$ac_exeext conftest.$ac_ext
16106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16107 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16108 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16110 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16114 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16115 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16116 $as_echo_n "(cached) " >&6
16117 else
16118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16119 /* end confdefs.h. */
16120 #include <stdio.h>
16121 #if defined(HAVE_READLINE_READLINE_H)
16122 #include <readline/readline.h>
16123 #elif defined(HAVE_EDITLINE_READLINE_H)
16124 #include <editline/readline.h>
16125 #elif defined(HAVE_READLINE_H)
16126 #include <readline.h>
16127 #endif
16130 main ()
16132 rl_filename_quote_characters = "x";
16134 return 0;
16136 _ACEOF
16137 if ac_fn_c_try_link "$LINENO"; then :
16138 pgac_cv_var_rl_filename_quote_characters=yes
16139 else
16140 pgac_cv_var_rl_filename_quote_characters=no
16142 rm -f core conftest.err conftest.$ac_objext \
16143 conftest$ac_exeext conftest.$ac_ext
16145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16146 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16147 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16149 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16153 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16154 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16155 $as_echo_n "(cached) " >&6
16156 else
16157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16158 /* end confdefs.h. */
16159 #include <stdio.h>
16160 #if defined(HAVE_READLINE_READLINE_H)
16161 #include <readline/readline.h>
16162 #elif defined(HAVE_EDITLINE_READLINE_H)
16163 #include <editline/readline.h>
16164 #elif defined(HAVE_READLINE_H)
16165 #include <readline.h>
16166 #endif
16169 main ()
16171 rl_filename_quoting_function = 0;
16173 return 0;
16175 _ACEOF
16176 if ac_fn_c_try_link "$LINENO"; then :
16177 pgac_cv_var_rl_filename_quoting_function=yes
16178 else
16179 pgac_cv_var_rl_filename_quoting_function=no
16181 rm -f core conftest.err conftest.$ac_objext \
16182 conftest$ac_exeext conftest.$ac_ext
16184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16185 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16186 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16188 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16192 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16193 do :
16194 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16195 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16196 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16197 cat >>confdefs.h <<_ACEOF
16198 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16199 _ACEOF
16202 done
16207 # This test makes sure that run tests work at all. Sometimes a shared
16208 # library is found by the linker, but the runtime linker can't find it.
16209 # This check should come after all modifications of compiler or linker
16210 # variables, and before any other run tests.
16211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16212 $as_echo_n "checking test program... " >&6; }
16213 if test "$cross_compiling" = yes; then :
16214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16215 $as_echo "cross-compiling" >&6; }
16216 else
16217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16218 /* end confdefs.h. */
16219 int main() { return 0; }
16220 _ACEOF
16221 if ac_fn_c_try_run "$LINENO"; then :
16222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16223 $as_echo "ok" >&6; }
16224 else
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16226 $as_echo "failed" >&6; }
16227 as_fn_error $? "
16228 Could not execute a simple test program. This may be a problem
16229 related to locating shared libraries. Check the file 'config.log'
16230 for the exact reason." "$LINENO" 5
16232 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16233 conftest.$ac_objext conftest.beam conftest.$ac_ext
16237 # --------------------
16238 # Run tests below here
16239 # --------------------
16242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16243 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16244 if ${pgac_cv_type_long_int_64+:} false; then :
16245 $as_echo_n "(cached) " >&6
16246 else
16247 if test "$cross_compiling" = yes; then :
16248 # If cross-compiling, check the size reported by the compiler and
16249 # trust that the arithmetic works.
16250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16251 /* end confdefs.h. */
16254 main ()
16256 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16257 test_array [0] = 0;
16258 return test_array [0];
16261 return 0;
16263 _ACEOF
16264 if ac_fn_c_try_compile "$LINENO"; then :
16265 pgac_cv_type_long_int_64=yes
16266 else
16267 pgac_cv_type_long_int_64=no
16269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16270 else
16271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16272 /* end confdefs.h. */
16273 typedef long int ac_int64;
16276 * These are globals to discourage the compiler from folding all the
16277 * arithmetic tests down to compile-time constants.
16279 ac_int64 a = 20000001;
16280 ac_int64 b = 40000005;
16282 int does_int64_work()
16284 ac_int64 c,d;
16286 if (sizeof(ac_int64) != 8)
16287 return 0; /* definitely not the right size */
16289 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16290 c = a * b;
16291 d = (c + b) / b;
16292 if (d != a+1)
16293 return 0;
16294 return 1;
16298 main() {
16299 return (! does_int64_work());
16301 _ACEOF
16302 if ac_fn_c_try_run "$LINENO"; then :
16303 pgac_cv_type_long_int_64=yes
16304 else
16305 pgac_cv_type_long_int_64=no
16307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16308 conftest.$ac_objext conftest.beam conftest.$ac_ext
16312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16313 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16315 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16316 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16318 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16323 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16324 pg_int64_type="long int"
16325 else
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16327 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16328 if ${pgac_cv_type_long_long_int_64+:} false; then :
16329 $as_echo_n "(cached) " >&6
16330 else
16331 if test "$cross_compiling" = yes; then :
16332 # If cross-compiling, check the size reported by the compiler and
16333 # trust that the arithmetic works.
16334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16335 /* end confdefs.h. */
16338 main ()
16340 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16341 test_array [0] = 0;
16342 return test_array [0];
16345 return 0;
16347 _ACEOF
16348 if ac_fn_c_try_compile "$LINENO"; then :
16349 pgac_cv_type_long_long_int_64=yes
16350 else
16351 pgac_cv_type_long_long_int_64=no
16353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16354 else
16355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16356 /* end confdefs.h. */
16357 typedef long long int ac_int64;
16360 * These are globals to discourage the compiler from folding all the
16361 * arithmetic tests down to compile-time constants.
16363 ac_int64 a = 20000001;
16364 ac_int64 b = 40000005;
16366 int does_int64_work()
16368 ac_int64 c,d;
16370 if (sizeof(ac_int64) != 8)
16371 return 0; /* definitely not the right size */
16373 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16374 c = a * b;
16375 d = (c + b) / b;
16376 if (d != a+1)
16377 return 0;
16378 return 1;
16382 main() {
16383 return (! does_int64_work());
16385 _ACEOF
16386 if ac_fn_c_try_run "$LINENO"; then :
16387 pgac_cv_type_long_long_int_64=yes
16388 else
16389 pgac_cv_type_long_long_int_64=no
16391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16392 conftest.$ac_objext conftest.beam conftest.$ac_ext
16396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16397 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16399 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16400 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16402 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16406 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16407 pg_int64_type="long long int"
16408 else
16409 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16414 cat >>confdefs.h <<_ACEOF
16415 #define PG_INT64_TYPE $pg_int64_type
16416 _ACEOF
16419 # Select the printf length modifier that goes with that, too.
16420 if test x"$pg_int64_type" = x"long long int" ; then
16421 INT64_MODIFIER='"ll"'
16422 else
16423 INT64_MODIFIER='"l"'
16427 cat >>confdefs.h <<_ACEOF
16428 #define INT64_MODIFIER $INT64_MODIFIER
16429 _ACEOF
16432 # has to be down here, rather than with the other builtins, because
16433 # the test uses PG_INT64_TYPE.
16434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16435 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16436 if ${pgac_cv__builtin_op_overflow+:} false; then :
16437 $as_echo_n "(cached) " >&6
16438 else
16439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16440 /* end confdefs.h. */
16442 PG_INT64_TYPE a = 1;
16443 PG_INT64_TYPE b = 1;
16444 PG_INT64_TYPE result;
16445 int oflo;
16448 main ()
16450 oflo = __builtin_mul_overflow(a, b, &result);
16452 return 0;
16454 _ACEOF
16455 if ac_fn_c_try_link "$LINENO"; then :
16456 pgac_cv__builtin_op_overflow=yes
16457 else
16458 pgac_cv__builtin_op_overflow=no
16460 rm -f core conftest.err conftest.$ac_objext \
16461 conftest$ac_exeext conftest.$ac_ext
16463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16464 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16465 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16467 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16471 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16472 # The cast to long int works around a bug in the HP C Compiler
16473 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16474 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16475 # This bug is HP SR number 8606223364.
16476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16477 $as_echo_n "checking size of void *... " >&6; }
16478 if ${ac_cv_sizeof_void_p+:} false; then :
16479 $as_echo_n "(cached) " >&6
16480 else
16481 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16483 else
16484 if test "$ac_cv_type_void_p" = yes; then
16485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16486 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16487 as_fn_error 77 "cannot compute sizeof (void *)
16488 See \`config.log' for more details" "$LINENO" 5; }
16489 else
16490 ac_cv_sizeof_void_p=0
16495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16496 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16500 cat >>confdefs.h <<_ACEOF
16501 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16502 _ACEOF
16505 # The cast to long int works around a bug in the HP C Compiler
16506 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16507 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16508 # This bug is HP SR number 8606223364.
16509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16510 $as_echo_n "checking size of size_t... " >&6; }
16511 if ${ac_cv_sizeof_size_t+:} false; then :
16512 $as_echo_n "(cached) " >&6
16513 else
16514 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16516 else
16517 if test "$ac_cv_type_size_t" = yes; then
16518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16519 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16520 as_fn_error 77 "cannot compute sizeof (size_t)
16521 See \`config.log' for more details" "$LINENO" 5; }
16522 else
16523 ac_cv_sizeof_size_t=0
16528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16529 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16533 cat >>confdefs.h <<_ACEOF
16534 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16535 _ACEOF
16538 # The cast to long int works around a bug in the HP C Compiler
16539 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16540 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16541 # This bug is HP SR number 8606223364.
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16543 $as_echo_n "checking size of long... " >&6; }
16544 if ${ac_cv_sizeof_long+:} false; then :
16545 $as_echo_n "(cached) " >&6
16546 else
16547 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16549 else
16550 if test "$ac_cv_type_long" = yes; then
16551 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16552 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16553 as_fn_error 77 "cannot compute sizeof (long)
16554 See \`config.log' for more details" "$LINENO" 5; }
16555 else
16556 ac_cv_sizeof_long=0
16561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16562 $as_echo "$ac_cv_sizeof_long" >&6; }
16566 cat >>confdefs.h <<_ACEOF
16567 #define SIZEOF_LONG $ac_cv_sizeof_long
16568 _ACEOF
16572 # Determine memory alignment requirements for the basic C data types.
16574 # The cast to long int works around a bug in the HP C Compiler,
16575 # see AC_CHECK_SIZEOF for more information.
16576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16577 $as_echo_n "checking alignment of short... " >&6; }
16578 if ${ac_cv_alignof_short+:} false; then :
16579 $as_echo_n "(cached) " >&6
16580 else
16581 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
16582 #ifndef offsetof
16583 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16584 #endif
16585 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16587 else
16588 if test "$ac_cv_type_short" = yes; then
16589 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16590 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16591 as_fn_error 77 "cannot compute alignment of short
16592 See \`config.log' for more details" "$LINENO" 5; }
16593 else
16594 ac_cv_alignof_short=0
16599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16600 $as_echo "$ac_cv_alignof_short" >&6; }
16604 cat >>confdefs.h <<_ACEOF
16605 #define ALIGNOF_SHORT $ac_cv_alignof_short
16606 _ACEOF
16609 # The cast to long int works around a bug in the HP C Compiler,
16610 # see AC_CHECK_SIZEOF for more information.
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16612 $as_echo_n "checking alignment of int... " >&6; }
16613 if ${ac_cv_alignof_int+:} false; then :
16614 $as_echo_n "(cached) " >&6
16615 else
16616 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
16617 #ifndef offsetof
16618 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16619 #endif
16620 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16622 else
16623 if test "$ac_cv_type_int" = yes; then
16624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16625 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16626 as_fn_error 77 "cannot compute alignment of int
16627 See \`config.log' for more details" "$LINENO" 5; }
16628 else
16629 ac_cv_alignof_int=0
16634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16635 $as_echo "$ac_cv_alignof_int" >&6; }
16639 cat >>confdefs.h <<_ACEOF
16640 #define ALIGNOF_INT $ac_cv_alignof_int
16641 _ACEOF
16644 # The cast to long int works around a bug in the HP C Compiler,
16645 # see AC_CHECK_SIZEOF for more information.
16646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16647 $as_echo_n "checking alignment of long... " >&6; }
16648 if ${ac_cv_alignof_long+:} false; then :
16649 $as_echo_n "(cached) " >&6
16650 else
16651 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
16652 #ifndef offsetof
16653 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16654 #endif
16655 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16657 else
16658 if test "$ac_cv_type_long" = yes; then
16659 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16660 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16661 as_fn_error 77 "cannot compute alignment of long
16662 See \`config.log' for more details" "$LINENO" 5; }
16663 else
16664 ac_cv_alignof_long=0
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16670 $as_echo "$ac_cv_alignof_long" >&6; }
16674 cat >>confdefs.h <<_ACEOF
16675 #define ALIGNOF_LONG $ac_cv_alignof_long
16676 _ACEOF
16679 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16680 # The cast to long int works around a bug in the HP C Compiler,
16681 # see AC_CHECK_SIZEOF for more information.
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16683 $as_echo_n "checking alignment of long long int... " >&6; }
16684 if ${ac_cv_alignof_long_long_int+:} false; then :
16685 $as_echo_n "(cached) " >&6
16686 else
16687 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
16688 #ifndef offsetof
16689 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16690 #endif
16691 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16693 else
16694 if test "$ac_cv_type_long_long_int" = yes; then
16695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16696 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16697 as_fn_error 77 "cannot compute alignment of long long int
16698 See \`config.log' for more details" "$LINENO" 5; }
16699 else
16700 ac_cv_alignof_long_long_int=0
16705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16706 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16710 cat >>confdefs.h <<_ACEOF
16711 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16712 _ACEOF
16716 # The cast to long int works around a bug in the HP C Compiler,
16717 # see AC_CHECK_SIZEOF for more information.
16718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16719 $as_echo_n "checking alignment of double... " >&6; }
16720 if ${ac_cv_alignof_double+:} false; then :
16721 $as_echo_n "(cached) " >&6
16722 else
16723 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
16724 #ifndef offsetof
16725 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16726 #endif
16727 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16729 else
16730 if test "$ac_cv_type_double" = yes; then
16731 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16732 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16733 as_fn_error 77 "cannot compute alignment of double
16734 See \`config.log' for more details" "$LINENO" 5; }
16735 else
16736 ac_cv_alignof_double=0
16741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16742 $as_echo "$ac_cv_alignof_double" >&6; }
16746 cat >>confdefs.h <<_ACEOF
16747 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16748 _ACEOF
16752 # Compute maximum alignment of any basic type.
16754 # We require 'double' to have the strictest alignment among the basic types,
16755 # because otherwise the C ABI might impose 8-byte alignment on some of the
16756 # other C types that correspond to TYPALIGN_DOUBLE SQL types. That could
16757 # cause a mismatch between the tuple layout and the C struct layout of a
16758 # catalog tuple. We used to carefully order catalog columns such that any
16759 # fixed-width, attalign=4 columns were at offsets divisible by 8 regardless
16760 # of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms
16761 # where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF.
16763 # We assume without checking that long's alignment is at least as strong as
16764 # char, short, or int. Note that we intentionally do not consider any types
16765 # wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
16766 # much of a penalty for disk and memory space.
16768 MAX_ALIGNOF=$ac_cv_alignof_double
16770 if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
16771 as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
16773 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $ac_cv_alignof_long_long_int -gt $MAX_ALIGNOF ; then
16774 as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
16777 cat >>confdefs.h <<_ACEOF
16778 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16779 _ACEOF
16783 # Some compilers offer a 128-bit integer scalar type.
16784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16785 $as_echo_n "checking for __int128... " >&6; }
16786 if ${pgac_cv__128bit_int+:} false; then :
16787 $as_echo_n "(cached) " >&6
16788 else
16789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16790 /* end confdefs.h. */
16793 * We don't actually run this test, just link it to verify that any support
16794 * functions needed for __int128 are present.
16796 * These are globals to discourage the compiler from folding all the
16797 * arithmetic tests down to compile-time constants. We do not have
16798 * convenient support for 128bit literals at this point...
16800 __int128 a = 48828125;
16801 __int128 b = 97656250;
16804 main ()
16807 __int128 c,d;
16808 a = (a << 12) + 1; /* 200000000001 */
16809 b = (b << 12) + 5; /* 400000000005 */
16810 /* try the most relevant arithmetic ops */
16811 c = a * b;
16812 d = (c + b) / b;
16813 /* must use the results, else compiler may optimize arithmetic away */
16814 if (d != a+1)
16815 return 1;
16818 return 0;
16820 _ACEOF
16821 if ac_fn_c_try_link "$LINENO"; then :
16822 pgac_cv__128bit_int=yes
16823 else
16824 pgac_cv__128bit_int=no
16826 rm -f core conftest.err conftest.$ac_objext \
16827 conftest$ac_exeext conftest.$ac_ext
16829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16830 $as_echo "$pgac_cv__128bit_int" >&6; }
16831 if test x"$pgac_cv__128bit_int" = xyes ; then
16832 # Use of non-default alignment with __int128 tickles bugs in some compilers.
16833 # If not cross-compiling, we can test for bugs and disable use of __int128
16834 # with buggy compilers. If cross-compiling, hope for the best.
16835 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16837 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16838 if ${pgac_cv__128bit_int_bug+:} false; then :
16839 $as_echo_n "(cached) " >&6
16840 else
16841 if test "$cross_compiling" = yes; then :
16842 pgac_cv__128bit_int_bug="assuming ok"
16843 else
16844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16845 /* end confdefs.h. */
16847 /* This must match the corresponding code in c.h: */
16848 #if defined(__GNUC__) || defined(__SUNPRO_C)
16849 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16850 #elif defined(_MSC_VER)
16851 #define pg_attribute_aligned(a) __declspec(align(a))
16852 #endif
16853 typedef __int128 int128a
16854 #if defined(pg_attribute_aligned)
16855 pg_attribute_aligned(8)
16856 #endif
16858 int128a holder;
16859 void pass_by_val(void *buffer, int128a par) { holder = par; }
16862 main ()
16865 long int i64 = 97656225L << 12;
16866 int128a q;
16867 pass_by_val(main, (int128a) i64);
16868 q = (int128a) i64;
16869 if (q != holder)
16870 return 1;
16873 return 0;
16875 _ACEOF
16876 if ac_fn_c_try_run "$LINENO"; then :
16877 pgac_cv__128bit_int_bug=ok
16878 else
16879 pgac_cv__128bit_int_bug=broken
16881 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16882 conftest.$ac_objext conftest.beam conftest.$ac_ext
16886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16887 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16888 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
16890 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
16892 # The cast to long int works around a bug in the HP C Compiler,
16893 # see AC_CHECK_SIZEOF for more information.
16894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
16895 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
16896 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
16897 $as_echo_n "(cached) " >&6
16898 else
16899 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
16900 #ifndef offsetof
16901 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16902 #endif
16903 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
16905 else
16906 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
16907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16908 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16909 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
16910 See \`config.log' for more details" "$LINENO" 5; }
16911 else
16912 ac_cv_alignof_PG_INT128_TYPE=0
16917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
16918 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
16922 cat >>confdefs.h <<_ACEOF
16923 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
16924 _ACEOF
16930 # Check for various atomic operations now that we have checked how to declare
16931 # 64bit integers.
16932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
16933 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
16934 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
16935 $as_echo_n "(cached) " >&6
16936 else
16937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16938 /* end confdefs.h. */
16941 main ()
16943 char lock = 0;
16944 __sync_lock_test_and_set(&lock, 1);
16945 __sync_lock_release(&lock);
16947 return 0;
16949 _ACEOF
16950 if ac_fn_c_try_link "$LINENO"; then :
16951 pgac_cv_gcc_sync_char_tas="yes"
16952 else
16953 pgac_cv_gcc_sync_char_tas="no"
16955 rm -f core conftest.err conftest.$ac_objext \
16956 conftest$ac_exeext conftest.$ac_ext
16958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
16959 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
16960 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
16962 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
16965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
16966 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
16967 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
16968 $as_echo_n "(cached) " >&6
16969 else
16970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16971 /* end confdefs.h. */
16974 main ()
16976 int lock = 0;
16977 __sync_lock_test_and_set(&lock, 1);
16978 __sync_lock_release(&lock);
16980 return 0;
16982 _ACEOF
16983 if ac_fn_c_try_link "$LINENO"; then :
16984 pgac_cv_gcc_sync_int32_tas="yes"
16985 else
16986 pgac_cv_gcc_sync_int32_tas="no"
16988 rm -f core conftest.err conftest.$ac_objext \
16989 conftest$ac_exeext conftest.$ac_ext
16991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
16992 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
16993 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
16995 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
16998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
16999 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17000 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17001 $as_echo_n "(cached) " >&6
17002 else
17003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17004 /* end confdefs.h. */
17007 main ()
17009 int val = 0;
17010 __sync_val_compare_and_swap(&val, 0, 37);
17012 return 0;
17014 _ACEOF
17015 if ac_fn_c_try_link "$LINENO"; then :
17016 pgac_cv_gcc_sync_int32_cas="yes"
17017 else
17018 pgac_cv_gcc_sync_int32_cas="no"
17020 rm -f core conftest.err conftest.$ac_objext \
17021 conftest$ac_exeext conftest.$ac_ext
17023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17024 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17025 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17027 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17031 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17032 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17033 $as_echo_n "(cached) " >&6
17034 else
17035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17036 /* end confdefs.h. */
17039 main ()
17041 PG_INT64_TYPE lock = 0;
17042 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17044 return 0;
17046 _ACEOF
17047 if ac_fn_c_try_link "$LINENO"; then :
17048 pgac_cv_gcc_sync_int64_cas="yes"
17049 else
17050 pgac_cv_gcc_sync_int64_cas="no"
17052 rm -f core conftest.err conftest.$ac_objext \
17053 conftest$ac_exeext conftest.$ac_ext
17055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17056 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17057 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17059 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17063 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17064 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17065 $as_echo_n "(cached) " >&6
17066 else
17067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17068 /* end confdefs.h. */
17071 main ()
17073 int val = 0;
17074 int expect = 0;
17075 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17077 return 0;
17079 _ACEOF
17080 if ac_fn_c_try_link "$LINENO"; then :
17081 pgac_cv_gcc_atomic_int32_cas="yes"
17082 else
17083 pgac_cv_gcc_atomic_int32_cas="no"
17085 rm -f core conftest.err conftest.$ac_objext \
17086 conftest$ac_exeext conftest.$ac_ext
17088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17089 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17090 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17092 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17096 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17097 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17098 $as_echo_n "(cached) " >&6
17099 else
17100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17101 /* end confdefs.h. */
17104 main ()
17106 PG_INT64_TYPE val = 0;
17107 PG_INT64_TYPE expect = 0;
17108 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17110 return 0;
17112 _ACEOF
17113 if ac_fn_c_try_link "$LINENO"; then :
17114 pgac_cv_gcc_atomic_int64_cas="yes"
17115 else
17116 pgac_cv_gcc_atomic_int64_cas="no"
17118 rm -f core conftest.err conftest.$ac_objext \
17119 conftest$ac_exeext conftest.$ac_ext
17121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17122 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17123 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17125 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17130 # Check for x86 cpuid instruction
17131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17132 $as_echo_n "checking for __get_cpuid... " >&6; }
17133 if ${pgac_cv__get_cpuid+:} false; then :
17134 $as_echo_n "(cached) " >&6
17135 else
17136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17137 /* end confdefs.h. */
17138 #include <cpuid.h>
17140 main ()
17142 unsigned int exx[4] = {0, 0, 0, 0};
17143 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17146 return 0;
17148 _ACEOF
17149 if ac_fn_c_try_link "$LINENO"; then :
17150 pgac_cv__get_cpuid="yes"
17151 else
17152 pgac_cv__get_cpuid="no"
17154 rm -f core conftest.err conftest.$ac_objext \
17155 conftest$ac_exeext conftest.$ac_ext
17157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17158 $as_echo "$pgac_cv__get_cpuid" >&6; }
17159 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17161 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid_count" >&5
17166 $as_echo_n "checking for __get_cpuid_count... " >&6; }
17167 if ${pgac_cv__get_cpuid_count+:} false; then :
17168 $as_echo_n "(cached) " >&6
17169 else
17170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17171 /* end confdefs.h. */
17172 #include <cpuid.h>
17174 main ()
17176 unsigned int exx[4] = {0, 0, 0, 0};
17177 __get_cpuid_count(7, 0, &exx[0], &exx[1], &exx[2], &exx[3]);
17180 return 0;
17182 _ACEOF
17183 if ac_fn_c_try_link "$LINENO"; then :
17184 pgac_cv__get_cpuid_count="yes"
17185 else
17186 pgac_cv__get_cpuid_count="no"
17188 rm -f core conftest.err conftest.$ac_objext \
17189 conftest$ac_exeext conftest.$ac_ext
17191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid_count" >&5
17192 $as_echo "$pgac_cv__get_cpuid_count" >&6; }
17193 if test x"$pgac_cv__get_cpuid_count" = x"yes"; then
17195 $as_echo "#define HAVE__GET_CPUID_COUNT 1" >>confdefs.h
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17200 $as_echo_n "checking for __cpuid... " >&6; }
17201 if ${pgac_cv__cpuid+:} false; then :
17202 $as_echo_n "(cached) " >&6
17203 else
17204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17205 /* end confdefs.h. */
17206 #include <intrin.h>
17208 main ()
17210 unsigned int exx[4] = {0, 0, 0, 0};
17211 __get_cpuid(exx[0], 1);
17214 return 0;
17216 _ACEOF
17217 if ac_fn_c_try_link "$LINENO"; then :
17218 pgac_cv__cpuid="yes"
17219 else
17220 pgac_cv__cpuid="no"
17222 rm -f core conftest.err conftest.$ac_objext \
17223 conftest$ac_exeext conftest.$ac_ext
17225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17226 $as_echo "$pgac_cv__cpuid" >&6; }
17227 if test x"$pgac_cv__cpuid" = x"yes"; then
17229 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuidex" >&5
17234 $as_echo_n "checking for __cpuidex... " >&6; }
17235 if ${pgac_cv__cpuidex+:} false; then :
17236 $as_echo_n "(cached) " >&6
17237 else
17238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17239 /* end confdefs.h. */
17240 #include <intrin.h>
17242 main ()
17244 unsigned int exx[4] = {0, 0, 0, 0};
17245 __get_cpuidex(exx[0], 7, 0);
17248 return 0;
17250 _ACEOF
17251 if ac_fn_c_try_link "$LINENO"; then :
17252 pgac_cv__cpuidex="yes"
17253 else
17254 pgac_cv__cpuidex="no"
17256 rm -f core conftest.err conftest.$ac_objext \
17257 conftest$ac_exeext conftest.$ac_ext
17259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuidex" >&5
17260 $as_echo "$pgac_cv__cpuidex" >&6; }
17261 if test x"$pgac_cv__cpuidex" = x"yes"; then
17263 $as_echo "#define HAVE__CPUIDEX 1" >>confdefs.h
17267 # Check for XSAVE intrinsics
17269 CFLAGS_XSAVE=""
17270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xgetbv with CFLAGS=" >&5
17271 $as_echo_n "checking for _xgetbv with CFLAGS=... " >&6; }
17272 if ${pgac_cv_xsave_intrinsics_+:} false; then :
17273 $as_echo_n "(cached) " >&6
17274 else
17275 pgac_save_CFLAGS=$CFLAGS
17276 CFLAGS="$pgac_save_CFLAGS "
17277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17278 /* end confdefs.h. */
17279 #include <immintrin.h>
17281 main ()
17283 return _xgetbv(0) & 0xe0;
17285 return 0;
17287 _ACEOF
17288 if ac_fn_c_try_link "$LINENO"; then :
17289 pgac_cv_xsave_intrinsics_=yes
17290 else
17291 pgac_cv_xsave_intrinsics_=no
17293 rm -f core conftest.err conftest.$ac_objext \
17294 conftest$ac_exeext conftest.$ac_ext
17295 CFLAGS="$pgac_save_CFLAGS"
17297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_xsave_intrinsics_" >&5
17298 $as_echo "$pgac_cv_xsave_intrinsics_" >&6; }
17299 if test x"$pgac_cv_xsave_intrinsics_" = x"yes"; then
17300 CFLAGS_XSAVE=""
17301 pgac_xsave_intrinsics=yes
17304 if test x"$pgac_xsave_intrinsics" != x"yes"; then
17305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xgetbv with CFLAGS=-mxsave" >&5
17306 $as_echo_n "checking for _xgetbv with CFLAGS=-mxsave... " >&6; }
17307 if ${pgac_cv_xsave_intrinsics__mxsave+:} false; then :
17308 $as_echo_n "(cached) " >&6
17309 else
17310 pgac_save_CFLAGS=$CFLAGS
17311 CFLAGS="$pgac_save_CFLAGS -mxsave"
17312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17313 /* end confdefs.h. */
17314 #include <immintrin.h>
17316 main ()
17318 return _xgetbv(0) & 0xe0;
17320 return 0;
17322 _ACEOF
17323 if ac_fn_c_try_link "$LINENO"; then :
17324 pgac_cv_xsave_intrinsics__mxsave=yes
17325 else
17326 pgac_cv_xsave_intrinsics__mxsave=no
17328 rm -f core conftest.err conftest.$ac_objext \
17329 conftest$ac_exeext conftest.$ac_ext
17330 CFLAGS="$pgac_save_CFLAGS"
17332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_xsave_intrinsics__mxsave" >&5
17333 $as_echo "$pgac_cv_xsave_intrinsics__mxsave" >&6; }
17334 if test x"$pgac_cv_xsave_intrinsics__mxsave" = x"yes"; then
17335 CFLAGS_XSAVE="-mxsave"
17336 pgac_xsave_intrinsics=yes
17340 if test x"$pgac_xsave_intrinsics" = x"yes"; then
17342 $as_echo "#define HAVE_XSAVE_INTRINSICS 1" >>confdefs.h
17347 # Check for AVX-512 popcount intrinsics
17349 CFLAGS_POPCNT=""
17350 PG_POPCNT_OBJS=""
17351 if test x"$host_cpu" = x"x86_64"; then
17352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_popcnt_epi64 with CFLAGS=" >&5
17353 $as_echo_n "checking for _mm512_popcnt_epi64 with CFLAGS=... " >&6; }
17354 if ${pgac_cv_avx512_popcnt_intrinsics_+:} false; then :
17355 $as_echo_n "(cached) " >&6
17356 else
17357 pgac_save_CFLAGS=$CFLAGS
17358 CFLAGS="$pgac_save_CFLAGS "
17359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17360 /* end confdefs.h. */
17361 #include <immintrin.h>
17363 main ()
17365 const char buf[sizeof(__m512i)];
17366 PG_INT64_TYPE popcnt = 0;
17367 __m512i accum = _mm512_setzero_si512();
17368 const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
17369 const __m512i cnt = _mm512_popcnt_epi64(val);
17370 accum = _mm512_add_epi64(accum, cnt);
17371 popcnt = _mm512_reduce_add_epi64(accum);
17372 /* return computed value, to prevent the above being optimized away */
17373 return popcnt == 0;
17375 return 0;
17377 _ACEOF
17378 if ac_fn_c_try_link "$LINENO"; then :
17379 pgac_cv_avx512_popcnt_intrinsics_=yes
17380 else
17381 pgac_cv_avx512_popcnt_intrinsics_=no
17383 rm -f core conftest.err conftest.$ac_objext \
17384 conftest$ac_exeext conftest.$ac_ext
17385 CFLAGS="$pgac_save_CFLAGS"
17387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_popcnt_intrinsics_" >&5
17388 $as_echo "$pgac_cv_avx512_popcnt_intrinsics_" >&6; }
17389 if test x"$pgac_cv_avx512_popcnt_intrinsics_" = x"yes"; then
17390 CFLAGS_POPCNT=""
17391 pgac_avx512_popcnt_intrinsics=yes
17394 if test x"$pgac_avx512_popcnt_intrinsics" != x"yes"; then
17395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_popcnt_epi64 with CFLAGS=-mavx512vpopcntdq -mavx512bw" >&5
17396 $as_echo_n "checking for _mm512_popcnt_epi64 with CFLAGS=-mavx512vpopcntdq -mavx512bw... " >&6; }
17397 if ${pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw+:} false; then :
17398 $as_echo_n "(cached) " >&6
17399 else
17400 pgac_save_CFLAGS=$CFLAGS
17401 CFLAGS="$pgac_save_CFLAGS -mavx512vpopcntdq -mavx512bw"
17402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17403 /* end confdefs.h. */
17404 #include <immintrin.h>
17406 main ()
17408 const char buf[sizeof(__m512i)];
17409 PG_INT64_TYPE popcnt = 0;
17410 __m512i accum = _mm512_setzero_si512();
17411 const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
17412 const __m512i cnt = _mm512_popcnt_epi64(val);
17413 accum = _mm512_add_epi64(accum, cnt);
17414 popcnt = _mm512_reduce_add_epi64(accum);
17415 /* return computed value, to prevent the above being optimized away */
17416 return popcnt == 0;
17418 return 0;
17420 _ACEOF
17421 if ac_fn_c_try_link "$LINENO"; then :
17422 pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw=yes
17423 else
17424 pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw=no
17426 rm -f core conftest.err conftest.$ac_objext \
17427 conftest$ac_exeext conftest.$ac_ext
17428 CFLAGS="$pgac_save_CFLAGS"
17430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw" >&5
17431 $as_echo "$pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw" >&6; }
17432 if test x"$pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw" = x"yes"; then
17433 CFLAGS_POPCNT="-mavx512vpopcntdq -mavx512bw"
17434 pgac_avx512_popcnt_intrinsics=yes
17438 if test x"$pgac_avx512_popcnt_intrinsics" = x"yes"; then
17439 PG_POPCNT_OBJS="pg_popcount_avx512.o pg_popcount_avx512_choose.o"
17441 $as_echo "#define USE_AVX512_POPCNT_WITH_RUNTIME_CHECK 1" >>confdefs.h
17448 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17450 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17451 # with the default compiler flags. If not, check if adding the -msse4.2
17452 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17454 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17455 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17456 $as_echo_n "(cached) " >&6
17457 else
17458 pgac_save_CFLAGS=$CFLAGS
17459 CFLAGS="$pgac_save_CFLAGS "
17460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17461 /* end confdefs.h. */
17462 #include <nmmintrin.h>
17464 main ()
17466 unsigned int crc = 0;
17467 crc = _mm_crc32_u8(crc, 0);
17468 crc = _mm_crc32_u32(crc, 0);
17469 /* return computed value, to prevent the above being optimized away */
17470 return crc == 0;
17472 return 0;
17474 _ACEOF
17475 if ac_fn_c_try_link "$LINENO"; then :
17476 pgac_cv_sse42_crc32_intrinsics_=yes
17477 else
17478 pgac_cv_sse42_crc32_intrinsics_=no
17480 rm -f core conftest.err conftest.$ac_objext \
17481 conftest$ac_exeext conftest.$ac_ext
17482 CFLAGS="$pgac_save_CFLAGS"
17484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17485 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17486 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17487 CFLAGS_CRC=""
17488 pgac_sse42_crc32_intrinsics=yes
17491 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17493 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17494 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17495 $as_echo_n "(cached) " >&6
17496 else
17497 pgac_save_CFLAGS=$CFLAGS
17498 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17500 /* end confdefs.h. */
17501 #include <nmmintrin.h>
17503 main ()
17505 unsigned int crc = 0;
17506 crc = _mm_crc32_u8(crc, 0);
17507 crc = _mm_crc32_u32(crc, 0);
17508 /* return computed value, to prevent the above being optimized away */
17509 return crc == 0;
17511 return 0;
17513 _ACEOF
17514 if ac_fn_c_try_link "$LINENO"; then :
17515 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17516 else
17517 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17519 rm -f core conftest.err conftest.$ac_objext \
17520 conftest$ac_exeext conftest.$ac_ext
17521 CFLAGS="$pgac_save_CFLAGS"
17523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17524 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17525 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17526 CFLAGS_CRC="-msse4.2"
17527 pgac_sse42_crc32_intrinsics=yes
17532 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17533 # define __SSE4_2__ in that case.
17534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17535 /* end confdefs.h. */
17538 main ()
17541 #ifndef __SSE4_2__
17542 #error __SSE4_2__ not defined
17543 #endif
17546 return 0;
17548 _ACEOF
17549 if ac_fn_c_try_compile "$LINENO"; then :
17550 SSE4_2_TARGETED=1
17552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17554 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17556 # First check if __crc32c* intrinsics can be used with the default compiler
17557 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17558 # CFLAGS_CRC is set if the extra flag is required.
17559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17560 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17561 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17562 $as_echo_n "(cached) " >&6
17563 else
17564 pgac_save_CFLAGS=$CFLAGS
17565 CFLAGS="$pgac_save_CFLAGS "
17566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17567 /* end confdefs.h. */
17568 #include <arm_acle.h>
17570 main ()
17572 unsigned int crc = 0;
17573 crc = __crc32cb(crc, 0);
17574 crc = __crc32ch(crc, 0);
17575 crc = __crc32cw(crc, 0);
17576 crc = __crc32cd(crc, 0);
17577 /* return computed value, to prevent the above being optimized away */
17578 return crc == 0;
17580 return 0;
17582 _ACEOF
17583 if ac_fn_c_try_link "$LINENO"; then :
17584 pgac_cv_armv8_crc32c_intrinsics_=yes
17585 else
17586 pgac_cv_armv8_crc32c_intrinsics_=no
17588 rm -f core conftest.err conftest.$ac_objext \
17589 conftest$ac_exeext conftest.$ac_ext
17590 CFLAGS="$pgac_save_CFLAGS"
17592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17593 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17594 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17595 CFLAGS_CRC=""
17596 pgac_armv8_crc32c_intrinsics=yes
17599 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17601 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17602 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17603 $as_echo_n "(cached) " >&6
17604 else
17605 pgac_save_CFLAGS=$CFLAGS
17606 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17608 /* end confdefs.h. */
17609 #include <arm_acle.h>
17611 main ()
17613 unsigned int crc = 0;
17614 crc = __crc32cb(crc, 0);
17615 crc = __crc32ch(crc, 0);
17616 crc = __crc32cw(crc, 0);
17617 crc = __crc32cd(crc, 0);
17618 /* return computed value, to prevent the above being optimized away */
17619 return crc == 0;
17621 return 0;
17623 _ACEOF
17624 if ac_fn_c_try_link "$LINENO"; then :
17625 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17626 else
17627 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17629 rm -f core conftest.err conftest.$ac_objext \
17630 conftest$ac_exeext conftest.$ac_ext
17631 CFLAGS="$pgac_save_CFLAGS"
17633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17634 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17635 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17636 CFLAGS_CRC="-march=armv8-a+crc"
17637 pgac_armv8_crc32c_intrinsics=yes
17642 # Check for LoongArch CRC intrinsics to do CRC calculations.
17644 # Check if __builtin_loongarch_crcc_* intrinsics can be used
17645 # with the default compiler flags.
17646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_loongarch_crcc_w_b_w, __builtin_loongarch_crcc_w_h_w, __builtin_loongarch_crcc_w_w_w and __builtin_loongarch_crcc_w_d_w" >&5
17647 $as_echo_n "checking for __builtin_loongarch_crcc_w_b_w, __builtin_loongarch_crcc_w_h_w, __builtin_loongarch_crcc_w_w_w and __builtin_loongarch_crcc_w_d_w... " >&6; }
17648 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
17649 $as_echo_n "(cached) " >&6
17650 else
17651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17652 /* end confdefs.h. */
17655 main ()
17657 unsigned int crc = 0;
17658 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
17659 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
17660 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
17661 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
17662 /* return computed value, to prevent the above being optimized away */
17663 return crc == 0;
17665 return 0;
17667 _ACEOF
17668 if ac_fn_c_try_link "$LINENO"; then :
17669 pgac_cv_loongarch_crc32c_intrinsics=yes
17670 else
17671 pgac_cv_loongarch_crc32c_intrinsics=no
17673 rm -f core conftest.err conftest.$ac_objext \
17674 conftest$ac_exeext conftest.$ac_ext
17676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_loongarch_crc32c_intrinsics" >&5
17677 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
17678 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
17679 pgac_loongarch_crc32c_intrinsics=yes
17685 # Select CRC-32C implementation.
17687 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17688 # use the special CRC instructions for calculating CRC-32C. If we're not
17689 # targeting such a processor, but we can nevertheless produce code that uses
17690 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17691 # implementations and select which one to use at runtime, depending on whether
17692 # SSE 4.2 is supported by the processor we're running on.
17694 # Similarly, if we are targeting an ARM processor that has the CRC
17695 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17696 # we're not targeting such a processor, but can nevertheless produce code that
17697 # uses the CRC instructions, compile both, and select at runtime.
17699 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
17700 # in the template or configure command line.
17702 # If we are targeting a LoongArch processor, CRC instructions are
17703 # always available (at least on 64 bit), so no runtime check is needed.
17704 if test x"$USE_SLICING_BY_8_CRC32C" = x"" && test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_ARMV8_CRC32C" = x"" && test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_LOONGARCH_CRC32C" = x""; then
17705 # Use Intel SSE 4.2 if available.
17706 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17707 USE_SSE42_CRC32C=1
17708 else
17709 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17710 # the runtime check.
17711 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
17712 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17713 else
17714 # Use ARM CRC Extension if available.
17715 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
17716 USE_ARMV8_CRC32C=1
17717 else
17718 # ARM CRC Extension, with runtime check?
17719 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17720 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17721 else
17722 # LoongArch CRCC instructions.
17723 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
17724 USE_LOONGARCH_CRC32C=1
17725 else
17726 # fall back to slicing-by-8 algorithm, which doesn't require any
17727 # special CPU support.
17728 USE_SLICING_BY_8_CRC32C=1
17736 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17738 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17739 if test x"$USE_SSE42_CRC32C" = x"1"; then
17741 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17743 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17745 $as_echo "SSE 4.2" >&6; }
17746 else
17747 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17749 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17751 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17753 $as_echo "SSE 4.2 with runtime check" >&6; }
17754 else
17755 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17757 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17759 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17761 $as_echo "ARMv8 CRC instructions" >&6; }
17762 else
17763 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17765 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17767 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17769 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17770 else
17771 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
17773 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
17775 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
17776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
17777 $as_echo "LoongArch CRCC instructions" >&6; }
17778 else
17780 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17782 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17784 $as_echo "slicing-by-8" >&6; }
17793 # Select semaphore implementation type.
17794 if test "$PORTNAME" != "win32"; then
17795 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17796 # Need sem_open for this
17797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17798 $as_echo_n "checking for library containing sem_open... " >&6; }
17799 if ${ac_cv_search_sem_open+:} false; then :
17800 $as_echo_n "(cached) " >&6
17801 else
17802 ac_func_search_save_LIBS=$LIBS
17803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17804 /* end confdefs.h. */
17806 /* Override any GCC internal prototype to avoid an error.
17807 Use char because int might match the return type of a GCC
17808 builtin and then its argument prototype would still apply. */
17809 #ifdef __cplusplus
17810 extern "C"
17811 #endif
17812 char sem_open ();
17814 main ()
17816 return sem_open ();
17818 return 0;
17820 _ACEOF
17821 for ac_lib in '' rt pthread; do
17822 if test -z "$ac_lib"; then
17823 ac_res="none required"
17824 else
17825 ac_res=-l$ac_lib
17826 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17828 if ac_fn_c_try_link "$LINENO"; then :
17829 ac_cv_search_sem_open=$ac_res
17831 rm -f core conftest.err conftest.$ac_objext \
17832 conftest$ac_exeext
17833 if ${ac_cv_search_sem_open+:} false; then :
17834 break
17836 done
17837 if ${ac_cv_search_sem_open+:} false; then :
17839 else
17840 ac_cv_search_sem_open=no
17842 rm conftest.$ac_ext
17843 LIBS=$ac_func_search_save_LIBS
17845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17846 $as_echo "$ac_cv_search_sem_open" >&6; }
17847 ac_res=$ac_cv_search_sem_open
17848 if test "$ac_res" != no; then :
17849 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17850 USE_NAMED_POSIX_SEMAPHORES=1
17854 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17855 # Need sem_init for this
17856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17857 $as_echo_n "checking for library containing sem_init... " >&6; }
17858 if ${ac_cv_search_sem_init+:} false; then :
17859 $as_echo_n "(cached) " >&6
17860 else
17861 ac_func_search_save_LIBS=$LIBS
17862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17863 /* end confdefs.h. */
17865 /* Override any GCC internal prototype to avoid an error.
17866 Use char because int might match the return type of a GCC
17867 builtin and then its argument prototype would still apply. */
17868 #ifdef __cplusplus
17869 extern "C"
17870 #endif
17871 char sem_init ();
17873 main ()
17875 return sem_init ();
17877 return 0;
17879 _ACEOF
17880 for ac_lib in '' rt pthread; do
17881 if test -z "$ac_lib"; then
17882 ac_res="none required"
17883 else
17884 ac_res=-l$ac_lib
17885 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17887 if ac_fn_c_try_link "$LINENO"; then :
17888 ac_cv_search_sem_init=$ac_res
17890 rm -f core conftest.err conftest.$ac_objext \
17891 conftest$ac_exeext
17892 if ${ac_cv_search_sem_init+:} false; then :
17893 break
17895 done
17896 if ${ac_cv_search_sem_init+:} false; then :
17898 else
17899 ac_cv_search_sem_init=no
17901 rm conftest.$ac_ext
17902 LIBS=$ac_func_search_save_LIBS
17904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17905 $as_echo "$ac_cv_search_sem_init" >&6; }
17906 ac_res=$ac_cv_search_sem_init
17907 if test "$ac_res" != no; then :
17908 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17909 USE_UNNAMED_POSIX_SEMAPHORES=1
17913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17914 $as_echo_n "checking which semaphore API to use... " >&6; }
17915 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17917 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17919 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17920 sematype="named POSIX"
17921 else
17922 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17924 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17926 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17927 sematype="unnamed POSIX"
17928 else
17930 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17932 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17933 sematype="System V"
17936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17937 $as_echo "$sematype" >&6; }
17938 else
17940 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17942 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17946 # Select shared-memory implementation type.
17947 if test "$PORTNAME" != "win32"; then
17949 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17951 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17952 else
17954 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17956 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17959 # Select random number source. If a TLS library is used then it will be the
17960 # first choice, else the native platform sources (Windows API or /dev/urandom)
17961 # will be used.
17962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17963 $as_echo_n "checking which random number source to use... " >&6; }
17964 if test x"$with_ssl" = x"openssl" ; then
17965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17966 $as_echo "OpenSSL" >&6; }
17967 elif test x"$PORTNAME" = x"win32" ; then
17968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17969 $as_echo "Windows native" >&6; }
17970 elif test x"$cross_compiling" = x"yes"; then
17971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
17972 $as_echo "assuming /dev/urandom" >&6; }
17973 else
17974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17975 $as_echo "/dev/urandom" >&6; }
17976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17977 $as_echo_n "checking for /dev/urandom... " >&6; }
17978 if ${ac_cv_file__dev_urandom+:} false; then :
17979 $as_echo_n "(cached) " >&6
17980 else
17981 test "$cross_compiling" = yes &&
17982 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17983 if test -r "/dev/urandom"; then
17984 ac_cv_file__dev_urandom=yes
17985 else
17986 ac_cv_file__dev_urandom=no
17989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17990 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17991 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17996 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
17997 as_fn_error $? "
17998 no source of strong random numbers was found
17999 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18003 # If not set in template file, set bytes to use libc memset()
18004 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18005 MEMSET_LOOP_LIMIT=1024
18008 cat >>confdefs.h <<_ACEOF
18009 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18010 _ACEOF
18014 if test "$enable_nls" = yes ; then
18016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18017 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18018 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18019 $as_echo_n "(cached) " >&6
18020 else
18021 ac_func_search_save_LIBS=$LIBS
18022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18023 /* end confdefs.h. */
18025 /* Override any GCC internal prototype to avoid an error.
18026 Use char because int might match the return type of a GCC
18027 builtin and then its argument prototype would still apply. */
18028 #ifdef __cplusplus
18029 extern "C"
18030 #endif
18031 char bind_textdomain_codeset ();
18033 main ()
18035 return bind_textdomain_codeset ();
18037 return 0;
18039 _ACEOF
18040 for ac_lib in '' intl; do
18041 if test -z "$ac_lib"; then
18042 ac_res="none required"
18043 else
18044 ac_res=-l$ac_lib
18045 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18047 if ac_fn_c_try_link "$LINENO"; then :
18048 ac_cv_search_bind_textdomain_codeset=$ac_res
18050 rm -f core conftest.err conftest.$ac_objext \
18051 conftest$ac_exeext
18052 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18053 break
18055 done
18056 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18058 else
18059 ac_cv_search_bind_textdomain_codeset=no
18061 rm conftest.$ac_ext
18062 LIBS=$ac_func_search_save_LIBS
18064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18065 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18066 ac_res=$ac_cv_search_bind_textdomain_codeset
18067 if test "$ac_res" != no; then :
18068 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18070 else
18071 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18074 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18075 if test "x$ac_cv_header_libintl_h" = xyes; then :
18077 else
18078 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18082 if test -z "$MSGFMT"; then
18083 for ac_prog in msgfmt
18085 # Extract the first word of "$ac_prog", so it can be a program name with args.
18086 set dummy $ac_prog; ac_word=$2
18087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18088 $as_echo_n "checking for $ac_word... " >&6; }
18089 if ${ac_cv_path_MSGFMT+:} false; then :
18090 $as_echo_n "(cached) " >&6
18091 else
18092 case $MSGFMT in
18093 [\\/]* | ?:[\\/]*)
18094 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18098 for as_dir in $PATH
18100 IFS=$as_save_IFS
18101 test -z "$as_dir" && as_dir=.
18102 for ac_exec_ext in '' $ac_executable_extensions; do
18103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18104 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18106 break 2
18108 done
18109 done
18110 IFS=$as_save_IFS
18113 esac
18115 MSGFMT=$ac_cv_path_MSGFMT
18116 if test -n "$MSGFMT"; then
18117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18118 $as_echo "$MSGFMT" >&6; }
18119 else
18120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18121 $as_echo "no" >&6; }
18125 test -n "$MSGFMT" && break
18126 done
18128 else
18129 # Report the value of MSGFMT in configure's output in all cases.
18130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18131 $as_echo_n "checking for MSGFMT... " >&6; }
18132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18133 $as_echo "$MSGFMT" >&6; }
18136 if test -z "$MSGFMT"; then
18137 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18140 $as_echo_n "checking for msgfmt flags... " >&6; }
18141 if ${pgac_cv_msgfmt_flags+:} false; then :
18142 $as_echo_n "(cached) " >&6
18143 else
18144 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18145 pgac_cv_msgfmt_flags=-c
18148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18149 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18150 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18152 if test -z "$MSGMERGE"; then
18153 for ac_prog in msgmerge
18155 # Extract the first word of "$ac_prog", so it can be a program name with args.
18156 set dummy $ac_prog; ac_word=$2
18157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18158 $as_echo_n "checking for $ac_word... " >&6; }
18159 if ${ac_cv_path_MSGMERGE+:} false; then :
18160 $as_echo_n "(cached) " >&6
18161 else
18162 case $MSGMERGE in
18163 [\\/]* | ?:[\\/]*)
18164 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18168 for as_dir in $PATH
18170 IFS=$as_save_IFS
18171 test -z "$as_dir" && as_dir=.
18172 for ac_exec_ext in '' $ac_executable_extensions; do
18173 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18174 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18175 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18176 break 2
18178 done
18179 done
18180 IFS=$as_save_IFS
18183 esac
18185 MSGMERGE=$ac_cv_path_MSGMERGE
18186 if test -n "$MSGMERGE"; then
18187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18188 $as_echo "$MSGMERGE" >&6; }
18189 else
18190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18191 $as_echo "no" >&6; }
18195 test -n "$MSGMERGE" && break
18196 done
18198 else
18199 # Report the value of MSGMERGE in configure's output in all cases.
18200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18201 $as_echo_n "checking for MSGMERGE... " >&6; }
18202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18203 $as_echo "$MSGMERGE" >&6; }
18206 if test -z "$XGETTEXT"; then
18207 for ac_prog in xgettext
18209 # Extract the first word of "$ac_prog", so it can be a program name with args.
18210 set dummy $ac_prog; ac_word=$2
18211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18212 $as_echo_n "checking for $ac_word... " >&6; }
18213 if ${ac_cv_path_XGETTEXT+:} false; then :
18214 $as_echo_n "(cached) " >&6
18215 else
18216 case $XGETTEXT in
18217 [\\/]* | ?:[\\/]*)
18218 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18222 for as_dir in $PATH
18224 IFS=$as_save_IFS
18225 test -z "$as_dir" && as_dir=.
18226 for ac_exec_ext in '' $ac_executable_extensions; do
18227 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18228 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18230 break 2
18232 done
18233 done
18234 IFS=$as_save_IFS
18237 esac
18239 XGETTEXT=$ac_cv_path_XGETTEXT
18240 if test -n "$XGETTEXT"; then
18241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18242 $as_echo "$XGETTEXT" >&6; }
18243 else
18244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18245 $as_echo "no" >&6; }
18249 test -n "$XGETTEXT" && break
18250 done
18252 else
18253 # Report the value of XGETTEXT in configure's output in all cases.
18254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18255 $as_echo_n "checking for XGETTEXT... " >&6; }
18256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18257 $as_echo "$XGETTEXT" >&6; }
18263 # Check for Tcl configuration script tclConfig.sh
18264 if test "$with_tcl" = yes; then
18265 if test -z "$TCLSH"; then
18266 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18268 # Extract the first word of "$ac_prog", so it can be a program name with args.
18269 set dummy $ac_prog; ac_word=$2
18270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18271 $as_echo_n "checking for $ac_word... " >&6; }
18272 if ${ac_cv_path_TCLSH+:} false; then :
18273 $as_echo_n "(cached) " >&6
18274 else
18275 case $TCLSH in
18276 [\\/]* | ?:[\\/]*)
18277 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18281 for as_dir in $PATH
18283 IFS=$as_save_IFS
18284 test -z "$as_dir" && as_dir=.
18285 for ac_exec_ext in '' $ac_executable_extensions; do
18286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18287 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18289 break 2
18291 done
18292 done
18293 IFS=$as_save_IFS
18296 esac
18298 TCLSH=$ac_cv_path_TCLSH
18299 if test -n "$TCLSH"; then
18300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18301 $as_echo "$TCLSH" >&6; }
18302 else
18303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18304 $as_echo "no" >&6; }
18308 test -n "$TCLSH" && break
18309 done
18311 else
18312 # Report the value of TCLSH in configure's output in all cases.
18313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18314 $as_echo_n "checking for TCLSH... " >&6; }
18315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18316 $as_echo "$TCLSH" >&6; }
18319 if test x"$TCLSH" = x""; then
18320 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18324 $as_echo_n "checking for tclConfig.sh... " >&6; }
18325 # Let user override test
18326 if test -z "$TCL_CONFIG_SH"; then
18327 pgac_test_dirs="$with_tclconfig"
18329 set X $pgac_test_dirs; shift
18330 if test $# -eq 0; then
18331 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18332 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18333 # On newer macOS, $auto_path frequently doesn't include the place
18334 # where tclConfig.sh actually lives. Append that to the end, so as not
18335 # to break cases where a non-default Tcl installation is being used.
18336 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18337 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18339 set X $pgac_test_dirs; shift
18342 for pgac_dir do
18343 if test -r "$pgac_dir/tclConfig.sh"; then
18344 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18345 break
18347 done
18350 if test -z "$TCL_CONFIG_SH"; then
18351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18352 $as_echo "no" >&6; }
18353 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18354 else
18355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18356 $as_echo "$TCL_CONFIG_SH" >&6; }
18361 . "$TCL_CONFIG_SH"
18362 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18363 eval TCL_LIBS=\"$TCL_LIBS\"
18364 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18365 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18367 if test "$TCL_SHARED_BUILD" != 1; then
18368 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18369 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18371 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18372 ac_save_CPPFLAGS=$CPPFLAGS
18373 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18374 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18375 if test "x$ac_cv_header_tcl_h" = xyes; then :
18377 else
18378 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18382 CPPFLAGS=$ac_save_CPPFLAGS
18385 # check for <perl.h>
18386 if test "$with_perl" = yes; then
18387 ac_save_CPPFLAGS=$CPPFLAGS
18388 CPPFLAGS="$CPPFLAGS $perl_includespec"
18389 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18391 if test "x$ac_cv_header_perl_h" = xyes; then :
18393 else
18394 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18398 # While we're at it, check that we can link to libperl.
18399 # On most platforms, if perl.h is there then libperl.so will be too, but at
18400 # this writing Debian packages them separately. There is no known reason to
18401 # waste cycles on separate probes for the Tcl or Python libraries, though.
18402 # On some Red Hat platforms, the link attempt can fail if we don't use
18403 # CFLAGS_SL while building the test program.
18404 ac_save_CFLAGS=$CFLAGS
18405 CFLAGS="$CFLAGS $CFLAGS_SL"
18406 pgac_save_LIBS=$LIBS
18407 LIBS="$perl_embed_ldflags"
18408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18409 $as_echo_n "checking for libperl... " >&6; }
18410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18411 /* end confdefs.h. */
18413 #include <EXTERN.h>
18414 #include <perl.h>
18417 main ()
18419 perl_alloc();
18421 return 0;
18423 _ACEOF
18424 if ac_fn_c_try_link "$LINENO"; then :
18425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18426 $as_echo "yes" >&6; }
18427 else
18428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18429 $as_echo "no" >&6; }
18430 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18432 rm -f core conftest.err conftest.$ac_objext \
18433 conftest$ac_exeext conftest.$ac_ext
18434 LIBS=$pgac_save_LIBS
18435 CFLAGS=$ac_save_CFLAGS
18436 CPPFLAGS=$ac_save_CPPFLAGS
18439 # check for <Python.h>
18440 if test "$with_python" = yes; then
18441 ac_save_CPPFLAGS=$CPPFLAGS
18442 CPPFLAGS="$python_includespec $CPPFLAGS"
18443 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18444 if test "x$ac_cv_header_Python_h" = xyes; then :
18446 else
18447 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18451 CPPFLAGS=$ac_save_CPPFLAGS
18455 # Check for documentation-building tools
18457 if test -z "$XMLLINT"; then
18458 for ac_prog in xmllint
18460 # Extract the first word of "$ac_prog", so it can be a program name with args.
18461 set dummy $ac_prog; ac_word=$2
18462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18463 $as_echo_n "checking for $ac_word... " >&6; }
18464 if ${ac_cv_path_XMLLINT+:} false; then :
18465 $as_echo_n "(cached) " >&6
18466 else
18467 case $XMLLINT in
18468 [\\/]* | ?:[\\/]*)
18469 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18473 for as_dir in $PATH
18475 IFS=$as_save_IFS
18476 test -z "$as_dir" && as_dir=.
18477 for ac_exec_ext in '' $ac_executable_extensions; do
18478 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18479 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18480 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18481 break 2
18483 done
18484 done
18485 IFS=$as_save_IFS
18488 esac
18490 XMLLINT=$ac_cv_path_XMLLINT
18491 if test -n "$XMLLINT"; then
18492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18493 $as_echo "$XMLLINT" >&6; }
18494 else
18495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18496 $as_echo "no" >&6; }
18500 test -n "$XMLLINT" && break
18501 done
18503 else
18504 # Report the value of XMLLINT in configure's output in all cases.
18505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18506 $as_echo_n "checking for XMLLINT... " >&6; }
18507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18508 $as_echo "$XMLLINT" >&6; }
18511 if test -z "$XSLTPROC"; then
18512 for ac_prog in xsltproc
18514 # Extract the first word of "$ac_prog", so it can be a program name with args.
18515 set dummy $ac_prog; ac_word=$2
18516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18517 $as_echo_n "checking for $ac_word... " >&6; }
18518 if ${ac_cv_path_XSLTPROC+:} false; then :
18519 $as_echo_n "(cached) " >&6
18520 else
18521 case $XSLTPROC in
18522 [\\/]* | ?:[\\/]*)
18523 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18527 for as_dir in $PATH
18529 IFS=$as_save_IFS
18530 test -z "$as_dir" && as_dir=.
18531 for ac_exec_ext in '' $ac_executable_extensions; do
18532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18533 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18535 break 2
18537 done
18538 done
18539 IFS=$as_save_IFS
18542 esac
18544 XSLTPROC=$ac_cv_path_XSLTPROC
18545 if test -n "$XSLTPROC"; then
18546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18547 $as_echo "$XSLTPROC" >&6; }
18548 else
18549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18550 $as_echo "no" >&6; }
18554 test -n "$XSLTPROC" && break
18555 done
18557 else
18558 # Report the value of XSLTPROC in configure's output in all cases.
18559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18560 $as_echo_n "checking for XSLTPROC... " >&6; }
18561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18562 $as_echo "$XSLTPROC" >&6; }
18565 if test -z "$FOP"; then
18566 for ac_prog in fop
18568 # Extract the first word of "$ac_prog", so it can be a program name with args.
18569 set dummy $ac_prog; ac_word=$2
18570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18571 $as_echo_n "checking for $ac_word... " >&6; }
18572 if ${ac_cv_path_FOP+:} false; then :
18573 $as_echo_n "(cached) " >&6
18574 else
18575 case $FOP in
18576 [\\/]* | ?:[\\/]*)
18577 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18581 for as_dir in $PATH
18583 IFS=$as_save_IFS
18584 test -z "$as_dir" && as_dir=.
18585 for ac_exec_ext in '' $ac_executable_extensions; do
18586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18587 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18589 break 2
18591 done
18592 done
18593 IFS=$as_save_IFS
18596 esac
18598 FOP=$ac_cv_path_FOP
18599 if test -n "$FOP"; then
18600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18601 $as_echo "$FOP" >&6; }
18602 else
18603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18604 $as_echo "no" >&6; }
18608 test -n "$FOP" && break
18609 done
18611 else
18612 # Report the value of FOP in configure's output in all cases.
18613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18614 $as_echo_n "checking for FOP... " >&6; }
18615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18616 $as_echo "$FOP" >&6; }
18619 if test -z "$DBTOEPUB"; then
18620 for ac_prog in dbtoepub
18622 # Extract the first word of "$ac_prog", so it can be a program name with args.
18623 set dummy $ac_prog; ac_word=$2
18624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18625 $as_echo_n "checking for $ac_word... " >&6; }
18626 if ${ac_cv_path_DBTOEPUB+:} false; then :
18627 $as_echo_n "(cached) " >&6
18628 else
18629 case $DBTOEPUB in
18630 [\\/]* | ?:[\\/]*)
18631 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18635 for as_dir in $PATH
18637 IFS=$as_save_IFS
18638 test -z "$as_dir" && as_dir=.
18639 for ac_exec_ext in '' $ac_executable_extensions; do
18640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18641 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18643 break 2
18645 done
18646 done
18647 IFS=$as_save_IFS
18650 esac
18652 DBTOEPUB=$ac_cv_path_DBTOEPUB
18653 if test -n "$DBTOEPUB"; then
18654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18655 $as_echo "$DBTOEPUB" >&6; }
18656 else
18657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18658 $as_echo "no" >&6; }
18662 test -n "$DBTOEPUB" && break
18663 done
18665 else
18666 # Report the value of DBTOEPUB in configure's output in all cases.
18667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18668 $as_echo_n "checking for DBTOEPUB... " >&6; }
18669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18670 $as_echo "$DBTOEPUB" >&6; }
18675 # Check for test tools
18677 if test "$enable_tap_tests" = yes; then
18678 # Make sure we know where prove is.
18679 if test -z "$PROVE"; then
18680 for ac_prog in prove
18682 # Extract the first word of "$ac_prog", so it can be a program name with args.
18683 set dummy $ac_prog; ac_word=$2
18684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18685 $as_echo_n "checking for $ac_word... " >&6; }
18686 if ${ac_cv_path_PROVE+:} false; then :
18687 $as_echo_n "(cached) " >&6
18688 else
18689 case $PROVE in
18690 [\\/]* | ?:[\\/]*)
18691 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18695 for as_dir in $PATH
18697 IFS=$as_save_IFS
18698 test -z "$as_dir" && as_dir=.
18699 for ac_exec_ext in '' $ac_executable_extensions; do
18700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18701 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18703 break 2
18705 done
18706 done
18707 IFS=$as_save_IFS
18710 esac
18712 PROVE=$ac_cv_path_PROVE
18713 if test -n "$PROVE"; then
18714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18715 $as_echo "$PROVE" >&6; }
18716 else
18717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18718 $as_echo "no" >&6; }
18722 test -n "$PROVE" && break
18723 done
18725 else
18726 # Report the value of PROVE in configure's output in all cases.
18727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18728 $as_echo_n "checking for PROVE... " >&6; }
18729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18730 $as_echo "$PROVE" >&6; }
18733 if test -z "$PROVE"; then
18734 as_fn_error $? "prove not found" "$LINENO" 5
18736 # Check for necessary Perl modules. You might think we should use
18737 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
18738 # installation than perl, eg on MSys, so we have to check using prove.
18739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
18740 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
18741 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
18742 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
18743 if test $? -eq 0; then
18744 # log the module version details, but don't show them interactively
18745 echo "$modulestderr" >&5
18746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18747 $as_echo "yes" >&6; }
18748 else
18749 # on failure, though, show the results to the user
18750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
18751 $as_echo "$modulestderr" >&6; }
18752 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18756 # If compiler will take -Wl,--as-needed (or various platform-specific
18757 # spellings thereof) then add that to LDFLAGS. This is much easier than
18758 # trying to filter LIBS to the minimum for each executable.
18759 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18760 # libreadline; therefore we postpone testing it until we know what library
18761 # dependencies readline has. The test code will try to link with $LIBS.
18762 if test "$with_readline" = yes; then
18763 link_test_func=readline
18764 else
18765 link_test_func=exit
18768 if test "$PORTNAME" = "darwin"; then
18769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
18770 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
18771 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
18772 $as_echo_n "(cached) " >&6
18773 else
18774 pgac_save_LDFLAGS=$LDFLAGS
18775 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18776 if test "$cross_compiling" = yes; then :
18777 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
18778 else
18779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18780 /* end confdefs.h. */
18781 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18783 main ()
18787 return 0;
18789 _ACEOF
18790 if ac_fn_c_try_run "$LINENO"; then :
18791 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
18792 else
18793 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
18795 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18796 conftest.$ac_objext conftest.beam conftest.$ac_ext
18799 LDFLAGS="$pgac_save_LDFLAGS"
18801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
18802 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
18803 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
18804 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
18808 elif test "$PORTNAME" = "openbsd"; then
18809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
18810 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
18811 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
18812 $as_echo_n "(cached) " >&6
18813 else
18814 pgac_save_LDFLAGS=$LDFLAGS
18815 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18816 if test "$cross_compiling" = yes; then :
18817 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
18818 else
18819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18820 /* end confdefs.h. */
18821 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18823 main ()
18827 return 0;
18829 _ACEOF
18830 if ac_fn_c_try_run "$LINENO"; then :
18831 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
18832 else
18833 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
18835 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18836 conftest.$ac_objext conftest.beam conftest.$ac_ext
18839 LDFLAGS="$pgac_save_LDFLAGS"
18841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
18842 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
18843 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
18844 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
18848 else
18849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
18850 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
18851 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
18852 $as_echo_n "(cached) " >&6
18853 else
18854 pgac_save_LDFLAGS=$LDFLAGS
18855 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18856 if test "$cross_compiling" = yes; then :
18857 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
18858 else
18859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18860 /* end confdefs.h. */
18861 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18863 main ()
18867 return 0;
18869 _ACEOF
18870 if ac_fn_c_try_run "$LINENO"; then :
18871 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
18872 else
18873 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
18875 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18876 conftest.$ac_objext conftest.beam conftest.$ac_ext
18879 LDFLAGS="$pgac_save_LDFLAGS"
18881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
18882 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
18883 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
18884 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
18890 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
18891 # (backend specific ldflags). One some platforms this will always fail (e.g.,
18892 # windows), but on others it depends on the choice of linker (e.g., solaris).
18893 # macOS uses -export_dynamic instead. (On macOS, the option is only
18894 # needed when also using -flto, but we add it anyway since it's
18895 # harmless.)
18896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
18897 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
18898 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
18899 $as_echo_n "(cached) " >&6
18900 else
18901 pgac_save_LDFLAGS=$LDFLAGS
18902 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
18903 if test "$cross_compiling" = yes; then :
18904 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
18905 else
18906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18907 /* end confdefs.h. */
18908 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18910 main ()
18914 return 0;
18916 _ACEOF
18917 if ac_fn_c_try_run "$LINENO"; then :
18918 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
18919 else
18920 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
18922 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18923 conftest.$ac_objext conftest.beam conftest.$ac_ext
18926 LDFLAGS="$pgac_save_LDFLAGS"
18928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
18929 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
18930 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
18931 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
18934 if test x"$LDFLAGS_EX_BE" = x""; then
18935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE" >&5
18936 $as_echo_n "checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE... " >&6; }
18937 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic+:} false; then :
18938 $as_echo_n "(cached) " >&6
18939 else
18940 pgac_save_LDFLAGS=$LDFLAGS
18941 LDFLAGS="$pgac_save_LDFLAGS -Wl,-export_dynamic"
18942 if test "$cross_compiling" = yes; then :
18943 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic="assuming no"
18944 else
18945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18946 /* end confdefs.h. */
18947 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18949 main ()
18953 return 0;
18955 _ACEOF
18956 if ac_fn_c_try_run "$LINENO"; then :
18957 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=yes
18958 else
18959 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=no
18961 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18962 conftest.$ac_objext conftest.beam conftest.$ac_ext
18965 LDFLAGS="$pgac_save_LDFLAGS"
18967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&5
18968 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&6; }
18969 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" = x"yes"; then
18970 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,-export_dynamic"
18976 # Create compiler version string
18977 if test x"$GCC" = x"yes" ; then
18978 cc_string=`${CC} --version | sed q`
18979 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18980 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18981 cc_string=`${CC} -V 2>&1 | sed q`
18982 else
18983 cc_string=$CC
18987 cat >>confdefs.h <<_ACEOF
18988 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18989 _ACEOF
18992 # Supply a numeric version string for use by 3rd party add-ons
18993 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18994 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
18995 $AWK '{printf "%d%04d", $1, $2}'`"
18997 cat >>confdefs.h <<_ACEOF
18998 #define PG_VERSION_NUM $PG_VERSION_NUM
18999 _ACEOF
19003 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19004 # literally, so that it's possible to override it at build time using
19005 # a command like "make ... PG_SYSROOT=path". This has to be done after
19006 # we've finished all configure checks that depend on CPPFLAGS.
19007 # The same for LDFLAGS, too.
19008 if test x"$PG_SYSROOT" != x; then
19009 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19010 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19015 # Begin output steps
19017 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19018 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19019 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19020 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19021 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19022 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19024 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19025 # Currently only used when LLVM is used
19026 if test "$with_llvm" = yes ; then
19027 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19028 $as_echo "$as_me: using CXX=$CXX" >&6;}
19029 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19030 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19031 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19032 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19033 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19034 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19035 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19036 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19039 # prepare build tree if outside source tree
19040 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19041 # Note 2: /bin/pwd might be better than shell's built-in at getting
19042 # a symlink-free name.
19043 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19044 vpath_build=no
19045 else
19046 vpath_build=yes
19047 if test "$no_create" != yes; then
19048 $as_echo_n "preparing build tree... " >&6
19049 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19050 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19051 || as_fn_error $? "failed" "$LINENO" 5
19052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19053 $as_echo "done" >&6; }
19059 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19062 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}"
19065 if test "$PORTNAME" = "win32"; then
19066 ac_config_commands="$ac_config_commands check_win32_symlinks"
19070 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19073 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19076 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19079 cat >confcache <<\_ACEOF
19080 # This file is a shell script that caches the results of configure
19081 # tests run on this system so they can be shared between configure
19082 # scripts and configure runs, see configure's option --config-cache.
19083 # It is not useful on other systems. If it contains results you don't
19084 # want to keep, you may remove or edit it.
19086 # config.status only pays attention to the cache file if you give it
19087 # the --recheck option to rerun configure.
19089 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19090 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19091 # following values.
19093 _ACEOF
19095 # The following way of writing the cache mishandles newlines in values,
19096 # but we know of no workaround that is simple, portable, and efficient.
19097 # So, we kill variables containing newlines.
19098 # Ultrix sh set writes to stderr and can't be redirected directly,
19099 # and sets the high bit in the cache file unless we assign to the vars.
19101 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19102 eval ac_val=\$$ac_var
19103 case $ac_val in #(
19104 *${as_nl}*)
19105 case $ac_var in #(
19106 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19107 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19108 esac
19109 case $ac_var in #(
19110 _ | IFS | as_nl) ;; #(
19111 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19112 *) { eval $ac_var=; unset $ac_var;} ;;
19113 esac ;;
19114 esac
19115 done
19117 (set) 2>&1 |
19118 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19119 *${as_nl}ac_space=\ *)
19120 # `set' does not quote correctly, so add quotes: double-quote
19121 # substitution turns \\\\ into \\, and sed turns \\ into \.
19122 sed -n \
19123 "s/'/'\\\\''/g;
19124 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19125 ;; #(
19127 # `set' quotes correctly as required by POSIX, so do not add quotes.
19128 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19130 esac |
19131 sort
19133 sed '
19134 /^ac_cv_env_/b end
19135 t clear
19136 :clear
19137 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19138 t end
19139 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19140 :end' >>confcache
19141 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19142 if test -w "$cache_file"; then
19143 if test "x$cache_file" != "x/dev/null"; then
19144 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19145 $as_echo "$as_me: updating cache $cache_file" >&6;}
19146 if test ! -f "$cache_file" || test -h "$cache_file"; then
19147 cat confcache >"$cache_file"
19148 else
19149 case $cache_file in #(
19150 */* | ?:*)
19151 mv -f confcache "$cache_file"$$ &&
19152 mv -f "$cache_file"$$ "$cache_file" ;; #(
19154 mv -f confcache "$cache_file" ;;
19155 esac
19158 else
19159 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19160 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19163 rm -f confcache
19165 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19166 # Let make expand exec_prefix.
19167 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19169 DEFS=-DHAVE_CONFIG_H
19171 ac_libobjs=
19172 ac_ltlibobjs=
19174 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19175 # 1. Remove the extension, and $U if already installed.
19176 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19177 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19178 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19179 # will be set to the directory where LIBOBJS objects are built.
19180 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19181 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19182 done
19183 LIBOBJS=$ac_libobjs
19185 LTLIBOBJS=$ac_ltlibobjs
19190 : "${CONFIG_STATUS=./config.status}"
19191 ac_write_fail=0
19192 ac_clean_files_save=$ac_clean_files
19193 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19194 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19195 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19196 as_write_fail=0
19197 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19198 #! $SHELL
19199 # Generated by $as_me.
19200 # Run this file to recreate the current configuration.
19201 # Compiler output produced by configure, useful for debugging
19202 # configure, is in config.log if it exists.
19204 debug=false
19205 ac_cs_recheck=false
19206 ac_cs_silent=false
19208 SHELL=\${CONFIG_SHELL-$SHELL}
19209 export SHELL
19210 _ASEOF
19211 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19212 ## -------------------- ##
19213 ## M4sh Initialization. ##
19214 ## -------------------- ##
19216 # Be more Bourne compatible
19217 DUALCASE=1; export DUALCASE # for MKS sh
19218 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19219 emulate sh
19220 NULLCMD=:
19221 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19222 # is contrary to our usage. Disable this feature.
19223 alias -g '${1+"$@"}'='"$@"'
19224 setopt NO_GLOB_SUBST
19225 else
19226 case `(set -o) 2>/dev/null` in #(
19227 *posix*) :
19228 set -o posix ;; #(
19229 *) :
19231 esac
19235 as_nl='
19237 export as_nl
19238 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19239 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19240 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19241 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19242 # Prefer a ksh shell builtin over an external printf program on Solaris,
19243 # but without wasting forks for bash or zsh.
19244 if test -z "$BASH_VERSION$ZSH_VERSION" \
19245 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19246 as_echo='print -r --'
19247 as_echo_n='print -rn --'
19248 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19249 as_echo='printf %s\n'
19250 as_echo_n='printf %s'
19251 else
19252 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19253 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19254 as_echo_n='/usr/ucb/echo -n'
19255 else
19256 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19257 as_echo_n_body='eval
19258 arg=$1;
19259 case $arg in #(
19260 *"$as_nl"*)
19261 expr "X$arg" : "X\\(.*\\)$as_nl";
19262 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19263 esac;
19264 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19266 export as_echo_n_body
19267 as_echo_n='sh -c $as_echo_n_body as_echo'
19269 export as_echo_body
19270 as_echo='sh -c $as_echo_body as_echo'
19273 # The user is always right.
19274 if test "${PATH_SEPARATOR+set}" != set; then
19275 PATH_SEPARATOR=:
19276 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19277 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19278 PATH_SEPARATOR=';'
19283 # IFS
19284 # We need space, tab and new line, in precisely that order. Quoting is
19285 # there to prevent editors from complaining about space-tab.
19286 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19287 # splitting by setting IFS to empty value.)
19288 IFS=" "" $as_nl"
19290 # Find who we are. Look in the path if we contain no directory separator.
19291 as_myself=
19292 case $0 in #((
19293 *[\\/]* ) as_myself=$0 ;;
19294 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19295 for as_dir in $PATH
19297 IFS=$as_save_IFS
19298 test -z "$as_dir" && as_dir=.
19299 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19300 done
19301 IFS=$as_save_IFS
19304 esac
19305 # We did not find ourselves, most probably we were run as `sh COMMAND'
19306 # in which case we are not to be found in the path.
19307 if test "x$as_myself" = x; then
19308 as_myself=$0
19310 if test ! -f "$as_myself"; then
19311 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19312 exit 1
19315 # Unset variables that we do not need and which cause bugs (e.g. in
19316 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19317 # suppresses any "Segmentation fault" message there. '((' could
19318 # trigger a bug in pdksh 5.2.14.
19319 for as_var in BASH_ENV ENV MAIL MAILPATH
19320 do eval test x\${$as_var+set} = xset \
19321 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19322 done
19323 PS1='$ '
19324 PS2='> '
19325 PS4='+ '
19327 # NLS nuisances.
19328 LC_ALL=C
19329 export LC_ALL
19330 LANGUAGE=C
19331 export LANGUAGE
19333 # CDPATH.
19334 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19337 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19338 # ----------------------------------------
19339 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19340 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19341 # script with STATUS, using 1 if that was 0.
19342 as_fn_error ()
19344 as_status=$1; test $as_status -eq 0 && as_status=1
19345 if test "$4"; then
19346 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19347 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19349 $as_echo "$as_me: error: $2" >&2
19350 as_fn_exit $as_status
19351 } # as_fn_error
19354 # as_fn_set_status STATUS
19355 # -----------------------
19356 # Set $? to STATUS, without forking.
19357 as_fn_set_status ()
19359 return $1
19360 } # as_fn_set_status
19362 # as_fn_exit STATUS
19363 # -----------------
19364 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19365 as_fn_exit ()
19367 set +e
19368 as_fn_set_status $1
19369 exit $1
19370 } # as_fn_exit
19372 # as_fn_unset VAR
19373 # ---------------
19374 # Portably unset VAR.
19375 as_fn_unset ()
19377 { eval $1=; unset $1;}
19379 as_unset=as_fn_unset
19380 # as_fn_append VAR VALUE
19381 # ----------------------
19382 # Append the text in VALUE to the end of the definition contained in VAR. Take
19383 # advantage of any shell optimizations that allow amortized linear growth over
19384 # repeated appends, instead of the typical quadratic growth present in naive
19385 # implementations.
19386 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19387 eval 'as_fn_append ()
19389 eval $1+=\$2
19391 else
19392 as_fn_append ()
19394 eval $1=\$$1\$2
19396 fi # as_fn_append
19398 # as_fn_arith ARG...
19399 # ------------------
19400 # Perform arithmetic evaluation on the ARGs, and store the result in the
19401 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19402 # must be portable across $(()) and expr.
19403 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19404 eval 'as_fn_arith ()
19406 as_val=$(( $* ))
19408 else
19409 as_fn_arith ()
19411 as_val=`expr "$@" || test $? -eq 1`
19413 fi # as_fn_arith
19416 if expr a : '\(a\)' >/dev/null 2>&1 &&
19417 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19418 as_expr=expr
19419 else
19420 as_expr=false
19423 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19424 as_basename=basename
19425 else
19426 as_basename=false
19429 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19430 as_dirname=dirname
19431 else
19432 as_dirname=false
19435 as_me=`$as_basename -- "$0" ||
19436 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19437 X"$0" : 'X\(//\)$' \| \
19438 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19439 $as_echo X/"$0" |
19440 sed '/^.*\/\([^/][^/]*\)\/*$/{
19441 s//\1/
19444 /^X\/\(\/\/\)$/{
19445 s//\1/
19448 /^X\/\(\/\).*/{
19449 s//\1/
19452 s/.*/./; q'`
19454 # Avoid depending upon Character Ranges.
19455 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19456 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19457 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19458 as_cr_digits='0123456789'
19459 as_cr_alnum=$as_cr_Letters$as_cr_digits
19461 ECHO_C= ECHO_N= ECHO_T=
19462 case `echo -n x` in #(((((
19463 -n*)
19464 case `echo 'xy\c'` in
19465 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19466 xy) ECHO_C='\c';;
19467 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19468 ECHO_T=' ';;
19469 esac;;
19471 ECHO_N='-n';;
19472 esac
19474 rm -f conf$$ conf$$.exe conf$$.file
19475 if test -d conf$$.dir; then
19476 rm -f conf$$.dir/conf$$.file
19477 else
19478 rm -f conf$$.dir
19479 mkdir conf$$.dir 2>/dev/null
19481 if (echo >conf$$.file) 2>/dev/null; then
19482 if ln -s conf$$.file conf$$ 2>/dev/null; then
19483 as_ln_s='ln -s'
19484 # ... but there are two gotchas:
19485 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19486 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19487 # In both cases, we have to default to `cp -pR'.
19488 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19489 as_ln_s='cp -pR'
19490 elif ln conf$$.file conf$$ 2>/dev/null; then
19491 as_ln_s=ln
19492 else
19493 as_ln_s='cp -pR'
19495 else
19496 as_ln_s='cp -pR'
19498 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19499 rmdir conf$$.dir 2>/dev/null
19502 # as_fn_mkdir_p
19503 # -------------
19504 # Create "$as_dir" as a directory, including parents if necessary.
19505 as_fn_mkdir_p ()
19508 case $as_dir in #(
19509 -*) as_dir=./$as_dir;;
19510 esac
19511 test -d "$as_dir" || eval $as_mkdir_p || {
19512 as_dirs=
19513 while :; do
19514 case $as_dir in #(
19515 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19516 *) as_qdir=$as_dir;;
19517 esac
19518 as_dirs="'$as_qdir' $as_dirs"
19519 as_dir=`$as_dirname -- "$as_dir" ||
19520 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19521 X"$as_dir" : 'X\(//\)[^/]' \| \
19522 X"$as_dir" : 'X\(//\)$' \| \
19523 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19524 $as_echo X"$as_dir" |
19525 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19526 s//\1/
19529 /^X\(\/\/\)[^/].*/{
19530 s//\1/
19533 /^X\(\/\/\)$/{
19534 s//\1/
19537 /^X\(\/\).*/{
19538 s//\1/
19541 s/.*/./; q'`
19542 test -d "$as_dir" && break
19543 done
19544 test -z "$as_dirs" || eval "mkdir $as_dirs"
19545 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19548 } # as_fn_mkdir_p
19549 if mkdir -p . 2>/dev/null; then
19550 as_mkdir_p='mkdir -p "$as_dir"'
19551 else
19552 test -d ./-p && rmdir ./-p
19553 as_mkdir_p=false
19557 # as_fn_executable_p FILE
19558 # -----------------------
19559 # Test if FILE is an executable regular file.
19560 as_fn_executable_p ()
19562 test -f "$1" && test -x "$1"
19563 } # as_fn_executable_p
19564 as_test_x='test -x'
19565 as_executable_p=as_fn_executable_p
19567 # Sed expression to map a string onto a valid CPP name.
19568 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19570 # Sed expression to map a string onto a valid variable name.
19571 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19574 exec 6>&1
19575 ## ----------------------------------- ##
19576 ## Main body of $CONFIG_STATUS script. ##
19577 ## ----------------------------------- ##
19578 _ASEOF
19579 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19581 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19582 # Save the log message, to keep $0 and so on meaningful, and to
19583 # report actual input values of CONFIG_FILES etc. instead of their
19584 # values after options handling.
19585 ac_log="
19586 This file was extended by PostgreSQL $as_me 18devel, which was
19587 generated by GNU Autoconf 2.69. Invocation command line was
19589 CONFIG_FILES = $CONFIG_FILES
19590 CONFIG_HEADERS = $CONFIG_HEADERS
19591 CONFIG_LINKS = $CONFIG_LINKS
19592 CONFIG_COMMANDS = $CONFIG_COMMANDS
19593 $ $0 $@
19595 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19598 _ACEOF
19600 case $ac_config_files in *"
19601 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19602 esac
19604 case $ac_config_headers in *"
19605 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19606 esac
19609 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19610 # Files that config.status was made for.
19611 config_files="$ac_config_files"
19612 config_headers="$ac_config_headers"
19613 config_links="$ac_config_links"
19614 config_commands="$ac_config_commands"
19616 _ACEOF
19618 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19619 ac_cs_usage="\
19620 \`$as_me' instantiates files and other configuration actions
19621 from templates according to the current configuration. Unless the files
19622 and actions are specified as TAGs, all are instantiated by default.
19624 Usage: $0 [OPTION]... [TAG]...
19626 -h, --help print this help, then exit
19627 -V, --version print version number and configuration settings, then exit
19628 --config print configuration, then exit
19629 -q, --quiet, --silent
19630 do not print progress messages
19631 -d, --debug don't remove temporary files
19632 --recheck update $as_me by reconfiguring in the same conditions
19633 --file=FILE[:TEMPLATE]
19634 instantiate the configuration file FILE
19635 --header=FILE[:TEMPLATE]
19636 instantiate the configuration header FILE
19638 Configuration files:
19639 $config_files
19641 Configuration headers:
19642 $config_headers
19644 Configuration links:
19645 $config_links
19647 Configuration commands:
19648 $config_commands
19650 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19651 PostgreSQL home page: <https://www.postgresql.org/>."
19653 _ACEOF
19654 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19655 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19656 ac_cs_version="\\
19657 PostgreSQL config.status 18devel
19658 configured by $0, generated by GNU Autoconf 2.69,
19659 with options \\"\$ac_cs_config\\"
19661 Copyright (C) 2012 Free Software Foundation, Inc.
19662 This config.status script is free software; the Free Software Foundation
19663 gives unlimited permission to copy, distribute and modify it."
19665 ac_pwd='$ac_pwd'
19666 srcdir='$srcdir'
19667 INSTALL='$INSTALL'
19668 MKDIR_P='$MKDIR_P'
19669 AWK='$AWK'
19670 test -n "\$AWK" || AWK=awk
19671 _ACEOF
19673 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19674 # The default lists apply if the user does not specify any file.
19675 ac_need_defaults=:
19676 while test $# != 0
19678 case $1 in
19679 --*=?*)
19680 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19681 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19682 ac_shift=:
19684 --*=)
19685 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19686 ac_optarg=
19687 ac_shift=:
19690 ac_option=$1
19691 ac_optarg=$2
19692 ac_shift=shift
19694 esac
19696 case $ac_option in
19697 # Handling of the options.
19698 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19699 ac_cs_recheck=: ;;
19700 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19701 $as_echo "$ac_cs_version"; exit ;;
19702 --config | --confi | --conf | --con | --co | --c )
19703 $as_echo "$ac_cs_config"; exit ;;
19704 --debug | --debu | --deb | --de | --d | -d )
19705 debug=: ;;
19706 --file | --fil | --fi | --f )
19707 $ac_shift
19708 case $ac_optarg in
19709 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19710 '') as_fn_error $? "missing file argument" ;;
19711 esac
19712 as_fn_append CONFIG_FILES " '$ac_optarg'"
19713 ac_need_defaults=false;;
19714 --header | --heade | --head | --hea )
19715 $ac_shift
19716 case $ac_optarg in
19717 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19718 esac
19719 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19720 ac_need_defaults=false;;
19721 --he | --h)
19722 # Conflict between --help and --header
19723 as_fn_error $? "ambiguous option: \`$1'
19724 Try \`$0 --help' for more information.";;
19725 --help | --hel | -h )
19726 $as_echo "$ac_cs_usage"; exit ;;
19727 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19728 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19729 ac_cs_silent=: ;;
19731 # This is an error.
19732 -*) as_fn_error $? "unrecognized option: \`$1'
19733 Try \`$0 --help' for more information." ;;
19735 *) as_fn_append ac_config_targets " $1"
19736 ac_need_defaults=false ;;
19738 esac
19739 shift
19740 done
19742 ac_configure_extra_args=
19744 if $ac_cs_silent; then
19745 exec 6>/dev/null
19746 ac_configure_extra_args="$ac_configure_extra_args --silent"
19749 _ACEOF
19750 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19751 if \$ac_cs_recheck; then
19752 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19753 shift
19754 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19755 CONFIG_SHELL='$SHELL'
19756 export CONFIG_SHELL
19757 exec "\$@"
19760 _ACEOF
19761 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19762 exec 5>>config.log
19764 echo
19765 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19766 ## Running $as_me. ##
19767 _ASBOX
19768 $as_echo "$ac_log"
19769 } >&5
19771 _ACEOF
19772 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19773 _ACEOF
19775 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19777 # Handling of arguments.
19778 for ac_config_target in $ac_config_targets
19780 case $ac_config_target in
19781 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19782 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19783 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19784 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19785 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19786 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19787 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19788 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19789 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19790 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19791 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19793 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19794 esac
19795 done
19798 # If the user did not use the arguments to specify the items to instantiate,
19799 # then the envvar interface is used. Set only those that are not.
19800 # We use the long form for the default assignment because of an extremely
19801 # bizarre bug on SunOS 4.1.3.
19802 if $ac_need_defaults; then
19803 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19804 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19805 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19806 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19809 # Have a temporary directory for convenience. Make it in the build tree
19810 # simply because there is no reason against having it here, and in addition,
19811 # creating and moving files from /tmp can sometimes cause problems.
19812 # Hook for its removal unless debugging.
19813 # Note that there is a small window in which the directory will not be cleaned:
19814 # after its creation but before its name has been assigned to `$tmp'.
19815 $debug ||
19817 tmp= ac_tmp=
19818 trap 'exit_status=$?
19819 : "${ac_tmp:=$tmp}"
19820 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19822 trap 'as_fn_exit 1' 1 2 13 15
19824 # Create a (secure) tmp directory for tmp files.
19827 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19828 test -d "$tmp"
19829 } ||
19831 tmp=./conf$$-$RANDOM
19832 (umask 077 && mkdir "$tmp")
19833 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19834 ac_tmp=$tmp
19836 # Set up the scripts for CONFIG_FILES section.
19837 # No need to generate them if there are no CONFIG_FILES.
19838 # This happens for instance with `./config.status config.h'.
19839 if test -n "$CONFIG_FILES"; then
19842 ac_cr=`echo X | tr X '\015'`
19843 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19844 # But we know of no other shell where ac_cr would be empty at this
19845 # point, so we can use a bashism as a fallback.
19846 if test "x$ac_cr" = x; then
19847 eval ac_cr=\$\'\\r\'
19849 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19850 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19851 ac_cs_awk_cr='\\r'
19852 else
19853 ac_cs_awk_cr=$ac_cr
19856 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19857 _ACEOF
19861 echo "cat >conf$$subs.awk <<_ACEOF" &&
19862 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19863 echo "_ACEOF"
19864 } >conf$$subs.sh ||
19865 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19866 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19867 ac_delim='%!_!# '
19868 for ac_last_try in false false false false false :; do
19869 . ./conf$$subs.sh ||
19870 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19872 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19873 if test $ac_delim_n = $ac_delim_num; then
19874 break
19875 elif $ac_last_try; then
19876 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19877 else
19878 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19880 done
19881 rm -f conf$$subs.sh
19883 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19884 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19885 _ACEOF
19886 sed -n '
19888 s/^/S["/; s/!.*/"]=/
19891 s/^[^!]*!//
19892 :repl
19893 t repl
19894 s/'"$ac_delim"'$//
19895 t delim
19898 s/\(.\{148\}\)..*/\1/
19899 t more1
19900 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19903 b repl
19904 :more1
19905 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19908 s/.\{148\}//
19909 t nl
19910 :delim
19912 s/\(.\{148\}\)..*/\1/
19913 t more2
19914 s/["\\]/\\&/g; s/^/"/; s/$/"/
19917 :more2
19918 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19921 s/.\{148\}//
19922 t delim
19923 ' <conf$$subs.awk | sed '
19924 /^[^""]/{
19926 s/\n//
19928 ' >>$CONFIG_STATUS || ac_write_fail=1
19929 rm -f conf$$subs.awk
19930 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19931 _ACAWK
19932 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19933 for (key in S) S_is_set[key] = 1
19934 FS = "\a"
19938 line = $ 0
19939 nfields = split(line, field, "@")
19940 substed = 0
19941 len = length(field[1])
19942 for (i = 2; i < nfields; i++) {
19943 key = field[i]
19944 keylen = length(key)
19945 if (S_is_set[key]) {
19946 value = S[key]
19947 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19948 len += length(value) + length(field[++i])
19949 substed = 1
19950 } else
19951 len += 1 + keylen
19954 print line
19957 _ACAWK
19958 _ACEOF
19959 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19960 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19961 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19962 else
19964 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19965 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19966 _ACEOF
19968 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19969 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19970 # trailing colons and then remove the whole line if VPATH becomes empty
19971 # (actually we leave an empty line to preserve line numbers).
19972 if test "x$srcdir" = x.; then
19973 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19975 s///
19976 s/^/:/
19977 s/[ ]*$/:/
19978 s/:\$(srcdir):/:/g
19979 s/:\${srcdir}:/:/g
19980 s/:@srcdir@:/:/g
19981 s/^:*//
19982 s/:*$//
19984 s/\(=[ ]*\).*/\1/
19986 s/\n//
19987 s/^[^=]*=[ ]*$//
19991 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19992 fi # test -n "$CONFIG_FILES"
19994 # Set up the scripts for CONFIG_HEADERS section.
19995 # No need to generate them if there are no CONFIG_HEADERS.
19996 # This happens for instance with `./config.status Makefile'.
19997 if test -n "$CONFIG_HEADERS"; then
19998 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19999 BEGIN {
20000 _ACEOF
20002 # Transform confdefs.h into an awk script `defines.awk', embedded as
20003 # here-document in config.status, that substitutes the proper values into
20004 # config.h.in to produce config.h.
20006 # Create a delimiter string that does not exist in confdefs.h, to ease
20007 # handling of long lines.
20008 ac_delim='%!_!# '
20009 for ac_last_try in false false :; do
20010 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20011 if test -z "$ac_tt"; then
20012 break
20013 elif $ac_last_try; then
20014 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20015 else
20016 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20018 done
20020 # For the awk script, D is an array of macro values keyed by name,
20021 # likewise P contains macro parameters if any. Preserve backslash
20022 # newline sequences.
20024 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20025 sed -n '
20026 s/.\{148\}/&'"$ac_delim"'/g
20027 t rset
20028 :rset
20029 s/^[ ]*#[ ]*define[ ][ ]*/ /
20030 t def
20032 :def
20033 s/\\$//
20034 t bsnl
20035 s/["\\]/\\&/g
20036 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20037 D["\1"]=" \3"/p
20038 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20040 :bsnl
20041 s/["\\]/\\&/g
20042 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20043 D["\1"]=" \3\\\\\\n"\\/p
20044 t cont
20045 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20046 t cont
20048 :cont
20050 s/.\{148\}/&'"$ac_delim"'/g
20051 t clear
20052 :clear
20053 s/\\$//
20054 t bsnlc
20055 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20057 :bsnlc
20058 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20059 b cont
20060 ' <confdefs.h | sed '
20061 s/'"$ac_delim"'/"\\\
20062 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20064 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20065 for (key in D) D_is_set[key] = 1
20066 FS = "\a"
20068 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20069 line = \$ 0
20070 split(line, arg, " ")
20071 if (arg[1] == "#") {
20072 defundef = arg[2]
20073 mac1 = arg[3]
20074 } else {
20075 defundef = substr(arg[1], 2)
20076 mac1 = arg[2]
20078 split(mac1, mac2, "(") #)
20079 macro = mac2[1]
20080 prefix = substr(line, 1, index(line, defundef) - 1)
20081 if (D_is_set[macro]) {
20082 # Preserve the white space surrounding the "#".
20083 print prefix "define", macro P[macro] D[macro]
20084 next
20085 } else {
20086 # Replace #undef with comments. This is necessary, for example,
20087 # in the case of _POSIX_SOURCE, which is predefined and required
20088 # on some systems where configure will not decide to define it.
20089 if (defundef == "undef") {
20090 print "/*", prefix defundef, macro, "*/"
20091 next
20095 { print }
20096 _ACAWK
20097 _ACEOF
20098 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20099 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20100 fi # test -n "$CONFIG_HEADERS"
20103 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20104 shift
20105 for ac_tag
20107 case $ac_tag in
20108 :[FHLC]) ac_mode=$ac_tag; continue;;
20109 esac
20110 case $ac_mode$ac_tag in
20111 :[FHL]*:*);;
20112 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20113 :[FH]-) ac_tag=-:-;;
20114 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20115 esac
20116 ac_save_IFS=$IFS
20117 IFS=:
20118 set x $ac_tag
20119 IFS=$ac_save_IFS
20120 shift
20121 ac_file=$1
20122 shift
20124 case $ac_mode in
20125 :L) ac_source=$1;;
20126 :[FH])
20127 ac_file_inputs=
20128 for ac_f
20130 case $ac_f in
20131 -) ac_f="$ac_tmp/stdin";;
20132 *) # Look for the file first in the build tree, then in the source tree
20133 # (if the path is not absolute). The absolute path cannot be DOS-style,
20134 # because $ac_f cannot contain `:'.
20135 test -f "$ac_f" ||
20136 case $ac_f in
20137 [\\/$]*) false;;
20138 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20139 esac ||
20140 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20141 esac
20142 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20143 as_fn_append ac_file_inputs " '$ac_f'"
20144 done
20146 # Let's still pretend it is `configure' which instantiates (i.e., don't
20147 # use $as_me), people would be surprised to read:
20148 # /* config.h. Generated by config.status. */
20149 configure_input='Generated from '`
20150 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20151 `' by configure.'
20152 if test x"$ac_file" != x-; then
20153 configure_input="$ac_file. $configure_input"
20154 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20155 $as_echo "$as_me: creating $ac_file" >&6;}
20157 # Neutralize special characters interpreted by sed in replacement strings.
20158 case $configure_input in #(
20159 *\&* | *\|* | *\\* )
20160 ac_sed_conf_input=`$as_echo "$configure_input" |
20161 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20162 *) ac_sed_conf_input=$configure_input;;
20163 esac
20165 case $ac_tag in
20166 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20167 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20168 esac
20170 esac
20172 ac_dir=`$as_dirname -- "$ac_file" ||
20173 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20174 X"$ac_file" : 'X\(//\)[^/]' \| \
20175 X"$ac_file" : 'X\(//\)$' \| \
20176 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20177 $as_echo X"$ac_file" |
20178 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20179 s//\1/
20182 /^X\(\/\/\)[^/].*/{
20183 s//\1/
20186 /^X\(\/\/\)$/{
20187 s//\1/
20190 /^X\(\/\).*/{
20191 s//\1/
20194 s/.*/./; q'`
20195 as_dir="$ac_dir"; as_fn_mkdir_p
20196 ac_builddir=.
20198 case "$ac_dir" in
20199 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20201 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20202 # A ".." for each directory in $ac_dir_suffix.
20203 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20204 case $ac_top_builddir_sub in
20205 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20206 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20207 esac ;;
20208 esac
20209 ac_abs_top_builddir=$ac_pwd
20210 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20211 # for backward compatibility:
20212 ac_top_builddir=$ac_top_build_prefix
20214 case $srcdir in
20215 .) # We are building in place.
20216 ac_srcdir=.
20217 ac_top_srcdir=$ac_top_builddir_sub
20218 ac_abs_top_srcdir=$ac_pwd ;;
20219 [\\/]* | ?:[\\/]* ) # Absolute name.
20220 ac_srcdir=$srcdir$ac_dir_suffix;
20221 ac_top_srcdir=$srcdir
20222 ac_abs_top_srcdir=$srcdir ;;
20223 *) # Relative name.
20224 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20225 ac_top_srcdir=$ac_top_build_prefix$srcdir
20226 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20227 esac
20228 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20231 case $ac_mode in
20234 # CONFIG_FILE
20237 case $INSTALL in
20238 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20239 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20240 esac
20241 ac_MKDIR_P=$MKDIR_P
20242 case $MKDIR_P in
20243 [\\/$]* | ?:[\\/]* ) ;;
20244 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20245 esac
20246 _ACEOF
20248 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20249 # If the template does not know about datarootdir, expand it.
20250 # FIXME: This hack should be removed a few years after 2.60.
20251 ac_datarootdir_hack=; ac_datarootdir_seen=
20252 ac_sed_dataroot='
20253 /datarootdir/ {
20257 /@datadir@/p
20258 /@docdir@/p
20259 /@infodir@/p
20260 /@localedir@/p
20261 /@mandir@/p'
20262 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20263 *datarootdir*) ac_datarootdir_seen=yes;;
20264 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20265 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20266 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20267 _ACEOF
20268 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20269 ac_datarootdir_hack='
20270 s&@datadir@&$datadir&g
20271 s&@docdir@&$docdir&g
20272 s&@infodir@&$infodir&g
20273 s&@localedir@&$localedir&g
20274 s&@mandir@&$mandir&g
20275 s&\\\${datarootdir}&$datarootdir&g' ;;
20276 esac
20277 _ACEOF
20279 # Neutralize VPATH when `$srcdir' = `.'.
20280 # Shell code in configure.ac might set extrasub.
20281 # FIXME: do we really want to maintain this feature?
20282 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20283 ac_sed_extra="$ac_vpsub
20284 $extrasub
20285 _ACEOF
20286 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20288 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20289 s|@configure_input@|$ac_sed_conf_input|;t t
20290 s&@top_builddir@&$ac_top_builddir_sub&;t t
20291 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20292 s&@srcdir@&$ac_srcdir&;t t
20293 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20294 s&@top_srcdir@&$ac_top_srcdir&;t t
20295 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20296 s&@builddir@&$ac_builddir&;t t
20297 s&@abs_builddir@&$ac_abs_builddir&;t t
20298 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20299 s&@INSTALL@&$ac_INSTALL&;t t
20300 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20301 $ac_datarootdir_hack
20303 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20304 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20306 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20307 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20308 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20309 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20311 which seems to be undefined. Please make sure it is defined" >&5
20312 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20313 which seems to be undefined. Please make sure it is defined" >&2;}
20315 rm -f "$ac_tmp/stdin"
20316 case $ac_file in
20317 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20318 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20319 esac \
20320 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20324 # CONFIG_HEADER
20326 if test x"$ac_file" != x-; then
20328 $as_echo "/* $configure_input */" \
20329 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20330 } >"$ac_tmp/config.h" \
20331 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20332 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20333 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20334 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20335 else
20336 rm -f "$ac_file"
20337 mv "$ac_tmp/config.h" "$ac_file" \
20338 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20340 else
20341 $as_echo "/* $configure_input */" \
20342 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20343 || as_fn_error $? "could not create -" "$LINENO" 5
20348 # CONFIG_LINK
20351 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20353 else
20354 # Prefer the file from the source tree if names are identical.
20355 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20356 ac_source=$srcdir/$ac_source
20359 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20360 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20362 if test ! -r "$ac_source"; then
20363 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20365 rm -f "$ac_file"
20367 # Try a relative symlink, then a hard link, then a copy.
20368 case $ac_source in
20369 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20370 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20371 esac
20372 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20373 ln "$ac_source" "$ac_file" 2>/dev/null ||
20374 cp -p "$ac_source" "$ac_file" ||
20375 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20378 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20379 $as_echo "$as_me: executing $ac_file commands" >&6;}
20381 esac
20384 case $ac_file$ac_mode in
20385 "check_win32_symlinks":C)
20386 # Links sometimes fail undetected on Mingw -
20387 # so here we detect it and warn the user
20388 for FILE in $CONFIG_LINKS
20390 # test -e works for symlinks in the MinGW console
20391 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20392 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20393 done
20395 "src/include/pg_config.h":H)
20396 # Update timestamp for pg_config.h (see Makefile.global)
20397 echo >src/include/stamp-h
20399 "src/include/pg_config_ext.h":H)
20400 # Update timestamp for pg_config_ext.h (see Makefile.global)
20401 echo >src/include/stamp-ext-h
20403 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20405 esac
20406 done # for ac_tag
20409 as_fn_exit 0
20410 _ACEOF
20411 ac_clean_files=$ac_clean_files_save
20413 test $ac_write_fail = 0 ||
20414 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20417 # configure is writing to config.log, and then calls config.status.
20418 # config.status does its own redirection, appending to config.log.
20419 # Unfortunately, on DOS this fails, as config.log is still kept open
20420 # by configure, so config.status won't be able to write to it; its
20421 # output is simply discarded. So we exec the FD to /dev/null,
20422 # effectively closing config.log, so it can be properly (re)opened and
20423 # appended to by config.status. When coming back to configure, we
20424 # need to make the FD available again.
20425 if test "$no_create" != yes; then
20426 ac_cs_success=:
20427 ac_config_status_args=
20428 test "$silent" = yes &&
20429 ac_config_status_args="$ac_config_status_args --quiet"
20430 exec 5>/dev/null
20431 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20432 exec 5>>config.log
20433 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20434 # would make configure fail if this is the last instruction.
20435 $ac_cs_success || as_fn_exit 1
20437 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20438 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20439 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20443 # Ensure that any meson build directories would reconfigure and see that
20444 # there's a conflicting in-tree build and can error out.
20445 if test "$vpath_build" = "no"; then
20446 touch meson.build