Stamp 12.22.
[pgsql.git] / configure
blob350d426a77ea8c5d4fa46a9e7136b4a9ff60779a
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 12.22.
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-2019, 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='12.22'
586 PACKAGE_STRING='PostgreSQL 12.22'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL=''
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 DBTOEPUB
635 XSLTPROC
636 XMLLINT
637 TCL_SHLIB_LD_LIBS
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_ARMV8_CRC32C
650 CFLAGS_SSE42
651 have_win32_dbghelp
652 LIBOBJS
653 UUID_LIBS
654 LDAP_LIBS_BE
655 LDAP_LIBS_FE
656 PTHREAD_CFLAGS
657 PTHREAD_LIBS
658 PTHREAD_CC
659 ax_pthread_config
662 python_additional_libs
663 python_libspec
664 python_libdir
665 python_includespec
666 python_version
667 python_majorversion
668 PYTHON
669 perl_embed_ldflags
670 perl_embed_ccflags
671 perl_includespec
672 perl_useshrplib
673 perl_privlibexp
674 perl_archlibexp
675 PERL
676 FLEXFLAGS
677 FLEX
678 BISONFLAGS
679 BISON
680 MKDIR_P
681 LN_S
683 install_bin
684 INSTALL_DATA
685 INSTALL_SCRIPT
686 INSTALL_PROGRAM
687 WINDRES
688 DLLWRAP
689 DLLTOOL
691 STRIP_SHARED_LIB
692 STRIP_STATIC_LIB
693 STRIP
694 RANLIB
695 with_gnu_ld
697 LDFLAGS_SL
698 LDFLAGS_EX
699 ELF_SYS
700 EGREP
701 GREP
702 with_zlib
703 with_system_tzdata
704 with_libxslt
705 XML2_LIBS
706 XML2_CFLAGS
707 XML2_CONFIG
708 with_libxml
709 UUID_EXTRA_OBJS
710 with_uuid
711 with_systemd
712 with_selinux
713 with_openssl
714 with_ldap
715 with_krb_srvnam
716 krb_srvtab
717 with_gssapi
718 with_python
719 with_perl
720 with_tcl
721 ICU_LIBS
722 ICU_CFLAGS
723 with_icu
724 enable_thread_safety
725 INCLUDES
726 autodepend
727 PKG_CONFIG_LIBDIR
728 PKG_CONFIG_PATH
729 PKG_CONFIG
733 CFLAGS_SL
734 BITCODE_CXXFLAGS
735 BITCODE_CFLAGS
736 CFLAGS_VECTOR
737 PERMIT_DECLARATION_AFTER_STATEMENT
738 LLVM_BINPATH
739 LLVM_CXXFLAGS
740 LLVM_CFLAGS
741 LLVM_CPPFLAGS
742 LLVM_LIBS
743 CLANG
744 LLVM_CONFIG
746 with_llvm
747 SUN_STUDIO_CC
748 ac_ct_CXX
749 CXXFLAGS
751 OBJEXT
752 EXEEXT
753 ac_ct_CC
754 CPPFLAGS
755 LDFLAGS
756 CFLAGS
758 enable_tap_tests
759 enable_dtrace
760 DTRACEFLAGS
761 DTRACE
762 enable_coverage
763 GENHTML
764 LCOV
765 GCOV
766 enable_debug
767 enable_rpath
768 default_port
769 WANTED_LANGUAGES
770 enable_nls
771 PORTNAME
772 host_os
773 host_vendor
774 host_cpu
775 host
776 build_os
777 build_vendor
778 build_cpu
779 build
780 PG_MAJORVERSION
781 configure_args
782 target_alias
783 host_alias
784 build_alias
785 LIBS
786 ECHO_T
787 ECHO_N
788 ECHO_C
789 DEFS
790 mandir
791 localedir
792 libdir
793 psdir
794 pdfdir
795 dvidir
796 htmldir
797 infodir
798 docdir
799 oldincludedir
800 includedir
801 localstatedir
802 sharedstatedir
803 sysconfdir
804 datadir
805 datarootdir
806 libexecdir
807 sbindir
808 bindir
809 program_transform_name
810 prefix
811 exec_prefix
812 PACKAGE_URL
813 PACKAGE_BUGREPORT
814 PACKAGE_STRING
815 PACKAGE_VERSION
816 PACKAGE_TARNAME
817 PACKAGE_NAME
818 PATH_SEPARATOR
819 SHELL'
820 ac_subst_files=''
821 ac_user_opts='
822 enable_option_checking
823 with_extra_version
824 with_template
825 with_includes
826 with_libraries
827 with_libs
828 enable_integer_datetimes
829 enable_nls
830 with_pgport
831 enable_rpath
832 enable_spinlocks
833 enable_atomics
834 enable_debug
835 enable_profiling
836 enable_coverage
837 enable_dtrace
838 enable_tap_tests
839 with_blocksize
840 with_segsize
841 with_wal_blocksize
842 with_CC
843 with_llvm
844 enable_depend
845 enable_cassert
846 enable_thread_safety
847 with_icu
848 with_tcl
849 with_tclconfig
850 with_perl
851 with_python
852 with_gssapi
853 with_krb_srvnam
854 with_pam
855 with_bsd_auth
856 with_ldap
857 with_bonjour
858 with_openssl
859 with_selinux
860 with_systemd
861 with_readline
862 with_libedit_preferred
863 with_uuid
864 with_ossp_uuid
865 with_libxml
866 with_libxslt
867 with_system_tzdata
868 with_zlib
869 with_gnu_ld
870 enable_largefile
871 enable_float4_byval
872 enable_float8_byval
874 ac_precious_vars='build_alias
875 host_alias
876 target_alias
878 CFLAGS
879 LDFLAGS
880 LIBS
881 CPPFLAGS
883 CXXFLAGS
885 LLVM_CONFIG
886 CLANG
888 PKG_CONFIG
889 PKG_CONFIG_PATH
890 PKG_CONFIG_LIBDIR
891 ICU_CFLAGS
892 ICU_LIBS
893 XML2_CONFIG
894 XML2_CFLAGS
895 XML2_LIBS
896 LDFLAGS_EX
897 LDFLAGS_SL
898 PERL
899 PYTHON
900 MSGFMT
901 TCLSH'
904 # Initialize some variables set by options.
905 ac_init_help=
906 ac_init_version=false
907 ac_unrecognized_opts=
908 ac_unrecognized_sep=
909 # The variables have the same names as the options, with
910 # dashes changed to underlines.
911 cache_file=/dev/null
912 exec_prefix=NONE
913 no_create=
914 no_recursion=
915 prefix=NONE
916 program_prefix=NONE
917 program_suffix=NONE
918 program_transform_name=s,x,x,
919 silent=
920 site=
921 srcdir=
922 verbose=
923 x_includes=NONE
924 x_libraries=NONE
926 # Installation directory options.
927 # These are left unexpanded so users can "make install exec_prefix=/foo"
928 # and all the variables that are supposed to be based on exec_prefix
929 # by default will actually change.
930 # Use braces instead of parens because sh, perl, etc. also accept them.
931 # (The list follows the same order as the GNU Coding Standards.)
932 bindir='${exec_prefix}/bin'
933 sbindir='${exec_prefix}/sbin'
934 libexecdir='${exec_prefix}/libexec'
935 datarootdir='${prefix}/share'
936 datadir='${datarootdir}'
937 sysconfdir='${prefix}/etc'
938 sharedstatedir='${prefix}/com'
939 localstatedir='${prefix}/var'
940 includedir='${prefix}/include'
941 oldincludedir='/usr/include'
942 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
943 infodir='${datarootdir}/info'
944 htmldir='${docdir}'
945 dvidir='${docdir}'
946 pdfdir='${docdir}'
947 psdir='${docdir}'
948 libdir='${exec_prefix}/lib'
949 localedir='${datarootdir}/locale'
950 mandir='${datarootdir}/man'
952 ac_prev=
953 ac_dashdash=
954 for ac_option
956 # If the previous option needs an argument, assign it.
957 if test -n "$ac_prev"; then
958 eval $ac_prev=\$ac_option
959 ac_prev=
960 continue
963 case $ac_option in
964 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
965 *=) ac_optarg= ;;
966 *) ac_optarg=yes ;;
967 esac
969 # Accept the important Cygnus configure options, so we can diagnose typos.
971 case $ac_dashdash$ac_option in
973 ac_dashdash=yes ;;
975 -bindir | --bindir | --bindi | --bind | --bin | --bi)
976 ac_prev=bindir ;;
977 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
978 bindir=$ac_optarg ;;
980 -build | --build | --buil | --bui | --bu)
981 ac_prev=build_alias ;;
982 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
983 build_alias=$ac_optarg ;;
985 -cache-file | --cache-file | --cache-fil | --cache-fi \
986 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
987 ac_prev=cache_file ;;
988 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
989 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
990 cache_file=$ac_optarg ;;
992 --config-cache | -C)
993 cache_file=config.cache ;;
995 -datadir | --datadir | --datadi | --datad)
996 ac_prev=datadir ;;
997 -datadir=* | --datadir=* | --datadi=* | --datad=*)
998 datadir=$ac_optarg ;;
1000 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1001 | --dataroo | --dataro | --datar)
1002 ac_prev=datarootdir ;;
1003 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1004 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1005 datarootdir=$ac_optarg ;;
1007 -disable-* | --disable-*)
1008 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1009 # Reject names that are not valid shell variable names.
1010 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1011 as_fn_error $? "invalid feature name: $ac_useropt"
1012 ac_useropt_orig=$ac_useropt
1013 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1014 case $ac_user_opts in
1016 "enable_$ac_useropt"
1017 "*) ;;
1018 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1019 ac_unrecognized_sep=', ';;
1020 esac
1021 eval enable_$ac_useropt=no ;;
1023 -docdir | --docdir | --docdi | --doc | --do)
1024 ac_prev=docdir ;;
1025 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1026 docdir=$ac_optarg ;;
1028 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1029 ac_prev=dvidir ;;
1030 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1031 dvidir=$ac_optarg ;;
1033 -enable-* | --enable-*)
1034 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1035 # Reject names that are not valid shell variable names.
1036 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1037 as_fn_error $? "invalid feature name: $ac_useropt"
1038 ac_useropt_orig=$ac_useropt
1039 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1040 case $ac_user_opts in
1042 "enable_$ac_useropt"
1043 "*) ;;
1044 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1045 ac_unrecognized_sep=', ';;
1046 esac
1047 eval enable_$ac_useropt=\$ac_optarg ;;
1049 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1050 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1051 | --exec | --exe | --ex)
1052 ac_prev=exec_prefix ;;
1053 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1054 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1055 | --exec=* | --exe=* | --ex=*)
1056 exec_prefix=$ac_optarg ;;
1058 -gas | --gas | --ga | --g)
1059 # Obsolete; use --with-gas.
1060 with_gas=yes ;;
1062 -help | --help | --hel | --he | -h)
1063 ac_init_help=long ;;
1064 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1065 ac_init_help=recursive ;;
1066 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1067 ac_init_help=short ;;
1069 -host | --host | --hos | --ho)
1070 ac_prev=host_alias ;;
1071 -host=* | --host=* | --hos=* | --ho=*)
1072 host_alias=$ac_optarg ;;
1074 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1075 ac_prev=htmldir ;;
1076 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1077 | --ht=*)
1078 htmldir=$ac_optarg ;;
1080 -includedir | --includedir | --includedi | --included | --include \
1081 | --includ | --inclu | --incl | --inc)
1082 ac_prev=includedir ;;
1083 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1084 | --includ=* | --inclu=* | --incl=* | --inc=*)
1085 includedir=$ac_optarg ;;
1087 -infodir | --infodir | --infodi | --infod | --info | --inf)
1088 ac_prev=infodir ;;
1089 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1090 infodir=$ac_optarg ;;
1092 -libdir | --libdir | --libdi | --libd)
1093 ac_prev=libdir ;;
1094 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1095 libdir=$ac_optarg ;;
1097 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1098 | --libexe | --libex | --libe)
1099 ac_prev=libexecdir ;;
1100 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1101 | --libexe=* | --libex=* | --libe=*)
1102 libexecdir=$ac_optarg ;;
1104 -localedir | --localedir | --localedi | --localed | --locale)
1105 ac_prev=localedir ;;
1106 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1107 localedir=$ac_optarg ;;
1109 -localstatedir | --localstatedir | --localstatedi | --localstated \
1110 | --localstate | --localstat | --localsta | --localst | --locals)
1111 ac_prev=localstatedir ;;
1112 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1113 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1114 localstatedir=$ac_optarg ;;
1116 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1117 ac_prev=mandir ;;
1118 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1119 mandir=$ac_optarg ;;
1121 -nfp | --nfp | --nf)
1122 # Obsolete; use --without-fp.
1123 with_fp=no ;;
1125 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1126 | --no-cr | --no-c | -n)
1127 no_create=yes ;;
1129 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1130 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1131 no_recursion=yes ;;
1133 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1134 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1135 | --oldin | --oldi | --old | --ol | --o)
1136 ac_prev=oldincludedir ;;
1137 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1138 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1139 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1140 oldincludedir=$ac_optarg ;;
1142 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1143 ac_prev=prefix ;;
1144 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1145 prefix=$ac_optarg ;;
1147 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1148 | --program-pre | --program-pr | --program-p)
1149 ac_prev=program_prefix ;;
1150 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1151 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1152 program_prefix=$ac_optarg ;;
1154 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1155 | --program-suf | --program-su | --program-s)
1156 ac_prev=program_suffix ;;
1157 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1158 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1159 program_suffix=$ac_optarg ;;
1161 -program-transform-name | --program-transform-name \
1162 | --program-transform-nam | --program-transform-na \
1163 | --program-transform-n | --program-transform- \
1164 | --program-transform | --program-transfor \
1165 | --program-transfo | --program-transf \
1166 | --program-trans | --program-tran \
1167 | --progr-tra | --program-tr | --program-t)
1168 ac_prev=program_transform_name ;;
1169 -program-transform-name=* | --program-transform-name=* \
1170 | --program-transform-nam=* | --program-transform-na=* \
1171 | --program-transform-n=* | --program-transform-=* \
1172 | --program-transform=* | --program-transfor=* \
1173 | --program-transfo=* | --program-transf=* \
1174 | --program-trans=* | --program-tran=* \
1175 | --progr-tra=* | --program-tr=* | --program-t=*)
1176 program_transform_name=$ac_optarg ;;
1178 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1179 ac_prev=pdfdir ;;
1180 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1181 pdfdir=$ac_optarg ;;
1183 -psdir | --psdir | --psdi | --psd | --ps)
1184 ac_prev=psdir ;;
1185 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1186 psdir=$ac_optarg ;;
1188 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1189 | -silent | --silent | --silen | --sile | --sil)
1190 silent=yes ;;
1192 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1193 ac_prev=sbindir ;;
1194 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1195 | --sbi=* | --sb=*)
1196 sbindir=$ac_optarg ;;
1198 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1199 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1200 | --sharedst | --shareds | --shared | --share | --shar \
1201 | --sha | --sh)
1202 ac_prev=sharedstatedir ;;
1203 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1204 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1205 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1206 | --sha=* | --sh=*)
1207 sharedstatedir=$ac_optarg ;;
1209 -site | --site | --sit)
1210 ac_prev=site ;;
1211 -site=* | --site=* | --sit=*)
1212 site=$ac_optarg ;;
1214 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1215 ac_prev=srcdir ;;
1216 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1217 srcdir=$ac_optarg ;;
1219 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1220 | --syscon | --sysco | --sysc | --sys | --sy)
1221 ac_prev=sysconfdir ;;
1222 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1223 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1224 sysconfdir=$ac_optarg ;;
1226 -target | --target | --targe | --targ | --tar | --ta | --t)
1227 ac_prev=target_alias ;;
1228 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1229 target_alias=$ac_optarg ;;
1231 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1232 verbose=yes ;;
1234 -version | --version | --versio | --versi | --vers | -V)
1235 ac_init_version=: ;;
1237 -with-* | --with-*)
1238 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1239 # Reject names that are not valid shell variable names.
1240 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1241 as_fn_error $? "invalid package name: $ac_useropt"
1242 ac_useropt_orig=$ac_useropt
1243 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1244 case $ac_user_opts in
1246 "with_$ac_useropt"
1247 "*) ;;
1248 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1249 ac_unrecognized_sep=', ';;
1250 esac
1251 eval with_$ac_useropt=\$ac_optarg ;;
1253 -without-* | --without-*)
1254 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1255 # Reject names that are not valid shell variable names.
1256 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1257 as_fn_error $? "invalid package name: $ac_useropt"
1258 ac_useropt_orig=$ac_useropt
1259 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1260 case $ac_user_opts in
1262 "with_$ac_useropt"
1263 "*) ;;
1264 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1265 ac_unrecognized_sep=', ';;
1266 esac
1267 eval with_$ac_useropt=no ;;
1269 --x)
1270 # Obsolete; use --with-x.
1271 with_x=yes ;;
1273 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1274 | --x-incl | --x-inc | --x-in | --x-i)
1275 ac_prev=x_includes ;;
1276 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1277 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1278 x_includes=$ac_optarg ;;
1280 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1281 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1282 ac_prev=x_libraries ;;
1283 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1284 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1285 x_libraries=$ac_optarg ;;
1287 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1288 Try \`$0 --help' for more information"
1291 *=*)
1292 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1293 # Reject names that are not valid shell variable names.
1294 case $ac_envvar in #(
1295 '' | [0-9]* | *[!_$as_cr_alnum]* )
1296 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1297 esac
1298 eval $ac_envvar=\$ac_optarg
1299 export $ac_envvar ;;
1302 # FIXME: should be removed in autoconf 3.0.
1303 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1304 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1305 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1306 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1309 esac
1310 done
1312 if test -n "$ac_prev"; then
1313 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1314 as_fn_error $? "missing argument to $ac_option"
1317 if test -n "$ac_unrecognized_opts"; then
1318 case $enable_option_checking in
1319 no) ;;
1320 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1321 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1322 esac
1325 # Check all directory arguments for consistency.
1326 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1327 datadir sysconfdir sharedstatedir localstatedir includedir \
1328 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1329 libdir localedir mandir
1331 eval ac_val=\$$ac_var
1332 # Remove trailing slashes.
1333 case $ac_val in
1334 */ )
1335 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1336 eval $ac_var=\$ac_val;;
1337 esac
1338 # Be sure to have absolute directory names.
1339 case $ac_val in
1340 [\\/$]* | ?:[\\/]* ) continue;;
1341 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1342 esac
1343 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1344 done
1346 # There might be people who depend on the old broken behavior: `$host'
1347 # used to hold the argument of --host etc.
1348 # FIXME: To remove some day.
1349 build=$build_alias
1350 host=$host_alias
1351 target=$target_alias
1353 # FIXME: To remove some day.
1354 if test "x$host_alias" != x; then
1355 if test "x$build_alias" = x; then
1356 cross_compiling=maybe
1357 elif test "x$build_alias" != "x$host_alias"; then
1358 cross_compiling=yes
1362 ac_tool_prefix=
1363 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1365 test "$silent" = yes && exec 6>/dev/null
1368 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1369 ac_ls_di=`ls -di .` &&
1370 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1371 as_fn_error $? "working directory cannot be determined"
1372 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1373 as_fn_error $? "pwd does not report name of working directory"
1376 # Find the source files, if location was not specified.
1377 if test -z "$srcdir"; then
1378 ac_srcdir_defaulted=yes
1379 # Try the directory containing this script, then the parent directory.
1380 ac_confdir=`$as_dirname -- "$as_myself" ||
1381 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1382 X"$as_myself" : 'X\(//\)[^/]' \| \
1383 X"$as_myself" : 'X\(//\)$' \| \
1384 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1385 $as_echo X"$as_myself" |
1386 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1387 s//\1/
1390 /^X\(\/\/\)[^/].*/{
1391 s//\1/
1394 /^X\(\/\/\)$/{
1395 s//\1/
1398 /^X\(\/\).*/{
1399 s//\1/
1402 s/.*/./; q'`
1403 srcdir=$ac_confdir
1404 if test ! -r "$srcdir/$ac_unique_file"; then
1405 srcdir=..
1407 else
1408 ac_srcdir_defaulted=no
1410 if test ! -r "$srcdir/$ac_unique_file"; then
1411 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1412 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1414 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1415 ac_abs_confdir=`(
1416 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1417 pwd)`
1418 # When building in place, set srcdir=.
1419 if test "$ac_abs_confdir" = "$ac_pwd"; then
1420 srcdir=.
1422 # Remove unnecessary trailing slashes from srcdir.
1423 # Double slashes in file names in object file debugging info
1424 # mess up M-x gdb in Emacs.
1425 case $srcdir in
1426 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1427 esac
1428 for ac_var in $ac_precious_vars; do
1429 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1430 eval ac_env_${ac_var}_value=\$${ac_var}
1431 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1432 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1433 done
1436 # Report the --help message.
1438 if test "$ac_init_help" = "long"; then
1439 # Omit some internal or obsolete options to make the list less imposing.
1440 # This message is too long to be a string in the A/UX 3.1 sh.
1441 cat <<_ACEOF
1442 \`configure' configures PostgreSQL 12.22 to adapt to many kinds of systems.
1444 Usage: $0 [OPTION]... [VAR=VALUE]...
1446 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1447 VAR=VALUE. See below for descriptions of some of the useful variables.
1449 Defaults for the options are specified in brackets.
1451 Configuration:
1452 -h, --help display this help and exit
1453 --help=short display options specific to this package
1454 --help=recursive display the short help of all the included packages
1455 -V, --version display version information and exit
1456 -q, --quiet, --silent do not print \`checking ...' messages
1457 --cache-file=FILE cache test results in FILE [disabled]
1458 -C, --config-cache alias for \`--cache-file=config.cache'
1459 -n, --no-create do not create output files
1460 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1462 Installation directories:
1463 --prefix=PREFIX install architecture-independent files in PREFIX
1464 [$ac_default_prefix]
1465 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1466 [PREFIX]
1468 By default, \`make install' will install all the files in
1469 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1470 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1471 for instance \`--prefix=\$HOME'.
1473 For better control, use the options below.
1475 Fine tuning of the installation directories:
1476 --bindir=DIR user executables [EPREFIX/bin]
1477 --sbindir=DIR system admin executables [EPREFIX/sbin]
1478 --libexecdir=DIR program executables [EPREFIX/libexec]
1479 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1480 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1481 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1482 --libdir=DIR object code libraries [EPREFIX/lib]
1483 --includedir=DIR C header files [PREFIX/include]
1484 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1485 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1486 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1487 --infodir=DIR info documentation [DATAROOTDIR/info]
1488 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1489 --mandir=DIR man documentation [DATAROOTDIR/man]
1490 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1491 --htmldir=DIR html documentation [DOCDIR]
1492 --dvidir=DIR dvi documentation [DOCDIR]
1493 --pdfdir=DIR pdf documentation [DOCDIR]
1494 --psdir=DIR ps documentation [DOCDIR]
1495 _ACEOF
1497 cat <<\_ACEOF
1499 System types:
1500 --build=BUILD configure for building on BUILD [guessed]
1501 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1502 _ACEOF
1505 if test -n "$ac_init_help"; then
1506 case $ac_init_help in
1507 short | recursive ) echo "Configuration of PostgreSQL 12.22:";;
1508 esac
1509 cat <<\_ACEOF
1511 Optional Features:
1512 --disable-option-checking ignore unrecognized --enable/--with options
1513 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1514 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1515 --disable-integer-datetimes
1516 obsolete option, no longer supported
1517 --enable-nls[=LANGUAGES]
1518 enable Native Language Support
1519 --disable-rpath do not embed shared library search path in
1520 executables
1521 --disable-spinlocks do not use spinlocks
1522 --disable-atomics do not use atomic operations
1523 --enable-debug build with debugging symbols (-g)
1524 --enable-profiling build with profiling enabled
1525 --enable-coverage build with coverage testing instrumentation
1526 --enable-dtrace build with DTrace support
1527 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1528 --enable-depend turn on automatic dependency tracking
1529 --enable-cassert enable assertion checks (for debugging)
1530 --disable-thread-safety disable thread-safety in client libraries
1531 --disable-largefile omit support for large files
1532 --disable-float4-byval disable float4 passed by value
1533 --disable-float8-byval disable float8 passed by value
1535 Optional Packages:
1536 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1537 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1538 --with-extra-version=STRING
1539 append STRING to version
1540 --with-template=NAME override operating system template
1541 --with-includes=DIRS look for additional header files in DIRS
1542 --with-libraries=DIRS look for additional libraries in DIRS
1543 --with-libs=DIRS alternative spelling of --with-libraries
1544 --with-pgport=PORTNUM set default port number [5432]
1545 --with-blocksize=BLOCKSIZE
1546 set table block size in kB [8]
1547 --with-segsize=SEGSIZE set table segment size in GB [1]
1548 --with-wal-blocksize=BLOCKSIZE
1549 set WAL block size in kB [8]
1550 --with-CC=CMD set compiler (deprecated)
1551 --with-llvm build with LLVM based JIT support
1552 --with-icu build with ICU support
1553 --with-tcl build Tcl modules (PL/Tcl)
1554 --with-tclconfig=DIR tclConfig.sh is in DIR
1555 --with-perl build Perl modules (PL/Perl)
1556 --with-python build Python modules (PL/Python)
1557 --with-gssapi build with GSSAPI support
1558 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1559 [postgres]
1560 --with-pam build with PAM support
1561 --with-bsd-auth build with BSD Authentication support
1562 --with-ldap build with LDAP support
1563 --with-bonjour build with Bonjour support
1564 --with-openssl build with OpenSSL support
1565 --with-selinux build with SELinux support
1566 --with-systemd build with systemd support
1567 --without-readline do not use GNU Readline nor BSD Libedit for editing
1568 --with-libedit-preferred
1569 prefer BSD Libedit over GNU Readline
1570 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1571 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1572 --with-libxml build with XML support
1573 --with-libxslt use XSLT support when building contrib/xml2
1574 --with-system-tzdata=DIR
1575 use system time zone data in DIR
1576 --without-zlib do not use Zlib
1577 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1579 Some influential environment variables:
1580 CC C compiler command
1581 CFLAGS C compiler flags
1582 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1583 nonstandard directory <lib dir>
1584 LIBS libraries to pass to the linker, e.g. -l<library>
1585 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1586 you have headers in a nonstandard directory <include dir>
1587 CXX C++ compiler command
1588 CXXFLAGS C++ compiler flags
1589 LLVM_CONFIG path to llvm-config command
1590 CLANG path to clang compiler to generate bitcode
1591 CPP C preprocessor
1592 PKG_CONFIG path to pkg-config utility
1593 PKG_CONFIG_PATH
1594 directories to add to pkg-config's search path
1595 PKG_CONFIG_LIBDIR
1596 path overriding pkg-config's built-in search path
1597 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1598 ICU_LIBS linker flags for ICU, overriding pkg-config
1599 XML2_CONFIG path to xml2-config utility
1600 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1601 XML2_LIBS linker flags for XML2, overriding pkg-config
1602 LDFLAGS_EX extra linker flags for linking executables only
1603 LDFLAGS_SL extra linker flags for linking shared libraries only
1604 PERL Perl program
1605 PYTHON Python program
1606 MSGFMT msgfmt program for NLS
1607 TCLSH Tcl interpreter program (tclsh)
1609 Use these variables to override the choices made by `configure' or to help
1610 it to find libraries and programs with nonstandard names/locations.
1612 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1613 _ACEOF
1614 ac_status=$?
1617 if test "$ac_init_help" = "recursive"; then
1618 # If there are subdirs, report their specific --help.
1619 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1620 test -d "$ac_dir" ||
1621 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1622 continue
1623 ac_builddir=.
1625 case "$ac_dir" in
1626 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1628 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1629 # A ".." for each directory in $ac_dir_suffix.
1630 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1631 case $ac_top_builddir_sub in
1632 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1633 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1634 esac ;;
1635 esac
1636 ac_abs_top_builddir=$ac_pwd
1637 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1638 # for backward compatibility:
1639 ac_top_builddir=$ac_top_build_prefix
1641 case $srcdir in
1642 .) # We are building in place.
1643 ac_srcdir=.
1644 ac_top_srcdir=$ac_top_builddir_sub
1645 ac_abs_top_srcdir=$ac_pwd ;;
1646 [\\/]* | ?:[\\/]* ) # Absolute name.
1647 ac_srcdir=$srcdir$ac_dir_suffix;
1648 ac_top_srcdir=$srcdir
1649 ac_abs_top_srcdir=$srcdir ;;
1650 *) # Relative name.
1651 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1652 ac_top_srcdir=$ac_top_build_prefix$srcdir
1653 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1654 esac
1655 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1657 cd "$ac_dir" || { ac_status=$?; continue; }
1658 # Check for guested configure.
1659 if test -f "$ac_srcdir/configure.gnu"; then
1660 echo &&
1661 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1662 elif test -f "$ac_srcdir/configure"; then
1663 echo &&
1664 $SHELL "$ac_srcdir/configure" --help=recursive
1665 else
1666 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1667 fi || ac_status=$?
1668 cd "$ac_pwd" || { ac_status=$?; break; }
1669 done
1672 test -n "$ac_init_help" && exit $ac_status
1673 if $ac_init_version; then
1674 cat <<\_ACEOF
1675 PostgreSQL configure 12.22
1676 generated by GNU Autoconf 2.69
1678 Copyright (C) 2012 Free Software Foundation, Inc.
1679 This configure script is free software; the Free Software Foundation
1680 gives unlimited permission to copy, distribute and modify it.
1682 Copyright (c) 1996-2019, PostgreSQL Global Development Group
1683 _ACEOF
1684 exit
1687 ## ------------------------ ##
1688 ## Autoconf initialization. ##
1689 ## ------------------------ ##
1691 # ac_fn_c_try_compile LINENO
1692 # --------------------------
1693 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1694 ac_fn_c_try_compile ()
1696 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1697 rm -f conftest.$ac_objext
1698 if { { ac_try="$ac_compile"
1699 case "(($ac_try" in
1700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1701 *) ac_try_echo=$ac_try;;
1702 esac
1703 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1704 $as_echo "$ac_try_echo"; } >&5
1705 (eval "$ac_compile") 2>conftest.err
1706 ac_status=$?
1707 if test -s conftest.err; then
1708 grep -v '^ *+' conftest.err >conftest.er1
1709 cat conftest.er1 >&5
1710 mv -f conftest.er1 conftest.err
1712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1713 test $ac_status = 0; } && {
1714 test -z "$ac_c_werror_flag" ||
1715 test ! -s conftest.err
1716 } && test -s conftest.$ac_objext; then :
1717 ac_retval=0
1718 else
1719 $as_echo "$as_me: failed program was:" >&5
1720 sed 's/^/| /' conftest.$ac_ext >&5
1722 ac_retval=1
1724 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1725 as_fn_set_status $ac_retval
1727 } # ac_fn_c_try_compile
1729 # ac_fn_cxx_try_compile LINENO
1730 # ----------------------------
1731 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1732 ac_fn_cxx_try_compile ()
1734 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735 rm -f conftest.$ac_objext
1736 if { { ac_try="$ac_compile"
1737 case "(($ac_try" in
1738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1739 *) ac_try_echo=$ac_try;;
1740 esac
1741 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1742 $as_echo "$ac_try_echo"; } >&5
1743 (eval "$ac_compile") 2>conftest.err
1744 ac_status=$?
1745 if test -s conftest.err; then
1746 grep -v '^ *+' conftest.err >conftest.er1
1747 cat conftest.er1 >&5
1748 mv -f conftest.er1 conftest.err
1750 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1751 test $ac_status = 0; } && {
1752 test -z "$ac_cxx_werror_flag" ||
1753 test ! -s conftest.err
1754 } && test -s conftest.$ac_objext; then :
1755 ac_retval=0
1756 else
1757 $as_echo "$as_me: failed program was:" >&5
1758 sed 's/^/| /' conftest.$ac_ext >&5
1760 ac_retval=1
1762 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1763 as_fn_set_status $ac_retval
1765 } # ac_fn_cxx_try_compile
1767 # ac_fn_c_try_link LINENO
1768 # -----------------------
1769 # Try to link conftest.$ac_ext, and return whether this succeeded.
1770 ac_fn_c_try_link ()
1772 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1773 rm -f conftest.$ac_objext conftest$ac_exeext
1774 if { { ac_try="$ac_link"
1775 case "(($ac_try" in
1776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1777 *) ac_try_echo=$ac_try;;
1778 esac
1779 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1780 $as_echo "$ac_try_echo"; } >&5
1781 (eval "$ac_link") 2>conftest.err
1782 ac_status=$?
1783 if test -s conftest.err; then
1784 grep -v '^ *+' conftest.err >conftest.er1
1785 cat conftest.er1 >&5
1786 mv -f conftest.er1 conftest.err
1788 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1789 test $ac_status = 0; } && {
1790 test -z "$ac_c_werror_flag" ||
1791 test ! -s conftest.err
1792 } && test -s conftest$ac_exeext && {
1793 test "$cross_compiling" = yes ||
1794 test -x conftest$ac_exeext
1795 }; then :
1796 ac_retval=0
1797 else
1798 $as_echo "$as_me: failed program was:" >&5
1799 sed 's/^/| /' conftest.$ac_ext >&5
1801 ac_retval=1
1803 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1804 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1805 # interfere with the next link command; also delete a directory that is
1806 # left behind by Apple's compiler. We do this before executing the actions.
1807 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1808 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1809 as_fn_set_status $ac_retval
1811 } # ac_fn_c_try_link
1813 # ac_fn_c_try_cpp LINENO
1814 # ----------------------
1815 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1816 ac_fn_c_try_cpp ()
1818 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1819 if { { ac_try="$ac_cpp conftest.$ac_ext"
1820 case "(($ac_try" in
1821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1822 *) ac_try_echo=$ac_try;;
1823 esac
1824 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1825 $as_echo "$ac_try_echo"; } >&5
1826 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1827 ac_status=$?
1828 if test -s conftest.err; then
1829 grep -v '^ *+' conftest.err >conftest.er1
1830 cat conftest.er1 >&5
1831 mv -f conftest.er1 conftest.err
1833 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1834 test $ac_status = 0; } > conftest.i && {
1835 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1836 test ! -s conftest.err
1837 }; then :
1838 ac_retval=0
1839 else
1840 $as_echo "$as_me: failed program was:" >&5
1841 sed 's/^/| /' conftest.$ac_ext >&5
1843 ac_retval=1
1845 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1846 as_fn_set_status $ac_retval
1848 } # ac_fn_c_try_cpp
1850 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1851 # -------------------------------------------------------
1852 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1853 # the include files in INCLUDES and setting the cache variable VAR
1854 # accordingly.
1855 ac_fn_c_check_header_mongrel ()
1857 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1858 if eval \${$3+:} false; then :
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1860 $as_echo_n "checking for $2... " >&6; }
1861 if eval \${$3+:} false; then :
1862 $as_echo_n "(cached) " >&6
1864 eval ac_res=\$$3
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1866 $as_echo "$ac_res" >&6; }
1867 else
1868 # Is the header compilable?
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1870 $as_echo_n "checking $2 usability... " >&6; }
1871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1872 /* end confdefs.h. */
1874 #include <$2>
1875 _ACEOF
1876 if ac_fn_c_try_compile "$LINENO"; then :
1877 ac_header_compiler=yes
1878 else
1879 ac_header_compiler=no
1881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1883 $as_echo "$ac_header_compiler" >&6; }
1885 # Is the header present?
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1887 $as_echo_n "checking $2 presence... " >&6; }
1888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1889 /* end confdefs.h. */
1890 #include <$2>
1891 _ACEOF
1892 if ac_fn_c_try_cpp "$LINENO"; then :
1893 ac_header_preproc=yes
1894 else
1895 ac_header_preproc=no
1897 rm -f conftest.err conftest.i conftest.$ac_ext
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1899 $as_echo "$ac_header_preproc" >&6; }
1901 # So? What about this header?
1902 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1903 yes:no: )
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1905 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1907 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1909 no:yes:* )
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1911 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1913 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1915 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1917 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1919 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1920 ( $as_echo "## ---------------------------------------------- ##
1921 ## Report this to pgsql-bugs@lists.postgresql.org ##
1922 ## ---------------------------------------------- ##"
1923 ) | sed "s/^/$as_me: WARNING: /" >&2
1925 esac
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1927 $as_echo_n "checking for $2... " >&6; }
1928 if eval \${$3+:} false; then :
1929 $as_echo_n "(cached) " >&6
1930 else
1931 eval "$3=\$ac_header_compiler"
1933 eval ac_res=\$$3
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935 $as_echo "$ac_res" >&6; }
1937 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1939 } # ac_fn_c_check_header_mongrel
1941 # ac_fn_c_try_run LINENO
1942 # ----------------------
1943 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1944 # that executables *can* be run.
1945 ac_fn_c_try_run ()
1947 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948 if { { ac_try="$ac_link"
1949 case "(($ac_try" in
1950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951 *) ac_try_echo=$ac_try;;
1952 esac
1953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1954 $as_echo "$ac_try_echo"; } >&5
1955 (eval "$ac_link") 2>&5
1956 ac_status=$?
1957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1959 { { case "(($ac_try" in
1960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1961 *) ac_try_echo=$ac_try;;
1962 esac
1963 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1964 $as_echo "$ac_try_echo"; } >&5
1965 (eval "$ac_try") 2>&5
1966 ac_status=$?
1967 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1968 test $ac_status = 0; }; }; then :
1969 ac_retval=0
1970 else
1971 $as_echo "$as_me: program exited with status $ac_status" >&5
1972 $as_echo "$as_me: failed program was:" >&5
1973 sed 's/^/| /' conftest.$ac_ext >&5
1975 ac_retval=$ac_status
1977 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1979 as_fn_set_status $ac_retval
1981 } # ac_fn_c_try_run
1983 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1984 # -------------------------------------------------------
1985 # Tests whether HEADER exists and can be compiled using the include files in
1986 # INCLUDES, setting the cache variable VAR accordingly.
1987 ac_fn_c_check_header_compile ()
1989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1991 $as_echo_n "checking for $2... " >&6; }
1992 if eval \${$3+:} false; then :
1993 $as_echo_n "(cached) " >&6
1994 else
1995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1996 /* end confdefs.h. */
1998 #include <$2>
1999 _ACEOF
2000 if ac_fn_c_try_compile "$LINENO"; then :
2001 eval "$3=yes"
2002 else
2003 eval "$3=no"
2005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2007 eval ac_res=\$$3
2008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2009 $as_echo "$ac_res" >&6; }
2010 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012 } # ac_fn_c_check_header_compile
2014 # ac_fn_c_check_func LINENO FUNC VAR
2015 # ----------------------------------
2016 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2017 ac_fn_c_check_func ()
2019 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2021 $as_echo_n "checking for $2... " >&6; }
2022 if eval \${$3+:} false; then :
2023 $as_echo_n "(cached) " >&6
2024 else
2025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026 /* end confdefs.h. */
2027 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2028 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2029 #define $2 innocuous_$2
2031 /* System header to define __stub macros and hopefully few prototypes,
2032 which can conflict with char $2 (); below.
2033 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2034 <limits.h> exists even on freestanding compilers. */
2036 #ifdef __STDC__
2037 # include <limits.h>
2038 #else
2039 # include <assert.h>
2040 #endif
2042 #undef $2
2044 /* Override any GCC internal prototype to avoid an error.
2045 Use char because int might match the return type of a GCC
2046 builtin and then its argument prototype would still apply. */
2047 #ifdef __cplusplus
2048 extern "C"
2049 #endif
2050 char $2 ();
2051 /* The GNU C library defines this for functions which it implements
2052 to always fail with ENOSYS. Some functions are actually named
2053 something starting with __ and the normal name is an alias. */
2054 #if defined __stub_$2 || defined __stub___$2
2055 choke me
2056 #endif
2059 main ()
2061 return $2 ();
2063 return 0;
2065 _ACEOF
2066 if ac_fn_c_try_link "$LINENO"; then :
2067 eval "$3=yes"
2068 else
2069 eval "$3=no"
2071 rm -f core conftest.err conftest.$ac_objext \
2072 conftest$ac_exeext conftest.$ac_ext
2074 eval ac_res=\$$3
2075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2076 $as_echo "$ac_res" >&6; }
2077 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2079 } # ac_fn_c_check_func
2081 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2082 # -------------------------------------------
2083 # Tests whether TYPE exists after having included INCLUDES, setting cache
2084 # variable VAR accordingly.
2085 ac_fn_c_check_type ()
2087 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2089 $as_echo_n "checking for $2... " >&6; }
2090 if eval \${$3+:} false; then :
2091 $as_echo_n "(cached) " >&6
2092 else
2093 eval "$3=no"
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095 /* end confdefs.h. */
2098 main ()
2100 if (sizeof ($2))
2101 return 0;
2103 return 0;
2105 _ACEOF
2106 if ac_fn_c_try_compile "$LINENO"; then :
2107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108 /* end confdefs.h. */
2111 main ()
2113 if (sizeof (($2)))
2114 return 0;
2116 return 0;
2118 _ACEOF
2119 if ac_fn_c_try_compile "$LINENO"; then :
2121 else
2122 eval "$3=yes"
2124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128 eval ac_res=\$$3
2129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2130 $as_echo "$ac_res" >&6; }
2131 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2133 } # ac_fn_c_check_type
2135 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2136 # ----------------------------------------------------
2137 # Tries to find if the field MEMBER exists in type AGGR, after including
2138 # INCLUDES, setting cache variable VAR accordingly.
2139 ac_fn_c_check_member ()
2141 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2143 $as_echo_n "checking for $2.$3... " >&6; }
2144 if eval \${$4+:} false; then :
2145 $as_echo_n "(cached) " >&6
2146 else
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148 /* end confdefs.h. */
2151 main ()
2153 static $2 ac_aggr;
2154 if (ac_aggr.$3)
2155 return 0;
2157 return 0;
2159 _ACEOF
2160 if ac_fn_c_try_compile "$LINENO"; then :
2161 eval "$4=yes"
2162 else
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164 /* end confdefs.h. */
2167 main ()
2169 static $2 ac_aggr;
2170 if (sizeof ac_aggr.$3)
2171 return 0;
2173 return 0;
2175 _ACEOF
2176 if ac_fn_c_try_compile "$LINENO"; then :
2177 eval "$4=yes"
2178 else
2179 eval "$4=no"
2181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2185 eval ac_res=\$$4
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2187 $as_echo "$ac_res" >&6; }
2188 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2190 } # ac_fn_c_check_member
2192 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2193 # --------------------------------------------
2194 # Tries to find the compile-time value of EXPR in a program that includes
2195 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2196 # computed
2197 ac_fn_c_compute_int ()
2199 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2200 if test "$cross_compiling" = yes; then
2201 # Depending upon the size, compute the lo and hi bounds.
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203 /* end confdefs.h. */
2206 main ()
2208 static int test_array [1 - 2 * !(($2) >= 0)];
2209 test_array [0] = 0;
2210 return test_array [0];
2213 return 0;
2215 _ACEOF
2216 if ac_fn_c_try_compile "$LINENO"; then :
2217 ac_lo=0 ac_mid=0
2218 while :; do
2219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220 /* end confdefs.h. */
2223 main ()
2225 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2226 test_array [0] = 0;
2227 return test_array [0];
2230 return 0;
2232 _ACEOF
2233 if ac_fn_c_try_compile "$LINENO"; then :
2234 ac_hi=$ac_mid; break
2235 else
2236 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2237 if test $ac_lo -le $ac_mid; then
2238 ac_lo= ac_hi=
2239 break
2241 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2244 done
2245 else
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247 /* end confdefs.h. */
2250 main ()
2252 static int test_array [1 - 2 * !(($2) < 0)];
2253 test_array [0] = 0;
2254 return test_array [0];
2257 return 0;
2259 _ACEOF
2260 if ac_fn_c_try_compile "$LINENO"; then :
2261 ac_hi=-1 ac_mid=-1
2262 while :; do
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264 /* end confdefs.h. */
2267 main ()
2269 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2270 test_array [0] = 0;
2271 return test_array [0];
2274 return 0;
2276 _ACEOF
2277 if ac_fn_c_try_compile "$LINENO"; then :
2278 ac_lo=$ac_mid; break
2279 else
2280 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2281 if test $ac_mid -le $ac_hi; then
2282 ac_lo= ac_hi=
2283 break
2285 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288 done
2289 else
2290 ac_lo= ac_hi=
2292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295 # Binary search between lo and hi bounds.
2296 while test "x$ac_lo" != "x$ac_hi"; do
2297 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299 /* end confdefs.h. */
2302 main ()
2304 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2305 test_array [0] = 0;
2306 return test_array [0];
2309 return 0;
2311 _ACEOF
2312 if ac_fn_c_try_compile "$LINENO"; then :
2313 ac_hi=$ac_mid
2314 else
2315 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318 done
2319 case $ac_lo in #((
2320 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2321 '') ac_retval=1 ;;
2322 esac
2323 else
2324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2325 /* end confdefs.h. */
2327 static long int longval () { return $2; }
2328 static unsigned long int ulongval () { return $2; }
2329 #include <stdio.h>
2330 #include <stdlib.h>
2332 main ()
2335 FILE *f = fopen ("conftest.val", "w");
2336 if (! f)
2337 return 1;
2338 if (($2) < 0)
2340 long int i = longval ();
2341 if (i != ($2))
2342 return 1;
2343 fprintf (f, "%ld", i);
2345 else
2347 unsigned long int i = ulongval ();
2348 if (i != ($2))
2349 return 1;
2350 fprintf (f, "%lu", i);
2352 /* Do not output a trailing newline, as this causes \r\n confusion
2353 on some platforms. */
2354 return ferror (f) || fclose (f) != 0;
2357 return 0;
2359 _ACEOF
2360 if ac_fn_c_try_run "$LINENO"; then :
2361 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2362 else
2363 ac_retval=1
2365 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2366 conftest.$ac_objext conftest.beam conftest.$ac_ext
2367 rm -f conftest.val
2370 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2371 as_fn_set_status $ac_retval
2373 } # ac_fn_c_compute_int
2375 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2376 # ---------------------------------------------
2377 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2378 # accordingly.
2379 ac_fn_c_check_decl ()
2381 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2382 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2383 as_decl_name=`echo $2|sed 's/ *(.*//'`
2384 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2386 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2387 if eval \${$3+:} false; then :
2388 $as_echo_n "(cached) " >&6
2389 else
2390 ac_save_werror_flag=$ac_c_werror_flag
2391 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2393 /* end confdefs.h. */
2396 main ()
2398 #ifndef $as_decl_name
2399 #ifdef __cplusplus
2400 (void) $as_decl_use;
2401 #else
2402 (void) $as_decl_name;
2403 #endif
2404 #endif
2407 return 0;
2409 _ACEOF
2410 if ac_fn_c_try_compile "$LINENO"; then :
2411 eval "$3=yes"
2412 else
2413 eval "$3=no"
2415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2416 ac_c_werror_flag=$ac_save_werror_flag
2418 eval ac_res=\$$3
2419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2420 $as_echo "$ac_res" >&6; }
2421 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2423 } # ac_fn_c_check_decl
2424 cat >config.log <<_ACEOF
2425 This file contains any messages produced by compilers while
2426 running configure, to aid debugging if configure makes a mistake.
2428 It was created by PostgreSQL $as_me 12.22, which was
2429 generated by GNU Autoconf 2.69. Invocation command line was
2431 $ $0 $@
2433 _ACEOF
2434 exec 5>>config.log
2436 cat <<_ASUNAME
2437 ## --------- ##
2438 ## Platform. ##
2439 ## --------- ##
2441 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2442 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2443 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2444 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2445 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2447 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2448 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2450 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2451 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2452 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2453 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2454 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2455 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2456 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2458 _ASUNAME
2460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2461 for as_dir in $PATH
2463 IFS=$as_save_IFS
2464 test -z "$as_dir" && as_dir=.
2465 $as_echo "PATH: $as_dir"
2466 done
2467 IFS=$as_save_IFS
2469 } >&5
2471 cat >&5 <<_ACEOF
2474 ## ----------- ##
2475 ## Core tests. ##
2476 ## ----------- ##
2478 _ACEOF
2481 # Keep a trace of the command line.
2482 # Strip out --no-create and --no-recursion so they do not pile up.
2483 # Strip out --silent because we don't want to record it for future runs.
2484 # Also quote any args containing shell meta-characters.
2485 # Make two passes to allow for proper duplicate-argument suppression.
2486 ac_configure_args=
2487 ac_configure_args0=
2488 ac_configure_args1=
2489 ac_must_keep_next=false
2490 for ac_pass in 1 2
2492 for ac_arg
2494 case $ac_arg in
2495 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2496 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2497 | -silent | --silent | --silen | --sile | --sil)
2498 continue ;;
2499 *\'*)
2500 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2501 esac
2502 case $ac_pass in
2503 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2505 as_fn_append ac_configure_args1 " '$ac_arg'"
2506 if test $ac_must_keep_next = true; then
2507 ac_must_keep_next=false # Got value, back to normal.
2508 else
2509 case $ac_arg in
2510 *=* | --config-cache | -C | -disable-* | --disable-* \
2511 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2512 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2513 | -with-* | --with-* | -without-* | --without-* | --x)
2514 case "$ac_configure_args0 " in
2515 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2516 esac
2518 -* ) ac_must_keep_next=true ;;
2519 esac
2521 as_fn_append ac_configure_args " '$ac_arg'"
2523 esac
2524 done
2525 done
2526 { ac_configure_args0=; unset ac_configure_args0;}
2527 { ac_configure_args1=; unset ac_configure_args1;}
2529 # When interrupted or exit'd, cleanup temporary files, and complete
2530 # config.log. We remove comments because anyway the quotes in there
2531 # would cause problems or look ugly.
2532 # WARNING: Use '\'' to represent an apostrophe within the trap.
2533 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2534 trap 'exit_status=$?
2535 # Save into config.log some information that might help in debugging.
2537 echo
2539 $as_echo "## ---------------- ##
2540 ## Cache variables. ##
2541 ## ---------------- ##"
2542 echo
2543 # The following way of writing the cache mishandles newlines in values,
2545 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2546 eval ac_val=\$$ac_var
2547 case $ac_val in #(
2548 *${as_nl}*)
2549 case $ac_var in #(
2550 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2551 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2552 esac
2553 case $ac_var in #(
2554 _ | IFS | as_nl) ;; #(
2555 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2556 *) { eval $ac_var=; unset $ac_var;} ;;
2557 esac ;;
2558 esac
2559 done
2560 (set) 2>&1 |
2561 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2562 *${as_nl}ac_space=\ *)
2563 sed -n \
2564 "s/'\''/'\''\\\\'\'''\''/g;
2565 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2566 ;; #(
2568 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2570 esac |
2571 sort
2573 echo
2575 $as_echo "## ----------------- ##
2576 ## Output variables. ##
2577 ## ----------------- ##"
2578 echo
2579 for ac_var in $ac_subst_vars
2581 eval ac_val=\$$ac_var
2582 case $ac_val in
2583 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2584 esac
2585 $as_echo "$ac_var='\''$ac_val'\''"
2586 done | sort
2587 echo
2589 if test -n "$ac_subst_files"; then
2590 $as_echo "## ------------------- ##
2591 ## File substitutions. ##
2592 ## ------------------- ##"
2593 echo
2594 for ac_var in $ac_subst_files
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
2605 if test -s confdefs.h; then
2606 $as_echo "## ----------- ##
2607 ## confdefs.h. ##
2608 ## ----------- ##"
2609 echo
2610 cat confdefs.h
2611 echo
2613 test "$ac_signal" != 0 &&
2614 $as_echo "$as_me: caught signal $ac_signal"
2615 $as_echo "$as_me: exit $exit_status"
2616 } >&5
2617 rm -f core *.core core.conftest.* &&
2618 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2619 exit $exit_status
2621 for ac_signal in 1 2 13 15; do
2622 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2623 done
2624 ac_signal=0
2626 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2627 rm -f -r conftest* confdefs.h
2629 $as_echo "/* confdefs.h */" > confdefs.h
2631 # Predefined preprocessor variables.
2633 cat >>confdefs.h <<_ACEOF
2634 #define PACKAGE_NAME "$PACKAGE_NAME"
2635 _ACEOF
2637 cat >>confdefs.h <<_ACEOF
2638 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2639 _ACEOF
2641 cat >>confdefs.h <<_ACEOF
2642 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2643 _ACEOF
2645 cat >>confdefs.h <<_ACEOF
2646 #define PACKAGE_STRING "$PACKAGE_STRING"
2647 _ACEOF
2649 cat >>confdefs.h <<_ACEOF
2650 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2651 _ACEOF
2653 cat >>confdefs.h <<_ACEOF
2654 #define PACKAGE_URL "$PACKAGE_URL"
2655 _ACEOF
2658 # Let the site file select an alternate cache file if it wants to.
2659 # Prefer an explicitly selected file to automatically selected ones.
2660 ac_site_file1=NONE
2661 ac_site_file2=NONE
2662 if test -n "$CONFIG_SITE"; then
2663 # We do not want a PATH search for config.site.
2664 case $CONFIG_SITE in #((
2665 -*) ac_site_file1=./$CONFIG_SITE;;
2666 */*) ac_site_file1=$CONFIG_SITE;;
2667 *) ac_site_file1=./$CONFIG_SITE;;
2668 esac
2669 elif test "x$prefix" != xNONE; then
2670 ac_site_file1=$prefix/share/config.site
2671 ac_site_file2=$prefix/etc/config.site
2672 else
2673 ac_site_file1=$ac_default_prefix/share/config.site
2674 ac_site_file2=$ac_default_prefix/etc/config.site
2676 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2678 test "x$ac_site_file" = xNONE && continue
2679 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2681 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2682 sed 's/^/| /' "$ac_site_file" >&5
2683 . "$ac_site_file" \
2684 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686 as_fn_error $? "failed to load site script $ac_site_file
2687 See \`config.log' for more details" "$LINENO" 5; }
2689 done
2691 if test -r "$cache_file"; then
2692 # Some versions of bash will fail to source /dev/null (special files
2693 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2694 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2696 $as_echo "$as_me: loading cache $cache_file" >&6;}
2697 case $cache_file in
2698 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2699 *) . "./$cache_file";;
2700 esac
2702 else
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2704 $as_echo "$as_me: creating cache $cache_file" >&6;}
2705 >$cache_file
2708 # Check that the precious variables saved in the cache have kept the same
2709 # value.
2710 ac_cache_corrupted=false
2711 for ac_var in $ac_precious_vars; do
2712 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2713 eval ac_new_set=\$ac_env_${ac_var}_set
2714 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2715 eval ac_new_val=\$ac_env_${ac_var}_value
2716 case $ac_old_set,$ac_new_set in
2717 set,)
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2719 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2720 ac_cache_corrupted=: ;;
2721 ,set)
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2723 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2724 ac_cache_corrupted=: ;;
2725 ,);;
2727 if test "x$ac_old_val" != "x$ac_new_val"; then
2728 # differences in whitespace do not lead to failure.
2729 ac_old_val_w=`echo x $ac_old_val`
2730 ac_new_val_w=`echo x $ac_new_val`
2731 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2733 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2734 ac_cache_corrupted=:
2735 else
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2737 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2738 eval $ac_var=\$ac_old_val
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2741 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2743 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2744 fi;;
2745 esac
2746 # Pass precious variables to config.status.
2747 if test "$ac_new_set" = set; then
2748 case $ac_new_val in
2749 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2750 *) ac_arg=$ac_var=$ac_new_val ;;
2751 esac
2752 case " $ac_configure_args " in
2753 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2754 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2755 esac
2757 done
2758 if $ac_cache_corrupted; then
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2760 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2762 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2763 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2765 ## -------------------- ##
2766 ## Main body of script. ##
2767 ## -------------------- ##
2769 ac_ext=c
2770 ac_cpp='$CPP $CPPFLAGS'
2771 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2772 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2780 ac_aux_dir=
2781 for ac_dir in config "$srcdir"/config; do
2782 if test -f "$ac_dir/install-sh"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/install-sh -c"
2785 break
2786 elif test -f "$ac_dir/install.sh"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/install.sh -c"
2789 break
2790 elif test -f "$ac_dir/shtool"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/shtool install -c"
2793 break
2795 done
2796 if test -z "$ac_aux_dir"; then
2797 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2800 # These three variables are undocumented and unsupported,
2801 # and are intended to be withdrawn in a future Autoconf release.
2802 # They can cause serious problems if a builder's source tree is in a directory
2803 # whose full name contains unusual characters.
2804 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2805 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2806 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2810 configure_args=$ac_configure_args
2813 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2816 cat >>confdefs.h <<_ACEOF
2817 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2818 _ACEOF
2824 # Check whether --with-extra-version was given.
2825 if test "${with_extra_version+set}" = set; then :
2826 withval=$with_extra_version;
2827 case $withval in
2828 yes)
2829 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2832 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2835 PG_VERSION="$PACKAGE_VERSION$withval"
2837 esac
2839 else
2840 PG_VERSION="$PACKAGE_VERSION"
2845 cat >>confdefs.h <<_ACEOF
2846 #define PG_VERSION "$PG_VERSION"
2847 _ACEOF
2850 # Make sure we can run config.sub.
2851 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2852 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2855 $as_echo_n "checking build system type... " >&6; }
2856 if ${ac_cv_build+:} false; then :
2857 $as_echo_n "(cached) " >&6
2858 else
2859 ac_build_alias=$build_alias
2860 test "x$ac_build_alias" = x &&
2861 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2862 test "x$ac_build_alias" = x &&
2863 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2864 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2865 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2869 $as_echo "$ac_cv_build" >&6; }
2870 case $ac_cv_build in
2871 *-*-*) ;;
2872 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2873 esac
2874 build=$ac_cv_build
2875 ac_save_IFS=$IFS; IFS='-'
2876 set x $ac_cv_build
2877 shift
2878 build_cpu=$1
2879 build_vendor=$2
2880 shift; shift
2881 # Remember, the first character of IFS is used to create $*,
2882 # except with old shells:
2883 build_os=$*
2884 IFS=$ac_save_IFS
2885 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2889 $as_echo_n "checking host system type... " >&6; }
2890 if ${ac_cv_host+:} false; then :
2891 $as_echo_n "(cached) " >&6
2892 else
2893 if test "x$host_alias" = x; then
2894 ac_cv_host=$ac_cv_build
2895 else
2896 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2897 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2902 $as_echo "$ac_cv_host" >&6; }
2903 case $ac_cv_host in
2904 *-*-*) ;;
2905 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2906 esac
2907 host=$ac_cv_host
2908 ac_save_IFS=$IFS; IFS='-'
2909 set x $ac_cv_host
2910 shift
2911 host_cpu=$1
2912 host_vendor=$2
2913 shift; shift
2914 # Remember, the first character of IFS is used to create $*,
2915 # except with old shells:
2916 host_os=$*
2917 IFS=$ac_save_IFS
2918 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2922 template=
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2924 $as_echo_n "checking which template to use... " >&6; }
2929 # Check whether --with-template was given.
2930 if test "${with_template+set}" = set; then :
2931 withval=$with_template;
2932 case $withval in
2933 yes)
2934 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2937 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2941 case $withval in
2942 list) echo; ls "$srcdir/src/template"; exit;;
2943 *) if test -f "$srcdir/src/template/$with_template" ; then
2944 template=$withval
2945 else
2946 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2947 fi;;
2948 esac
2951 esac
2953 else
2955 # --with-template not given
2957 case $host_os in
2958 aix*) template=aix ;;
2959 cygwin*) template=cygwin ;;
2960 darwin*) template=darwin ;;
2961 dragonfly*) template=netbsd ;;
2962 freebsd*) template=freebsd ;;
2963 hpux*) template=hpux ;;
2964 linux*|gnu*|k*bsd*-gnu)
2965 template=linux ;;
2966 mingw*) template=win32 ;;
2967 netbsd*) template=netbsd ;;
2968 openbsd*) template=openbsd ;;
2969 solaris*) template=solaris ;;
2970 esac
2972 if test x"$template" = x"" ; then
2973 as_fn_error $? "
2974 *******************************************************************
2975 PostgreSQL has apparently not been ported to your platform yet.
2976 To try a manual configuration, look into the src/template directory
2977 for a similar platform and use the '--with-template=' option.
2979 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
2980 rectifying this. Include the above 'checking host system type...'
2981 line.
2982 *******************************************************************
2983 " "$LINENO" 5
2991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2992 $as_echo "$template" >&6; }
2994 PORTNAME=$template
2997 # Initialize default assumption that we do not need separate assembly code
2998 # for TAS (test-and-set). This can be overridden by the template file
2999 # when it's executed.
3000 need_tas=no
3001 tas_file=dummy.s
3006 ## Command line options
3010 # Add non-standard directories to the include path
3015 # Check whether --with-includes was given.
3016 if test "${with_includes+set}" = set; then :
3017 withval=$with_includes;
3018 case $withval in
3019 yes)
3020 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3023 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3028 esac
3036 # Add non-standard directories to the library search path
3041 # Check whether --with-libraries was given.
3042 if test "${with_libraries+set}" = set; then :
3043 withval=$with_libraries;
3044 case $withval in
3045 yes)
3046 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3049 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3052 LIBRARY_DIRS=$withval
3054 esac
3063 # Check whether --with-libs was given.
3064 if test "${with_libs+set}" = set; then :
3065 withval=$with_libs;
3066 case $withval in
3067 yes)
3068 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3071 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3074 LIBRARY_DIRS=$withval
3076 esac
3084 # 64-bit integer date/time storage is now the only option, but to avoid
3085 # unnecessary breakage of build scripts, continue to accept an explicit
3086 # "--enable-integer-datetimes" switch.
3090 # Check whether --enable-integer-datetimes was given.
3091 if test "${enable_integer_datetimes+set}" = set; then :
3092 enableval=$enable_integer_datetimes;
3093 case $enableval in
3094 yes)
3098 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3101 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3103 esac
3105 else
3106 enable_integer_datetimes=yes
3114 # NLS
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3117 $as_echo_n "checking whether NLS is wanted... " >&6; }
3120 # Check whether --enable-nls was given.
3121 if test "${enable_nls+set}" = set; then :
3122 enableval=$enable_nls;
3123 case $enableval in
3124 yes)
3131 enable_nls=yes
3132 WANTED_LANGUAGES=$enableval
3134 esac
3136 else
3137 enable_nls=no
3142 if test "$enable_nls" = yes; then
3144 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3149 $as_echo "$enable_nls" >&6; }
3154 # Default port number (--with-pgport), default 5432
3156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3157 $as_echo_n "checking for default port number... " >&6; }
3161 # Check whether --with-pgport was given.
3162 if test "${with_pgport+set}" = set; then :
3163 withval=$with_pgport;
3164 case $withval in
3165 yes)
3166 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3169 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3172 default_port=$withval
3174 esac
3176 else
3177 default_port=5432
3181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3182 $as_echo "$default_port" >&6; }
3183 # Need both of these because some places want an integer and some a string
3185 cat >>confdefs.h <<_ACEOF
3186 #define DEF_PGPORT ${default_port}
3187 _ACEOF
3190 cat >>confdefs.h <<_ACEOF
3191 #define DEF_PGPORT_STR "${default_port}"
3192 _ACEOF
3196 # It's worth validating port; you can get very confusing errors otherwise
3197 if test x"$default_port" = x""; then
3198 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3199 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3200 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3201 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3202 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3203 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3204 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3208 # '-rpath'-like feature can be disabled
3212 # Check whether --enable-rpath was given.
3213 if test "${enable_rpath+set}" = set; then :
3214 enableval=$enable_rpath;
3215 case $enableval in
3216 yes)
3223 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3225 esac
3227 else
3228 enable_rpath=yes
3236 # Spinlocks
3240 # Check whether --enable-spinlocks was given.
3241 if test "${enable_spinlocks+set}" = set; then :
3242 enableval=$enable_spinlocks;
3243 case $enableval in
3244 yes)
3251 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3253 esac
3255 else
3256 enable_spinlocks=yes
3263 # Atomic operations
3267 # Check whether --enable-atomics was given.
3268 if test "${enable_atomics+set}" = set; then :
3269 enableval=$enable_atomics;
3270 case $enableval in
3271 yes)
3278 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3280 esac
3282 else
3283 enable_atomics=yes
3290 # --enable-debug adds -g to compiler flags
3294 # Check whether --enable-debug was given.
3295 if test "${enable_debug+set}" = set; then :
3296 enableval=$enable_debug;
3297 case $enableval in
3298 yes)
3305 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3307 esac
3309 else
3310 enable_debug=no
3318 # --enable-profiling enables gcc profiling
3322 # Check whether --enable-profiling was given.
3323 if test "${enable_profiling+set}" = set; then :
3324 enableval=$enable_profiling;
3325 case $enableval in
3326 yes)
3333 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3335 esac
3337 else
3338 enable_profiling=no
3345 # --enable-coverage enables generation of code coverage metrics with gcov
3349 # Check whether --enable-coverage was given.
3350 if test "${enable_coverage+set}" = set; then :
3351 enableval=$enable_coverage;
3352 case $enableval in
3353 yes)
3354 if test -z "$GCOV"; then
3355 for ac_prog in gcov
3357 # Extract the first word of "$ac_prog", so it can be a program name with args.
3358 set dummy $ac_prog; ac_word=$2
3359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3360 $as_echo_n "checking for $ac_word... " >&6; }
3361 if ${ac_cv_path_GCOV+:} false; then :
3362 $as_echo_n "(cached) " >&6
3363 else
3364 case $GCOV in
3365 [\\/]* | ?:[\\/]*)
3366 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3370 for as_dir in $PATH
3372 IFS=$as_save_IFS
3373 test -z "$as_dir" && as_dir=.
3374 for ac_exec_ext in '' $ac_executable_extensions; do
3375 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3376 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3377 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3378 break 2
3380 done
3381 done
3382 IFS=$as_save_IFS
3385 esac
3387 GCOV=$ac_cv_path_GCOV
3388 if test -n "$GCOV"; then
3389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3390 $as_echo "$GCOV" >&6; }
3391 else
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3393 $as_echo "no" >&6; }
3397 test -n "$GCOV" && break
3398 done
3400 else
3401 # Report the value of GCOV in configure's output in all cases.
3402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3403 $as_echo_n "checking for GCOV... " >&6; }
3404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3405 $as_echo "$GCOV" >&6; }
3408 if test -z "$GCOV"; then
3409 as_fn_error $? "gcov not found" "$LINENO" 5
3411 if test -z "$LCOV"; then
3412 for ac_prog in lcov
3414 # Extract the first word of "$ac_prog", so it can be a program name with args.
3415 set dummy $ac_prog; ac_word=$2
3416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3417 $as_echo_n "checking for $ac_word... " >&6; }
3418 if ${ac_cv_path_LCOV+:} false; then :
3419 $as_echo_n "(cached) " >&6
3420 else
3421 case $LCOV in
3422 [\\/]* | ?:[\\/]*)
3423 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3427 for as_dir in $PATH
3429 IFS=$as_save_IFS
3430 test -z "$as_dir" && as_dir=.
3431 for ac_exec_ext in '' $ac_executable_extensions; do
3432 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3433 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3434 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3435 break 2
3437 done
3438 done
3439 IFS=$as_save_IFS
3442 esac
3444 LCOV=$ac_cv_path_LCOV
3445 if test -n "$LCOV"; then
3446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3447 $as_echo "$LCOV" >&6; }
3448 else
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3450 $as_echo "no" >&6; }
3454 test -n "$LCOV" && break
3455 done
3457 else
3458 # Report the value of LCOV in configure's output in all cases.
3459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3460 $as_echo_n "checking for LCOV... " >&6; }
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3462 $as_echo "$LCOV" >&6; }
3465 if test -z "$LCOV"; then
3466 as_fn_error $? "lcov not found" "$LINENO" 5
3468 if test -z "$GENHTML"; then
3469 for ac_prog in genhtml
3471 # Extract the first word of "$ac_prog", so it can be a program name with args.
3472 set dummy $ac_prog; ac_word=$2
3473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3474 $as_echo_n "checking for $ac_word... " >&6; }
3475 if ${ac_cv_path_GENHTML+:} false; then :
3476 $as_echo_n "(cached) " >&6
3477 else
3478 case $GENHTML in
3479 [\\/]* | ?:[\\/]*)
3480 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3483 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3484 for as_dir in $PATH
3486 IFS=$as_save_IFS
3487 test -z "$as_dir" && as_dir=.
3488 for ac_exec_ext in '' $ac_executable_extensions; do
3489 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3490 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3491 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3492 break 2
3494 done
3495 done
3496 IFS=$as_save_IFS
3499 esac
3501 GENHTML=$ac_cv_path_GENHTML
3502 if test -n "$GENHTML"; then
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3504 $as_echo "$GENHTML" >&6; }
3505 else
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3507 $as_echo "no" >&6; }
3511 test -n "$GENHTML" && break
3512 done
3514 else
3515 # Report the value of GENHTML in configure's output in all cases.
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3517 $as_echo_n "checking for GENHTML... " >&6; }
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3519 $as_echo "$GENHTML" >&6; }
3522 if test -z "$GENHTML"; then
3523 as_fn_error $? "genhtml not found" "$LINENO" 5
3530 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3532 esac
3534 else
3535 enable_coverage=no
3543 # DTrace
3547 # Check whether --enable-dtrace was given.
3548 if test "${enable_dtrace+set}" = set; then :
3549 enableval=$enable_dtrace;
3550 case $enableval in
3551 yes)
3552 if test -z "$DTRACE"; then
3553 for ac_prog in dtrace
3555 # Extract the first word of "$ac_prog", so it can be a program name with args.
3556 set dummy $ac_prog; ac_word=$2
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3558 $as_echo_n "checking for $ac_word... " >&6; }
3559 if ${ac_cv_path_DTRACE+:} false; then :
3560 $as_echo_n "(cached) " >&6
3561 else
3562 case $DTRACE in
3563 [\\/]* | ?:[\\/]*)
3564 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3568 for as_dir in $PATH
3570 IFS=$as_save_IFS
3571 test -z "$as_dir" && as_dir=.
3572 for ac_exec_ext in '' $ac_executable_extensions; do
3573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3574 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3576 break 2
3578 done
3579 done
3580 IFS=$as_save_IFS
3583 esac
3585 DTRACE=$ac_cv_path_DTRACE
3586 if test -n "$DTRACE"; then
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3588 $as_echo "$DTRACE" >&6; }
3589 else
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3591 $as_echo "no" >&6; }
3595 test -n "$DTRACE" && break
3596 done
3598 else
3599 # Report the value of DTRACE in configure's output in all cases.
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3601 $as_echo_n "checking for DTRACE... " >&6; }
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3603 $as_echo "$DTRACE" >&6; }
3606 if test -z "$DTRACE"; then
3607 as_fn_error $? "dtrace not found" "$LINENO" 5
3615 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3617 esac
3619 else
3620 enable_dtrace=no
3628 # TAP tests
3632 # Check whether --enable-tap-tests was given.
3633 if test "${enable_tap_tests+set}" = set; then :
3634 enableval=$enable_tap_tests;
3635 case $enableval in
3636 yes)
3643 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3645 esac
3647 else
3648 enable_tap_tests=no
3656 # Block size
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3659 $as_echo_n "checking for block size... " >&6; }
3663 # Check whether --with-blocksize was given.
3664 if test "${with_blocksize+set}" = set; then :
3665 withval=$with_blocksize;
3666 case $withval in
3667 yes)
3668 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3671 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3674 blocksize=$withval
3676 esac
3678 else
3679 blocksize=8
3683 case ${blocksize} in
3684 1) BLCKSZ=1024;;
3685 2) BLCKSZ=2048;;
3686 4) BLCKSZ=4096;;
3687 8) BLCKSZ=8192;;
3688 16) BLCKSZ=16384;;
3689 32) BLCKSZ=32768;;
3690 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3691 esac
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3693 $as_echo "${blocksize}kB" >&6; }
3696 cat >>confdefs.h <<_ACEOF
3697 #define BLCKSZ ${BLCKSZ}
3698 _ACEOF
3702 # Relation segment size
3704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3705 $as_echo_n "checking for segment size... " >&6; }
3709 # Check whether --with-segsize was given.
3710 if test "${with_segsize+set}" = set; then :
3711 withval=$with_segsize;
3712 case $withval in
3713 yes)
3714 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3717 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3720 segsize=$withval
3722 esac
3724 else
3725 segsize=1
3729 # this expression is set up to avoid unnecessary integer overflow
3730 # blocksize is already guaranteed to be a factor of 1024
3731 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3732 test $? -eq 0 || exit 1
3733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3734 $as_echo "${segsize}GB" >&6; }
3737 cat >>confdefs.h <<_ACEOF
3738 #define RELSEG_SIZE ${RELSEG_SIZE}
3739 _ACEOF
3743 # WAL block size
3745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3746 $as_echo_n "checking for WAL block size... " >&6; }
3750 # Check whether --with-wal-blocksize was given.
3751 if test "${with_wal_blocksize+set}" = set; then :
3752 withval=$with_wal_blocksize;
3753 case $withval in
3754 yes)
3755 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3758 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3761 wal_blocksize=$withval
3763 esac
3765 else
3766 wal_blocksize=8
3770 case ${wal_blocksize} in
3771 1) XLOG_BLCKSZ=1024;;
3772 2) XLOG_BLCKSZ=2048;;
3773 4) XLOG_BLCKSZ=4096;;
3774 8) XLOG_BLCKSZ=8192;;
3775 16) XLOG_BLCKSZ=16384;;
3776 32) XLOG_BLCKSZ=32768;;
3777 64) XLOG_BLCKSZ=65536;;
3778 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3779 esac
3780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3781 $as_echo "${wal_blocksize}kB" >&6; }
3784 cat >>confdefs.h <<_ACEOF
3785 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3786 _ACEOF
3790 # C compiler
3793 # For historical reasons you can also use --with-CC to specify the C compiler
3794 # to use, although the standard way to do this is to set the CC environment
3795 # variable.
3799 # Check whether --with-CC was given.
3800 if test "${with_CC+set}" = set; then :
3801 withval=$with_CC;
3802 case $withval in
3803 yes)
3804 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3807 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3810 CC=$with_CC
3812 esac
3818 case $template in
3819 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3820 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3821 esac
3823 ac_ext=c
3824 ac_cpp='$CPP $CPPFLAGS'
3825 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3826 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3827 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3828 if test -n "$ac_tool_prefix"; then
3829 for ac_prog in $pgac_cc_list
3831 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3832 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3834 $as_echo_n "checking for $ac_word... " >&6; }
3835 if ${ac_cv_prog_CC+:} false; then :
3836 $as_echo_n "(cached) " >&6
3837 else
3838 if test -n "$CC"; then
3839 ac_cv_prog_CC="$CC" # Let the user override the test.
3840 else
3841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842 for as_dir in $PATH
3844 IFS=$as_save_IFS
3845 test -z "$as_dir" && as_dir=.
3846 for ac_exec_ext in '' $ac_executable_extensions; do
3847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3848 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3850 break 2
3852 done
3853 done
3854 IFS=$as_save_IFS
3858 CC=$ac_cv_prog_CC
3859 if test -n "$CC"; then
3860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3861 $as_echo "$CC" >&6; }
3862 else
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3864 $as_echo "no" >&6; }
3868 test -n "$CC" && break
3869 done
3871 if test -z "$CC"; then
3872 ac_ct_CC=$CC
3873 for ac_prog in $pgac_cc_list
3875 # Extract the first word of "$ac_prog", so it can be a program name with args.
3876 set dummy $ac_prog; ac_word=$2
3877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3878 $as_echo_n "checking for $ac_word... " >&6; }
3879 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3880 $as_echo_n "(cached) " >&6
3881 else
3882 if test -n "$ac_ct_CC"; then
3883 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3884 else
3885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3886 for as_dir in $PATH
3888 IFS=$as_save_IFS
3889 test -z "$as_dir" && as_dir=.
3890 for ac_exec_ext in '' $ac_executable_extensions; do
3891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3892 ac_cv_prog_ac_ct_CC="$ac_prog"
3893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3894 break 2
3896 done
3897 done
3898 IFS=$as_save_IFS
3902 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3903 if test -n "$ac_ct_CC"; then
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3905 $as_echo "$ac_ct_CC" >&6; }
3906 else
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3908 $as_echo "no" >&6; }
3912 test -n "$ac_ct_CC" && break
3913 done
3915 if test "x$ac_ct_CC" = x; then
3916 CC=""
3917 else
3918 case $cross_compiling:$ac_tool_warned in
3919 yes:)
3920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3921 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3922 ac_tool_warned=yes ;;
3923 esac
3924 CC=$ac_ct_CC
3929 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3930 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3931 as_fn_error $? "no acceptable C compiler found in \$PATH
3932 See \`config.log' for more details" "$LINENO" 5; }
3934 # Provide some information about the compiler.
3935 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3936 set X $ac_compile
3937 ac_compiler=$2
3938 for ac_option in --version -v -V -qversion; do
3939 { { ac_try="$ac_compiler $ac_option >&5"
3940 case "(($ac_try" in
3941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3942 *) ac_try_echo=$ac_try;;
3943 esac
3944 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3945 $as_echo "$ac_try_echo"; } >&5
3946 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3947 ac_status=$?
3948 if test -s conftest.err; then
3949 sed '10a\
3950 ... rest of stderr output deleted ...
3951 10q' conftest.err >conftest.er1
3952 cat conftest.er1 >&5
3954 rm -f conftest.er1 conftest.err
3955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3956 test $ac_status = 0; }
3957 done
3959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3960 /* end confdefs.h. */
3963 main ()
3967 return 0;
3969 _ACEOF
3970 ac_clean_files_save=$ac_clean_files
3971 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3972 # Try to create an executable without -o first, disregard a.out.
3973 # It will help us diagnose broken compilers, and finding out an intuition
3974 # of exeext.
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3976 $as_echo_n "checking whether the C compiler works... " >&6; }
3977 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3979 # The possible output files:
3980 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3982 ac_rmfiles=
3983 for ac_file in $ac_files
3985 case $ac_file in
3986 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3987 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3988 esac
3989 done
3990 rm -f $ac_rmfiles
3992 if { { ac_try="$ac_link_default"
3993 case "(($ac_try" in
3994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995 *) ac_try_echo=$ac_try;;
3996 esac
3997 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3998 $as_echo "$ac_try_echo"; } >&5
3999 (eval "$ac_link_default") 2>&5
4000 ac_status=$?
4001 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4002 test $ac_status = 0; }; then :
4003 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4004 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4005 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4006 # so that the user can short-circuit this test for compilers unknown to
4007 # Autoconf.
4008 for ac_file in $ac_files ''
4010 test -f "$ac_file" || continue
4011 case $ac_file in
4012 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4014 [ab].out )
4015 # We found the default executable, but exeext='' is most
4016 # certainly right.
4017 break;;
4018 *.* )
4019 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4020 then :; else
4021 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4023 # We set ac_cv_exeext here because the later test for it is not
4024 # safe: cross compilers may not add the suffix if given an `-o'
4025 # argument, so we may need to know it at that point already.
4026 # Even if this section looks crufty: it has the advantage of
4027 # actually working.
4028 break;;
4030 break;;
4031 esac
4032 done
4033 test "$ac_cv_exeext" = no && ac_cv_exeext=
4035 else
4036 ac_file=''
4038 if test -z "$ac_file"; then :
4039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040 $as_echo "no" >&6; }
4041 $as_echo "$as_me: failed program was:" >&5
4042 sed 's/^/| /' conftest.$ac_ext >&5
4044 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4045 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4046 as_fn_error 77 "C compiler cannot create executables
4047 See \`config.log' for more details" "$LINENO" 5; }
4048 else
4049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4050 $as_echo "yes" >&6; }
4052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4053 $as_echo_n "checking for C compiler default output file name... " >&6; }
4054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4055 $as_echo "$ac_file" >&6; }
4056 ac_exeext=$ac_cv_exeext
4058 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4059 ac_clean_files=$ac_clean_files_save
4060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4061 $as_echo_n "checking for suffix of executables... " >&6; }
4062 if { { ac_try="$ac_link"
4063 case "(($ac_try" in
4064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4065 *) ac_try_echo=$ac_try;;
4066 esac
4067 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4068 $as_echo "$ac_try_echo"; } >&5
4069 (eval "$ac_link") 2>&5
4070 ac_status=$?
4071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4072 test $ac_status = 0; }; then :
4073 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4074 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4075 # work properly (i.e., refer to `conftest.exe'), while it won't with
4076 # `rm'.
4077 for ac_file in conftest.exe conftest conftest.*; do
4078 test -f "$ac_file" || continue
4079 case $ac_file in
4080 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4081 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4082 break;;
4083 * ) break;;
4084 esac
4085 done
4086 else
4087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4088 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4089 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4090 See \`config.log' for more details" "$LINENO" 5; }
4092 rm -f conftest conftest$ac_cv_exeext
4093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4094 $as_echo "$ac_cv_exeext" >&6; }
4096 rm -f conftest.$ac_ext
4097 EXEEXT=$ac_cv_exeext
4098 ac_exeext=$EXEEXT
4099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4100 /* end confdefs.h. */
4101 #include <stdio.h>
4103 main ()
4105 FILE *f = fopen ("conftest.out", "w");
4106 return ferror (f) || fclose (f) != 0;
4109 return 0;
4111 _ACEOF
4112 ac_clean_files="$ac_clean_files conftest.out"
4113 # Check that the compiler produces executables we can run. If not, either
4114 # the compiler is broken, or we cross compile.
4115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4116 $as_echo_n "checking whether we are cross compiling... " >&6; }
4117 if test "$cross_compiling" != yes; then
4118 { { ac_try="$ac_link"
4119 case "(($ac_try" in
4120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4121 *) ac_try_echo=$ac_try;;
4122 esac
4123 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4124 $as_echo "$ac_try_echo"; } >&5
4125 (eval "$ac_link") 2>&5
4126 ac_status=$?
4127 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4128 test $ac_status = 0; }
4129 if { ac_try='./conftest$ac_cv_exeext'
4130 { { case "(($ac_try" in
4131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4132 *) ac_try_echo=$ac_try;;
4133 esac
4134 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4135 $as_echo "$ac_try_echo"; } >&5
4136 (eval "$ac_try") 2>&5
4137 ac_status=$?
4138 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4139 test $ac_status = 0; }; }; then
4140 cross_compiling=no
4141 else
4142 if test "$cross_compiling" = maybe; then
4143 cross_compiling=yes
4144 else
4145 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4146 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4147 as_fn_error $? "cannot run C compiled programs.
4148 If you meant to cross compile, use \`--host'.
4149 See \`config.log' for more details" "$LINENO" 5; }
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4154 $as_echo "$cross_compiling" >&6; }
4156 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4157 ac_clean_files=$ac_clean_files_save
4158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4159 $as_echo_n "checking for suffix of object files... " >&6; }
4160 if ${ac_cv_objext+:} false; then :
4161 $as_echo_n "(cached) " >&6
4162 else
4163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4164 /* end confdefs.h. */
4167 main ()
4171 return 0;
4173 _ACEOF
4174 rm -f conftest.o conftest.obj
4175 if { { ac_try="$ac_compile"
4176 case "(($ac_try" in
4177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4178 *) ac_try_echo=$ac_try;;
4179 esac
4180 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4181 $as_echo "$ac_try_echo"; } >&5
4182 (eval "$ac_compile") 2>&5
4183 ac_status=$?
4184 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4185 test $ac_status = 0; }; then :
4186 for ac_file in conftest.o conftest.obj conftest.*; do
4187 test -f "$ac_file" || continue;
4188 case $ac_file in
4189 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4190 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4191 break;;
4192 esac
4193 done
4194 else
4195 $as_echo "$as_me: failed program was:" >&5
4196 sed 's/^/| /' conftest.$ac_ext >&5
4198 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4199 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4200 as_fn_error $? "cannot compute suffix of object files: cannot compile
4201 See \`config.log' for more details" "$LINENO" 5; }
4203 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4206 $as_echo "$ac_cv_objext" >&6; }
4207 OBJEXT=$ac_cv_objext
4208 ac_objext=$OBJEXT
4209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4210 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4211 if ${ac_cv_c_compiler_gnu+:} false; then :
4212 $as_echo_n "(cached) " >&6
4213 else
4214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4215 /* end confdefs.h. */
4218 main ()
4220 #ifndef __GNUC__
4221 choke me
4222 #endif
4225 return 0;
4227 _ACEOF
4228 if ac_fn_c_try_compile "$LINENO"; then :
4229 ac_compiler_gnu=yes
4230 else
4231 ac_compiler_gnu=no
4233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4234 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4238 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4239 if test $ac_compiler_gnu = yes; then
4240 GCC=yes
4241 else
4242 GCC=
4244 ac_test_CFLAGS=${CFLAGS+set}
4245 ac_save_CFLAGS=$CFLAGS
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4247 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4248 if ${ac_cv_prog_cc_g+:} false; then :
4249 $as_echo_n "(cached) " >&6
4250 else
4251 ac_save_c_werror_flag=$ac_c_werror_flag
4252 ac_c_werror_flag=yes
4253 ac_cv_prog_cc_g=no
4254 CFLAGS="-g"
4255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4256 /* end confdefs.h. */
4259 main ()
4263 return 0;
4265 _ACEOF
4266 if ac_fn_c_try_compile "$LINENO"; then :
4267 ac_cv_prog_cc_g=yes
4268 else
4269 CFLAGS=""
4270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4271 /* end confdefs.h. */
4274 main ()
4278 return 0;
4280 _ACEOF
4281 if ac_fn_c_try_compile "$LINENO"; then :
4283 else
4284 ac_c_werror_flag=$ac_save_c_werror_flag
4285 CFLAGS="-g"
4286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4287 /* end confdefs.h. */
4290 main ()
4294 return 0;
4296 _ACEOF
4297 if ac_fn_c_try_compile "$LINENO"; then :
4298 ac_cv_prog_cc_g=yes
4300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4305 ac_c_werror_flag=$ac_save_c_werror_flag
4307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4308 $as_echo "$ac_cv_prog_cc_g" >&6; }
4309 if test "$ac_test_CFLAGS" = set; then
4310 CFLAGS=$ac_save_CFLAGS
4311 elif test $ac_cv_prog_cc_g = yes; then
4312 if test "$GCC" = yes; then
4313 CFLAGS="-g -O2"
4314 else
4315 CFLAGS="-g"
4317 else
4318 if test "$GCC" = yes; then
4319 CFLAGS="-O2"
4320 else
4321 CFLAGS=
4324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4325 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4326 if ${ac_cv_prog_cc_c89+:} false; then :
4327 $as_echo_n "(cached) " >&6
4328 else
4329 ac_cv_prog_cc_c89=no
4330 ac_save_CC=$CC
4331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4332 /* end confdefs.h. */
4333 #include <stdarg.h>
4334 #include <stdio.h>
4335 struct stat;
4336 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4337 struct buf { int x; };
4338 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4339 static char *e (p, i)
4340 char **p;
4341 int i;
4343 return p[i];
4345 static char *f (char * (*g) (char **, int), char **p, ...)
4347 char *s;
4348 va_list v;
4349 va_start (v,p);
4350 s = g (p, va_arg (v,int));
4351 va_end (v);
4352 return s;
4355 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4356 function prototypes and stuff, but not '\xHH' hex character constants.
4357 These don't provoke an error unfortunately, instead are silently treated
4358 as 'x'. The following induces an error, until -std is added to get
4359 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4360 array size at least. It's necessary to write '\x00'==0 to get something
4361 that's true only with -std. */
4362 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4364 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4365 inside strings and character constants. */
4366 #define FOO(x) 'x'
4367 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4369 int test (int i, double x);
4370 struct s1 {int (*f) (int a);};
4371 struct s2 {int (*f) (double a);};
4372 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4373 int argc;
4374 char **argv;
4376 main ()
4378 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4380 return 0;
4382 _ACEOF
4383 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4384 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4386 CC="$ac_save_CC $ac_arg"
4387 if ac_fn_c_try_compile "$LINENO"; then :
4388 ac_cv_prog_cc_c89=$ac_arg
4390 rm -f core conftest.err conftest.$ac_objext
4391 test "x$ac_cv_prog_cc_c89" != "xno" && break
4392 done
4393 rm -f conftest.$ac_ext
4394 CC=$ac_save_CC
4397 # AC_CACHE_VAL
4398 case "x$ac_cv_prog_cc_c89" in
4400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4401 $as_echo "none needed" >&6; } ;;
4402 xno)
4403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4404 $as_echo "unsupported" >&6; } ;;
4406 CC="$CC $ac_cv_prog_cc_c89"
4407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4408 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4409 esac
4410 if test "x$ac_cv_prog_cc_c89" != xno; then :
4414 ac_ext=c
4415 ac_cpp='$CPP $CPPFLAGS'
4416 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4417 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4418 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4421 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4422 if ${ac_cv_prog_cc_c99+:} false; then :
4423 $as_echo_n "(cached) " >&6
4424 else
4425 ac_cv_prog_cc_c99=no
4426 ac_save_CC=$CC
4427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428 /* end confdefs.h. */
4429 #include <stdarg.h>
4430 #include <stdbool.h>
4431 #include <stdlib.h>
4432 #include <wchar.h>
4433 #include <stdio.h>
4435 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4436 #define debug(...) fprintf (stderr, __VA_ARGS__)
4437 #define showlist(...) puts (#__VA_ARGS__)
4438 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4439 static void
4440 test_varargs_macros (void)
4442 int x = 1234;
4443 int y = 5678;
4444 debug ("Flag");
4445 debug ("X = %d\n", x);
4446 showlist (The first, second, and third items.);
4447 report (x>y, "x is %d but y is %d", x, y);
4450 // Check long long types.
4451 #define BIG64 18446744073709551615ull
4452 #define BIG32 4294967295ul
4453 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4454 #if !BIG_OK
4455 your preprocessor is broken;
4456 #endif
4457 #if BIG_OK
4458 #else
4459 your preprocessor is broken;
4460 #endif
4461 static long long int bignum = -9223372036854775807LL;
4462 static unsigned long long int ubignum = BIG64;
4464 struct incomplete_array
4466 int datasize;
4467 double data[];
4470 struct named_init {
4471 int number;
4472 const wchar_t *name;
4473 double average;
4476 typedef const char *ccp;
4478 static inline int
4479 test_restrict (ccp restrict text)
4481 // See if C++-style comments work.
4482 // Iterate through items via the restricted pointer.
4483 // Also check for declarations in for loops.
4484 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4485 continue;
4486 return 0;
4489 // Check varargs and va_copy.
4490 static void
4491 test_varargs (const char *format, ...)
4493 va_list args;
4494 va_start (args, format);
4495 va_list args_copy;
4496 va_copy (args_copy, args);
4498 const char *str;
4499 int number;
4500 float fnumber;
4502 while (*format)
4504 switch (*format++)
4506 case 's': // string
4507 str = va_arg (args_copy, const char *);
4508 break;
4509 case 'd': // int
4510 number = va_arg (args_copy, int);
4511 break;
4512 case 'f': // float
4513 fnumber = va_arg (args_copy, double);
4514 break;
4515 default:
4516 break;
4519 va_end (args_copy);
4520 va_end (args);
4524 main ()
4527 // Check bool.
4528 _Bool success = false;
4530 // Check restrict.
4531 if (test_restrict ("String literal") == 0)
4532 success = true;
4533 char *restrict newvar = "Another string";
4535 // Check varargs.
4536 test_varargs ("s, d' f .", "string", 65, 34.234);
4537 test_varargs_macros ();
4539 // Check flexible array members.
4540 struct incomplete_array *ia =
4541 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4542 ia->datasize = 10;
4543 for (int i = 0; i < ia->datasize; ++i)
4544 ia->data[i] = i * 1.234;
4546 // Check named initializers.
4547 struct named_init ni = {
4548 .number = 34,
4549 .name = L"Test wide string",
4550 .average = 543.34343,
4553 ni.number = 58;
4555 int dynamic_array[ni.number];
4556 dynamic_array[ni.number - 1] = 543;
4558 // work around unused variable warnings
4559 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4560 || dynamic_array[ni.number - 1] != 543);
4563 return 0;
4565 _ACEOF
4566 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4568 CC="$ac_save_CC $ac_arg"
4569 if ac_fn_c_try_compile "$LINENO"; then :
4570 ac_cv_prog_cc_c99=$ac_arg
4572 rm -f core conftest.err conftest.$ac_objext
4573 test "x$ac_cv_prog_cc_c99" != "xno" && break
4574 done
4575 rm -f conftest.$ac_ext
4576 CC=$ac_save_CC
4579 # AC_CACHE_VAL
4580 case "x$ac_cv_prog_cc_c99" in
4582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4583 $as_echo "none needed" >&6; } ;;
4584 xno)
4585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4586 $as_echo "unsupported" >&6; } ;;
4588 CC="$CC $ac_cv_prog_cc_c99"
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4590 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4591 esac
4592 if test "x$ac_cv_prog_cc_c99" != xno; then :
4598 # Error out if the compiler does not support C99, as the codebase
4599 # relies on that.
4600 if test "$ac_cv_prog_cc_c99" = no; then
4601 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4604 ac_ext=cpp
4605 ac_cpp='$CXXCPP $CPPFLAGS'
4606 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4607 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4608 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4609 if test -z "$CXX"; then
4610 if test -n "$CCC"; then
4611 CXX=$CCC
4612 else
4613 if test -n "$ac_tool_prefix"; then
4614 for ac_prog in $pgac_cxx_list
4616 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619 $as_echo_n "checking for $ac_word... " >&6; }
4620 if ${ac_cv_prog_CXX+:} false; then :
4621 $as_echo_n "(cached) " >&6
4622 else
4623 if test -n "$CXX"; then
4624 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4625 else
4626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4627 for as_dir in $PATH
4629 IFS=$as_save_IFS
4630 test -z "$as_dir" && as_dir=.
4631 for ac_exec_ext in '' $ac_executable_extensions; do
4632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4633 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4635 break 2
4637 done
4638 done
4639 IFS=$as_save_IFS
4643 CXX=$ac_cv_prog_CXX
4644 if test -n "$CXX"; then
4645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4646 $as_echo "$CXX" >&6; }
4647 else
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4649 $as_echo "no" >&6; }
4653 test -n "$CXX" && break
4654 done
4656 if test -z "$CXX"; then
4657 ac_ct_CXX=$CXX
4658 for ac_prog in $pgac_cxx_list
4660 # Extract the first word of "$ac_prog", so it can be a program name with args.
4661 set dummy $ac_prog; ac_word=$2
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4663 $as_echo_n "checking for $ac_word... " >&6; }
4664 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4665 $as_echo_n "(cached) " >&6
4666 else
4667 if test -n "$ac_ct_CXX"; then
4668 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4669 else
4670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4671 for as_dir in $PATH
4673 IFS=$as_save_IFS
4674 test -z "$as_dir" && as_dir=.
4675 for ac_exec_ext in '' $ac_executable_extensions; do
4676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4677 ac_cv_prog_ac_ct_CXX="$ac_prog"
4678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4679 break 2
4681 done
4682 done
4683 IFS=$as_save_IFS
4687 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4688 if test -n "$ac_ct_CXX"; then
4689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4690 $as_echo "$ac_ct_CXX" >&6; }
4691 else
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693 $as_echo "no" >&6; }
4697 test -n "$ac_ct_CXX" && break
4698 done
4700 if test "x$ac_ct_CXX" = x; then
4701 CXX="g++"
4702 else
4703 case $cross_compiling:$ac_tool_warned in
4704 yes:)
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4706 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4707 ac_tool_warned=yes ;;
4708 esac
4709 CXX=$ac_ct_CXX
4715 # Provide some information about the compiler.
4716 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4717 set X $ac_compile
4718 ac_compiler=$2
4719 for ac_option in --version -v -V -qversion; do
4720 { { ac_try="$ac_compiler $ac_option >&5"
4721 case "(($ac_try" in
4722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4723 *) ac_try_echo=$ac_try;;
4724 esac
4725 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4726 $as_echo "$ac_try_echo"; } >&5
4727 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4728 ac_status=$?
4729 if test -s conftest.err; then
4730 sed '10a\
4731 ... rest of stderr output deleted ...
4732 10q' conftest.err >conftest.er1
4733 cat conftest.er1 >&5
4735 rm -f conftest.er1 conftest.err
4736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4737 test $ac_status = 0; }
4738 done
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4741 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4742 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4743 $as_echo_n "(cached) " >&6
4744 else
4745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4746 /* end confdefs.h. */
4749 main ()
4751 #ifndef __GNUC__
4752 choke me
4753 #endif
4756 return 0;
4758 _ACEOF
4759 if ac_fn_cxx_try_compile "$LINENO"; then :
4760 ac_compiler_gnu=yes
4761 else
4762 ac_compiler_gnu=no
4764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4765 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4769 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4770 if test $ac_compiler_gnu = yes; then
4771 GXX=yes
4772 else
4773 GXX=
4775 ac_test_CXXFLAGS=${CXXFLAGS+set}
4776 ac_save_CXXFLAGS=$CXXFLAGS
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4778 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4779 if ${ac_cv_prog_cxx_g+:} false; then :
4780 $as_echo_n "(cached) " >&6
4781 else
4782 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4783 ac_cxx_werror_flag=yes
4784 ac_cv_prog_cxx_g=no
4785 CXXFLAGS="-g"
4786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4787 /* end confdefs.h. */
4790 main ()
4794 return 0;
4796 _ACEOF
4797 if ac_fn_cxx_try_compile "$LINENO"; then :
4798 ac_cv_prog_cxx_g=yes
4799 else
4800 CXXFLAGS=""
4801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4802 /* end confdefs.h. */
4805 main ()
4809 return 0;
4811 _ACEOF
4812 if ac_fn_cxx_try_compile "$LINENO"; then :
4814 else
4815 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4816 CXXFLAGS="-g"
4817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4818 /* end confdefs.h. */
4821 main ()
4825 return 0;
4827 _ACEOF
4828 if ac_fn_cxx_try_compile "$LINENO"; then :
4829 ac_cv_prog_cxx_g=yes
4831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4836 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4839 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4840 if test "$ac_test_CXXFLAGS" = set; then
4841 CXXFLAGS=$ac_save_CXXFLAGS
4842 elif test $ac_cv_prog_cxx_g = yes; then
4843 if test "$GXX" = yes; then
4844 CXXFLAGS="-g -O2"
4845 else
4846 CXXFLAGS="-g"
4848 else
4849 if test "$GXX" = yes; then
4850 CXXFLAGS="-O2"
4851 else
4852 CXXFLAGS=
4855 ac_ext=c
4856 ac_cpp='$CPP $CPPFLAGS'
4857 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4858 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4859 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4862 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4863 # but has idiosyncrasies of its own. We assume icc will define
4864 # __INTEL_COMPILER regardless of CFLAGS.
4866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4867 /* end confdefs.h. */
4870 main ()
4872 #ifndef __INTEL_COMPILER
4873 choke me
4874 #endif
4876 return 0;
4878 _ACEOF
4879 if ac_fn_c_try_compile "$LINENO"; then :
4880 ICC=yes
4881 else
4882 ICC=no
4884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4886 # Check if it's Sun Studio compiler. We assume that
4887 # __SUNPRO_C will be defined for Sun Studio compilers
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4892 main ()
4894 #ifndef __SUNPRO_C
4895 choke me
4896 #endif
4898 return 0;
4900 _ACEOF
4901 if ac_fn_c_try_compile "$LINENO"; then :
4902 SUN_STUDIO_CC=yes
4903 else
4904 SUN_STUDIO_CC=no
4906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4912 # LLVM
4914 # Checked early because subsequent tests depend on it.
4918 # Check whether --with-llvm was given.
4919 if test "${with_llvm+set}" = set; then :
4920 withval=$with_llvm;
4921 case $withval in
4922 yes)
4924 $as_echo "#define USE_LLVM 1" >>confdefs.h
4931 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4933 esac
4935 else
4936 with_llvm=no
4942 for ac_prog in gawk mawk nawk awk
4944 # Extract the first word of "$ac_prog", so it can be a program name with args.
4945 set dummy $ac_prog; ac_word=$2
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947 $as_echo_n "checking for $ac_word... " >&6; }
4948 if ${ac_cv_prog_AWK+:} false; then :
4949 $as_echo_n "(cached) " >&6
4950 else
4951 if test -n "$AWK"; then
4952 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4953 else
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955 for as_dir in $PATH
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4961 ac_cv_prog_AWK="$ac_prog"
4962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4963 break 2
4965 done
4966 done
4967 IFS=$as_save_IFS
4971 AWK=$ac_cv_prog_AWK
4972 if test -n "$AWK"; then
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4974 $as_echo "$AWK" >&6; }
4975 else
4976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977 $as_echo "no" >&6; }
4981 test -n "$AWK" && break
4982 done
4984 if test "$with_llvm" = yes; then :
4990 if test -z "$LLVM_CONFIG"; then
4991 for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
4993 # Extract the first word of "$ac_prog", so it can be a program name with args.
4994 set dummy $ac_prog; ac_word=$2
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996 $as_echo_n "checking for $ac_word... " >&6; }
4997 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4998 $as_echo_n "(cached) " >&6
4999 else
5000 case $LLVM_CONFIG in
5001 [\\/]* | ?:[\\/]*)
5002 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5006 for as_dir in $PATH
5008 IFS=$as_save_IFS
5009 test -z "$as_dir" && as_dir=.
5010 for ac_exec_ext in '' $ac_executable_extensions; do
5011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5012 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5014 break 2
5016 done
5017 done
5018 IFS=$as_save_IFS
5021 esac
5023 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5024 if test -n "$LLVM_CONFIG"; then
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5026 $as_echo "$LLVM_CONFIG" >&6; }
5027 else
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029 $as_echo "no" >&6; }
5033 test -n "$LLVM_CONFIG" && break
5034 done
5036 else
5037 # Report the value of LLVM_CONFIG in configure's output in all cases.
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5039 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5041 $as_echo "$LLVM_CONFIG" >&6; }
5045 # no point continuing if llvm wasn't found
5046 if test -z "$LLVM_CONFIG"; then
5047 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5049 # check if detected $LLVM_CONFIG is executable
5050 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5051 if test "x$pgac_llvm_version" = "xno"; then
5052 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5054 # and whether the version is supported
5055 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5056 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5058 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5059 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5061 # need clang to create some bitcode files
5063 if test -z "$CLANG"; then
5064 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5066 # Extract the first word of "$ac_prog", so it can be a program name with args.
5067 set dummy $ac_prog; ac_word=$2
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069 $as_echo_n "checking for $ac_word... " >&6; }
5070 if ${ac_cv_path_CLANG+:} false; then :
5071 $as_echo_n "(cached) " >&6
5072 else
5073 case $CLANG in
5074 [\\/]* | ?:[\\/]*)
5075 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079 for as_dir in $PATH
5081 IFS=$as_save_IFS
5082 test -z "$as_dir" && as_dir=.
5083 for ac_exec_ext in '' $ac_executable_extensions; do
5084 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5085 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087 break 2
5089 done
5090 done
5091 IFS=$as_save_IFS
5094 esac
5096 CLANG=$ac_cv_path_CLANG
5097 if test -n "$CLANG"; then
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5099 $as_echo "$CLANG" >&6; }
5100 else
5101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102 $as_echo "no" >&6; }
5106 test -n "$CLANG" && break
5107 done
5109 else
5110 # Report the value of CLANG in configure's output in all cases.
5111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5112 $as_echo_n "checking for CLANG... " >&6; }
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5114 $as_echo "$CLANG" >&6; }
5117 if test -z "$CLANG"; then
5118 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5120 # make sure clang is executable
5121 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5122 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5124 # Could check clang version, but it doesn't seem that
5125 # important. Systems with a new enough LLVM version are usually
5126 # going to have a decent clang version too. It's also not entirely
5127 # clear what the minimum version is.
5129 # Collect compiler flags necessary to build the LLVM dependent
5130 # shared library.
5131 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5132 case $pgac_option in
5133 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5134 esac
5135 done
5137 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5138 case $pgac_option in
5139 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5140 esac
5141 done
5143 # ABI influencing options, standard influencing options
5144 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5145 case $pgac_option in
5146 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5147 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5148 esac
5149 done
5151 # Look for components we're interested in, collect necessary
5152 # libs. As some components are optional, we can't just list all of
5153 # them as it'd raise an error.
5154 pgac_components='';
5155 for pgac_component in `$LLVM_CONFIG --components`; do
5156 case $pgac_component in
5157 engine) pgac_components="$pgac_components $pgac_component";;
5158 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5159 orcjit) pgac_components="$pgac_components $pgac_component";;
5160 passes) pgac_components="$pgac_components $pgac_component";;
5161 native) pgac_components="$pgac_components $pgac_component";;
5162 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5163 esac
5164 done;
5166 # And then get the libraries that need to be linked in for the
5167 # selected components. They're large libraries, we only want to
5168 # link them into the LLVM using shared library.
5169 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5170 case $pgac_option in
5171 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5172 esac
5173 done
5175 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5185 fi # fi
5188 unset CFLAGS
5189 unset CXXFLAGS
5192 # Read the template
5194 . "$srcdir/src/template/$template" || exit
5196 # C[XX]FLAGS are selected so:
5197 # If the user specifies something in the environment, that is used.
5198 # else: If the template file set something, that is used.
5199 # else: If coverage was enabled, don't set anything.
5200 # else: If the compiler is GCC, then we use -O2.
5201 # else: If the compiler is something else, then we use -O, unless debugging.
5203 if test "$ac_env_CFLAGS_set" = set; then
5204 CFLAGS=$ac_env_CFLAGS_value
5205 elif test "${CFLAGS+set}" = set; then
5206 : # (keep what template set)
5207 elif test "$enable_coverage" = yes; then
5208 : # no optimization by default
5209 elif test "$GCC" = yes; then
5210 CFLAGS="-O2"
5211 else
5212 # if the user selected debug mode, don't use -O
5213 if test "$enable_debug" != yes; then
5214 CFLAGS="-O"
5218 if test "$ac_env_CXXFLAGS_set" = set; then
5219 CXXFLAGS=$ac_env_CXXFLAGS_value
5220 elif test "${CXXFLAGS+set}" = set; then
5221 : # (keep what template set)
5222 elif test "$enable_coverage" = yes; then
5223 : # no optimization by default
5224 elif test "$GCC" = yes; then
5225 CXXFLAGS="-O2"
5226 else
5227 # if the user selected debug mode, don't use -O
5228 if test "$enable_debug" != yes; then
5229 CXXFLAGS="-O"
5233 # When generating bitcode (for inlining) we always want to use -O2
5234 # even when --enable-debug is specified. The bitcode is not going to
5235 # be used for line-by-line debugging, and JIT inlining doesn't work
5236 # without at least -O1 (otherwise clang will emit 'noinline'
5237 # attributes everywhere), which is bad for testing. Still allow the
5238 # environment to override if done explicitly.
5239 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5240 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5241 else
5242 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5244 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5245 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5246 else
5247 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5250 # C[XX]FLAGS we determined above will be added back at the end
5251 user_CFLAGS=$CFLAGS
5252 CFLAGS=""
5253 user_CXXFLAGS=$CXXFLAGS
5254 CXXFLAGS=""
5255 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5256 BITCODE_CFLAGS=""
5257 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5258 BITCODE_CXXFLAGS=""
5260 # set CFLAGS_VECTOR from the environment, if available
5261 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5262 CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5265 # Some versions of GCC support some additional useful warning flags.
5266 # Check whether they are supported, and add them to CFLAGS if so.
5267 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5268 # but has its own. Also check other compiler-specific flags here.
5270 if test "$GCC" = yes -a "$ICC" = no; then
5271 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5272 CXXFLAGS="-Wall -Wpointer-arith"
5273 # These work in some but not all gcc versions
5274 save_CFLAGS=$CFLAGS
5276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5277 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5278 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5279 $as_echo_n "(cached) " >&6
5280 else
5281 pgac_save_CFLAGS=$CFLAGS
5282 pgac_save_CC=$CC
5283 CC=${CC}
5284 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5285 ac_save_c_werror_flag=$ac_c_werror_flag
5286 ac_c_werror_flag=yes
5287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5288 /* end confdefs.h. */
5291 main ()
5295 return 0;
5297 _ACEOF
5298 if ac_fn_c_try_compile "$LINENO"; then :
5299 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5300 else
5301 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5304 ac_c_werror_flag=$ac_save_c_werror_flag
5305 CFLAGS="$pgac_save_CFLAGS"
5306 CC="$pgac_save_CC"
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5309 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5310 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5311 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5315 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5316 # disable it, so AC_SUBST the negative form.
5317 PERMIT_DECLARATION_AFTER_STATEMENT=
5318 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5319 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5322 # Really don't want VLAs to be used in our dialect of C
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5325 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5326 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5327 $as_echo_n "(cached) " >&6
5328 else
5329 pgac_save_CFLAGS=$CFLAGS
5330 pgac_save_CC=$CC
5331 CC=${CC}
5332 CFLAGS="${CFLAGS} -Werror=vla"
5333 ac_save_c_werror_flag=$ac_c_werror_flag
5334 ac_c_werror_flag=yes
5335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5336 /* end confdefs.h. */
5339 main ()
5343 return 0;
5345 _ACEOF
5346 if ac_fn_c_try_compile "$LINENO"; then :
5347 pgac_cv_prog_CC_cflags__Werror_vla=yes
5348 else
5349 pgac_cv_prog_CC_cflags__Werror_vla=no
5351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5352 ac_c_werror_flag=$ac_save_c_werror_flag
5353 CFLAGS="$pgac_save_CFLAGS"
5354 CC="$pgac_save_CC"
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5357 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5358 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5359 CFLAGS="${CFLAGS} -Werror=vla"
5363 # -Wvla is not applicable for C++
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5366 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5367 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5368 $as_echo_n "(cached) " >&6
5369 else
5370 pgac_save_CFLAGS=$CFLAGS
5371 pgac_save_CC=$CC
5372 CC=${CC}
5373 CFLAGS="${CFLAGS} -Wendif-labels"
5374 ac_save_c_werror_flag=$ac_c_werror_flag
5375 ac_c_werror_flag=yes
5376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5377 /* end confdefs.h. */
5380 main ()
5384 return 0;
5386 _ACEOF
5387 if ac_fn_c_try_compile "$LINENO"; then :
5388 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5389 else
5390 pgac_cv_prog_CC_cflags__Wendif_labels=no
5392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5393 ac_c_werror_flag=$ac_save_c_werror_flag
5394 CFLAGS="$pgac_save_CFLAGS"
5395 CC="$pgac_save_CC"
5397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5398 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5399 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5400 CFLAGS="${CFLAGS} -Wendif-labels"
5404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5405 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5406 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5407 $as_echo_n "(cached) " >&6
5408 else
5409 pgac_save_CXXFLAGS=$CXXFLAGS
5410 pgac_save_CXX=$CXX
5411 CXX=${CXX}
5412 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5413 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5414 ac_cxx_werror_flag=yes
5415 ac_ext=cpp
5416 ac_cpp='$CXXCPP $CPPFLAGS'
5417 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5418 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5419 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5422 /* end confdefs.h. */
5425 main ()
5429 return 0;
5431 _ACEOF
5432 if ac_fn_cxx_try_compile "$LINENO"; then :
5433 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5434 else
5435 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5438 ac_ext=c
5439 ac_cpp='$CPP $CPPFLAGS'
5440 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5441 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5442 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5444 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5445 CXXFLAGS="$pgac_save_CXXFLAGS"
5446 CXX="$pgac_save_CXX"
5448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5449 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5450 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5451 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5457 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5458 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5459 $as_echo_n "(cached) " >&6
5460 else
5461 pgac_save_CFLAGS=$CFLAGS
5462 pgac_save_CC=$CC
5463 CC=${CC}
5464 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5465 ac_save_c_werror_flag=$ac_c_werror_flag
5466 ac_c_werror_flag=yes
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5468 /* end confdefs.h. */
5471 main ()
5475 return 0;
5477 _ACEOF
5478 if ac_fn_c_try_compile "$LINENO"; then :
5479 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5480 else
5481 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5484 ac_c_werror_flag=$ac_save_c_werror_flag
5485 CFLAGS="$pgac_save_CFLAGS"
5486 CC="$pgac_save_CC"
5488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5489 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5490 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5491 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5496 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5497 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5498 $as_echo_n "(cached) " >&6
5499 else
5500 pgac_save_CXXFLAGS=$CXXFLAGS
5501 pgac_save_CXX=$CXX
5502 CXX=${CXX}
5503 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5504 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5505 ac_cxx_werror_flag=yes
5506 ac_ext=cpp
5507 ac_cpp='$CXXCPP $CPPFLAGS'
5508 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5509 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5510 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5513 /* end confdefs.h. */
5516 main ()
5520 return 0;
5522 _ACEOF
5523 if ac_fn_cxx_try_compile "$LINENO"; then :
5524 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5525 else
5526 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5529 ac_ext=c
5530 ac_cpp='$CPP $CPPFLAGS'
5531 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5532 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5533 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5535 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5536 CXXFLAGS="$pgac_save_CXXFLAGS"
5537 CXX="$pgac_save_CXX"
5539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5540 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5541 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5542 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5546 # This was included in -Wall/-Wformat in older GCC versions
5548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5549 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5550 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5551 $as_echo_n "(cached) " >&6
5552 else
5553 pgac_save_CFLAGS=$CFLAGS
5554 pgac_save_CC=$CC
5555 CC=${CC}
5556 CFLAGS="${CFLAGS} -Wformat-security"
5557 ac_save_c_werror_flag=$ac_c_werror_flag
5558 ac_c_werror_flag=yes
5559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5560 /* end confdefs.h. */
5563 main ()
5567 return 0;
5569 _ACEOF
5570 if ac_fn_c_try_compile "$LINENO"; then :
5571 pgac_cv_prog_CC_cflags__Wformat_security=yes
5572 else
5573 pgac_cv_prog_CC_cflags__Wformat_security=no
5575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5576 ac_c_werror_flag=$ac_save_c_werror_flag
5577 CFLAGS="$pgac_save_CFLAGS"
5578 CC="$pgac_save_CC"
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5581 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5582 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5583 CFLAGS="${CFLAGS} -Wformat-security"
5587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5588 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5589 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5590 $as_echo_n "(cached) " >&6
5591 else
5592 pgac_save_CXXFLAGS=$CXXFLAGS
5593 pgac_save_CXX=$CXX
5594 CXX=${CXX}
5595 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5596 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5597 ac_cxx_werror_flag=yes
5598 ac_ext=cpp
5599 ac_cpp='$CXXCPP $CPPFLAGS'
5600 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5601 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5602 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5605 /* end confdefs.h. */
5608 main ()
5612 return 0;
5614 _ACEOF
5615 if ac_fn_cxx_try_compile "$LINENO"; then :
5616 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5617 else
5618 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5621 ac_ext=c
5622 ac_cpp='$CPP $CPPFLAGS'
5623 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5624 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5625 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5627 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5628 CXXFLAGS="$pgac_save_CXXFLAGS"
5629 CXX="$pgac_save_CXX"
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5632 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5633 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5634 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5638 # Disable strict-aliasing rules; needed for gcc 3.3+
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5641 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5642 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5643 $as_echo_n "(cached) " >&6
5644 else
5645 pgac_save_CFLAGS=$CFLAGS
5646 pgac_save_CC=$CC
5647 CC=${CC}
5648 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5649 ac_save_c_werror_flag=$ac_c_werror_flag
5650 ac_c_werror_flag=yes
5651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5652 /* end confdefs.h. */
5655 main ()
5659 return 0;
5661 _ACEOF
5662 if ac_fn_c_try_compile "$LINENO"; then :
5663 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5664 else
5665 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5668 ac_c_werror_flag=$ac_save_c_werror_flag
5669 CFLAGS="$pgac_save_CFLAGS"
5670 CC="$pgac_save_CC"
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5673 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5674 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5675 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5680 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5681 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5682 $as_echo_n "(cached) " >&6
5683 else
5684 pgac_save_CXXFLAGS=$CXXFLAGS
5685 pgac_save_CXX=$CXX
5686 CXX=${CXX}
5687 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5688 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5689 ac_cxx_werror_flag=yes
5690 ac_ext=cpp
5691 ac_cpp='$CXXCPP $CPPFLAGS'
5692 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5693 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5694 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5697 /* end confdefs.h. */
5700 main ()
5704 return 0;
5706 _ACEOF
5707 if ac_fn_cxx_try_compile "$LINENO"; then :
5708 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5709 else
5710 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5713 ac_ext=c
5714 ac_cpp='$CPP $CPPFLAGS'
5715 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5716 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5717 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5719 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5720 CXXFLAGS="$pgac_save_CXXFLAGS"
5721 CXX="$pgac_save_CXX"
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5724 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5725 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5726 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5730 # Disable optimizations that assume no overflow; needed for gcc 4.3+
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5733 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5734 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5735 $as_echo_n "(cached) " >&6
5736 else
5737 pgac_save_CFLAGS=$CFLAGS
5738 pgac_save_CC=$CC
5739 CC=${CC}
5740 CFLAGS="${CFLAGS} -fwrapv"
5741 ac_save_c_werror_flag=$ac_c_werror_flag
5742 ac_c_werror_flag=yes
5743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5744 /* end confdefs.h. */
5747 main ()
5751 return 0;
5753 _ACEOF
5754 if ac_fn_c_try_compile "$LINENO"; then :
5755 pgac_cv_prog_CC_cflags__fwrapv=yes
5756 else
5757 pgac_cv_prog_CC_cflags__fwrapv=no
5759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5760 ac_c_werror_flag=$ac_save_c_werror_flag
5761 CFLAGS="$pgac_save_CFLAGS"
5762 CC="$pgac_save_CC"
5764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5765 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5766 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5767 CFLAGS="${CFLAGS} -fwrapv"
5771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5772 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5773 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5774 $as_echo_n "(cached) " >&6
5775 else
5776 pgac_save_CXXFLAGS=$CXXFLAGS
5777 pgac_save_CXX=$CXX
5778 CXX=${CXX}
5779 CXXFLAGS="${CXXFLAGS} -fwrapv"
5780 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5781 ac_cxx_werror_flag=yes
5782 ac_ext=cpp
5783 ac_cpp='$CXXCPP $CPPFLAGS'
5784 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5785 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5786 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789 /* end confdefs.h. */
5792 main ()
5796 return 0;
5798 _ACEOF
5799 if ac_fn_cxx_try_compile "$LINENO"; then :
5800 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5801 else
5802 pgac_cv_prog_CXX_cxxflags__fwrapv=no
5804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5805 ac_ext=c
5806 ac_cpp='$CPP $CPPFLAGS'
5807 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5808 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5809 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5811 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5812 CXXFLAGS="$pgac_save_CXXFLAGS"
5813 CXX="$pgac_save_CXX"
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5816 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5817 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5818 CXXFLAGS="${CXXFLAGS} -fwrapv"
5822 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5825 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5826 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5827 $as_echo_n "(cached) " >&6
5828 else
5829 pgac_save_CFLAGS=$CFLAGS
5830 pgac_save_CC=$CC
5831 CC=${CC}
5832 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5833 ac_save_c_werror_flag=$ac_c_werror_flag
5834 ac_c_werror_flag=yes
5835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5836 /* end confdefs.h. */
5839 main ()
5843 return 0;
5845 _ACEOF
5846 if ac_fn_c_try_compile "$LINENO"; then :
5847 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5848 else
5849 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5852 ac_c_werror_flag=$ac_save_c_werror_flag
5853 CFLAGS="$pgac_save_CFLAGS"
5854 CC="$pgac_save_CC"
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5857 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5858 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5859 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5864 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5865 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5866 $as_echo_n "(cached) " >&6
5867 else
5868 pgac_save_CXXFLAGS=$CXXFLAGS
5869 pgac_save_CXX=$CXX
5870 CXX=${CXX}
5871 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5872 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5873 ac_cxx_werror_flag=yes
5874 ac_ext=cpp
5875 ac_cpp='$CXXCPP $CPPFLAGS'
5876 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5877 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5878 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5881 /* end confdefs.h. */
5884 main ()
5888 return 0;
5890 _ACEOF
5891 if ac_fn_cxx_try_compile "$LINENO"; then :
5892 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5893 else
5894 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5897 ac_ext=c
5898 ac_cpp='$CPP $CPPFLAGS'
5899 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5900 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5901 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5903 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5904 CXXFLAGS="$pgac_save_CXXFLAGS"
5905 CXX="$pgac_save_CXX"
5907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5908 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5909 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5910 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5914 # Optimization flags for specific files that benefit from vectorization
5915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5916 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5917 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5918 $as_echo_n "(cached) " >&6
5919 else
5920 pgac_save_CFLAGS=$CFLAGS
5921 pgac_save_CC=$CC
5922 CC=${CC}
5923 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5924 ac_save_c_werror_flag=$ac_c_werror_flag
5925 ac_c_werror_flag=yes
5926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5927 /* end confdefs.h. */
5930 main ()
5934 return 0;
5936 _ACEOF
5937 if ac_fn_c_try_compile "$LINENO"; then :
5938 pgac_cv_prog_CC_cflags__funroll_loops=yes
5939 else
5940 pgac_cv_prog_CC_cflags__funroll_loops=no
5942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5943 ac_c_werror_flag=$ac_save_c_werror_flag
5944 CFLAGS="$pgac_save_CFLAGS"
5945 CC="$pgac_save_CC"
5947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5948 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5949 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5950 CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5955 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5956 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5957 $as_echo_n "(cached) " >&6
5958 else
5959 pgac_save_CFLAGS=$CFLAGS
5960 pgac_save_CC=$CC
5961 CC=${CC}
5962 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5963 ac_save_c_werror_flag=$ac_c_werror_flag
5964 ac_c_werror_flag=yes
5965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5966 /* end confdefs.h. */
5969 main ()
5973 return 0;
5975 _ACEOF
5976 if ac_fn_c_try_compile "$LINENO"; then :
5977 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5978 else
5979 pgac_cv_prog_CC_cflags__ftree_vectorize=no
5981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5982 ac_c_werror_flag=$ac_save_c_werror_flag
5983 CFLAGS="$pgac_save_CFLAGS"
5984 CC="$pgac_save_CC"
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5987 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5988 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5989 CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5994 # The following tests want to suppress various unhelpful warnings by adding
5995 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
5996 # switches, so we have to test for the positive form and if that works,
5997 # add the negative form. Note that tests of this form typically need to
5998 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6000 # Suppress clang's unhelpful unused-command-line-argument warnings.
6001 NOT_THE_CFLAGS=""
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6003 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6004 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6005 $as_echo_n "(cached) " >&6
6006 else
6007 pgac_save_CFLAGS=$CFLAGS
6008 pgac_save_CC=$CC
6009 CC=${CC}
6010 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6011 ac_save_c_werror_flag=$ac_c_werror_flag
6012 ac_c_werror_flag=yes
6013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6014 /* end confdefs.h. */
6017 main ()
6021 return 0;
6023 _ACEOF
6024 if ac_fn_c_try_compile "$LINENO"; then :
6025 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6026 else
6027 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6030 ac_c_werror_flag=$ac_save_c_werror_flag
6031 CFLAGS="$pgac_save_CFLAGS"
6032 CC="$pgac_save_CC"
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6035 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6036 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6037 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6041 if test -n "$NOT_THE_CFLAGS"; then
6042 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6044 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6045 # of warnings when building plperl because of usages in the Perl headers.
6046 NOT_THE_CFLAGS=""
6047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6048 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6049 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6050 $as_echo_n "(cached) " >&6
6051 else
6052 pgac_save_CFLAGS=$CFLAGS
6053 pgac_save_CC=$CC
6054 CC=${CC}
6055 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6056 ac_save_c_werror_flag=$ac_c_werror_flag
6057 ac_c_werror_flag=yes
6058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6059 /* end confdefs.h. */
6062 main ()
6066 return 0;
6068 _ACEOF
6069 if ac_fn_c_try_compile "$LINENO"; then :
6070 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6071 else
6072 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6075 ac_c_werror_flag=$ac_save_c_werror_flag
6076 CFLAGS="$pgac_save_CFLAGS"
6077 CC="$pgac_save_CC"
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6080 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6081 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6082 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6086 if test -n "$NOT_THE_CFLAGS"; then
6087 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6089 # Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
6090 # tree-walking APIs that we can't reasonably change in the back branches.
6091 NOT_THE_CFLAGS=""
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS" >&5
6093 $as_echo_n "checking whether ${CC} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS... " >&6; }
6094 if ${pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype+:} false; then :
6095 $as_echo_n "(cached) " >&6
6096 else
6097 pgac_save_CFLAGS=$CFLAGS
6098 pgac_save_CC=$CC
6099 CC=${CC}
6100 CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
6101 ac_save_c_werror_flag=$ac_c_werror_flag
6102 ac_c_werror_flag=yes
6103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6104 /* end confdefs.h. */
6107 main ()
6111 return 0;
6113 _ACEOF
6114 if ac_fn_c_try_compile "$LINENO"; then :
6115 pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype=yes
6116 else
6117 pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype=no
6119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6120 ac_c_werror_flag=$ac_save_c_werror_flag
6121 CFLAGS="$pgac_save_CFLAGS"
6122 CC="$pgac_save_CC"
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" >&5
6125 $as_echo "$pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" >&6; }
6126 if test x"$pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" = x"yes"; then
6127 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
6131 if test -n "$NOT_THE_CFLAGS"; then
6132 CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
6134 # Similarly disable useless truncation warnings from gcc 8+
6135 NOT_THE_CFLAGS=""
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6137 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6138 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6139 $as_echo_n "(cached) " >&6
6140 else
6141 pgac_save_CFLAGS=$CFLAGS
6142 pgac_save_CC=$CC
6143 CC=${CC}
6144 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6145 ac_save_c_werror_flag=$ac_c_werror_flag
6146 ac_c_werror_flag=yes
6147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6148 /* end confdefs.h. */
6151 main ()
6155 return 0;
6157 _ACEOF
6158 if ac_fn_c_try_compile "$LINENO"; then :
6159 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6160 else
6161 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6164 ac_c_werror_flag=$ac_save_c_werror_flag
6165 CFLAGS="$pgac_save_CFLAGS"
6166 CC="$pgac_save_CC"
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6169 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6170 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6171 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6175 if test -n "$NOT_THE_CFLAGS"; then
6176 CFLAGS="$CFLAGS -Wno-format-truncation"
6178 NOT_THE_CFLAGS=""
6179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6180 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6181 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6182 $as_echo_n "(cached) " >&6
6183 else
6184 pgac_save_CFLAGS=$CFLAGS
6185 pgac_save_CC=$CC
6186 CC=${CC}
6187 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6188 ac_save_c_werror_flag=$ac_c_werror_flag
6189 ac_c_werror_flag=yes
6190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6191 /* end confdefs.h. */
6194 main ()
6198 return 0;
6200 _ACEOF
6201 if ac_fn_c_try_compile "$LINENO"; then :
6202 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6203 else
6204 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6207 ac_c_werror_flag=$ac_save_c_werror_flag
6208 CFLAGS="$pgac_save_CFLAGS"
6209 CC="$pgac_save_CC"
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6212 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6213 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6214 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6218 if test -n "$NOT_THE_CFLAGS"; then
6219 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6221 elif test "$ICC" = yes; then
6222 # Intel's compiler has a bug/misoptimization in checking for
6223 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6226 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6227 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6228 $as_echo_n "(cached) " >&6
6229 else
6230 pgac_save_CFLAGS=$CFLAGS
6231 pgac_save_CC=$CC
6232 CC=${CC}
6233 CFLAGS="${CFLAGS} -mp1"
6234 ac_save_c_werror_flag=$ac_c_werror_flag
6235 ac_c_werror_flag=yes
6236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6237 /* end confdefs.h. */
6240 main ()
6244 return 0;
6246 _ACEOF
6247 if ac_fn_c_try_compile "$LINENO"; then :
6248 pgac_cv_prog_CC_cflags__mp1=yes
6249 else
6250 pgac_cv_prog_CC_cflags__mp1=no
6252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6253 ac_c_werror_flag=$ac_save_c_werror_flag
6254 CFLAGS="$pgac_save_CFLAGS"
6255 CC="$pgac_save_CC"
6257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6258 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6259 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6260 CFLAGS="${CFLAGS} -mp1"
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6265 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6266 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6267 $as_echo_n "(cached) " >&6
6268 else
6269 pgac_save_CXXFLAGS=$CXXFLAGS
6270 pgac_save_CXX=$CXX
6271 CXX=${CXX}
6272 CXXFLAGS="${CXXFLAGS} -mp1"
6273 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6274 ac_cxx_werror_flag=yes
6275 ac_ext=cpp
6276 ac_cpp='$CXXCPP $CPPFLAGS'
6277 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6278 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6279 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6282 /* end confdefs.h. */
6285 main ()
6289 return 0;
6291 _ACEOF
6292 if ac_fn_cxx_try_compile "$LINENO"; then :
6293 pgac_cv_prog_CXX_cxxflags__mp1=yes
6294 else
6295 pgac_cv_prog_CXX_cxxflags__mp1=no
6297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6298 ac_ext=c
6299 ac_cpp='$CPP $CPPFLAGS'
6300 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6301 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6302 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6304 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6305 CXXFLAGS="$pgac_save_CXXFLAGS"
6306 CXX="$pgac_save_CXX"
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6309 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6310 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6311 CXXFLAGS="${CXXFLAGS} -mp1"
6315 # Make sure strict aliasing is off (though this is said to be the default)
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6318 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6319 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6320 $as_echo_n "(cached) " >&6
6321 else
6322 pgac_save_CFLAGS=$CFLAGS
6323 pgac_save_CC=$CC
6324 CC=${CC}
6325 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6326 ac_save_c_werror_flag=$ac_c_werror_flag
6327 ac_c_werror_flag=yes
6328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6329 /* end confdefs.h. */
6332 main ()
6336 return 0;
6338 _ACEOF
6339 if ac_fn_c_try_compile "$LINENO"; then :
6340 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6341 else
6342 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6345 ac_c_werror_flag=$ac_save_c_werror_flag
6346 CFLAGS="$pgac_save_CFLAGS"
6347 CC="$pgac_save_CC"
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6350 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6351 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6352 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6357 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6358 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6359 $as_echo_n "(cached) " >&6
6360 else
6361 pgac_save_CXXFLAGS=$CXXFLAGS
6362 pgac_save_CXX=$CXX
6363 CXX=${CXX}
6364 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6365 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6366 ac_cxx_werror_flag=yes
6367 ac_ext=cpp
6368 ac_cpp='$CXXCPP $CPPFLAGS'
6369 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6370 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6371 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6374 /* end confdefs.h. */
6377 main ()
6381 return 0;
6383 _ACEOF
6384 if ac_fn_cxx_try_compile "$LINENO"; then :
6385 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6386 else
6387 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6390 ac_ext=c
6391 ac_cpp='$CPP $CPPFLAGS'
6392 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6393 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6394 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6396 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6397 CXXFLAGS="$pgac_save_CXXFLAGS"
6398 CXX="$pgac_save_CXX"
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6401 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6402 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6403 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6407 elif test "$PORTNAME" = "aix"; then
6408 # AIX's xlc has to have strict aliasing turned off too
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6411 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6412 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6413 $as_echo_n "(cached) " >&6
6414 else
6415 pgac_save_CFLAGS=$CFLAGS
6416 pgac_save_CC=$CC
6417 CC=${CC}
6418 CFLAGS="${CFLAGS} -qnoansialias"
6419 ac_save_c_werror_flag=$ac_c_werror_flag
6420 ac_c_werror_flag=yes
6421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6422 /* end confdefs.h. */
6425 main ()
6429 return 0;
6431 _ACEOF
6432 if ac_fn_c_try_compile "$LINENO"; then :
6433 pgac_cv_prog_CC_cflags__qnoansialias=yes
6434 else
6435 pgac_cv_prog_CC_cflags__qnoansialias=no
6437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6438 ac_c_werror_flag=$ac_save_c_werror_flag
6439 CFLAGS="$pgac_save_CFLAGS"
6440 CC="$pgac_save_CC"
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6443 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6444 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6445 CFLAGS="${CFLAGS} -qnoansialias"
6449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6450 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6451 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6452 $as_echo_n "(cached) " >&6
6453 else
6454 pgac_save_CXXFLAGS=$CXXFLAGS
6455 pgac_save_CXX=$CXX
6456 CXX=${CXX}
6457 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6458 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6459 ac_cxx_werror_flag=yes
6460 ac_ext=cpp
6461 ac_cpp='$CXXCPP $CPPFLAGS'
6462 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6463 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6464 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6467 /* end confdefs.h. */
6470 main ()
6474 return 0;
6476 _ACEOF
6477 if ac_fn_cxx_try_compile "$LINENO"; then :
6478 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6479 else
6480 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6483 ac_ext=c
6484 ac_cpp='$CPP $CPPFLAGS'
6485 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6486 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6487 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6489 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6490 CXXFLAGS="$pgac_save_CXXFLAGS"
6491 CXX="$pgac_save_CXX"
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6494 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6495 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6496 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6502 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6503 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6504 $as_echo_n "(cached) " >&6
6505 else
6506 pgac_save_CFLAGS=$CFLAGS
6507 pgac_save_CC=$CC
6508 CC=${CC}
6509 CFLAGS="${CFLAGS} -qlonglong"
6510 ac_save_c_werror_flag=$ac_c_werror_flag
6511 ac_c_werror_flag=yes
6512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6513 /* end confdefs.h. */
6516 main ()
6520 return 0;
6522 _ACEOF
6523 if ac_fn_c_try_compile "$LINENO"; then :
6524 pgac_cv_prog_CC_cflags__qlonglong=yes
6525 else
6526 pgac_cv_prog_CC_cflags__qlonglong=no
6528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6529 ac_c_werror_flag=$ac_save_c_werror_flag
6530 CFLAGS="$pgac_save_CFLAGS"
6531 CC="$pgac_save_CC"
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6534 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6535 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6536 CFLAGS="${CFLAGS} -qlonglong"
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6541 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6542 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6543 $as_echo_n "(cached) " >&6
6544 else
6545 pgac_save_CXXFLAGS=$CXXFLAGS
6546 pgac_save_CXX=$CXX
6547 CXX=${CXX}
6548 CXXFLAGS="${CXXFLAGS} -qlonglong"
6549 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6550 ac_cxx_werror_flag=yes
6551 ac_ext=cpp
6552 ac_cpp='$CXXCPP $CPPFLAGS'
6553 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6554 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6555 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6558 /* end confdefs.h. */
6561 main ()
6565 return 0;
6567 _ACEOF
6568 if ac_fn_cxx_try_compile "$LINENO"; then :
6569 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6570 else
6571 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6574 ac_ext=c
6575 ac_cpp='$CPP $CPPFLAGS'
6576 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6577 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6578 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6580 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6581 CXXFLAGS="$pgac_save_CXXFLAGS"
6582 CXX="$pgac_save_CXX"
6584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6585 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6586 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6587 CXXFLAGS="${CXXFLAGS} -qlonglong"
6591 elif test "$PORTNAME" = "hpux"; then
6592 # On some versions of HP-UX, libm functions do not set errno by default.
6593 # Fix that by using +Olibmerrno if the compiler recognizes it.
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6596 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6597 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6598 $as_echo_n "(cached) " >&6
6599 else
6600 pgac_save_CFLAGS=$CFLAGS
6601 pgac_save_CC=$CC
6602 CC=${CC}
6603 CFLAGS="${CFLAGS} +Olibmerrno"
6604 ac_save_c_werror_flag=$ac_c_werror_flag
6605 ac_c_werror_flag=yes
6606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6607 /* end confdefs.h. */
6610 main ()
6614 return 0;
6616 _ACEOF
6617 if ac_fn_c_try_compile "$LINENO"; then :
6618 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6619 else
6620 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6623 ac_c_werror_flag=$ac_save_c_werror_flag
6624 CFLAGS="$pgac_save_CFLAGS"
6625 CC="$pgac_save_CC"
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6628 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6629 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6630 CFLAGS="${CFLAGS} +Olibmerrno"
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6635 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6636 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6637 $as_echo_n "(cached) " >&6
6638 else
6639 pgac_save_CXXFLAGS=$CXXFLAGS
6640 pgac_save_CXX=$CXX
6641 CXX=${CXX}
6642 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6643 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6644 ac_cxx_werror_flag=yes
6645 ac_ext=cpp
6646 ac_cpp='$CXXCPP $CPPFLAGS'
6647 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6648 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6649 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6652 /* end confdefs.h. */
6655 main ()
6659 return 0;
6661 _ACEOF
6662 if ac_fn_cxx_try_compile "$LINENO"; then :
6663 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6664 else
6665 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6668 ac_ext=c
6669 ac_cpp='$CPP $CPPFLAGS'
6670 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6671 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6672 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6674 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6675 CXXFLAGS="$pgac_save_CXXFLAGS"
6676 CXX="$pgac_save_CXX"
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6679 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6680 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6681 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6689 # Determine flags used to emit bitcode for JIT inlining.
6690 # 1. We must duplicate any behaviour-changing compiler flags used above,
6691 # to keep compatibility with the compiler used for normal Postgres code.
6692 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
6693 # warning in the main build is enough.
6694 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
6695 if test "$with_llvm" = yes ; then
6696 CLANGXX="$CLANG -xc++"
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6699 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6700 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6701 $as_echo_n "(cached) " >&6
6702 else
6703 pgac_save_CFLAGS=$CFLAGS
6704 pgac_save_CC=$CC
6705 CC=${CLANG}
6706 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6707 ac_save_c_werror_flag=$ac_c_werror_flag
6708 ac_c_werror_flag=yes
6709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6710 /* end confdefs.h. */
6713 main ()
6717 return 0;
6719 _ACEOF
6720 if ac_fn_c_try_compile "$LINENO"; then :
6721 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6722 else
6723 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6726 ac_c_werror_flag=$ac_save_c_werror_flag
6727 CFLAGS="$pgac_save_CFLAGS"
6728 CC="$pgac_save_CC"
6730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6731 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6732 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6733 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6737 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6738 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6739 $as_echo_n "(cached) " >&6
6740 else
6741 pgac_save_CXXFLAGS=$CXXFLAGS
6742 pgac_save_CXX=$CXX
6743 CXX=${CLANGXX}
6744 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6745 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6746 ac_cxx_werror_flag=yes
6747 ac_ext=cpp
6748 ac_cpp='$CXXCPP $CPPFLAGS'
6749 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6750 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6751 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6754 /* end confdefs.h. */
6757 main ()
6761 return 0;
6763 _ACEOF
6764 if ac_fn_cxx_try_compile "$LINENO"; then :
6765 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6766 else
6767 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6770 ac_ext=c
6771 ac_cpp='$CPP $CPPFLAGS'
6772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6776 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6777 CXXFLAGS="$pgac_save_CXXFLAGS"
6778 CXX="$pgac_save_CXX"
6780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6781 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6782 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6783 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6787 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6788 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6789 $as_echo_n "(cached) " >&6
6790 else
6791 pgac_save_CFLAGS=$CFLAGS
6792 pgac_save_CC=$CC
6793 CC=${CLANG}
6794 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6795 ac_save_c_werror_flag=$ac_c_werror_flag
6796 ac_c_werror_flag=yes
6797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6798 /* end confdefs.h. */
6801 main ()
6805 return 0;
6807 _ACEOF
6808 if ac_fn_c_try_compile "$LINENO"; then :
6809 pgac_cv_prog_CLANG_cflags__fwrapv=yes
6810 else
6811 pgac_cv_prog_CLANG_cflags__fwrapv=no
6813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6814 ac_c_werror_flag=$ac_save_c_werror_flag
6815 CFLAGS="$pgac_save_CFLAGS"
6816 CC="$pgac_save_CC"
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6819 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6820 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6821 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6825 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6826 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6827 $as_echo_n "(cached) " >&6
6828 else
6829 pgac_save_CXXFLAGS=$CXXFLAGS
6830 pgac_save_CXX=$CXX
6831 CXX=${CLANGXX}
6832 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6833 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6834 ac_cxx_werror_flag=yes
6835 ac_ext=cpp
6836 ac_cpp='$CXXCPP $CPPFLAGS'
6837 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6838 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6839 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6842 /* end confdefs.h. */
6845 main ()
6849 return 0;
6851 _ACEOF
6852 if ac_fn_cxx_try_compile "$LINENO"; then :
6853 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6854 else
6855 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6858 ac_ext=c
6859 ac_cpp='$CPP $CPPFLAGS'
6860 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6861 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6862 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6864 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6865 CXXFLAGS="$pgac_save_CXXFLAGS"
6866 CXX="$pgac_save_CXX"
6868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6869 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6870 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6871 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6875 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6876 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6877 $as_echo_n "(cached) " >&6
6878 else
6879 pgac_save_CFLAGS=$CFLAGS
6880 pgac_save_CC=$CC
6881 CC=${CLANG}
6882 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6883 ac_save_c_werror_flag=$ac_c_werror_flag
6884 ac_c_werror_flag=yes
6885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6886 /* end confdefs.h. */
6889 main ()
6893 return 0;
6895 _ACEOF
6896 if ac_fn_c_try_compile "$LINENO"; then :
6897 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6898 else
6899 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6902 ac_c_werror_flag=$ac_save_c_werror_flag
6903 CFLAGS="$pgac_save_CFLAGS"
6904 CC="$pgac_save_CC"
6906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6907 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6908 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6909 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6913 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6914 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6915 $as_echo_n "(cached) " >&6
6916 else
6917 pgac_save_CXXFLAGS=$CXXFLAGS
6918 pgac_save_CXX=$CXX
6919 CXX=${CLANGXX}
6920 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6921 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6922 ac_cxx_werror_flag=yes
6923 ac_ext=cpp
6924 ac_cpp='$CXXCPP $CPPFLAGS'
6925 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6926 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6927 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6930 /* end confdefs.h. */
6933 main ()
6937 return 0;
6939 _ACEOF
6940 if ac_fn_cxx_try_compile "$LINENO"; then :
6941 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6942 else
6943 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6946 ac_ext=c
6947 ac_cpp='$CPP $CPPFLAGS'
6948 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6949 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6950 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6952 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6953 CXXFLAGS="$pgac_save_CXXFLAGS"
6954 CXX="$pgac_save_CXX"
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6957 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6958 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6959 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
6964 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
6965 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
6966 $as_echo_n "(cached) " >&6
6967 else
6968 pgac_save_CFLAGS=$CFLAGS
6969 pgac_save_CC=$CC
6970 CC=${CLANG}
6971 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
6972 ac_save_c_werror_flag=$ac_c_werror_flag
6973 ac_c_werror_flag=yes
6974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6975 /* end confdefs.h. */
6978 main ()
6982 return 0;
6984 _ACEOF
6985 if ac_fn_c_try_compile "$LINENO"; then :
6986 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
6987 else
6988 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
6990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6991 ac_c_werror_flag=$ac_save_c_werror_flag
6992 CFLAGS="$pgac_save_CFLAGS"
6993 CC="$pgac_save_CC"
6995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
6996 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
6997 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
6998 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7002 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7003 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7004 $as_echo_n "(cached) " >&6
7005 else
7006 pgac_save_CXXFLAGS=$CXXFLAGS
7007 pgac_save_CXX=$CXX
7008 CXX=${CLANGXX}
7009 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7010 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7011 ac_cxx_werror_flag=yes
7012 ac_ext=cpp
7013 ac_cpp='$CXXCPP $CPPFLAGS'
7014 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7015 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7016 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7019 /* end confdefs.h. */
7022 main ()
7026 return 0;
7028 _ACEOF
7029 if ac_fn_cxx_try_compile "$LINENO"; then :
7030 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7031 else
7032 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7035 ac_ext=c
7036 ac_cpp='$CPP $CPPFLAGS'
7037 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7038 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7039 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7041 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7042 CXXFLAGS="$pgac_save_CXXFLAGS"
7043 CXX="$pgac_save_CXX"
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7046 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7047 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7048 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7052 NOT_THE_CFLAGS=""
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7054 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7055 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7056 $as_echo_n "(cached) " >&6
7057 else
7058 pgac_save_CFLAGS=$CFLAGS
7059 pgac_save_CC=$CC
7060 CC=${CLANG}
7061 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7062 ac_save_c_werror_flag=$ac_c_werror_flag
7063 ac_c_werror_flag=yes
7064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7065 /* end confdefs.h. */
7068 main ()
7072 return 0;
7074 _ACEOF
7075 if ac_fn_c_try_compile "$LINENO"; then :
7076 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7077 else
7078 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7081 ac_c_werror_flag=$ac_save_c_werror_flag
7082 CFLAGS="$pgac_save_CFLAGS"
7083 CC="$pgac_save_CC"
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7086 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7087 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7088 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7091 if test -n "$NOT_THE_CFLAGS"; then
7092 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7094 NOT_THE_CFLAGS=""
7095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7096 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7097 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7098 $as_echo_n "(cached) " >&6
7099 else
7100 pgac_save_CFLAGS=$CFLAGS
7101 pgac_save_CC=$CC
7102 CC=${CLANG}
7103 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7104 ac_save_c_werror_flag=$ac_c_werror_flag
7105 ac_c_werror_flag=yes
7106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107 /* end confdefs.h. */
7110 main ()
7114 return 0;
7116 _ACEOF
7117 if ac_fn_c_try_compile "$LINENO"; then :
7118 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7119 else
7120 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7123 ac_c_werror_flag=$ac_save_c_werror_flag
7124 CFLAGS="$pgac_save_CFLAGS"
7125 CC="$pgac_save_CC"
7127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7128 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7129 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7130 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7133 if test -n "$NOT_THE_CFLAGS"; then
7134 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7136 NOT_THE_CFLAGS=""
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS" >&5
7138 $as_echo_n "checking whether ${CLANG} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS... " >&6; }
7139 if ${pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype+:} false; then :
7140 $as_echo_n "(cached) " >&6
7141 else
7142 pgac_save_CFLAGS=$CFLAGS
7143 pgac_save_CC=$CC
7144 CC=${CLANG}
7145 CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
7146 ac_save_c_werror_flag=$ac_c_werror_flag
7147 ac_c_werror_flag=yes
7148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7149 /* end confdefs.h. */
7152 main ()
7156 return 0;
7158 _ACEOF
7159 if ac_fn_c_try_compile "$LINENO"; then :
7160 pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype=yes
7161 else
7162 pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype=no
7164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7165 ac_c_werror_flag=$ac_save_c_werror_flag
7166 CFLAGS="$pgac_save_CFLAGS"
7167 CC="$pgac_save_CC"
7169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" >&5
7170 $as_echo "$pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" >&6; }
7171 if test x"$pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" = x"yes"; then
7172 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
7175 if test -n "$NOT_THE_CFLAGS"; then
7176 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-deprecated-non-prototype"
7178 NOT_THE_CFLAGS=""
7179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7180 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7181 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7182 $as_echo_n "(cached) " >&6
7183 else
7184 pgac_save_CFLAGS=$CFLAGS
7185 pgac_save_CC=$CC
7186 CC=${CLANG}
7187 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7188 ac_save_c_werror_flag=$ac_c_werror_flag
7189 ac_c_werror_flag=yes
7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7191 /* end confdefs.h. */
7194 main ()
7198 return 0;
7200 _ACEOF
7201 if ac_fn_c_try_compile "$LINENO"; then :
7202 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7203 else
7204 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7207 ac_c_werror_flag=$ac_save_c_werror_flag
7208 CFLAGS="$pgac_save_CFLAGS"
7209 CC="$pgac_save_CC"
7211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7212 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7213 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7214 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7217 if test -n "$NOT_THE_CFLAGS"; then
7218 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7220 NOT_THE_CFLAGS=""
7221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7222 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7223 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7224 $as_echo_n "(cached) " >&6
7225 else
7226 pgac_save_CFLAGS=$CFLAGS
7227 pgac_save_CC=$CC
7228 CC=${CLANG}
7229 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7230 ac_save_c_werror_flag=$ac_c_werror_flag
7231 ac_c_werror_flag=yes
7232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7233 /* end confdefs.h. */
7236 main ()
7240 return 0;
7242 _ACEOF
7243 if ac_fn_c_try_compile "$LINENO"; then :
7244 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7245 else
7246 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7249 ac_c_werror_flag=$ac_save_c_werror_flag
7250 CFLAGS="$pgac_save_CFLAGS"
7251 CC="$pgac_save_CC"
7253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7254 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7255 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7256 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7259 if test -n "$NOT_THE_CFLAGS"; then
7260 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7264 # supply -g if --enable-debug
7265 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7266 CFLAGS="$CFLAGS -g"
7269 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7270 CXXFLAGS="$CXXFLAGS -g"
7273 # enable code coverage if --enable-coverage
7274 if test "$enable_coverage" = yes; then
7275 if test "$GCC" = yes; then
7276 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7277 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7278 else
7279 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7283 # enable profiling if --enable-profiling
7284 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7285 if test "$GCC" = yes; then
7287 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7289 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7290 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7291 else
7292 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7296 # We already have this in Makefile.win32, but configure needs it too
7297 if test "$PORTNAME" = "win32"; then
7298 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
7301 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7302 # user-specified flags (if any) at the end. This lets users override
7303 # the automatic additions.
7304 CFLAGS="$CFLAGS $user_CFLAGS"
7305 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7306 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7307 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7312 # The template file must set up CFLAGS_SL; we don't support user override
7315 # Check if the compiler still works with the final flag settings
7316 # (note, we're not checking that for CXX, which is optional)
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7318 $as_echo_n "checking whether the C compiler still works... " >&6; }
7319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7320 /* end confdefs.h. */
7323 main ()
7325 return 0;
7327 return 0;
7329 _ACEOF
7330 if ac_fn_c_try_link "$LINENO"; then :
7331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7332 $as_echo "yes" >&6; }
7333 else
7334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7335 $as_echo "no" >&6; }
7336 as_fn_error $? "cannot proceed" "$LINENO" 5
7338 rm -f core conftest.err conftest.$ac_objext \
7339 conftest$ac_exeext conftest.$ac_ext
7341 # Defend against gcc -ffast-math
7342 if test "$GCC" = yes; then
7343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7344 /* end confdefs.h. */
7347 main ()
7349 #ifdef __FAST_MATH__
7350 choke me
7351 #endif
7353 return 0;
7355 _ACEOF
7356 if ac_fn_c_try_compile "$LINENO"; then :
7358 else
7359 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7364 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7365 # versions of clang do not understand -fexcess-precision=standard, the use of
7366 # x87 floating point operations leads to problems like isinf possibly returning
7367 # false for a value that is infinite when converted from the 80bit register to
7368 # the 8byte memory representation.
7370 # Only perform the test if the compiler doesn't understand
7371 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7372 # automatically.
7373 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7375 /* end confdefs.h. */
7378 main ()
7381 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7382 choke me
7383 #endif
7386 return 0;
7388 _ACEOF
7389 if ac_fn_c_try_compile "$LINENO"; then :
7391 else
7392 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397 ac_ext=c
7398 ac_cpp='$CPP $CPPFLAGS'
7399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7403 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7404 # On Suns, sometimes $CPP names a directory.
7405 if test -n "$CPP" && test -d "$CPP"; then
7406 CPP=
7408 if test -z "$CPP"; then
7409 if ${ac_cv_prog_CPP+:} false; then :
7410 $as_echo_n "(cached) " >&6
7411 else
7412 # Double quotes because CPP needs to be expanded
7413 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7415 ac_preproc_ok=false
7416 for ac_c_preproc_warn_flag in '' yes
7418 # Use a header file that comes with gcc, so configuring glibc
7419 # with a fresh cross-compiler works.
7420 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7421 # <limits.h> exists even on freestanding compilers.
7422 # On the NeXT, cc -E runs the code through the compiler's parser,
7423 # not just through cpp. "Syntax error" is here to catch this case.
7424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7425 /* end confdefs.h. */
7426 #ifdef __STDC__
7427 # include <limits.h>
7428 #else
7429 # include <assert.h>
7430 #endif
7431 Syntax error
7432 _ACEOF
7433 if ac_fn_c_try_cpp "$LINENO"; then :
7435 else
7436 # Broken: fails on valid input.
7437 continue
7439 rm -f conftest.err conftest.i conftest.$ac_ext
7441 # OK, works on sane cases. Now check whether nonexistent headers
7442 # can be detected and how.
7443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7444 /* end confdefs.h. */
7445 #include <ac_nonexistent.h>
7446 _ACEOF
7447 if ac_fn_c_try_cpp "$LINENO"; then :
7448 # Broken: success on invalid input.
7449 continue
7450 else
7451 # Passes both tests.
7452 ac_preproc_ok=:
7453 break
7455 rm -f conftest.err conftest.i conftest.$ac_ext
7457 done
7458 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7459 rm -f conftest.i conftest.err conftest.$ac_ext
7460 if $ac_preproc_ok; then :
7461 break
7464 done
7465 ac_cv_prog_CPP=$CPP
7468 CPP=$ac_cv_prog_CPP
7469 else
7470 ac_cv_prog_CPP=$CPP
7472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7473 $as_echo "$CPP" >&6; }
7474 ac_preproc_ok=false
7475 for ac_c_preproc_warn_flag in '' yes
7477 # Use a header file that comes with gcc, so configuring glibc
7478 # with a fresh cross-compiler works.
7479 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7480 # <limits.h> exists even on freestanding compilers.
7481 # On the NeXT, cc -E runs the code through the compiler's parser,
7482 # not just through cpp. "Syntax error" is here to catch this case.
7483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7484 /* end confdefs.h. */
7485 #ifdef __STDC__
7486 # include <limits.h>
7487 #else
7488 # include <assert.h>
7489 #endif
7490 Syntax error
7491 _ACEOF
7492 if ac_fn_c_try_cpp "$LINENO"; then :
7494 else
7495 # Broken: fails on valid input.
7496 continue
7498 rm -f conftest.err conftest.i conftest.$ac_ext
7500 # OK, works on sane cases. Now check whether nonexistent headers
7501 # can be detected and how.
7502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7503 /* end confdefs.h. */
7504 #include <ac_nonexistent.h>
7505 _ACEOF
7506 if ac_fn_c_try_cpp "$LINENO"; then :
7507 # Broken: success on invalid input.
7508 continue
7509 else
7510 # Passes both tests.
7511 ac_preproc_ok=:
7512 break
7514 rm -f conftest.err conftest.i conftest.$ac_ext
7516 done
7517 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7518 rm -f conftest.i conftest.err conftest.$ac_ext
7519 if $ac_preproc_ok; then :
7521 else
7522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7523 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7524 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7525 See \`config.log' for more details" "$LINENO" 5; }
7528 ac_ext=c
7529 ac_cpp='$CPP $CPPFLAGS'
7530 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7531 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7532 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7538 # Set up TAS assembly code if needed; the template file has now had its
7539 # chance to request this.
7541 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7544 if test "$need_tas" = yes ; then
7545 TAS=tas.o
7546 else
7547 TAS=""
7552 # Set up pkg_config in case we need it below
7561 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7562 if test -n "$ac_tool_prefix"; then
7563 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7564 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7566 $as_echo_n "checking for $ac_word... " >&6; }
7567 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7568 $as_echo_n "(cached) " >&6
7569 else
7570 case $PKG_CONFIG in
7571 [\\/]* | ?:[\\/]*)
7572 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7576 for as_dir in $PATH
7578 IFS=$as_save_IFS
7579 test -z "$as_dir" && as_dir=.
7580 for ac_exec_ext in '' $ac_executable_extensions; do
7581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7582 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7584 break 2
7586 done
7587 done
7588 IFS=$as_save_IFS
7591 esac
7593 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7594 if test -n "$PKG_CONFIG"; then
7595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7596 $as_echo "$PKG_CONFIG" >&6; }
7597 else
7598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7599 $as_echo "no" >&6; }
7604 if test -z "$ac_cv_path_PKG_CONFIG"; then
7605 ac_pt_PKG_CONFIG=$PKG_CONFIG
7606 # Extract the first word of "pkg-config", so it can be a program name with args.
7607 set dummy pkg-config; ac_word=$2
7608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7609 $as_echo_n "checking for $ac_word... " >&6; }
7610 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7611 $as_echo_n "(cached) " >&6
7612 else
7613 case $ac_pt_PKG_CONFIG in
7614 [\\/]* | ?:[\\/]*)
7615 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7619 for as_dir in $PATH
7621 IFS=$as_save_IFS
7622 test -z "$as_dir" && as_dir=.
7623 for ac_exec_ext in '' $ac_executable_extensions; do
7624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7625 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7627 break 2
7629 done
7630 done
7631 IFS=$as_save_IFS
7634 esac
7636 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7637 if test -n "$ac_pt_PKG_CONFIG"; then
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7639 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7640 else
7641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7642 $as_echo "no" >&6; }
7645 if test "x$ac_pt_PKG_CONFIG" = x; then
7646 PKG_CONFIG=""
7647 else
7648 case $cross_compiling:$ac_tool_warned in
7649 yes:)
7650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7651 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7652 ac_tool_warned=yes ;;
7653 esac
7654 PKG_CONFIG=$ac_pt_PKG_CONFIG
7656 else
7657 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7661 if test -n "$PKG_CONFIG"; then
7662 _pkg_min_version=0.9.0
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7664 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7665 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7667 $as_echo "yes" >&6; }
7668 else
7669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7670 $as_echo "no" >&6; }
7671 PKG_CONFIG=""
7676 # Automatic dependency tracking
7680 # Check whether --enable-depend was given.
7681 if test "${enable_depend+set}" = set; then :
7682 enableval=$enable_depend;
7683 case $enableval in
7684 yes)
7685 autodepend=yes
7691 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7693 esac
7695 else
7696 enable_depend=no
7705 # Enable assert checks
7709 # Check whether --enable-cassert was given.
7710 if test "${enable_cassert+set}" = set; then :
7711 enableval=$enable_cassert;
7712 case $enableval in
7713 yes)
7715 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7722 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7724 esac
7726 else
7727 enable_cassert=no
7735 # Include directories
7737 ac_save_IFS=$IFS
7738 IFS="${IFS}${PATH_SEPARATOR}"
7739 # SRCH_INC comes from the template file
7740 for dir in $with_includes $SRCH_INC; do
7741 if test -d "$dir"; then
7742 INCLUDES="$INCLUDES -I$dir"
7743 else
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7745 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7747 done
7748 IFS=$ac_save_IFS
7753 # Library directories
7755 ac_save_IFS=$IFS
7756 IFS="${IFS}${PATH_SEPARATOR}"
7757 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7758 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7759 if test -d "$dir"; then
7760 LIBDIRS="$LIBDIRS -L$dir"
7761 else
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7763 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7765 done
7766 IFS=$ac_save_IFS
7769 # Enable thread-safe client libraries
7771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7772 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7775 # Check whether --enable-thread-safety was given.
7776 if test "${enable_thread_safety+set}" = set; then :
7777 enableval=$enable_thread_safety;
7778 case $enableval in
7779 yes)
7786 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7788 esac
7790 else
7791 enable_thread_safety=yes
7796 if test "$enable_thread_safety" = yes; then
7798 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7802 $as_echo "$enable_thread_safety" >&6; }
7806 # ICU
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7809 $as_echo_n "checking whether to build with ICU support... " >&6; }
7813 # Check whether --with-icu was given.
7814 if test "${with_icu+set}" = set; then :
7815 withval=$with_icu;
7816 case $withval in
7817 yes)
7819 $as_echo "#define USE_ICU 1" >>confdefs.h
7826 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7828 esac
7830 else
7831 with_icu=no
7836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7837 $as_echo "$with_icu" >&6; }
7840 if test "$with_icu" = yes; then
7842 pkg_failed=no
7843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7844 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7846 if test -n "$ICU_CFLAGS"; then
7847 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7848 elif test -n "$PKG_CONFIG"; then
7849 if test -n "$PKG_CONFIG" && \
7850 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7851 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7852 ac_status=$?
7853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7854 test $ac_status = 0; }; then
7855 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7856 test "x$?" != "x0" && pkg_failed=yes
7857 else
7858 pkg_failed=yes
7860 else
7861 pkg_failed=untried
7863 if test -n "$ICU_LIBS"; then
7864 pkg_cv_ICU_LIBS="$ICU_LIBS"
7865 elif test -n "$PKG_CONFIG"; then
7866 if test -n "$PKG_CONFIG" && \
7867 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7868 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7869 ac_status=$?
7870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7871 test $ac_status = 0; }; then
7872 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7873 test "x$?" != "x0" && pkg_failed=yes
7874 else
7875 pkg_failed=yes
7877 else
7878 pkg_failed=untried
7883 if test $pkg_failed = yes; then
7884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7885 $as_echo "no" >&6; }
7887 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7888 _pkg_short_errors_supported=yes
7889 else
7890 _pkg_short_errors_supported=no
7892 if test $_pkg_short_errors_supported = yes; then
7893 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7894 else
7895 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7897 # Put the nasty error message in config.log where it belongs
7898 echo "$ICU_PKG_ERRORS" >&5
7900 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7902 $ICU_PKG_ERRORS
7904 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7905 installed software in a non-standard prefix.
7907 Alternatively, you may set the environment variables ICU_CFLAGS
7908 and ICU_LIBS to avoid the need to call pkg-config.
7909 See the pkg-config man page for more details." "$LINENO" 5
7910 elif test $pkg_failed = untried; then
7911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7912 $as_echo "no" >&6; }
7913 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7914 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7915 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7916 is in your PATH or set the PKG_CONFIG environment variable to the full
7917 path to pkg-config.
7919 Alternatively, you may set the environment variables ICU_CFLAGS
7920 and ICU_LIBS to avoid the need to call pkg-config.
7921 See the pkg-config man page for more details.
7923 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7924 See \`config.log' for more details" "$LINENO" 5; }
7925 else
7926 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7927 ICU_LIBS=$pkg_cv_ICU_LIBS
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7929 $as_echo "yes" >&6; }
7935 # Optionally build Tcl modules (PL/Tcl)
7937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7938 $as_echo_n "checking whether to build with Tcl... " >&6; }
7942 # Check whether --with-tcl was given.
7943 if test "${with_tcl+set}" = set; then :
7944 withval=$with_tcl;
7945 case $withval in
7946 yes)
7953 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7955 esac
7957 else
7958 with_tcl=no
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7964 $as_echo "$with_tcl" >&6; }
7967 # We see if the path to the Tcl/Tk configuration scripts is specified.
7968 # This will override the use of tclsh to find the paths to search.
7973 # Check whether --with-tclconfig was given.
7974 if test "${with_tclconfig+set}" = set; then :
7975 withval=$with_tclconfig;
7976 case $withval in
7977 yes)
7978 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7981 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7986 esac
7993 # Optionally build Perl modules (PL/Perl)
7995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7996 $as_echo_n "checking whether to build Perl modules... " >&6; }
8000 # Check whether --with-perl was given.
8001 if test "${with_perl+set}" = set; then :
8002 withval=$with_perl;
8003 case $withval in
8004 yes)
8011 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8013 esac
8015 else
8016 with_perl=no
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8022 $as_echo "$with_perl" >&6; }
8026 # Optionally build Python modules (PL/Python)
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8029 $as_echo_n "checking whether to build Python modules... " >&6; }
8033 # Check whether --with-python was given.
8034 if test "${with_python+set}" = set; then :
8035 withval=$with_python;
8036 case $withval in
8037 yes)
8044 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8046 esac
8048 else
8049 with_python=no
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8055 $as_echo "$with_python" >&6; }
8059 # GSSAPI
8061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8062 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8066 # Check whether --with-gssapi was given.
8067 if test "${with_gssapi+set}" = set; then :
8068 withval=$with_gssapi;
8069 case $withval in
8070 yes)
8073 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8075 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8082 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8084 esac
8086 else
8087 with_gssapi=no
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8093 $as_echo "$with_gssapi" >&6; }
8101 # Kerberos configuration parameters
8106 # Check whether --with-krb-srvnam was given.
8107 if test "${with_krb_srvnam+set}" = set; then :
8108 withval=$with_krb_srvnam;
8109 case $withval in
8110 yes)
8111 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8114 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8119 esac
8121 else
8122 with_krb_srvnam="postgres"
8128 cat >>confdefs.h <<_ACEOF
8129 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8130 _ACEOF
8135 # PAM
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8138 $as_echo_n "checking whether to build with PAM support... " >&6; }
8142 # Check whether --with-pam was given.
8143 if test "${with_pam+set}" = set; then :
8144 withval=$with_pam;
8145 case $withval in
8146 yes)
8148 $as_echo "#define USE_PAM 1" >>confdefs.h
8155 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8157 esac
8159 else
8160 with_pam=no
8165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8166 $as_echo "$with_pam" >&6; }
8170 # BSD AUTH
8172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8173 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8177 # Check whether --with-bsd-auth was given.
8178 if test "${with_bsd_auth+set}" = set; then :
8179 withval=$with_bsd_auth;
8180 case $withval in
8181 yes)
8183 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8190 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8192 esac
8194 else
8195 with_bsd_auth=no
8200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8201 $as_echo "$with_bsd_auth" >&6; }
8205 # LDAP
8207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8208 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8212 # Check whether --with-ldap was given.
8213 if test "${with_ldap+set}" = set; then :
8214 withval=$with_ldap;
8215 case $withval in
8216 yes)
8218 $as_echo "#define USE_LDAP 1" >>confdefs.h
8225 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8227 esac
8229 else
8230 with_ldap=no
8235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8236 $as_echo "$with_ldap" >&6; }
8241 # Bonjour
8243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8244 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8248 # Check whether --with-bonjour was given.
8249 if test "${with_bonjour+set}" = set; then :
8250 withval=$with_bonjour;
8251 case $withval in
8252 yes)
8254 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8261 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8263 esac
8265 else
8266 with_bonjour=no
8271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8272 $as_echo "$with_bonjour" >&6; }
8276 # OpenSSL
8278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
8279 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
8283 # Check whether --with-openssl was given.
8284 if test "${with_openssl+set}" = set; then :
8285 withval=$with_openssl;
8286 case $withval in
8287 yes)
8289 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
8296 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
8298 esac
8300 else
8301 with_openssl=no
8306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
8307 $as_echo "$with_openssl" >&6; }
8311 # SELinux
8313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8314 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8318 # Check whether --with-selinux was given.
8319 if test "${with_selinux+set}" = set; then :
8320 withval=$with_selinux;
8321 case $withval in
8322 yes)
8329 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8331 esac
8333 else
8334 with_selinux=no
8340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8341 $as_echo "$with_selinux" >&6; }
8344 # Systemd
8346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8347 $as_echo_n "checking whether to build with systemd support... " >&6; }
8351 # Check whether --with-systemd was given.
8352 if test "${with_systemd+set}" = set; then :
8353 withval=$with_systemd;
8354 case $withval in
8355 yes)
8357 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8364 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8366 esac
8368 else
8369 with_systemd=no
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8376 $as_echo "$with_systemd" >&6; }
8379 # Readline
8384 # Check whether --with-readline was given.
8385 if test "${with_readline+set}" = set; then :
8386 withval=$with_readline;
8387 case $withval in
8388 yes)
8395 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8397 esac
8399 else
8400 with_readline=yes
8405 # readline on MinGW has problems with backslashes in psql and other bugs.
8406 # This is particularly a problem with non-US code pages.
8407 # Therefore disable its use until we understand the cause. 2004-07-20
8408 if test "$PORTNAME" = "win32"; then
8409 if test "$with_readline" = yes; then
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8411 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8412 with_readline=no
8418 # Prefer libedit
8423 # Check whether --with-libedit-preferred was given.
8424 if test "${with_libedit_preferred+set}" = set; then :
8425 withval=$with_libedit_preferred;
8426 case $withval in
8427 yes)
8434 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8436 esac
8438 else
8439 with_libedit_preferred=no
8447 # UUID library
8449 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8450 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8451 # UUID library. More than one of these might be present on a given platform,
8452 # so we make the user say which one she wants.
8457 # Check whether --with-uuid was given.
8458 if test "${with_uuid+set}" = set; then :
8459 withval=$with_uuid;
8460 case $withval in
8461 yes)
8462 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8465 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8470 esac
8475 if test x"$with_uuid" = x"" ; then
8476 with_uuid=no
8481 # Check whether --with-ossp-uuid was given.
8482 if test "${with_ossp_uuid+set}" = set; then :
8483 withval=$with_ossp_uuid;
8484 case $withval in
8485 yes)
8492 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8494 esac
8496 else
8497 with_ossp_uuid=no
8502 if test "$with_ossp_uuid" = yes ; then
8503 with_uuid=ossp
8506 if test "$with_uuid" = bsd ; then
8508 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8510 UUID_EXTRA_OBJS="md5.o sha1.o"
8511 elif test "$with_uuid" = e2fs ; then
8513 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8515 UUID_EXTRA_OBJS="md5.o sha1.o"
8516 elif test "$with_uuid" = ossp ; then
8518 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8520 UUID_EXTRA_OBJS=""
8521 elif test "$with_uuid" = no ; then
8522 UUID_EXTRA_OBJS=""
8523 else
8524 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8531 # XML
8533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8534 $as_echo_n "checking whether to build with XML support... " >&6; }
8538 # Check whether --with-libxml was given.
8539 if test "${with_libxml+set}" = set; then :
8540 withval=$with_libxml;
8541 case $withval in
8542 yes)
8544 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8551 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8553 esac
8555 else
8556 with_libxml=no
8561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8562 $as_echo "$with_libxml" >&6; }
8565 if test "$with_libxml" = yes ; then
8566 # Check pkg-config, then xml2-config. But for backwards compatibility,
8567 # setting XML2_CONFIG overrides pkg-config.
8568 have_libxml2_pkg_config=no
8569 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8571 pkg_failed=no
8572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8573 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8575 if test -n "$XML2_CFLAGS"; then
8576 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8577 elif test -n "$PKG_CONFIG"; then
8578 if test -n "$PKG_CONFIG" && \
8579 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8580 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8581 ac_status=$?
8582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8583 test $ac_status = 0; }; then
8584 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8585 test "x$?" != "x0" && pkg_failed=yes
8586 else
8587 pkg_failed=yes
8589 else
8590 pkg_failed=untried
8592 if test -n "$XML2_LIBS"; then
8593 pkg_cv_XML2_LIBS="$XML2_LIBS"
8594 elif test -n "$PKG_CONFIG"; then
8595 if test -n "$PKG_CONFIG" && \
8596 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8597 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8598 ac_status=$?
8599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8600 test $ac_status = 0; }; then
8601 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8602 test "x$?" != "x0" && pkg_failed=yes
8603 else
8604 pkg_failed=yes
8606 else
8607 pkg_failed=untried
8612 if test $pkg_failed = yes; then
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8614 $as_echo "no" >&6; }
8616 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8617 _pkg_short_errors_supported=yes
8618 else
8619 _pkg_short_errors_supported=no
8621 if test $_pkg_short_errors_supported = yes; then
8622 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8623 else
8624 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8626 # Put the nasty error message in config.log where it belongs
8627 echo "$XML2_PKG_ERRORS" >&5
8629 # do nothing
8630 elif test $pkg_failed = untried; then
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8632 $as_echo "no" >&6; }
8633 # do nothing
8634 else
8635 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8636 XML2_LIBS=$pkg_cv_XML2_LIBS
8637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8638 $as_echo "yes" >&6; }
8639 have_libxml2_pkg_config=yes
8642 if test "$have_libxml2_pkg_config" = no ; then
8643 if test -z "$XML2_CONFIG"; then
8644 for ac_prog in xml2-config
8646 # Extract the first word of "$ac_prog", so it can be a program name with args.
8647 set dummy $ac_prog; ac_word=$2
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8649 $as_echo_n "checking for $ac_word... " >&6; }
8650 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8651 $as_echo_n "(cached) " >&6
8652 else
8653 case $XML2_CONFIG in
8654 [\\/]* | ?:[\\/]*)
8655 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8659 for as_dir in $PATH
8661 IFS=$as_save_IFS
8662 test -z "$as_dir" && as_dir=.
8663 for ac_exec_ext in '' $ac_executable_extensions; do
8664 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8665 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8667 break 2
8669 done
8670 done
8671 IFS=$as_save_IFS
8674 esac
8676 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8677 if test -n "$XML2_CONFIG"; then
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8679 $as_echo "$XML2_CONFIG" >&6; }
8680 else
8681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8682 $as_echo "no" >&6; }
8686 test -n "$XML2_CONFIG" && break
8687 done
8689 else
8690 # Report the value of XML2_CONFIG in configure's output in all cases.
8691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8692 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8694 $as_echo "$XML2_CONFIG" >&6; }
8697 if test -n "$XML2_CONFIG"; then
8698 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8699 XML2_LIBS=`$XML2_CONFIG --libs`
8702 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8703 for pgac_option in $XML2_CFLAGS; do
8704 case $pgac_option in
8705 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8706 esac
8707 done
8708 for pgac_option in $XML2_LIBS; do
8709 case $pgac_option in
8710 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8711 esac
8712 done
8717 # XSLT
8722 # Check whether --with-libxslt was given.
8723 if test "${with_libxslt+set}" = set; then :
8724 withval=$with_libxslt;
8725 case $withval in
8726 yes)
8728 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8735 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8737 esac
8739 else
8740 with_libxslt=no
8750 # tzdata
8755 # Check whether --with-system-tzdata was given.
8756 if test "${with_system_tzdata+set}" = set; then :
8757 withval=$with_system_tzdata;
8758 case $withval in
8759 yes)
8760 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8763 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8768 esac
8776 # Zlib
8781 # Check whether --with-zlib was given.
8782 if test "${with_zlib+set}" = set; then :
8783 withval=$with_zlib;
8784 case $withval in
8785 yes)
8792 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8794 esac
8796 else
8797 with_zlib=yes
8805 # Elf
8808 # Assume system is ELF if it predefines __ELF__ as 1,
8809 # otherwise believe host_os based default.
8810 case $host_os in
8811 freebsd1*|freebsd2*) elf=no;;
8812 freebsd3*|freebsd4*) elf=yes;;
8813 esac
8816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8817 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8818 if ${ac_cv_path_GREP+:} false; then :
8819 $as_echo_n "(cached) " >&6
8820 else
8821 if test -z "$GREP"; then
8822 ac_path_GREP_found=false
8823 # Loop through the user's path and test for each of PROGNAME-LIST
8824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8825 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8827 IFS=$as_save_IFS
8828 test -z "$as_dir" && as_dir=.
8829 for ac_prog in grep ggrep; do
8830 for ac_exec_ext in '' $ac_executable_extensions; do
8831 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8832 as_fn_executable_p "$ac_path_GREP" || continue
8833 # Check for GNU ac_path_GREP and select it if it is found.
8834 # Check for GNU $ac_path_GREP
8835 case `"$ac_path_GREP" --version 2>&1` in
8836 *GNU*)
8837 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8839 ac_count=0
8840 $as_echo_n 0123456789 >"conftest.in"
8841 while :
8843 cat "conftest.in" "conftest.in" >"conftest.tmp"
8844 mv "conftest.tmp" "conftest.in"
8845 cp "conftest.in" "conftest.nl"
8846 $as_echo 'GREP' >> "conftest.nl"
8847 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8848 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8849 as_fn_arith $ac_count + 1 && ac_count=$as_val
8850 if test $ac_count -gt ${ac_path_GREP_max-0}; then
8851 # Best one so far, save it but keep looking for a better one
8852 ac_cv_path_GREP="$ac_path_GREP"
8853 ac_path_GREP_max=$ac_count
8855 # 10*(2^10) chars as input seems more than enough
8856 test $ac_count -gt 10 && break
8857 done
8858 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8859 esac
8861 $ac_path_GREP_found && break 3
8862 done
8863 done
8864 done
8865 IFS=$as_save_IFS
8866 if test -z "$ac_cv_path_GREP"; then
8867 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8869 else
8870 ac_cv_path_GREP=$GREP
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8875 $as_echo "$ac_cv_path_GREP" >&6; }
8876 GREP="$ac_cv_path_GREP"
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8880 $as_echo_n "checking for egrep... " >&6; }
8881 if ${ac_cv_path_EGREP+:} false; then :
8882 $as_echo_n "(cached) " >&6
8883 else
8884 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8885 then ac_cv_path_EGREP="$GREP -E"
8886 else
8887 if test -z "$EGREP"; then
8888 ac_path_EGREP_found=false
8889 # Loop through the user's path and test for each of PROGNAME-LIST
8890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8891 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8893 IFS=$as_save_IFS
8894 test -z "$as_dir" && as_dir=.
8895 for ac_prog in egrep; do
8896 for ac_exec_ext in '' $ac_executable_extensions; do
8897 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8898 as_fn_executable_p "$ac_path_EGREP" || continue
8899 # Check for GNU ac_path_EGREP and select it if it is found.
8900 # Check for GNU $ac_path_EGREP
8901 case `"$ac_path_EGREP" --version 2>&1` in
8902 *GNU*)
8903 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8905 ac_count=0
8906 $as_echo_n 0123456789 >"conftest.in"
8907 while :
8909 cat "conftest.in" "conftest.in" >"conftest.tmp"
8910 mv "conftest.tmp" "conftest.in"
8911 cp "conftest.in" "conftest.nl"
8912 $as_echo 'EGREP' >> "conftest.nl"
8913 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8914 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8915 as_fn_arith $ac_count + 1 && ac_count=$as_val
8916 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8917 # Best one so far, save it but keep looking for a better one
8918 ac_cv_path_EGREP="$ac_path_EGREP"
8919 ac_path_EGREP_max=$ac_count
8921 # 10*(2^10) chars as input seems more than enough
8922 test $ac_count -gt 10 && break
8923 done
8924 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8925 esac
8927 $ac_path_EGREP_found && break 3
8928 done
8929 done
8930 done
8931 IFS=$as_save_IFS
8932 if test -z "$ac_cv_path_EGREP"; then
8933 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8935 else
8936 ac_cv_path_EGREP=$EGREP
8941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8942 $as_echo "$ac_cv_path_EGREP" >&6; }
8943 EGREP="$ac_cv_path_EGREP"
8946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8947 /* end confdefs.h. */
8948 #if __ELF__
8950 #endif
8952 _ACEOF
8953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8954 $EGREP "yes" >/dev/null 2>&1; then :
8955 ELF_SYS=true
8956 else
8957 if test "X$elf" = "Xyes" ; then
8958 ELF_SYS=true
8959 else
8960 ELF_SYS=
8963 rm -f conftest*
8968 # Assignments
8971 CPPFLAGS="$CPPFLAGS $INCLUDES"
8972 LDFLAGS="$LDFLAGS $LIBDIRS"
8978 # Check whether --with-gnu-ld was given.
8979 if test "${with_gnu_ld+set}" = set; then :
8980 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8981 else
8982 with_gnu_ld=no
8985 ac_prog=ld
8986 if test "$GCC" = yes; then
8987 # Check if gcc -print-prog-name=ld gives a path.
8988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8989 $as_echo_n "checking for ld used by GCC... " >&6; }
8990 case $host in
8991 *-*-mingw*)
8992 # gcc leaves a trailing carriage return which upsets mingw
8993 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8995 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8996 esac
8997 case "$ac_prog" in
8998 # Accept absolute paths.
8999 [\\/]* | [A-Za-z]:[\\/]*)
9000 re_direlt='/[^/][^/]*/\.\./'
9001 # Canonicalize the path of ld
9002 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9003 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9004 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9005 done
9006 test -z "$LD" && LD="$ac_prog"
9009 # If it fails, then pretend we aren't using GCC.
9010 ac_prog=ld
9013 # If it is relative, then search for the first ld in PATH.
9014 with_gnu_ld=unknown
9016 esac
9017 elif test "$with_gnu_ld" = yes; then
9018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9019 $as_echo_n "checking for GNU ld... " >&6; }
9020 else
9021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9022 $as_echo_n "checking for non-GNU ld... " >&6; }
9024 if ${ac_cv_path_LD+:} false; then :
9025 $as_echo_n "(cached) " >&6
9026 else
9027 if test -z "$LD"; then
9028 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9029 for ac_dir in $PATH; do
9030 test -z "$ac_dir" && ac_dir=.
9031 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9032 ac_cv_path_LD="$ac_dir/$ac_prog"
9033 # Check to see if the program is GNU ld. I'd rather use --version,
9034 # but apparently some GNU ld's only accept -v.
9035 # Break only if it was the GNU/non-GNU ld that we prefer.
9036 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9037 test "$with_gnu_ld" != no && break
9038 else
9039 test "$with_gnu_ld" != yes && break
9042 done
9043 IFS="$ac_save_ifs"
9044 else
9045 ac_cv_path_LD="$LD" # Let the user override the test with a path.
9049 LD="$ac_cv_path_LD"
9050 if test -n "$LD"; then
9051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9052 $as_echo "$LD" >&6; }
9053 else
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9055 $as_echo "no" >&6; }
9057 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9059 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9060 if ${ac_cv_prog_gnu_ld+:} false; then :
9061 $as_echo_n "(cached) " >&6
9062 else
9063 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9064 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9065 ac_cv_prog_gnu_ld=yes
9066 else
9067 ac_cv_prog_gnu_ld=no
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
9071 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
9072 with_gnu_ld=$ac_cv_prog_gnu_ld
9077 if test -n "$ac_tool_prefix"; then
9078 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9079 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9081 $as_echo_n "checking for $ac_word... " >&6; }
9082 if ${ac_cv_prog_RANLIB+:} false; then :
9083 $as_echo_n "(cached) " >&6
9084 else
9085 if test -n "$RANLIB"; then
9086 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9087 else
9088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9089 for as_dir in $PATH
9091 IFS=$as_save_IFS
9092 test -z "$as_dir" && as_dir=.
9093 for ac_exec_ext in '' $ac_executable_extensions; do
9094 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9095 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9097 break 2
9099 done
9100 done
9101 IFS=$as_save_IFS
9105 RANLIB=$ac_cv_prog_RANLIB
9106 if test -n "$RANLIB"; then
9107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9108 $as_echo "$RANLIB" >&6; }
9109 else
9110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9111 $as_echo "no" >&6; }
9116 if test -z "$ac_cv_prog_RANLIB"; then
9117 ac_ct_RANLIB=$RANLIB
9118 # Extract the first word of "ranlib", so it can be a program name with args.
9119 set dummy ranlib; ac_word=$2
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9121 $as_echo_n "checking for $ac_word... " >&6; }
9122 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
9123 $as_echo_n "(cached) " >&6
9124 else
9125 if test -n "$ac_ct_RANLIB"; then
9126 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9127 else
9128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9129 for as_dir in $PATH
9131 IFS=$as_save_IFS
9132 test -z "$as_dir" && as_dir=.
9133 for ac_exec_ext in '' $ac_executable_extensions; do
9134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9135 ac_cv_prog_ac_ct_RANLIB="ranlib"
9136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9137 break 2
9139 done
9140 done
9141 IFS=$as_save_IFS
9145 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9146 if test -n "$ac_ct_RANLIB"; then
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9148 $as_echo "$ac_ct_RANLIB" >&6; }
9149 else
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9151 $as_echo "no" >&6; }
9154 if test "x$ac_ct_RANLIB" = x; then
9155 RANLIB=":"
9156 else
9157 case $cross_compiling:$ac_tool_warned in
9158 yes:)
9159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9160 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9161 ac_tool_warned=yes ;;
9162 esac
9163 RANLIB=$ac_ct_RANLIB
9165 else
9166 RANLIB="$ac_cv_prog_RANLIB"
9170 if test -n "$ac_tool_prefix"; then
9171 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9172 set dummy ${ac_tool_prefix}strip; ac_word=$2
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9174 $as_echo_n "checking for $ac_word... " >&6; }
9175 if ${ac_cv_prog_STRIP+:} false; then :
9176 $as_echo_n "(cached) " >&6
9177 else
9178 if test -n "$STRIP"; then
9179 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9180 else
9181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9182 for as_dir in $PATH
9184 IFS=$as_save_IFS
9185 test -z "$as_dir" && as_dir=.
9186 for ac_exec_ext in '' $ac_executable_extensions; do
9187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9188 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9190 break 2
9192 done
9193 done
9194 IFS=$as_save_IFS
9198 STRIP=$ac_cv_prog_STRIP
9199 if test -n "$STRIP"; then
9200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9201 $as_echo "$STRIP" >&6; }
9202 else
9203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9204 $as_echo "no" >&6; }
9209 if test -z "$ac_cv_prog_STRIP"; then
9210 ac_ct_STRIP=$STRIP
9211 # Extract the first word of "strip", so it can be a program name with args.
9212 set dummy strip; ac_word=$2
9213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9214 $as_echo_n "checking for $ac_word... " >&6; }
9215 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9216 $as_echo_n "(cached) " >&6
9217 else
9218 if test -n "$ac_ct_STRIP"; then
9219 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9220 else
9221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9222 for as_dir in $PATH
9224 IFS=$as_save_IFS
9225 test -z "$as_dir" && as_dir=.
9226 for ac_exec_ext in '' $ac_executable_extensions; do
9227 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9228 ac_cv_prog_ac_ct_STRIP="strip"
9229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9230 break 2
9232 done
9233 done
9234 IFS=$as_save_IFS
9238 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9239 if test -n "$ac_ct_STRIP"; then
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9241 $as_echo "$ac_ct_STRIP" >&6; }
9242 else
9243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9244 $as_echo "no" >&6; }
9247 if test "x$ac_ct_STRIP" = x; then
9248 STRIP=":"
9249 else
9250 case $cross_compiling:$ac_tool_warned in
9251 yes:)
9252 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9253 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9254 ac_tool_warned=yes ;;
9255 esac
9256 STRIP=$ac_ct_STRIP
9258 else
9259 STRIP="$ac_cv_prog_STRIP"
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9264 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9265 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9266 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9267 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9269 $as_echo "yes" >&6; }
9270 else
9271 case $host_os in
9272 darwin*)
9273 STRIP="$STRIP -x"
9274 STRIP_STATIC_LIB=$STRIP
9275 STRIP_SHARED_LIB=$STRIP
9276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9277 $as_echo "yes" >&6; }
9280 STRIP_STATIC_LIB=:
9281 STRIP_SHARED_LIB=:
9282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9283 $as_echo "no" >&6; }
9285 esac
9290 if test -n "$ac_tool_prefix"; then
9291 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9292 set dummy ${ac_tool_prefix}ar; ac_word=$2
9293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9294 $as_echo_n "checking for $ac_word... " >&6; }
9295 if ${ac_cv_prog_AR+:} false; then :
9296 $as_echo_n "(cached) " >&6
9297 else
9298 if test -n "$AR"; then
9299 ac_cv_prog_AR="$AR" # Let the user override the test.
9300 else
9301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9302 for as_dir in $PATH
9304 IFS=$as_save_IFS
9305 test -z "$as_dir" && as_dir=.
9306 for ac_exec_ext in '' $ac_executable_extensions; do
9307 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9308 ac_cv_prog_AR="${ac_tool_prefix}ar"
9309 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9310 break 2
9312 done
9313 done
9314 IFS=$as_save_IFS
9318 AR=$ac_cv_prog_AR
9319 if test -n "$AR"; then
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9321 $as_echo "$AR" >&6; }
9322 else
9323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9324 $as_echo "no" >&6; }
9329 if test -z "$ac_cv_prog_AR"; then
9330 ac_ct_AR=$AR
9331 # Extract the first word of "ar", so it can be a program name with args.
9332 set dummy ar; ac_word=$2
9333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9334 $as_echo_n "checking for $ac_word... " >&6; }
9335 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9336 $as_echo_n "(cached) " >&6
9337 else
9338 if test -n "$ac_ct_AR"; then
9339 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9340 else
9341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9342 for as_dir in $PATH
9344 IFS=$as_save_IFS
9345 test -z "$as_dir" && as_dir=.
9346 for ac_exec_ext in '' $ac_executable_extensions; do
9347 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9348 ac_cv_prog_ac_ct_AR="ar"
9349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9350 break 2
9352 done
9353 done
9354 IFS=$as_save_IFS
9358 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9359 if test -n "$ac_ct_AR"; then
9360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9361 $as_echo "$ac_ct_AR" >&6; }
9362 else
9363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9364 $as_echo "no" >&6; }
9367 if test "x$ac_ct_AR" = x; then
9368 AR="ar"
9369 else
9370 case $cross_compiling:$ac_tool_warned in
9371 yes:)
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9373 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9374 ac_tool_warned=yes ;;
9375 esac
9376 AR=$ac_ct_AR
9378 else
9379 AR="$ac_cv_prog_AR"
9382 if test "$PORTNAME" = "win32"; then
9383 if test -n "$ac_tool_prefix"; then
9384 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9385 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9387 $as_echo_n "checking for $ac_word... " >&6; }
9388 if ${ac_cv_prog_DLLTOOL+:} false; then :
9389 $as_echo_n "(cached) " >&6
9390 else
9391 if test -n "$DLLTOOL"; then
9392 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9393 else
9394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9395 for as_dir in $PATH
9397 IFS=$as_save_IFS
9398 test -z "$as_dir" && as_dir=.
9399 for ac_exec_ext in '' $ac_executable_extensions; do
9400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9401 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9403 break 2
9405 done
9406 done
9407 IFS=$as_save_IFS
9411 DLLTOOL=$ac_cv_prog_DLLTOOL
9412 if test -n "$DLLTOOL"; then
9413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9414 $as_echo "$DLLTOOL" >&6; }
9415 else
9416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9417 $as_echo "no" >&6; }
9422 if test -z "$ac_cv_prog_DLLTOOL"; then
9423 ac_ct_DLLTOOL=$DLLTOOL
9424 # Extract the first word of "dlltool", so it can be a program name with args.
9425 set dummy dlltool; ac_word=$2
9426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9427 $as_echo_n "checking for $ac_word... " >&6; }
9428 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9429 $as_echo_n "(cached) " >&6
9430 else
9431 if test -n "$ac_ct_DLLTOOL"; then
9432 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9433 else
9434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9435 for as_dir in $PATH
9437 IFS=$as_save_IFS
9438 test -z "$as_dir" && as_dir=.
9439 for ac_exec_ext in '' $ac_executable_extensions; do
9440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9441 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9443 break 2
9445 done
9446 done
9447 IFS=$as_save_IFS
9451 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9452 if test -n "$ac_ct_DLLTOOL"; then
9453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9454 $as_echo "$ac_ct_DLLTOOL" >&6; }
9455 else
9456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9457 $as_echo "no" >&6; }
9460 if test "x$ac_ct_DLLTOOL" = x; then
9461 DLLTOOL="dlltool"
9462 else
9463 case $cross_compiling:$ac_tool_warned in
9464 yes:)
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9466 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9467 ac_tool_warned=yes ;;
9468 esac
9469 DLLTOOL=$ac_ct_DLLTOOL
9471 else
9472 DLLTOOL="$ac_cv_prog_DLLTOOL"
9475 if test -n "$ac_tool_prefix"; then
9476 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9477 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9479 $as_echo_n "checking for $ac_word... " >&6; }
9480 if ${ac_cv_prog_DLLWRAP+:} false; then :
9481 $as_echo_n "(cached) " >&6
9482 else
9483 if test -n "$DLLWRAP"; then
9484 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9485 else
9486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9487 for as_dir in $PATH
9489 IFS=$as_save_IFS
9490 test -z "$as_dir" && as_dir=.
9491 for ac_exec_ext in '' $ac_executable_extensions; do
9492 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9493 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9495 break 2
9497 done
9498 done
9499 IFS=$as_save_IFS
9503 DLLWRAP=$ac_cv_prog_DLLWRAP
9504 if test -n "$DLLWRAP"; then
9505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9506 $as_echo "$DLLWRAP" >&6; }
9507 else
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9509 $as_echo "no" >&6; }
9514 if test -z "$ac_cv_prog_DLLWRAP"; then
9515 ac_ct_DLLWRAP=$DLLWRAP
9516 # Extract the first word of "dllwrap", so it can be a program name with args.
9517 set dummy dllwrap; ac_word=$2
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9519 $as_echo_n "checking for $ac_word... " >&6; }
9520 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9521 $as_echo_n "(cached) " >&6
9522 else
9523 if test -n "$ac_ct_DLLWRAP"; then
9524 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9525 else
9526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9527 for as_dir in $PATH
9529 IFS=$as_save_IFS
9530 test -z "$as_dir" && as_dir=.
9531 for ac_exec_ext in '' $ac_executable_extensions; do
9532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9533 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9535 break 2
9537 done
9538 done
9539 IFS=$as_save_IFS
9543 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9544 if test -n "$ac_ct_DLLWRAP"; then
9545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9546 $as_echo "$ac_ct_DLLWRAP" >&6; }
9547 else
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9549 $as_echo "no" >&6; }
9552 if test "x$ac_ct_DLLWRAP" = x; then
9553 DLLWRAP="dllwrap"
9554 else
9555 case $cross_compiling:$ac_tool_warned in
9556 yes:)
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9558 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9559 ac_tool_warned=yes ;;
9560 esac
9561 DLLWRAP=$ac_ct_DLLWRAP
9563 else
9564 DLLWRAP="$ac_cv_prog_DLLWRAP"
9567 if test -n "$ac_tool_prefix"; then
9568 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9569 set dummy ${ac_tool_prefix}windres; ac_word=$2
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9571 $as_echo_n "checking for $ac_word... " >&6; }
9572 if ${ac_cv_prog_WINDRES+:} false; then :
9573 $as_echo_n "(cached) " >&6
9574 else
9575 if test -n "$WINDRES"; then
9576 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9577 else
9578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9579 for as_dir in $PATH
9581 IFS=$as_save_IFS
9582 test -z "$as_dir" && as_dir=.
9583 for ac_exec_ext in '' $ac_executable_extensions; do
9584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9585 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9587 break 2
9589 done
9590 done
9591 IFS=$as_save_IFS
9595 WINDRES=$ac_cv_prog_WINDRES
9596 if test -n "$WINDRES"; then
9597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9598 $as_echo "$WINDRES" >&6; }
9599 else
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9601 $as_echo "no" >&6; }
9606 if test -z "$ac_cv_prog_WINDRES"; then
9607 ac_ct_WINDRES=$WINDRES
9608 # Extract the first word of "windres", so it can be a program name with args.
9609 set dummy windres; ac_word=$2
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9611 $as_echo_n "checking for $ac_word... " >&6; }
9612 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9613 $as_echo_n "(cached) " >&6
9614 else
9615 if test -n "$ac_ct_WINDRES"; then
9616 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9617 else
9618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9619 for as_dir in $PATH
9621 IFS=$as_save_IFS
9622 test -z "$as_dir" && as_dir=.
9623 for ac_exec_ext in '' $ac_executable_extensions; do
9624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9625 ac_cv_prog_ac_ct_WINDRES="windres"
9626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9627 break 2
9629 done
9630 done
9631 IFS=$as_save_IFS
9635 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9636 if test -n "$ac_ct_WINDRES"; then
9637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9638 $as_echo "$ac_ct_WINDRES" >&6; }
9639 else
9640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9641 $as_echo "no" >&6; }
9644 if test "x$ac_ct_WINDRES" = x; then
9645 WINDRES="windres"
9646 else
9647 case $cross_compiling:$ac_tool_warned in
9648 yes:)
9649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9650 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9651 ac_tool_warned=yes ;;
9652 esac
9653 WINDRES=$ac_ct_WINDRES
9655 else
9656 WINDRES="$ac_cv_prog_WINDRES"
9661 # Find a good install program. We prefer a C program (faster),
9662 # so one script is as good as another. But avoid the broken or
9663 # incompatible versions:
9664 # SysV /etc/install, /usr/sbin/install
9665 # SunOS /usr/etc/install
9666 # IRIX /sbin/install
9667 # AIX /bin/install
9668 # AmigaOS /C/install, which installs bootblocks on floppy discs
9669 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9670 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9671 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9672 # OS/2's system install, which has a completely different semantic
9673 # ./install, which can be erroneously created by make from ./install.sh.
9674 # Reject install programs that cannot install multiple files.
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9676 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9677 if test -z "$INSTALL"; then
9678 if ${ac_cv_path_install+:} false; then :
9679 $as_echo_n "(cached) " >&6
9680 else
9681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9682 for as_dir in $PATH
9684 IFS=$as_save_IFS
9685 test -z "$as_dir" && as_dir=.
9686 # Account for people who put trailing slashes in PATH elements.
9687 case $as_dir/ in #((
9688 ./ | .// | /[cC]/* | \
9689 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9690 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9691 /usr/ucb/* ) ;;
9693 # OSF1 and SCO ODT 3.0 have their own names for install.
9694 # Don't use installbsd from OSF since it installs stuff as root
9695 # by default.
9696 for ac_prog in ginstall scoinst install; do
9697 for ac_exec_ext in '' $ac_executable_extensions; do
9698 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9699 if test $ac_prog = install &&
9700 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9701 # AIX install. It has an incompatible calling convention.
9703 elif test $ac_prog = install &&
9704 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9705 # program-specific install script used by HP pwplus--don't use.
9707 else
9708 rm -rf conftest.one conftest.two conftest.dir
9709 echo one > conftest.one
9710 echo two > conftest.two
9711 mkdir conftest.dir
9712 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9713 test -s conftest.one && test -s conftest.two &&
9714 test -s conftest.dir/conftest.one &&
9715 test -s conftest.dir/conftest.two
9716 then
9717 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9718 break 3
9722 done
9723 done
9725 esac
9727 done
9728 IFS=$as_save_IFS
9730 rm -rf conftest.one conftest.two conftest.dir
9733 if test "${ac_cv_path_install+set}" = set; then
9734 INSTALL=$ac_cv_path_install
9735 else
9736 # As a last resort, use the slow shell script. Don't cache a
9737 # value for INSTALL within a source directory, because that will
9738 # break other packages using the cache if that directory is
9739 # removed, or if the value is a relative name.
9740 INSTALL=$ac_install_sh
9743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9744 $as_echo "$INSTALL" >&6; }
9746 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9747 # It thinks the first close brace ends the variable substitution.
9748 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9750 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9752 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9754 # When Autoconf chooses install-sh as install program it tries to generate
9755 # a relative path to it in each makefile where it substitutes it. This clashes
9756 # with our Makefile.global concept. This workaround helps.
9757 case $INSTALL in
9758 *install-sh*) install_bin='';;
9759 *) install_bin=$INSTALL;;
9760 esac
9763 if test -z "$TAR"; then
9764 for ac_prog in tar
9766 # Extract the first word of "$ac_prog", so it can be a program name with args.
9767 set dummy $ac_prog; ac_word=$2
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769 $as_echo_n "checking for $ac_word... " >&6; }
9770 if ${ac_cv_path_TAR+:} false; then :
9771 $as_echo_n "(cached) " >&6
9772 else
9773 case $TAR in
9774 [\\/]* | ?:[\\/]*)
9775 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779 for as_dir in $PATH
9781 IFS=$as_save_IFS
9782 test -z "$as_dir" && as_dir=.
9783 for ac_exec_ext in '' $ac_executable_extensions; do
9784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787 break 2
9789 done
9790 done
9791 IFS=$as_save_IFS
9794 esac
9796 TAR=$ac_cv_path_TAR
9797 if test -n "$TAR"; then
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9799 $as_echo "$TAR" >&6; }
9800 else
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802 $as_echo "no" >&6; }
9806 test -n "$TAR" && break
9807 done
9809 else
9810 # Report the value of TAR in configure's output in all cases.
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9812 $as_echo_n "checking for TAR... " >&6; }
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9814 $as_echo "$TAR" >&6; }
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9818 $as_echo_n "checking whether ln -s works... " >&6; }
9819 LN_S=$as_ln_s
9820 if test "$LN_S" = "ln -s"; then
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9822 $as_echo "yes" >&6; }
9823 else
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9825 $as_echo "no, using $LN_S" >&6; }
9828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9829 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9830 if test -z "$MKDIR_P"; then
9831 if ${ac_cv_path_mkdir+:} false; then :
9832 $as_echo_n "(cached) " >&6
9833 else
9834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9835 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9837 IFS=$as_save_IFS
9838 test -z "$as_dir" && as_dir=.
9839 for ac_prog in mkdir gmkdir; do
9840 for ac_exec_ext in '' $ac_executable_extensions; do
9841 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9842 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9843 'mkdir (GNU coreutils) '* | \
9844 'mkdir (coreutils) '* | \
9845 'mkdir (fileutils) '4.1*)
9846 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9847 break 3;;
9848 esac
9849 done
9850 done
9851 done
9852 IFS=$as_save_IFS
9856 test -d ./--version && rmdir ./--version
9857 if test "${ac_cv_path_mkdir+set}" = set; then
9858 MKDIR_P="$ac_cv_path_mkdir -p"
9859 else
9860 # As a last resort, use the slow shell script. Don't cache a
9861 # value for MKDIR_P within a source directory, because that will
9862 # break other packages using the cache if that directory is
9863 # removed, or if the value is a relative name.
9864 MKDIR_P="$ac_install_sh -d"
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9868 $as_echo "$MKDIR_P" >&6; }
9870 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9871 # a relative path to it in each makefile where it substitutes it. This clashes
9872 # with our Makefile.global concept. This workaround helps.
9873 case $MKDIR_P in
9874 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9875 esac
9877 if test -z "$BISON"; then
9878 for ac_prog in bison
9880 # Extract the first word of "$ac_prog", so it can be a program name with args.
9881 set dummy $ac_prog; ac_word=$2
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9883 $as_echo_n "checking for $ac_word... " >&6; }
9884 if ${ac_cv_path_BISON+:} false; then :
9885 $as_echo_n "(cached) " >&6
9886 else
9887 case $BISON in
9888 [\\/]* | ?:[\\/]*)
9889 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9893 for as_dir in $PATH
9895 IFS=$as_save_IFS
9896 test -z "$as_dir" && as_dir=.
9897 for ac_exec_ext in '' $ac_executable_extensions; do
9898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9899 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9901 break 2
9903 done
9904 done
9905 IFS=$as_save_IFS
9908 esac
9910 BISON=$ac_cv_path_BISON
9911 if test -n "$BISON"; then
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9913 $as_echo "$BISON" >&6; }
9914 else
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9916 $as_echo "no" >&6; }
9920 test -n "$BISON" && break
9921 done
9923 else
9924 # Report the value of BISON in configure's output in all cases.
9925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9926 $as_echo_n "checking for BISON... " >&6; }
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9928 $as_echo "$BISON" >&6; }
9932 if test "$BISON"; then
9933 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9935 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9936 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9937 then
9938 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9939 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9940 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9941 $as_echo "$as_me: WARNING:
9942 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9943 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9944 BISON=""
9946 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9947 # of the now preferred %name-prefix "base_yy", but the latter
9948 # doesn't work with Bison 2.3 or less. So for now we silence the
9949 # deprecation warnings.
9950 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9951 then
9952 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9956 if test -z "$BISON"; then
9957 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9958 *** Without Bison you will not be able to build PostgreSQL from Git nor
9959 *** change any of the parser definition files. You can obtain Bison from
9960 *** a GNU mirror site. (If you are using the official distribution of
9961 *** PostgreSQL then you do not need to worry about this, because the Bison
9962 *** output is pre-generated.)" >&5
9963 $as_echo "$as_me: WARNING:
9964 *** Without Bison you will not be able to build PostgreSQL from Git nor
9965 *** change any of the parser definition files. You can obtain Bison from
9966 *** a GNU mirror site. (If you are using the official distribution of
9967 *** PostgreSQL then you do not need to worry about this, because the Bison
9968 *** output is pre-generated.)" >&2;}
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9973 $as_echo_n "checking for flex... " >&6; }
9974 if ${pgac_cv_path_flex+:} false; then :
9975 $as_echo_n "(cached) " >&6
9976 else
9977 # Let the user override the test
9978 if test -n "$FLEX"; then
9979 pgac_cv_path_flex=$FLEX
9980 else
9981 pgac_save_IFS=$IFS
9982 IFS=$PATH_SEPARATOR
9983 for pgac_dir in $PATH; do
9984 IFS=$pgac_save_IFS
9985 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9986 pgac_dir=`pwd`
9988 for pgac_prog in flex lex; do
9989 pgac_candidate="$pgac_dir/$pgac_prog"
9990 if test -f "$pgac_candidate" \
9991 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9992 then
9993 echo '%%' > conftest.l
9994 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9995 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9996 if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 31))) exit 0; else exit 1;}'
9997 then
9998 pgac_cv_path_flex=$pgac_candidate
9999 break 2
10000 else
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10002 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10003 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
10004 $as_echo "$as_me: WARNING:
10005 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10006 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
10010 done
10011 done
10012 rm -f conftest.l lex.yy.c
10013 : ${pgac_cv_path_flex=no}
10017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10018 $as_echo "$pgac_cv_path_flex" >&6; }
10019 if test x"$pgac_cv_path_flex" = x"no"; then
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10021 *** Without Flex you will not be able to build PostgreSQL from Git nor
10022 *** change any of the scanner definition files. You can obtain Flex from
10023 *** a GNU mirror site. (If you are using the official distribution of
10024 *** PostgreSQL then you do not need to worry about this because the Flex
10025 *** output is pre-generated.)" >&5
10026 $as_echo "$as_me: WARNING:
10027 *** Without Flex you will not be able to build PostgreSQL from Git nor
10028 *** change any of the scanner definition files. You can obtain Flex from
10029 *** a GNU mirror site. (If you are using the official distribution of
10030 *** PostgreSQL then you do not need to worry about this because the Flex
10031 *** output is pre-generated.)" >&2;}
10033 FLEX=
10034 else
10035 FLEX=$pgac_cv_path_flex
10036 pgac_flex_version=`$FLEX --version 2>/dev/null`
10037 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10038 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10045 if test -z "$PERL"; then
10046 for ac_prog in perl
10048 # Extract the first word of "$ac_prog", so it can be a program name with args.
10049 set dummy $ac_prog; ac_word=$2
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10051 $as_echo_n "checking for $ac_word... " >&6; }
10052 if ${ac_cv_path_PERL+:} false; then :
10053 $as_echo_n "(cached) " >&6
10054 else
10055 case $PERL in
10056 [\\/]* | ?:[\\/]*)
10057 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10061 for as_dir in $PATH
10063 IFS=$as_save_IFS
10064 test -z "$as_dir" && as_dir=.
10065 for ac_exec_ext in '' $ac_executable_extensions; do
10066 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10067 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10069 break 2
10071 done
10072 done
10073 IFS=$as_save_IFS
10076 esac
10078 PERL=$ac_cv_path_PERL
10079 if test -n "$PERL"; then
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10081 $as_echo "$PERL" >&6; }
10082 else
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10084 $as_echo "no" >&6; }
10088 test -n "$PERL" && break
10089 done
10091 else
10092 # Report the value of PERL in configure's output in all cases.
10093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10094 $as_echo_n "checking for PERL... " >&6; }
10095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10096 $as_echo "$PERL" >&6; }
10100 if test "$PERL"; then
10101 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'`
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10103 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10104 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10105 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
10106 then
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10108 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10109 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
10110 $as_echo "$as_me: WARNING:
10111 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10112 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
10113 PERL=""
10117 if test -z "$PERL"; then
10118 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10119 *** Without Perl you will not be able to build PostgreSQL from Git.
10120 *** You can obtain Perl from any CPAN mirror site.
10121 *** (If you are using the official distribution of PostgreSQL then you do not
10122 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10123 $as_echo "$as_me: WARNING:
10124 *** Without Perl you will not be able to build PostgreSQL from Git.
10125 *** You can obtain Perl from any CPAN mirror site.
10126 *** (If you are using the official distribution of PostgreSQL then you do not
10127 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10130 if test "$with_perl" = yes; then
10131 if test -z "$PERL"; then
10132 as_fn_error $? "Perl not found" "$LINENO" 5
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10136 $as_echo_n "checking for Perl archlibexp... " >&6; }
10137 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10138 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10140 $as_echo "$perl_archlibexp" >&6; }
10141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10142 $as_echo_n "checking for Perl privlibexp... " >&6; }
10143 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10144 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10146 $as_echo "$perl_privlibexp" >&6; }
10147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10148 $as_echo_n "checking for Perl useshrplib... " >&6; }
10149 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10150 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10152 $as_echo "$perl_useshrplib" >&6; }
10153 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10154 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10155 You might have to rebuild your Perl installation. Refer to the
10156 documentation for details. Use --without-perl to disable building
10157 PL/Perl." "$LINENO" 5
10159 # On most platforms, archlibexp is also where the Perl include files live ...
10160 perl_includespec="-I$perl_archlibexp/CORE"
10161 # ... but on newer macOS versions, we must use -iwithsysroot to look
10162 # under $PG_SYSROOT
10163 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10164 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10165 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10170 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10171 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10173 $as_echo "$perl_ccflags" >&6; }
10174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10175 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10176 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10178 $as_echo "$perl_embed_ccflags" >&6; }
10181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10182 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10183 if test "$PORTNAME" = "win32" ; then
10184 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10185 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10186 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10187 else
10188 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10189 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10190 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10193 else
10194 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10195 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
10196 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
10198 if test -z "$perl_embed_ldflags" ; then
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200 $as_echo "no" >&6; }
10201 as_fn_error $? "could not determine flags for linking embedded Perl.
10202 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10203 installed." "$LINENO" 5
10204 else
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10206 $as_echo "$perl_embed_ldflags" >&6; }
10211 if test "$with_python" = yes; then
10212 if test -z "$PYTHON"; then
10213 for ac_prog in python python3 python2
10215 # Extract the first word of "$ac_prog", so it can be a program name with args.
10216 set dummy $ac_prog; ac_word=$2
10217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10218 $as_echo_n "checking for $ac_word... " >&6; }
10219 if ${ac_cv_path_PYTHON+:} false; then :
10220 $as_echo_n "(cached) " >&6
10221 else
10222 case $PYTHON in
10223 [\\/]* | ?:[\\/]*)
10224 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10228 for as_dir in $PATH
10230 IFS=$as_save_IFS
10231 test -z "$as_dir" && as_dir=.
10232 for ac_exec_ext in '' $ac_executable_extensions; do
10233 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10234 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10235 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10236 break 2
10238 done
10239 done
10240 IFS=$as_save_IFS
10243 esac
10245 PYTHON=$ac_cv_path_PYTHON
10246 if test -n "$PYTHON"; then
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10248 $as_echo "$PYTHON" >&6; }
10249 else
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251 $as_echo "no" >&6; }
10255 test -n "$PYTHON" && break
10256 done
10258 else
10259 # Report the value of PYTHON in configure's output in all cases.
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10261 $as_echo_n "checking for PYTHON... " >&6; }
10262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10263 $as_echo "$PYTHON" >&6; }
10266 if test x"$PYTHON" = x""; then
10267 as_fn_error $? "Python not found" "$LINENO" 5
10271 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10272 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10273 $as_echo "$as_me: using python $python_fullversion" >&6;}
10274 # python_fullversion is typically n.n.n plus some trailing junk
10275 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10276 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10277 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10278 # Reject unsupported Python versions as soon as practical.
10279 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 7; then
10280 as_fn_error $? "Python version $python_version is too old (version 2.7 or later is required)" "$LINENO" 5
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10284 $as_echo_n "checking for Python sysconfig module... " >&6; }
10285 if "${PYTHON}" -c 'import sysconfig' 2>&5
10286 then
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10288 $as_echo "yes" >&6; }
10289 else
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10291 $as_echo "no" >&6; }
10292 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10296 $as_echo_n "checking Python configuration directory... " >&6; }
10297 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10299 $as_echo "$python_configdir" >&6; }
10301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10302 $as_echo_n "checking Python include directory... " >&6; }
10303 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10304 if test "$PORTNAME" = win32 ; then
10305 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10308 $as_echo "$python_includespec" >&6; }
10312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10313 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10315 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10316 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10318 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10319 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10320 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10321 then
10322 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10323 found_shlib=1
10324 else
10325 # Otherwise, guess the base name of the shlib.
10326 # LDVERSION was added in Python 3.2, before that use VERSION,
10327 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10328 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10329 if test x"${python_ldversion}" != x""; then
10330 ldlibrary="python${python_ldversion}"
10331 else
10332 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10333 if test x"${python_version_var}" != x""; then
10334 ldlibrary="python${python_version_var}"
10335 else
10336 ldlibrary="python${python_version}"
10339 # Search for a likely-looking file.
10340 found_shlib=0
10341 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10343 # We don't know the platform DLSUFFIX here, so check 'em all.
10344 for e in .so .dll .dylib .sl; do
10345 if test -e "$d/lib${ldlibrary}$e"; then
10346 python_libdir="$d"
10347 found_shlib=1
10348 break 2
10350 done
10351 done
10352 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10353 # (".so.n.n") as well. However, check this only after failing to find
10354 # ".so" anywhere, because yet other platforms (Debian) put the .so
10355 # symlink in a different directory from the underlying versioned shlib.
10356 if test "$found_shlib" != 1; then
10357 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10359 for f in "$d/lib${ldlibrary}.so."* ; do
10360 if test -e "$f"; then
10361 python_libdir="$d"
10362 found_shlib=1
10363 break 2
10365 done
10366 done
10368 # As usual, Windows has its own ideas. Possible default library
10369 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10370 # and the "lib" prefix might not be there.
10371 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10372 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10374 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10375 if test -e "$f"; then
10376 python_libdir="$d"
10377 found_shlib=1
10378 break 2
10380 done
10381 done
10384 if test "$found_shlib" != 1; then
10385 as_fn_error $? "could not find shared library for Python
10386 You might have to rebuild your Python installation. Refer to the
10387 documentation for details. Use --without-python to disable building
10388 PL/Python." "$LINENO" 5
10390 python_libspec="-L${python_libdir} -l${ldlibrary}"
10392 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10395 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10401 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10402 if test -z "$ZIC"; then
10403 for ac_prog in zic
10405 # Extract the first word of "$ac_prog", so it can be a program name with args.
10406 set dummy $ac_prog; ac_word=$2
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10408 $as_echo_n "checking for $ac_word... " >&6; }
10409 if ${ac_cv_path_ZIC+:} false; then :
10410 $as_echo_n "(cached) " >&6
10411 else
10412 case $ZIC in
10413 [\\/]* | ?:[\\/]*)
10414 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10418 for as_dir in $PATH
10420 IFS=$as_save_IFS
10421 test -z "$as_dir" && as_dir=.
10422 for ac_exec_ext in '' $ac_executable_extensions; do
10423 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10424 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10426 break 2
10428 done
10429 done
10430 IFS=$as_save_IFS
10433 esac
10435 ZIC=$ac_cv_path_ZIC
10436 if test -n "$ZIC"; then
10437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10438 $as_echo "$ZIC" >&6; }
10439 else
10440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441 $as_echo "no" >&6; }
10445 test -n "$ZIC" && break
10446 done
10448 else
10449 # Report the value of ZIC in configure's output in all cases.
10450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10451 $as_echo_n "checking for ZIC... " >&6; }
10452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10453 $as_echo "$ZIC" >&6; }
10456 if test -z "$ZIC"; then
10457 as_fn_error $? "
10458 When cross-compiling, either use the option --with-system-tzdata to use
10459 existing time-zone data, or set the environment variable ZIC to a zic
10460 program to use during the build." "$LINENO" 5
10465 # Pthreads
10467 # For each platform, we need to know about any special compile and link
10468 # libraries, and whether the normal C function names are thread-safe.
10469 # See the comment at the top of src/port/thread.c for more information.
10470 # WIN32 doesn't need the pthread tests; it always uses threads
10472 # These tests are run before the library-tests, because linking with the
10473 # other libraries can pull in the pthread functions as a side-effect. We
10474 # want to use the -pthread or similar flags directly, and not rely on
10475 # the side-effects of linking with some other library.
10477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10478 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10479 if ${ac_cv_path_SED+:} false; then :
10480 $as_echo_n "(cached) " >&6
10481 else
10482 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10483 for ac_i in 1 2 3 4 5 6 7; do
10484 ac_script="$ac_script$as_nl$ac_script"
10485 done
10486 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10487 { ac_script=; unset ac_script;}
10488 if test -z "$SED"; then
10489 ac_path_SED_found=false
10490 # Loop through the user's path and test for each of PROGNAME-LIST
10491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10492 for as_dir in $PATH
10494 IFS=$as_save_IFS
10495 test -z "$as_dir" && as_dir=.
10496 for ac_prog in sed gsed; do
10497 for ac_exec_ext in '' $ac_executable_extensions; do
10498 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10499 as_fn_executable_p "$ac_path_SED" || continue
10500 # Check for GNU ac_path_SED and select it if it is found.
10501 # Check for GNU $ac_path_SED
10502 case `"$ac_path_SED" --version 2>&1` in
10503 *GNU*)
10504 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10506 ac_count=0
10507 $as_echo_n 0123456789 >"conftest.in"
10508 while :
10510 cat "conftest.in" "conftest.in" >"conftest.tmp"
10511 mv "conftest.tmp" "conftest.in"
10512 cp "conftest.in" "conftest.nl"
10513 $as_echo '' >> "conftest.nl"
10514 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10515 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10516 as_fn_arith $ac_count + 1 && ac_count=$as_val
10517 if test $ac_count -gt ${ac_path_SED_max-0}; then
10518 # Best one so far, save it but keep looking for a better one
10519 ac_cv_path_SED="$ac_path_SED"
10520 ac_path_SED_max=$ac_count
10522 # 10*(2^10) chars as input seems more than enough
10523 test $ac_count -gt 10 && break
10524 done
10525 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10526 esac
10528 $ac_path_SED_found && break 3
10529 done
10530 done
10531 done
10532 IFS=$as_save_IFS
10533 if test -z "$ac_cv_path_SED"; then
10534 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10536 else
10537 ac_cv_path_SED=$SED
10541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10542 $as_echo "$ac_cv_path_SED" >&6; }
10543 SED="$ac_cv_path_SED"
10544 rm -f conftest.sed
10546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10547 $as_echo_n "checking for ANSI C header files... " >&6; }
10548 if ${ac_cv_header_stdc+:} false; then :
10549 $as_echo_n "(cached) " >&6
10550 else
10551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10552 /* end confdefs.h. */
10553 #include <stdlib.h>
10554 #include <stdarg.h>
10555 #include <string.h>
10556 #include <float.h>
10559 main ()
10563 return 0;
10565 _ACEOF
10566 if ac_fn_c_try_compile "$LINENO"; then :
10567 ac_cv_header_stdc=yes
10568 else
10569 ac_cv_header_stdc=no
10571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10573 if test $ac_cv_header_stdc = yes; then
10574 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10576 /* end confdefs.h. */
10577 #include <string.h>
10579 _ACEOF
10580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10581 $EGREP "memchr" >/dev/null 2>&1; then :
10583 else
10584 ac_cv_header_stdc=no
10586 rm -f conftest*
10590 if test $ac_cv_header_stdc = yes; then
10591 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10593 /* end confdefs.h. */
10594 #include <stdlib.h>
10596 _ACEOF
10597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10598 $EGREP "free" >/dev/null 2>&1; then :
10600 else
10601 ac_cv_header_stdc=no
10603 rm -f conftest*
10607 if test $ac_cv_header_stdc = yes; then
10608 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10609 if test "$cross_compiling" = yes; then :
10611 else
10612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10613 /* end confdefs.h. */
10614 #include <ctype.h>
10615 #include <stdlib.h>
10616 #if ((' ' & 0x0FF) == 0x020)
10617 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10618 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10619 #else
10620 # define ISLOWER(c) \
10621 (('a' <= (c) && (c) <= 'i') \
10622 || ('j' <= (c) && (c) <= 'r') \
10623 || ('s' <= (c) && (c) <= 'z'))
10624 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10625 #endif
10627 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10629 main ()
10631 int i;
10632 for (i = 0; i < 256; i++)
10633 if (XOR (islower (i), ISLOWER (i))
10634 || toupper (i) != TOUPPER (i))
10635 return 2;
10636 return 0;
10638 _ACEOF
10639 if ac_fn_c_try_run "$LINENO"; then :
10641 else
10642 ac_cv_header_stdc=no
10644 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10645 conftest.$ac_objext conftest.beam conftest.$ac_ext
10650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10651 $as_echo "$ac_cv_header_stdc" >&6; }
10652 if test $ac_cv_header_stdc = yes; then
10654 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10658 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10659 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10660 inttypes.h stdint.h unistd.h
10661 do :
10662 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10663 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10665 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10666 cat >>confdefs.h <<_ACEOF
10667 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10668 _ACEOF
10672 done
10675 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10676 # then
10681 ac_ext=c
10682 ac_cpp='$CPP $CPPFLAGS'
10683 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10684 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10685 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10687 ax_pthread_ok=no
10689 # We used to check for pthread.h first, but this fails if pthread.h
10690 # requires special compiler flags (e.g. on Tru64 or Sequent).
10691 # It gets checked for in the link test anyway.
10693 # First of all, check if the user has set any of the PTHREAD_LIBS,
10694 # etcetera environment variables, and if threads linking works using
10695 # them:
10696 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10697 ax_pthread_save_CC="$CC"
10698 ax_pthread_save_CFLAGS="$CFLAGS"
10699 ax_pthread_save_LIBS="$LIBS"
10700 if test "x$PTHREAD_CC" != "x"; then :
10701 CC="$PTHREAD_CC"
10703 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10704 LIBS="$PTHREAD_LIBS $LIBS"
10705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10706 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10708 /* end confdefs.h. */
10710 /* Override any GCC internal prototype to avoid an error.
10711 Use char because int might match the return type of a GCC
10712 builtin and then its argument prototype would still apply. */
10713 #ifdef __cplusplus
10714 extern "C"
10715 #endif
10716 char pthread_join ();
10718 main ()
10720 return pthread_join ();
10722 return 0;
10724 _ACEOF
10725 if ac_fn_c_try_link "$LINENO"; then :
10726 ax_pthread_ok=yes
10728 rm -f core conftest.err conftest.$ac_objext \
10729 conftest$ac_exeext conftest.$ac_ext
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10731 $as_echo "$ax_pthread_ok" >&6; }
10732 if test "x$ax_pthread_ok" = "xno"; then
10733 PTHREAD_LIBS=""
10734 PTHREAD_CFLAGS=""
10736 CC="$ax_pthread_save_CC"
10737 CFLAGS="$ax_pthread_save_CFLAGS"
10738 LIBS="$ax_pthread_save_LIBS"
10741 # We must check for the threads library under a number of different
10742 # names; the ordering is very important because some systems
10743 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10744 # libraries is broken (non-POSIX).
10746 # Create a list of thread flags to try. Items starting with a "-" are
10747 # C compiler flags, and other items are library names, except for "none"
10748 # which indicates that we try without any flags at all, and "pthread-config"
10749 # which is a program returning the flags for the Pth emulation library.
10751 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10753 # The ordering *is* (sometimes) important. Some notes on the
10754 # individual items follow:
10756 # pthreads: AIX (must check this before -lpthread)
10757 # none: in case threads are in libc; should be tried before -Kthread and
10758 # other compiler flags to prevent continual compiler warnings
10759 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10760 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10761 # (Note: HP C rejects this with "bad form for `-t' option")
10762 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10763 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10764 # doesn't hurt to check since this sometimes defines pthreads and
10765 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10766 # is present but should not be used directly; and before -mthreads,
10767 # because the compiler interprets this as "-mt" + "-hreads")
10768 # -mthreads: Mingw32/gcc, Lynx/gcc
10769 # pthread: Linux, etcetera
10770 # --thread-safe: KAI C++
10771 # pthread-config: use pthread-config program (for GNU Pth library)
10773 case $host_os in
10775 freebsd*)
10777 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10778 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10780 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10783 hpux*)
10785 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10786 # multi-threading and also sets -lpthread."
10788 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10791 openedition*)
10793 # IBM z/OS requires a feature-test macro to be defined in order to
10794 # enable POSIX threads at all, so give the user a hint if this is
10795 # not set. (We don't define these ourselves, as they can affect
10796 # other portions of the system API in unpredictable ways.)
10798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10799 /* end confdefs.h. */
10801 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10802 AX_PTHREAD_ZOS_MISSING
10803 # endif
10805 _ACEOF
10806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10807 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10809 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10811 rm -f conftest*
10815 solaris*)
10817 # On Solaris (at least, for some versions), libc contains stubbed
10818 # (non-functional) versions of the pthreads routines, so link-based
10819 # tests will erroneously succeed. (N.B.: The stubs are missing
10820 # pthread_cleanup_push, or rather a function called by this macro,
10821 # so we could check for that, but who knows whether they'll stub
10822 # that too in a future libc.) So we'll check first for the
10823 # standard Solaris way of linking pthreads (-mt -lpthread).
10825 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10827 esac
10829 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10831 if test "x$GCC" = "xyes"; then :
10832 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10835 # The presence of a feature test macro requesting re-entrant function
10836 # definitions is, on some systems, a strong hint that pthreads support is
10837 # correctly enabled
10839 case $host_os in
10840 darwin* | hpux* | linux* | osf* | solaris*)
10841 ax_pthread_check_macro="_REENTRANT"
10844 aix*)
10845 ax_pthread_check_macro="_THREAD_SAFE"
10849 ax_pthread_check_macro="--"
10851 esac
10852 if test "x$ax_pthread_check_macro" = "x--"; then :
10853 ax_pthread_check_cond=0
10854 else
10855 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10858 # Are we compiling with Clang?
10860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10861 $as_echo_n "checking whether $CC is Clang... " >&6; }
10862 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10863 $as_echo_n "(cached) " >&6
10864 else
10865 ax_cv_PTHREAD_CLANG=no
10866 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10867 if test "x$GCC" = "xyes"; then
10868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10869 /* end confdefs.h. */
10870 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10871 # if defined(__clang__) && defined(__llvm__)
10872 AX_PTHREAD_CC_IS_CLANG
10873 # endif
10875 _ACEOF
10876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10877 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10878 ax_cv_PTHREAD_CLANG=yes
10880 rm -f conftest*
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10886 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10887 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10889 ax_pthread_clang_warning=no
10891 # Clang needs special handling, because older versions handle the -pthread
10892 # option in a rather... idiosyncratic way
10894 if test "x$ax_pthread_clang" = "xyes"; then
10896 # Clang takes -pthread; it has never supported any other flag
10898 # (Note 1: This will need to be revisited if a system that Clang
10899 # supports has POSIX threads in a separate library. This tends not
10900 # to be the way of modern systems, but it's conceivable.)
10902 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10903 # to get POSIX threads support; the API is always present and
10904 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10905 # -pthread does define _REENTRANT, and while the Darwin headers
10906 # ignore this macro, third-party headers might not.)
10908 PTHREAD_CFLAGS="-pthread"
10909 PTHREAD_LIBS=
10911 ax_pthread_ok=yes
10913 # However, older versions of Clang make a point of warning the user
10914 # that, in an invocation where only linking and no compilation is
10915 # taking place, the -pthread option has no effect ("argument unused
10916 # during compilation"). They expect -pthread to be passed in only
10917 # when source code is being compiled.
10919 # Problem is, this is at odds with the way Automake and most other
10920 # C build frameworks function, which is that the same flags used in
10921 # compilation (CFLAGS) are also used in linking. Many systems
10922 # supported by AX_PTHREAD require exactly this for POSIX threads
10923 # support, and in fact it is often not straightforward to specify a
10924 # flag that is used only in the compilation phase and not in
10925 # linking. Such a scenario is extremely rare in practice.
10927 # Even though use of the -pthread flag in linking would only print
10928 # a warning, this can be a nuisance for well-run software projects
10929 # that build with -Werror. So if the active version of Clang has
10930 # this misfeature, we search for an option to squash it.
10932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10933 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10934 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10935 $as_echo_n "(cached) " >&6
10936 else
10937 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10938 # Create an alternate version of $ac_link that compiles and
10939 # links in two steps (.c -> .o, .o -> exe) instead of one
10940 # (.c -> exe), because the warning occurs only in the second
10941 # step
10942 ax_pthread_save_ac_link="$ac_link"
10943 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10944 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10945 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10946 ax_pthread_save_CFLAGS="$CFLAGS"
10947 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10948 if test "x$ax_pthread_try" = "xunknown"; then :
10949 break
10951 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10952 ac_link="$ax_pthread_save_ac_link"
10953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10954 /* end confdefs.h. */
10955 int main(void){return 0;}
10956 _ACEOF
10957 if ac_fn_c_try_link "$LINENO"; then :
10958 ac_link="$ax_pthread_2step_ac_link"
10959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10960 /* end confdefs.h. */
10961 int main(void){return 0;}
10962 _ACEOF
10963 if ac_fn_c_try_link "$LINENO"; then :
10964 break
10966 rm -f core conftest.err conftest.$ac_objext \
10967 conftest$ac_exeext conftest.$ac_ext
10970 rm -f core conftest.err conftest.$ac_objext \
10971 conftest$ac_exeext conftest.$ac_ext
10972 done
10973 ac_link="$ax_pthread_save_ac_link"
10974 CFLAGS="$ax_pthread_save_CFLAGS"
10975 if test "x$ax_pthread_try" = "x"; then :
10976 ax_pthread_try=no
10978 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10982 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10984 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10985 no | unknown) ;;
10986 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10987 esac
10989 fi # $ax_pthread_clang = yes
10991 if test "x$ax_pthread_ok" = "xno"; then
10992 for ax_pthread_try_flag in $ax_pthread_flags; do
10994 case $ax_pthread_try_flag in
10995 none)
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10997 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11000 -mt,pthread)
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11002 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11003 PTHREAD_CFLAGS="-mt"
11004 PTHREAD_LIBS="-lpthread"
11008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11009 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11010 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11013 pthread-config)
11014 # Extract the first word of "pthread-config", so it can be a program name with args.
11015 set dummy pthread-config; ac_word=$2
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11017 $as_echo_n "checking for $ac_word... " >&6; }
11018 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11019 $as_echo_n "(cached) " >&6
11020 else
11021 if test -n "$ax_pthread_config"; then
11022 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11023 else
11024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11025 for as_dir in $PATH
11027 IFS=$as_save_IFS
11028 test -z "$as_dir" && as_dir=.
11029 for ac_exec_ext in '' $ac_executable_extensions; do
11030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11031 ac_cv_prog_ax_pthread_config="yes"
11032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11033 break 2
11035 done
11036 done
11037 IFS=$as_save_IFS
11039 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11042 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11043 if test -n "$ax_pthread_config"; then
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11045 $as_echo "$ax_pthread_config" >&6; }
11046 else
11047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11048 $as_echo "no" >&6; }
11052 if test "x$ax_pthread_config" = "xno"; then :
11053 continue
11055 PTHREAD_CFLAGS="`pthread-config --cflags`"
11056 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11061 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11062 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11064 esac
11066 ax_pthread_save_CFLAGS="$CFLAGS"
11067 ax_pthread_save_LIBS="$LIBS"
11068 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11069 LIBS="$PTHREAD_LIBS $LIBS"
11071 # Check for various functions. We must include pthread.h,
11072 # since some functions may be macros. (On the Sequent, we
11073 # need a special flag -Kthread to make this header compile.)
11074 # We check for pthread_join because it is in -lpthread on IRIX
11075 # while pthread_create is in libc. We check for pthread_attr_init
11076 # due to DEC craziness with -lpthreads. We check for
11077 # pthread_cleanup_push because it is one of the few pthread
11078 # functions on Solaris that doesn't have a non-functional libc stub.
11079 # We try pthread_create on general principles.
11081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11082 /* end confdefs.h. */
11083 #include <pthread.h>
11084 # if $ax_pthread_check_cond
11085 # error "$ax_pthread_check_macro must be defined"
11086 # endif
11087 static void routine(void *a) { a = 0; }
11088 static void *start_routine(void *a) { return a; }
11090 main ()
11092 pthread_t th; pthread_attr_t attr;
11093 pthread_create(&th, 0, start_routine, 0);
11094 pthread_join(th, 0);
11095 pthread_attr_init(&attr);
11096 pthread_cleanup_push(routine, 0);
11097 pthread_cleanup_pop(0) /* ; */
11099 return 0;
11101 _ACEOF
11102 if ac_fn_c_try_link "$LINENO"; then :
11103 ax_pthread_ok=yes
11105 rm -f core conftest.err conftest.$ac_objext \
11106 conftest$ac_exeext conftest.$ac_ext
11108 CFLAGS="$ax_pthread_save_CFLAGS"
11109 LIBS="$ax_pthread_save_LIBS"
11111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11112 $as_echo "$ax_pthread_ok" >&6; }
11113 if test "x$ax_pthread_ok" = "xyes"; then :
11114 break
11117 PTHREAD_LIBS=""
11118 PTHREAD_CFLAGS=""
11119 done
11122 # Various other checks:
11123 if test "x$ax_pthread_ok" = "xyes"; then
11124 ax_pthread_save_CFLAGS="$CFLAGS"
11125 ax_pthread_save_LIBS="$LIBS"
11126 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11127 LIBS="$PTHREAD_LIBS $LIBS"
11129 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11131 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11132 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11133 $as_echo_n "(cached) " >&6
11134 else
11135 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11136 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11138 /* end confdefs.h. */
11139 #include <pthread.h>
11141 main ()
11143 int attr = $ax_pthread_attr; return attr /* ; */
11145 return 0;
11147 _ACEOF
11148 if ac_fn_c_try_link "$LINENO"; then :
11149 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11151 rm -f core conftest.err conftest.$ac_objext \
11152 conftest$ac_exeext conftest.$ac_ext
11153 done
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11157 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11158 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11159 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11160 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11162 cat >>confdefs.h <<_ACEOF
11163 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11164 _ACEOF
11166 ax_pthread_joinable_attr_defined=yes
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11171 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11172 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11173 $as_echo_n "(cached) " >&6
11174 else
11175 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11176 case $host_os in
11177 solaris*)
11178 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11180 esac
11183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11184 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11185 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11186 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11187 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11188 ax_pthread_special_flags_added=yes
11191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11192 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11193 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11194 $as_echo_n "(cached) " >&6
11195 else
11196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11197 /* end confdefs.h. */
11198 #include <pthread.h>
11200 main ()
11202 int i = PTHREAD_PRIO_INHERIT;
11204 return 0;
11206 _ACEOF
11207 if ac_fn_c_try_link "$LINENO"; then :
11208 ax_cv_PTHREAD_PRIO_INHERIT=yes
11209 else
11210 ax_cv_PTHREAD_PRIO_INHERIT=no
11212 rm -f core conftest.err conftest.$ac_objext \
11213 conftest$ac_exeext conftest.$ac_ext
11216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11217 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11218 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11219 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11221 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11223 ax_pthread_prio_inherit_defined=yes
11227 CFLAGS="$ax_pthread_save_CFLAGS"
11228 LIBS="$ax_pthread_save_LIBS"
11230 # More AIX lossage: compile with *_r variant
11231 if test "x$GCC" != "xyes"; then
11232 case $host_os in
11233 aix*)
11234 case "x/$CC" in #(
11235 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11236 #handle absolute path differently from PATH based program lookup
11237 case "x$CC" in #(
11238 x/*) :
11239 if as_fn_executable_p ${CC}_r; then :
11240 PTHREAD_CC="${CC}_r"
11241 fi ;; #(
11242 *) :
11243 for ac_prog in ${CC}_r
11245 # Extract the first word of "$ac_prog", so it can be a program name with args.
11246 set dummy $ac_prog; ac_word=$2
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11248 $as_echo_n "checking for $ac_word... " >&6; }
11249 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11250 $as_echo_n "(cached) " >&6
11251 else
11252 if test -n "$PTHREAD_CC"; then
11253 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11254 else
11255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11256 for as_dir in $PATH
11258 IFS=$as_save_IFS
11259 test -z "$as_dir" && as_dir=.
11260 for ac_exec_ext in '' $ac_executable_extensions; do
11261 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11262 ac_cv_prog_PTHREAD_CC="$ac_prog"
11263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11264 break 2
11266 done
11267 done
11268 IFS=$as_save_IFS
11272 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11273 if test -n "$PTHREAD_CC"; then
11274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11275 $as_echo "$PTHREAD_CC" >&6; }
11276 else
11277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11278 $as_echo "no" >&6; }
11282 test -n "$PTHREAD_CC" && break
11283 done
11284 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11286 esac ;; #(
11287 *) :
11289 esac
11291 esac
11295 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11301 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11302 if test "x$ax_pthread_ok" = "xyes"; then
11304 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11307 else
11308 ax_pthread_ok=no
11311 ac_ext=c
11312 ac_cpp='$CPP $CPPFLAGS'
11313 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11314 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11315 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11317 # set thread flags
11319 # Some platforms use these, so just define them. They can't hurt if they
11320 # are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
11321 # enables 5-arg getpwuid_r, among other things.
11322 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
11324 # Check for *_r functions
11325 _CFLAGS="$CFLAGS"
11326 _LIBS="$LIBS"
11327 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11328 LIBS="$LIBS $PTHREAD_LIBS"
11330 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11331 if test "x$ac_cv_header_pthread_h" = xyes; then :
11333 else
11334 as_fn_error $? "
11335 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11340 for ac_func in strerror_r getpwuid_r gethostbyname_r
11341 do :
11342 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11343 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11344 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11345 cat >>confdefs.h <<_ACEOF
11346 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11347 _ACEOF
11350 done
11353 # Do test here with the proper thread flags
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11355 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11356 if ${pgac_cv_func_strerror_r_int+:} false; then :
11357 $as_echo_n "(cached) " >&6
11358 else
11359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11360 /* end confdefs.h. */
11361 #include <string.h>
11363 main ()
11365 char buf[100];
11366 switch (strerror_r(1, buf, sizeof(buf)))
11367 { case 0: break; default: break; }
11370 return 0;
11372 _ACEOF
11373 if ac_fn_c_try_compile "$LINENO"; then :
11374 pgac_cv_func_strerror_r_int=yes
11375 else
11376 pgac_cv_func_strerror_r_int=no
11378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11381 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11382 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11384 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11389 CFLAGS="$_CFLAGS"
11390 LIBS="$_LIBS"
11393 else
11394 # else
11395 # do not use values from template file
11396 PTHREAD_CFLAGS=
11397 PTHREAD_LIBS=
11399 fi # fi
11406 ## Libraries
11408 ## Most libraries are included only if they demonstrably provide a function
11409 ## we need, but libm is an exception: always include it, because there are
11410 ## too many compilers that play cute optimization games that will break
11411 ## probes for standard functions such as pow().
11414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11415 $as_echo_n "checking for main in -lm... " >&6; }
11416 if ${ac_cv_lib_m_main+:} false; then :
11417 $as_echo_n "(cached) " >&6
11418 else
11419 ac_check_lib_save_LIBS=$LIBS
11420 LIBS="-lm $LIBS"
11421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11422 /* end confdefs.h. */
11426 main ()
11428 return main ();
11430 return 0;
11432 _ACEOF
11433 if ac_fn_c_try_link "$LINENO"; then :
11434 ac_cv_lib_m_main=yes
11435 else
11436 ac_cv_lib_m_main=no
11438 rm -f core conftest.err conftest.$ac_objext \
11439 conftest$ac_exeext conftest.$ac_ext
11440 LIBS=$ac_check_lib_save_LIBS
11442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11443 $as_echo "$ac_cv_lib_m_main" >&6; }
11444 if test "x$ac_cv_lib_m_main" = xyes; then :
11445 cat >>confdefs.h <<_ACEOF
11446 #define HAVE_LIBM 1
11447 _ACEOF
11449 LIBS="-lm $LIBS"
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11454 $as_echo_n "checking for library containing setproctitle... " >&6; }
11455 if ${ac_cv_search_setproctitle+:} false; then :
11456 $as_echo_n "(cached) " >&6
11457 else
11458 ac_func_search_save_LIBS=$LIBS
11459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11460 /* end confdefs.h. */
11462 /* Override any GCC internal prototype to avoid an error.
11463 Use char because int might match the return type of a GCC
11464 builtin and then its argument prototype would still apply. */
11465 #ifdef __cplusplus
11466 extern "C"
11467 #endif
11468 char setproctitle ();
11470 main ()
11472 return setproctitle ();
11474 return 0;
11476 _ACEOF
11477 for ac_lib in '' util; do
11478 if test -z "$ac_lib"; then
11479 ac_res="none required"
11480 else
11481 ac_res=-l$ac_lib
11482 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11484 if ac_fn_c_try_link "$LINENO"; then :
11485 ac_cv_search_setproctitle=$ac_res
11487 rm -f core conftest.err conftest.$ac_objext \
11488 conftest$ac_exeext
11489 if ${ac_cv_search_setproctitle+:} false; then :
11490 break
11492 done
11493 if ${ac_cv_search_setproctitle+:} false; then :
11495 else
11496 ac_cv_search_setproctitle=no
11498 rm conftest.$ac_ext
11499 LIBS=$ac_func_search_save_LIBS
11501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11502 $as_echo "$ac_cv_search_setproctitle" >&6; }
11503 ac_res=$ac_cv_search_setproctitle
11504 if test "$ac_res" != no; then :
11505 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11509 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11510 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11511 # required. Just checking for dlsym() ought to suffice.
11512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11513 $as_echo_n "checking for library containing dlsym... " >&6; }
11514 if ${ac_cv_search_dlsym+:} false; then :
11515 $as_echo_n "(cached) " >&6
11516 else
11517 ac_func_search_save_LIBS=$LIBS
11518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11519 /* end confdefs.h. */
11521 /* Override any GCC internal prototype to avoid an error.
11522 Use char because int might match the return type of a GCC
11523 builtin and then its argument prototype would still apply. */
11524 #ifdef __cplusplus
11525 extern "C"
11526 #endif
11527 char dlsym ();
11529 main ()
11531 return dlsym ();
11533 return 0;
11535 _ACEOF
11536 for ac_lib in '' dl; do
11537 if test -z "$ac_lib"; then
11538 ac_res="none required"
11539 else
11540 ac_res=-l$ac_lib
11541 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11543 if ac_fn_c_try_link "$LINENO"; then :
11544 ac_cv_search_dlsym=$ac_res
11546 rm -f core conftest.err conftest.$ac_objext \
11547 conftest$ac_exeext
11548 if ${ac_cv_search_dlsym+:} false; then :
11549 break
11551 done
11552 if ${ac_cv_search_dlsym+:} false; then :
11554 else
11555 ac_cv_search_dlsym=no
11557 rm conftest.$ac_ext
11558 LIBS=$ac_func_search_save_LIBS
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11561 $as_echo "$ac_cv_search_dlsym" >&6; }
11562 ac_res=$ac_cv_search_dlsym
11563 if test "$ac_res" != no; then :
11564 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11569 $as_echo_n "checking for library containing socket... " >&6; }
11570 if ${ac_cv_search_socket+:} false; then :
11571 $as_echo_n "(cached) " >&6
11572 else
11573 ac_func_search_save_LIBS=$LIBS
11574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11575 /* end confdefs.h. */
11577 /* Override any GCC internal prototype to avoid an error.
11578 Use char because int might match the return type of a GCC
11579 builtin and then its argument prototype would still apply. */
11580 #ifdef __cplusplus
11581 extern "C"
11582 #endif
11583 char socket ();
11585 main ()
11587 return socket ();
11589 return 0;
11591 _ACEOF
11592 for ac_lib in '' socket ws2_32; do
11593 if test -z "$ac_lib"; then
11594 ac_res="none required"
11595 else
11596 ac_res=-l$ac_lib
11597 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11599 if ac_fn_c_try_link "$LINENO"; then :
11600 ac_cv_search_socket=$ac_res
11602 rm -f core conftest.err conftest.$ac_objext \
11603 conftest$ac_exeext
11604 if ${ac_cv_search_socket+:} false; then :
11605 break
11607 done
11608 if ${ac_cv_search_socket+:} false; then :
11610 else
11611 ac_cv_search_socket=no
11613 rm conftest.$ac_ext
11614 LIBS=$ac_func_search_save_LIBS
11616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11617 $as_echo "$ac_cv_search_socket" >&6; }
11618 ac_res=$ac_cv_search_socket
11619 if test "$ac_res" != no; then :
11620 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11625 $as_echo_n "checking for library containing shl_load... " >&6; }
11626 if ${ac_cv_search_shl_load+:} false; then :
11627 $as_echo_n "(cached) " >&6
11628 else
11629 ac_func_search_save_LIBS=$LIBS
11630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11631 /* end confdefs.h. */
11633 /* Override any GCC internal prototype to avoid an error.
11634 Use char because int might match the return type of a GCC
11635 builtin and then its argument prototype would still apply. */
11636 #ifdef __cplusplus
11637 extern "C"
11638 #endif
11639 char shl_load ();
11641 main ()
11643 return shl_load ();
11645 return 0;
11647 _ACEOF
11648 for ac_lib in '' dld; do
11649 if test -z "$ac_lib"; then
11650 ac_res="none required"
11651 else
11652 ac_res=-l$ac_lib
11653 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11655 if ac_fn_c_try_link "$LINENO"; then :
11656 ac_cv_search_shl_load=$ac_res
11658 rm -f core conftest.err conftest.$ac_objext \
11659 conftest$ac_exeext
11660 if ${ac_cv_search_shl_load+:} false; then :
11661 break
11663 done
11664 if ${ac_cv_search_shl_load+:} false; then :
11666 else
11667 ac_cv_search_shl_load=no
11669 rm conftest.$ac_ext
11670 LIBS=$ac_func_search_save_LIBS
11672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11673 $as_echo "$ac_cv_search_shl_load" >&6; }
11674 ac_res=$ac_cv_search_shl_load
11675 if test "$ac_res" != no; then :
11676 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11681 $as_echo_n "checking for library containing getopt_long... " >&6; }
11682 if ${ac_cv_search_getopt_long+:} false; then :
11683 $as_echo_n "(cached) " >&6
11684 else
11685 ac_func_search_save_LIBS=$LIBS
11686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11687 /* end confdefs.h. */
11689 /* Override any GCC internal prototype to avoid an error.
11690 Use char because int might match the return type of a GCC
11691 builtin and then its argument prototype would still apply. */
11692 #ifdef __cplusplus
11693 extern "C"
11694 #endif
11695 char getopt_long ();
11697 main ()
11699 return getopt_long ();
11701 return 0;
11703 _ACEOF
11704 for ac_lib in '' getopt gnugetopt; do
11705 if test -z "$ac_lib"; then
11706 ac_res="none required"
11707 else
11708 ac_res=-l$ac_lib
11709 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11711 if ac_fn_c_try_link "$LINENO"; then :
11712 ac_cv_search_getopt_long=$ac_res
11714 rm -f core conftest.err conftest.$ac_objext \
11715 conftest$ac_exeext
11716 if ${ac_cv_search_getopt_long+:} false; then :
11717 break
11719 done
11720 if ${ac_cv_search_getopt_long+:} false; then :
11722 else
11723 ac_cv_search_getopt_long=no
11725 rm conftest.$ac_ext
11726 LIBS=$ac_func_search_save_LIBS
11728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11729 $as_echo "$ac_cv_search_getopt_long" >&6; }
11730 ac_res=$ac_cv_search_getopt_long
11731 if test "$ac_res" != no; then :
11732 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11737 $as_echo_n "checking for library containing crypt... " >&6; }
11738 if ${ac_cv_search_crypt+:} false; then :
11739 $as_echo_n "(cached) " >&6
11740 else
11741 ac_func_search_save_LIBS=$LIBS
11742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11743 /* end confdefs.h. */
11745 /* Override any GCC internal prototype to avoid an error.
11746 Use char because int might match the return type of a GCC
11747 builtin and then its argument prototype would still apply. */
11748 #ifdef __cplusplus
11749 extern "C"
11750 #endif
11751 char crypt ();
11753 main ()
11755 return crypt ();
11757 return 0;
11759 _ACEOF
11760 for ac_lib in '' crypt; do
11761 if test -z "$ac_lib"; then
11762 ac_res="none required"
11763 else
11764 ac_res=-l$ac_lib
11765 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11767 if ac_fn_c_try_link "$LINENO"; then :
11768 ac_cv_search_crypt=$ac_res
11770 rm -f core conftest.err conftest.$ac_objext \
11771 conftest$ac_exeext
11772 if ${ac_cv_search_crypt+:} false; then :
11773 break
11775 done
11776 if ${ac_cv_search_crypt+:} false; then :
11778 else
11779 ac_cv_search_crypt=no
11781 rm conftest.$ac_ext
11782 LIBS=$ac_func_search_save_LIBS
11784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11785 $as_echo "$ac_cv_search_crypt" >&6; }
11786 ac_res=$ac_cv_search_crypt
11787 if test "$ac_res" != no; then :
11788 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11793 $as_echo_n "checking for library containing shm_open... " >&6; }
11794 if ${ac_cv_search_shm_open+:} false; then :
11795 $as_echo_n "(cached) " >&6
11796 else
11797 ac_func_search_save_LIBS=$LIBS
11798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11799 /* end confdefs.h. */
11801 /* Override any GCC internal prototype to avoid an error.
11802 Use char because int might match the return type of a GCC
11803 builtin and then its argument prototype would still apply. */
11804 #ifdef __cplusplus
11805 extern "C"
11806 #endif
11807 char shm_open ();
11809 main ()
11811 return shm_open ();
11813 return 0;
11815 _ACEOF
11816 for ac_lib in '' rt; do
11817 if test -z "$ac_lib"; then
11818 ac_res="none required"
11819 else
11820 ac_res=-l$ac_lib
11821 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11823 if ac_fn_c_try_link "$LINENO"; then :
11824 ac_cv_search_shm_open=$ac_res
11826 rm -f core conftest.err conftest.$ac_objext \
11827 conftest$ac_exeext
11828 if ${ac_cv_search_shm_open+:} false; then :
11829 break
11831 done
11832 if ${ac_cv_search_shm_open+:} false; then :
11834 else
11835 ac_cv_search_shm_open=no
11837 rm conftest.$ac_ext
11838 LIBS=$ac_func_search_save_LIBS
11840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11841 $as_echo "$ac_cv_search_shm_open" >&6; }
11842 ac_res=$ac_cv_search_shm_open
11843 if test "$ac_res" != no; then :
11844 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11849 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11850 if ${ac_cv_search_shm_unlink+:} false; then :
11851 $as_echo_n "(cached) " >&6
11852 else
11853 ac_func_search_save_LIBS=$LIBS
11854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11855 /* end confdefs.h. */
11857 /* Override any GCC internal prototype to avoid an error.
11858 Use char because int might match the return type of a GCC
11859 builtin and then its argument prototype would still apply. */
11860 #ifdef __cplusplus
11861 extern "C"
11862 #endif
11863 char shm_unlink ();
11865 main ()
11867 return shm_unlink ();
11869 return 0;
11871 _ACEOF
11872 for ac_lib in '' rt; do
11873 if test -z "$ac_lib"; then
11874 ac_res="none required"
11875 else
11876 ac_res=-l$ac_lib
11877 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11879 if ac_fn_c_try_link "$LINENO"; then :
11880 ac_cv_search_shm_unlink=$ac_res
11882 rm -f core conftest.err conftest.$ac_objext \
11883 conftest$ac_exeext
11884 if ${ac_cv_search_shm_unlink+:} false; then :
11885 break
11887 done
11888 if ${ac_cv_search_shm_unlink+:} false; then :
11890 else
11891 ac_cv_search_shm_unlink=no
11893 rm conftest.$ac_ext
11894 LIBS=$ac_func_search_save_LIBS
11896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11897 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11898 ac_res=$ac_cv_search_shm_unlink
11899 if test "$ac_res" != no; then :
11900 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11905 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11906 if ${ac_cv_search_clock_gettime+:} false; then :
11907 $as_echo_n "(cached) " >&6
11908 else
11909 ac_func_search_save_LIBS=$LIBS
11910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11911 /* end confdefs.h. */
11913 /* Override any GCC internal prototype to avoid an error.
11914 Use char because int might match the return type of a GCC
11915 builtin and then its argument prototype would still apply. */
11916 #ifdef __cplusplus
11917 extern "C"
11918 #endif
11919 char clock_gettime ();
11921 main ()
11923 return clock_gettime ();
11925 return 0;
11927 _ACEOF
11928 for ac_lib in '' rt posix4; do
11929 if test -z "$ac_lib"; then
11930 ac_res="none required"
11931 else
11932 ac_res=-l$ac_lib
11933 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11935 if ac_fn_c_try_link "$LINENO"; then :
11936 ac_cv_search_clock_gettime=$ac_res
11938 rm -f core conftest.err conftest.$ac_objext \
11939 conftest$ac_exeext
11940 if ${ac_cv_search_clock_gettime+:} false; then :
11941 break
11943 done
11944 if ${ac_cv_search_clock_gettime+:} false; then :
11946 else
11947 ac_cv_search_clock_gettime=no
11949 rm conftest.$ac_ext
11950 LIBS=$ac_func_search_save_LIBS
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11953 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11954 ac_res=$ac_cv_search_clock_gettime
11955 if test "$ac_res" != no; then :
11956 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11960 # Solaris:
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11962 $as_echo_n "checking for library containing fdatasync... " >&6; }
11963 if ${ac_cv_search_fdatasync+:} false; then :
11964 $as_echo_n "(cached) " >&6
11965 else
11966 ac_func_search_save_LIBS=$LIBS
11967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11968 /* end confdefs.h. */
11970 /* Override any GCC internal prototype to avoid an error.
11971 Use char because int might match the return type of a GCC
11972 builtin and then its argument prototype would still apply. */
11973 #ifdef __cplusplus
11974 extern "C"
11975 #endif
11976 char fdatasync ();
11978 main ()
11980 return fdatasync ();
11982 return 0;
11984 _ACEOF
11985 for ac_lib in '' rt posix4; do
11986 if test -z "$ac_lib"; then
11987 ac_res="none required"
11988 else
11989 ac_res=-l$ac_lib
11990 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11992 if ac_fn_c_try_link "$LINENO"; then :
11993 ac_cv_search_fdatasync=$ac_res
11995 rm -f core conftest.err conftest.$ac_objext \
11996 conftest$ac_exeext
11997 if ${ac_cv_search_fdatasync+:} false; then :
11998 break
12000 done
12001 if ${ac_cv_search_fdatasync+:} false; then :
12003 else
12004 ac_cv_search_fdatasync=no
12006 rm conftest.$ac_ext
12007 LIBS=$ac_func_search_save_LIBS
12009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
12010 $as_echo "$ac_cv_search_fdatasync" >&6; }
12011 ac_res=$ac_cv_search_fdatasync
12012 if test "$ac_res" != no; then :
12013 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12017 # Required for thread_test.c on Solaris
12018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
12019 $as_echo_n "checking for library containing sched_yield... " >&6; }
12020 if ${ac_cv_search_sched_yield+:} false; then :
12021 $as_echo_n "(cached) " >&6
12022 else
12023 ac_func_search_save_LIBS=$LIBS
12024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12025 /* end confdefs.h. */
12027 /* Override any GCC internal prototype to avoid an error.
12028 Use char because int might match the return type of a GCC
12029 builtin and then its argument prototype would still apply. */
12030 #ifdef __cplusplus
12031 extern "C"
12032 #endif
12033 char sched_yield ();
12035 main ()
12037 return sched_yield ();
12039 return 0;
12041 _ACEOF
12042 for ac_lib in '' rt; do
12043 if test -z "$ac_lib"; then
12044 ac_res="none required"
12045 else
12046 ac_res=-l$ac_lib
12047 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12049 if ac_fn_c_try_link "$LINENO"; then :
12050 ac_cv_search_sched_yield=$ac_res
12052 rm -f core conftest.err conftest.$ac_objext \
12053 conftest$ac_exeext
12054 if ${ac_cv_search_sched_yield+:} false; then :
12055 break
12057 done
12058 if ${ac_cv_search_sched_yield+:} false; then :
12060 else
12061 ac_cv_search_sched_yield=no
12063 rm conftest.$ac_ext
12064 LIBS=$ac_func_search_save_LIBS
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
12067 $as_echo "$ac_cv_search_sched_yield" >&6; }
12068 ac_res=$ac_cv_search_sched_yield
12069 if test "$ac_res" != no; then :
12070 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12074 # Required for thread_test.c on Solaris 2.5:
12075 # Other ports use it too (HP-UX) so test unconditionally
12076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
12077 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
12078 if ${ac_cv_search_gethostbyname_r+:} false; then :
12079 $as_echo_n "(cached) " >&6
12080 else
12081 ac_func_search_save_LIBS=$LIBS
12082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12083 /* end confdefs.h. */
12085 /* Override any GCC internal prototype to avoid an error.
12086 Use char because int might match the return type of a GCC
12087 builtin and then its argument prototype would still apply. */
12088 #ifdef __cplusplus
12089 extern "C"
12090 #endif
12091 char gethostbyname_r ();
12093 main ()
12095 return gethostbyname_r ();
12097 return 0;
12099 _ACEOF
12100 for ac_lib in '' nsl; do
12101 if test -z "$ac_lib"; then
12102 ac_res="none required"
12103 else
12104 ac_res=-l$ac_lib
12105 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12107 if ac_fn_c_try_link "$LINENO"; then :
12108 ac_cv_search_gethostbyname_r=$ac_res
12110 rm -f core conftest.err conftest.$ac_objext \
12111 conftest$ac_exeext
12112 if ${ac_cv_search_gethostbyname_r+:} false; then :
12113 break
12115 done
12116 if ${ac_cv_search_gethostbyname_r+:} false; then :
12118 else
12119 ac_cv_search_gethostbyname_r=no
12121 rm conftest.$ac_ext
12122 LIBS=$ac_func_search_save_LIBS
12124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
12125 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
12126 ac_res=$ac_cv_search_gethostbyname_r
12127 if test "$ac_res" != no; then :
12128 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12132 # Cygwin:
12133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12134 $as_echo_n "checking for library containing shmget... " >&6; }
12135 if ${ac_cv_search_shmget+:} false; then :
12136 $as_echo_n "(cached) " >&6
12137 else
12138 ac_func_search_save_LIBS=$LIBS
12139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12140 /* end confdefs.h. */
12142 /* Override any GCC internal prototype to avoid an error.
12143 Use char because int might match the return type of a GCC
12144 builtin and then its argument prototype would still apply. */
12145 #ifdef __cplusplus
12146 extern "C"
12147 #endif
12148 char shmget ();
12150 main ()
12152 return shmget ();
12154 return 0;
12156 _ACEOF
12157 for ac_lib in '' cygipc; do
12158 if test -z "$ac_lib"; then
12159 ac_res="none required"
12160 else
12161 ac_res=-l$ac_lib
12162 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12164 if ac_fn_c_try_link "$LINENO"; then :
12165 ac_cv_search_shmget=$ac_res
12167 rm -f core conftest.err conftest.$ac_objext \
12168 conftest$ac_exeext
12169 if ${ac_cv_search_shmget+:} false; then :
12170 break
12172 done
12173 if ${ac_cv_search_shmget+:} false; then :
12175 else
12176 ac_cv_search_shmget=no
12178 rm conftest.$ac_ext
12179 LIBS=$ac_func_search_save_LIBS
12181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12182 $as_echo "$ac_cv_search_shmget" >&6; }
12183 ac_res=$ac_cv_search_shmget
12184 if test "$ac_res" != no; then :
12185 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12190 if test "$with_readline" = yes; then
12193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12194 $as_echo_n "checking for library containing readline... " >&6; }
12195 if ${pgac_cv_check_readline+:} false; then :
12196 $as_echo_n "(cached) " >&6
12197 else
12198 pgac_cv_check_readline=no
12199 pgac_save_LIBS=$LIBS
12200 if test x"$with_libedit_preferred" != x"yes"
12201 then READLINE_ORDER="-lreadline -ledit"
12202 else READLINE_ORDER="-ledit -lreadline"
12204 for pgac_rllib in $READLINE_ORDER ; do
12205 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12206 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12208 /* end confdefs.h. */
12210 /* Override any GCC internal prototype to avoid an error.
12211 Use char because int might match the return type of a GCC
12212 builtin and then its argument prototype would still apply. */
12213 #ifdef __cplusplus
12214 extern "C"
12215 #endif
12216 char readline ();
12218 main ()
12220 return readline ();
12222 return 0;
12224 _ACEOF
12225 if ac_fn_c_try_link "$LINENO"; then :
12227 # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
12228 # recognize dependent libraries; assume curses is needed if we didn't
12229 # find any dependency.
12230 case $host_os in
12231 netbsd* | openbsd* | irix*)
12232 if test x"$pgac_lib" = x"" ; then
12233 pgac_lib=" -lcurses"
12234 fi ;;
12235 esac
12237 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12238 break
12241 rm -f core conftest.err conftest.$ac_objext \
12242 conftest$ac_exeext conftest.$ac_ext
12243 done
12244 if test "$pgac_cv_check_readline" != no ; then
12245 break
12247 done
12248 LIBS=$pgac_save_LIBS
12251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12252 $as_echo "$pgac_cv_check_readline" >&6; }
12253 if test "$pgac_cv_check_readline" != no ; then
12254 LIBS="$pgac_cv_check_readline $LIBS"
12256 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12261 if test x"$pgac_cv_check_readline" = x"no"; then
12262 as_fn_error $? "readline library not found
12263 If you have readline already installed, see config.log for details on the
12264 failure. It is possible the compiler isn't looking in the proper directory.
12265 Use --without-readline to disable readline support." "$LINENO" 5
12269 if test "$with_zlib" = yes; then
12270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12271 $as_echo_n "checking for inflate in -lz... " >&6; }
12272 if ${ac_cv_lib_z_inflate+:} false; then :
12273 $as_echo_n "(cached) " >&6
12274 else
12275 ac_check_lib_save_LIBS=$LIBS
12276 LIBS="-lz $LIBS"
12277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12278 /* end confdefs.h. */
12280 /* Override any GCC internal prototype to avoid an error.
12281 Use char because int might match the return type of a GCC
12282 builtin and then its argument prototype would still apply. */
12283 #ifdef __cplusplus
12284 extern "C"
12285 #endif
12286 char inflate ();
12288 main ()
12290 return inflate ();
12292 return 0;
12294 _ACEOF
12295 if ac_fn_c_try_link "$LINENO"; then :
12296 ac_cv_lib_z_inflate=yes
12297 else
12298 ac_cv_lib_z_inflate=no
12300 rm -f core conftest.err conftest.$ac_objext \
12301 conftest$ac_exeext conftest.$ac_ext
12302 LIBS=$ac_check_lib_save_LIBS
12304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12305 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12306 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12307 cat >>confdefs.h <<_ACEOF
12308 #define HAVE_LIBZ 1
12309 _ACEOF
12311 LIBS="-lz $LIBS"
12313 else
12314 as_fn_error $? "zlib library not found
12315 If you have zlib already installed, see config.log for details on the
12316 failure. It is possible the compiler isn't looking in the proper directory.
12317 Use --without-zlib to disable zlib support." "$LINENO" 5
12322 if test "$enable_spinlocks" = yes; then
12324 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12326 else
12327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12328 *** Not using spinlocks will cause poor performance." >&5
12329 $as_echo "$as_me: WARNING:
12330 *** Not using spinlocks will cause poor performance." >&2;}
12333 if test "$enable_atomics" = yes; then
12335 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12337 else
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12339 *** Not using atomic operations will cause poor performance." >&5
12340 $as_echo "$as_me: WARNING:
12341 *** Not using atomic operations will cause poor performance." >&2;}
12344 if test "$with_gssapi" = yes ; then
12345 if test "$PORTNAME" != "win32"; then
12346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12347 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12348 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12349 $as_echo_n "(cached) " >&6
12350 else
12351 ac_func_search_save_LIBS=$LIBS
12352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12353 /* end confdefs.h. */
12355 /* Override any GCC internal prototype to avoid an error.
12356 Use char because int might match the return type of a GCC
12357 builtin and then its argument prototype would still apply. */
12358 #ifdef __cplusplus
12359 extern "C"
12360 #endif
12361 char gss_init_sec_context ();
12363 main ()
12365 return gss_init_sec_context ();
12367 return 0;
12369 _ACEOF
12370 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12371 if test -z "$ac_lib"; then
12372 ac_res="none required"
12373 else
12374 ac_res=-l$ac_lib
12375 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12377 if ac_fn_c_try_link "$LINENO"; then :
12378 ac_cv_search_gss_init_sec_context=$ac_res
12380 rm -f core conftest.err conftest.$ac_objext \
12381 conftest$ac_exeext
12382 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12383 break
12385 done
12386 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12388 else
12389 ac_cv_search_gss_init_sec_context=no
12391 rm conftest.$ac_ext
12392 LIBS=$ac_func_search_save_LIBS
12394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12395 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12396 ac_res=$ac_cv_search_gss_init_sec_context
12397 if test "$ac_res" != no; then :
12398 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12400 else
12401 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12404 else
12405 LIBS="$LIBS -lgssapi32"
12409 if test "$with_openssl" = yes ; then
12410 # Minimum required OpenSSL version is 0.9.8
12412 $as_echo "#define OPENSSL_API_COMPAT 0x00908000L" >>confdefs.h
12414 if test "$PORTNAME" != "win32"; then
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12416 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12417 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12418 $as_echo_n "(cached) " >&6
12419 else
12420 ac_check_lib_save_LIBS=$LIBS
12421 LIBS="-lcrypto $LIBS"
12422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12423 /* end confdefs.h. */
12425 /* Override any GCC internal prototype to avoid an error.
12426 Use char because int might match the return type of a GCC
12427 builtin and then its argument prototype would still apply. */
12428 #ifdef __cplusplus
12429 extern "C"
12430 #endif
12431 char CRYPTO_new_ex_data ();
12433 main ()
12435 return CRYPTO_new_ex_data ();
12437 return 0;
12439 _ACEOF
12440 if ac_fn_c_try_link "$LINENO"; then :
12441 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12442 else
12443 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12445 rm -f core conftest.err conftest.$ac_objext \
12446 conftest$ac_exeext conftest.$ac_ext
12447 LIBS=$ac_check_lib_save_LIBS
12449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12450 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12451 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12452 cat >>confdefs.h <<_ACEOF
12453 #define HAVE_LIBCRYPTO 1
12454 _ACEOF
12456 LIBS="-lcrypto $LIBS"
12458 else
12459 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12463 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12464 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12465 $as_echo_n "(cached) " >&6
12466 else
12467 ac_check_lib_save_LIBS=$LIBS
12468 LIBS="-lssl $LIBS"
12469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12470 /* end confdefs.h. */
12472 /* Override any GCC internal prototype to avoid an error.
12473 Use char because int might match the return type of a GCC
12474 builtin and then its argument prototype would still apply. */
12475 #ifdef __cplusplus
12476 extern "C"
12477 #endif
12478 char SSL_new ();
12480 main ()
12482 return SSL_new ();
12484 return 0;
12486 _ACEOF
12487 if ac_fn_c_try_link "$LINENO"; then :
12488 ac_cv_lib_ssl_SSL_new=yes
12489 else
12490 ac_cv_lib_ssl_SSL_new=no
12492 rm -f core conftest.err conftest.$ac_objext \
12493 conftest$ac_exeext conftest.$ac_ext
12494 LIBS=$ac_check_lib_save_LIBS
12496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12497 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12498 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12499 cat >>confdefs.h <<_ACEOF
12500 #define HAVE_LIBSSL 1
12501 _ACEOF
12503 LIBS="-lssl $LIBS"
12505 else
12506 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12509 else
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12511 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12512 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12513 $as_echo_n "(cached) " >&6
12514 else
12515 ac_func_search_save_LIBS=$LIBS
12516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517 /* end confdefs.h. */
12519 /* Override any GCC internal prototype to avoid an error.
12520 Use char because int might match the return type of a GCC
12521 builtin and then its argument prototype would still apply. */
12522 #ifdef __cplusplus
12523 extern "C"
12524 #endif
12525 char CRYPTO_new_ex_data ();
12527 main ()
12529 return CRYPTO_new_ex_data ();
12531 return 0;
12533 _ACEOF
12534 for ac_lib in '' eay32 crypto; do
12535 if test -z "$ac_lib"; then
12536 ac_res="none required"
12537 else
12538 ac_res=-l$ac_lib
12539 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12541 if ac_fn_c_try_link "$LINENO"; then :
12542 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12544 rm -f core conftest.err conftest.$ac_objext \
12545 conftest$ac_exeext
12546 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12547 break
12549 done
12550 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12552 else
12553 ac_cv_search_CRYPTO_new_ex_data=no
12555 rm conftest.$ac_ext
12556 LIBS=$ac_func_search_save_LIBS
12558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12559 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12560 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12561 if test "$ac_res" != no; then :
12562 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12564 else
12565 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12569 $as_echo_n "checking for library containing SSL_new... " >&6; }
12570 if ${ac_cv_search_SSL_new+:} false; then :
12571 $as_echo_n "(cached) " >&6
12572 else
12573 ac_func_search_save_LIBS=$LIBS
12574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12575 /* end confdefs.h. */
12577 /* Override any GCC internal prototype to avoid an error.
12578 Use char because int might match the return type of a GCC
12579 builtin and then its argument prototype would still apply. */
12580 #ifdef __cplusplus
12581 extern "C"
12582 #endif
12583 char SSL_new ();
12585 main ()
12587 return SSL_new ();
12589 return 0;
12591 _ACEOF
12592 for ac_lib in '' ssleay32 ssl; do
12593 if test -z "$ac_lib"; then
12594 ac_res="none required"
12595 else
12596 ac_res=-l$ac_lib
12597 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12599 if ac_fn_c_try_link "$LINENO"; then :
12600 ac_cv_search_SSL_new=$ac_res
12602 rm -f core conftest.err conftest.$ac_objext \
12603 conftest$ac_exeext
12604 if ${ac_cv_search_SSL_new+:} false; then :
12605 break
12607 done
12608 if ${ac_cv_search_SSL_new+:} false; then :
12610 else
12611 ac_cv_search_SSL_new=no
12613 rm conftest.$ac_ext
12614 LIBS=$ac_func_search_save_LIBS
12616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12617 $as_echo "$ac_cv_search_SSL_new" >&6; }
12618 ac_res=$ac_cv_search_SSL_new
12619 if test "$ac_res" != no; then :
12620 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12622 else
12623 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12627 for ac_func in SSL_get_current_compression X509_get_signature_nid
12628 do :
12629 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12630 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12631 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12632 cat >>confdefs.h <<_ACEOF
12633 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12634 _ACEOF
12637 done
12639 # Functions introduced in OpenSSL 1.1.0. We used to check for
12640 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12641 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12642 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12643 # functions.
12644 for ac_func in OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data
12645 do :
12646 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12647 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12648 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12649 cat >>confdefs.h <<_ACEOF
12650 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12651 _ACEOF
12654 done
12656 # OpenSSL versions before 1.1.0 required setting callback functions, for
12657 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12658 # function was removed.
12659 for ac_func in CRYPTO_lock
12660 do :
12661 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12662 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12663 cat >>confdefs.h <<_ACEOF
12664 #define HAVE_CRYPTO_LOCK 1
12665 _ACEOF
12668 done
12670 # Function introduced in OpenSSL 1.1.1.
12671 for ac_func in X509_get_signature_info SSL_CTX_set_num_tickets
12672 do :
12673 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12674 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12675 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12676 cat >>confdefs.h <<_ACEOF
12677 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12678 _ACEOF
12681 done
12683 # SSL_clear_options is a macro in OpenSSL from 0.9.8 to 1.0.2, and
12684 # a function from 1.1.0 onwards so we cannot use AC_CHECK_FUNCS.
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_clear_options" >&5
12686 $as_echo_n "checking for SSL_clear_options... " >&6; }
12687 if ${ac_cv_func_ssl_clear_options+:} false; then :
12688 $as_echo_n "(cached) " >&6
12689 else
12690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12691 /* end confdefs.h. */
12693 #include <openssl/ssl.h>
12694 #include <openssl/bio.h>
12695 SSL *ssl;
12698 main ()
12700 return SSL_clear_options(ssl, 0);
12702 return 0;
12704 _ACEOF
12705 if ac_fn_c_try_link "$LINENO"; then :
12706 ac_cv_func_ssl_clear_options=yes
12707 else
12708 ac_cv_func_ssl_clear_options=no
12710 rm -f core conftest.err conftest.$ac_objext \
12711 conftest$ac_exeext conftest.$ac_ext
12713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ssl_clear_options" >&5
12714 $as_echo "$ac_cv_func_ssl_clear_options" >&6; }
12715 if test $ac_cv_func_ssl_clear_options = yes ; then
12717 $as_echo "#define HAVE_SSL_CLEAR_OPTIONS 1" >>confdefs.h
12722 if test "$with_pam" = yes ; then
12723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12724 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12725 if ${ac_cv_lib_pam_pam_start+:} false; then :
12726 $as_echo_n "(cached) " >&6
12727 else
12728 ac_check_lib_save_LIBS=$LIBS
12729 LIBS="-lpam $LIBS"
12730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12731 /* end confdefs.h. */
12733 /* Override any GCC internal prototype to avoid an error.
12734 Use char because int might match the return type of a GCC
12735 builtin and then its argument prototype would still apply. */
12736 #ifdef __cplusplus
12737 extern "C"
12738 #endif
12739 char pam_start ();
12741 main ()
12743 return pam_start ();
12745 return 0;
12747 _ACEOF
12748 if ac_fn_c_try_link "$LINENO"; then :
12749 ac_cv_lib_pam_pam_start=yes
12750 else
12751 ac_cv_lib_pam_pam_start=no
12753 rm -f core conftest.err conftest.$ac_objext \
12754 conftest$ac_exeext conftest.$ac_ext
12755 LIBS=$ac_check_lib_save_LIBS
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12758 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12759 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12760 cat >>confdefs.h <<_ACEOF
12761 #define HAVE_LIBPAM 1
12762 _ACEOF
12764 LIBS="-lpam $LIBS"
12766 else
12767 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12772 if test "$with_libxml" = yes ; then
12773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12774 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12775 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12776 $as_echo_n "(cached) " >&6
12777 else
12778 ac_check_lib_save_LIBS=$LIBS
12779 LIBS="-lxml2 $LIBS"
12780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12781 /* end confdefs.h. */
12783 /* Override any GCC internal prototype to avoid an error.
12784 Use char because int might match the return type of a GCC
12785 builtin and then its argument prototype would still apply. */
12786 #ifdef __cplusplus
12787 extern "C"
12788 #endif
12789 char xmlSaveToBuffer ();
12791 main ()
12793 return xmlSaveToBuffer ();
12795 return 0;
12797 _ACEOF
12798 if ac_fn_c_try_link "$LINENO"; then :
12799 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12800 else
12801 ac_cv_lib_xml2_xmlSaveToBuffer=no
12803 rm -f core conftest.err conftest.$ac_objext \
12804 conftest$ac_exeext conftest.$ac_ext
12805 LIBS=$ac_check_lib_save_LIBS
12807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12808 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12809 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12810 cat >>confdefs.h <<_ACEOF
12811 #define HAVE_LIBXML2 1
12812 _ACEOF
12814 LIBS="-lxml2 $LIBS"
12816 else
12817 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12822 if test "$with_libxslt" = yes ; then
12823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12824 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12825 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12826 $as_echo_n "(cached) " >&6
12827 else
12828 ac_check_lib_save_LIBS=$LIBS
12829 LIBS="-lxslt $LIBS"
12830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12831 /* end confdefs.h. */
12833 /* Override any GCC internal prototype to avoid an error.
12834 Use char because int might match the return type of a GCC
12835 builtin and then its argument prototype would still apply. */
12836 #ifdef __cplusplus
12837 extern "C"
12838 #endif
12839 char xsltCleanupGlobals ();
12841 main ()
12843 return xsltCleanupGlobals ();
12845 return 0;
12847 _ACEOF
12848 if ac_fn_c_try_link "$LINENO"; then :
12849 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12850 else
12851 ac_cv_lib_xslt_xsltCleanupGlobals=no
12853 rm -f core conftest.err conftest.$ac_objext \
12854 conftest$ac_exeext conftest.$ac_ext
12855 LIBS=$ac_check_lib_save_LIBS
12857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12858 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12859 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12860 cat >>confdefs.h <<_ACEOF
12861 #define HAVE_LIBXSLT 1
12862 _ACEOF
12864 LIBS="-lxslt $LIBS"
12866 else
12867 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12872 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
12873 # also, on AIX, we may need to have openssl in LIBS for this step.
12874 if test "$with_ldap" = yes ; then
12875 _LIBS="$LIBS"
12876 if test "$PORTNAME" != "win32"; then
12877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12878 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12879 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12880 $as_echo_n "(cached) " >&6
12881 else
12882 ac_check_lib_save_LIBS=$LIBS
12883 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12885 /* end confdefs.h. */
12887 /* Override any GCC internal prototype to avoid an error.
12888 Use char because int might match the return type of a GCC
12889 builtin and then its argument prototype would still apply. */
12890 #ifdef __cplusplus
12891 extern "C"
12892 #endif
12893 char ldap_bind ();
12895 main ()
12897 return ldap_bind ();
12899 return 0;
12901 _ACEOF
12902 if ac_fn_c_try_link "$LINENO"; then :
12903 ac_cv_lib_ldap_ldap_bind=yes
12904 else
12905 ac_cv_lib_ldap_ldap_bind=no
12907 rm -f core conftest.err conftest.$ac_objext \
12908 conftest$ac_exeext conftest.$ac_ext
12909 LIBS=$ac_check_lib_save_LIBS
12911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12912 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12913 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12914 cat >>confdefs.h <<_ACEOF
12915 #define HAVE_LIBLDAP 1
12916 _ACEOF
12918 LIBS="-lldap $LIBS"
12920 else
12921 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12924 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12925 # This test is carried out against libldap.
12926 for ac_func in ldap_initialize
12927 do :
12928 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12929 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12930 cat >>confdefs.h <<_ACEOF
12931 #define HAVE_LDAP_INITIALIZE 1
12932 _ACEOF
12935 done
12937 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
12938 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
12939 # library from a separate OpenLDAP installation). The most reliable
12940 # way to check that is to check for a function introduced in 2.5.
12941 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
12942 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
12943 thread_safe_libldap=yes
12944 else
12945 thread_safe_libldap=no
12948 if test "$enable_thread_safety" = yes -a "$thread_safe_libldap" = no; then
12949 # Use ldap_r for FE if available, else assume ldap is thread-safe.
12950 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12951 LIBS="$_LIBS"
12952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12953 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12954 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12955 $as_echo_n "(cached) " >&6
12956 else
12957 ac_check_lib_save_LIBS=$LIBS
12958 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12960 /* end confdefs.h. */
12962 /* Override any GCC internal prototype to avoid an error.
12963 Use char because int might match the return type of a GCC
12964 builtin and then its argument prototype would still apply. */
12965 #ifdef __cplusplus
12966 extern "C"
12967 #endif
12968 char ldap_bind ();
12970 main ()
12972 return ldap_bind ();
12974 return 0;
12976 _ACEOF
12977 if ac_fn_c_try_link "$LINENO"; then :
12978 ac_cv_lib_ldap_r_ldap_bind=yes
12979 else
12980 ac_cv_lib_ldap_r_ldap_bind=no
12982 rm -f core conftest.err conftest.$ac_objext \
12983 conftest$ac_exeext conftest.$ac_ext
12984 LIBS=$ac_check_lib_save_LIBS
12986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12987 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12988 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12989 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12990 else
12991 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12994 else
12995 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12997 else
12998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12999 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13000 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13001 $as_echo_n "(cached) " >&6
13002 else
13003 ac_check_lib_save_LIBS=$LIBS
13004 LIBS="-lwldap32 $LIBS"
13005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13006 /* end confdefs.h. */
13008 /* Override any GCC internal prototype to avoid an error.
13009 Use char because int might match the return type of a GCC
13010 builtin and then its argument prototype would still apply. */
13011 #ifdef __cplusplus
13012 extern "C"
13013 #endif
13014 char ldap_bind ();
13016 main ()
13018 return ldap_bind ();
13020 return 0;
13022 _ACEOF
13023 if ac_fn_c_try_link "$LINENO"; then :
13024 ac_cv_lib_wldap32_ldap_bind=yes
13025 else
13026 ac_cv_lib_wldap32_ldap_bind=no
13028 rm -f core conftest.err conftest.$ac_objext \
13029 conftest$ac_exeext conftest.$ac_ext
13030 LIBS=$ac_check_lib_save_LIBS
13032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13033 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13034 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13035 cat >>confdefs.h <<_ACEOF
13036 #define HAVE_LIBWLDAP32 1
13037 _ACEOF
13039 LIBS="-lwldap32 $LIBS"
13041 else
13042 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13045 LDAP_LIBS_FE="-lwldap32"
13046 LDAP_LIBS_BE="-lwldap32"
13048 LIBS="$_LIBS"
13053 # for contrib/sepgsql
13054 if test "$with_selinux" = yes; then
13055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13056 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13057 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13058 $as_echo_n "(cached) " >&6
13059 else
13060 ac_check_lib_save_LIBS=$LIBS
13061 LIBS="-lselinux $LIBS"
13062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13063 /* end confdefs.h. */
13065 /* Override any GCC internal prototype to avoid an error.
13066 Use char because int might match the return type of a GCC
13067 builtin and then its argument prototype would still apply. */
13068 #ifdef __cplusplus
13069 extern "C"
13070 #endif
13071 char security_compute_create_name ();
13073 main ()
13075 return security_compute_create_name ();
13077 return 0;
13079 _ACEOF
13080 if ac_fn_c_try_link "$LINENO"; then :
13081 ac_cv_lib_selinux_security_compute_create_name=yes
13082 else
13083 ac_cv_lib_selinux_security_compute_create_name=no
13085 rm -f core conftest.err conftest.$ac_objext \
13086 conftest$ac_exeext conftest.$ac_ext
13087 LIBS=$ac_check_lib_save_LIBS
13089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13090 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13091 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13092 cat >>confdefs.h <<_ACEOF
13093 #define HAVE_LIBSELINUX 1
13094 _ACEOF
13096 LIBS="-lselinux $LIBS"
13098 else
13099 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13104 # for contrib/uuid-ossp
13105 if test "$with_uuid" = bsd ; then
13106 # On BSD, the UUID functions are in libc
13107 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13108 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13109 UUID_LIBS=""
13110 else
13111 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13114 elif test "$with_uuid" = e2fs ; then
13115 # On macOS, the UUID functions are in libc
13116 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13117 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13118 UUID_LIBS=""
13119 else
13120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13121 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13122 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13123 $as_echo_n "(cached) " >&6
13124 else
13125 ac_check_lib_save_LIBS=$LIBS
13126 LIBS="-luuid $LIBS"
13127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13128 /* end confdefs.h. */
13130 /* Override any GCC internal prototype to avoid an error.
13131 Use char because int might match the return type of a GCC
13132 builtin and then its argument prototype would still apply. */
13133 #ifdef __cplusplus
13134 extern "C"
13135 #endif
13136 char uuid_generate ();
13138 main ()
13140 return uuid_generate ();
13142 return 0;
13144 _ACEOF
13145 if ac_fn_c_try_link "$LINENO"; then :
13146 ac_cv_lib_uuid_uuid_generate=yes
13147 else
13148 ac_cv_lib_uuid_uuid_generate=no
13150 rm -f core conftest.err conftest.$ac_objext \
13151 conftest$ac_exeext conftest.$ac_ext
13152 LIBS=$ac_check_lib_save_LIBS
13154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13155 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13156 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13157 UUID_LIBS="-luuid"
13158 else
13159 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13164 elif test "$with_uuid" = ossp ; then
13165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13166 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13167 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13168 $as_echo_n "(cached) " >&6
13169 else
13170 ac_check_lib_save_LIBS=$LIBS
13171 LIBS="-lossp-uuid $LIBS"
13172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13173 /* end confdefs.h. */
13175 /* Override any GCC internal prototype to avoid an error.
13176 Use char because int might match the return type of a GCC
13177 builtin and then its argument prototype would still apply. */
13178 #ifdef __cplusplus
13179 extern "C"
13180 #endif
13181 char uuid_export ();
13183 main ()
13185 return uuid_export ();
13187 return 0;
13189 _ACEOF
13190 if ac_fn_c_try_link "$LINENO"; then :
13191 ac_cv_lib_ossp_uuid_uuid_export=yes
13192 else
13193 ac_cv_lib_ossp_uuid_uuid_export=no
13195 rm -f core conftest.err conftest.$ac_objext \
13196 conftest$ac_exeext conftest.$ac_ext
13197 LIBS=$ac_check_lib_save_LIBS
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13200 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13201 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13202 UUID_LIBS="-lossp-uuid"
13203 else
13204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13205 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13206 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13207 $as_echo_n "(cached) " >&6
13208 else
13209 ac_check_lib_save_LIBS=$LIBS
13210 LIBS="-luuid $LIBS"
13211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13212 /* end confdefs.h. */
13214 /* Override any GCC internal prototype to avoid an error.
13215 Use char because int might match the return type of a GCC
13216 builtin and then its argument prototype would still apply. */
13217 #ifdef __cplusplus
13218 extern "C"
13219 #endif
13220 char uuid_export ();
13222 main ()
13224 return uuid_export ();
13226 return 0;
13228 _ACEOF
13229 if ac_fn_c_try_link "$LINENO"; then :
13230 ac_cv_lib_uuid_uuid_export=yes
13231 else
13232 ac_cv_lib_uuid_uuid_export=no
13234 rm -f core conftest.err conftest.$ac_objext \
13235 conftest$ac_exeext conftest.$ac_ext
13236 LIBS=$ac_check_lib_save_LIBS
13238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13239 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13240 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13241 UUID_LIBS="-luuid"
13242 else
13243 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13253 ## Header files
13256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13257 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13258 if ${ac_cv_header_stdbool_h+:} false; then :
13259 $as_echo_n "(cached) " >&6
13260 else
13261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262 /* end confdefs.h. */
13264 #include <stdbool.h>
13265 #ifndef bool
13266 "error: bool is not defined"
13267 #endif
13268 #ifndef false
13269 "error: false is not defined"
13270 #endif
13271 #if false
13272 "error: false is not 0"
13273 #endif
13274 #ifndef true
13275 "error: true is not defined"
13276 #endif
13277 #if true != 1
13278 "error: true is not 1"
13279 #endif
13280 #ifndef __bool_true_false_are_defined
13281 "error: __bool_true_false_are_defined is not defined"
13282 #endif
13284 struct s { _Bool s: 1; _Bool t; } s;
13286 char a[true == 1 ? 1 : -1];
13287 char b[false == 0 ? 1 : -1];
13288 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13289 char d[(bool) 0.5 == true ? 1 : -1];
13290 /* See body of main program for 'e'. */
13291 char f[(_Bool) 0.0 == false ? 1 : -1];
13292 char g[true];
13293 char h[sizeof (_Bool)];
13294 char i[sizeof s.t];
13295 enum { j = false, k = true, l = false * true, m = true * 256 };
13296 /* The following fails for
13297 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13298 _Bool n[m];
13299 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13300 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13301 /* Catch a bug in an HP-UX C compiler. See
13302 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13303 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13305 _Bool q = true;
13306 _Bool *pq = &q;
13309 main ()
13312 bool e = &s;
13313 *pq |= q;
13314 *pq |= ! q;
13315 /* Refer to every declared value, to avoid compiler optimizations. */
13316 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13317 + !m + !n + !o + !p + !q + !pq);
13320 return 0;
13322 _ACEOF
13323 if ac_fn_c_try_compile "$LINENO"; then :
13324 ac_cv_header_stdbool_h=yes
13325 else
13326 ac_cv_header_stdbool_h=no
13328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13331 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13332 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13333 if test "x$ac_cv_type__Bool" = xyes; then :
13335 cat >>confdefs.h <<_ACEOF
13336 #define HAVE__BOOL 1
13337 _ACEOF
13343 if test $ac_cv_header_stdbool_h = yes; then
13345 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13350 for ac_header in atomic.h copyfile.h crypt.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
13351 do :
13352 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13353 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13354 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13355 cat >>confdefs.h <<_ACEOF
13356 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13357 _ACEOF
13361 done
13364 # On BSD, test for net/if.h will fail unless sys/socket.h
13365 # is included first.
13366 for ac_header in net/if.h
13367 do :
13368 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
13369 #include <sys/socket.h>
13372 if test "x$ac_cv_header_net_if_h" = xyes; then :
13373 cat >>confdefs.h <<_ACEOF
13374 #define HAVE_NET_IF_H 1
13375 _ACEOF
13379 done
13382 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
13383 # is included first.
13384 for ac_header in sys/ucred.h
13385 do :
13386 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13387 #include <sys/param.h>
13390 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13391 cat >>confdefs.h <<_ACEOF
13392 #define HAVE_SYS_UCRED_H 1
13393 _ACEOF
13397 done
13400 # At least on IRIX, test for netinet/tcp.h will fail unless
13401 # netinet/in.h is included first.
13402 for ac_header in netinet/tcp.h
13403 do :
13404 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13405 #include <netinet/in.h>
13408 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13409 cat >>confdefs.h <<_ACEOF
13410 #define HAVE_NETINET_TCP_H 1
13411 _ACEOF
13415 done
13418 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13419 for ac_header in readline/readline.h
13420 do :
13421 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13422 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13423 cat >>confdefs.h <<_ACEOF
13424 #define HAVE_READLINE_READLINE_H 1
13425 _ACEOF
13427 else
13428 for ac_header in readline.h
13429 do :
13430 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13431 if test "x$ac_cv_header_readline_h" = xyes; then :
13432 cat >>confdefs.h <<_ACEOF
13433 #define HAVE_READLINE_H 1
13434 _ACEOF
13436 else
13437 as_fn_error $? "readline header not found
13438 If you have readline already installed, see config.log for details on the
13439 failure. It is possible the compiler isn't looking in the proper directory.
13440 Use --without-readline to disable readline support." "$LINENO" 5
13443 done
13447 done
13449 for ac_header in readline/history.h
13450 do :
13451 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13452 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13453 cat >>confdefs.h <<_ACEOF
13454 #define HAVE_READLINE_HISTORY_H 1
13455 _ACEOF
13457 else
13458 for ac_header in history.h
13459 do :
13460 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13461 if test "x$ac_cv_header_history_h" = xyes; then :
13462 cat >>confdefs.h <<_ACEOF
13463 #define HAVE_HISTORY_H 1
13464 _ACEOF
13466 else
13467 as_fn_error $? "history header not found
13468 If you have readline already installed, see config.log for details on the
13469 failure. It is possible the compiler isn't looking in the proper directory.
13470 Use --without-readline to disable readline support." "$LINENO" 5
13473 done
13477 done
13481 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13482 # Some installations of libedit usurp /usr/include/readline/, which seems
13483 # bad practice, since in combined installations readline will have its headers
13484 # there. We might have to resort to AC_EGREP checks to make sure we found
13485 # the proper header...
13486 for ac_header in editline/readline.h
13487 do :
13488 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13489 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13490 cat >>confdefs.h <<_ACEOF
13491 #define HAVE_EDITLINE_READLINE_H 1
13492 _ACEOF
13494 else
13495 for ac_header in readline.h
13496 do :
13497 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13498 if test "x$ac_cv_header_readline_h" = xyes; then :
13499 cat >>confdefs.h <<_ACEOF
13500 #define HAVE_READLINE_H 1
13501 _ACEOF
13503 else
13504 for ac_header in readline/readline.h
13505 do :
13506 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13507 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13508 cat >>confdefs.h <<_ACEOF
13509 #define HAVE_READLINE_READLINE_H 1
13510 _ACEOF
13512 else
13513 as_fn_error $? "readline header not found
13514 If you have libedit already installed, see config.log for details on the
13515 failure. It is possible the compiler isn't looking in the proper directory.
13516 Use --without-readline to disable libedit support." "$LINENO" 5
13519 done
13523 done
13527 done
13529 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13530 # not be there at all. Hence, don't complain if not found. We must check
13531 # though, since in yet other versions it is an independent header.
13532 for ac_header in editline/history.h
13533 do :
13534 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13535 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13536 cat >>confdefs.h <<_ACEOF
13537 #define HAVE_EDITLINE_HISTORY_H 1
13538 _ACEOF
13540 else
13541 for ac_header in history.h
13542 do :
13543 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13544 if test "x$ac_cv_header_history_h" = xyes; then :
13545 cat >>confdefs.h <<_ACEOF
13546 #define HAVE_HISTORY_H 1
13547 _ACEOF
13549 else
13550 for ac_header in readline/history.h
13551 do :
13552 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13553 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13554 cat >>confdefs.h <<_ACEOF
13555 #define HAVE_READLINE_HISTORY_H 1
13556 _ACEOF
13560 done
13564 done
13568 done
13572 if test "$with_zlib" = yes; then
13573 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13574 if test "x$ac_cv_header_zlib_h" = xyes; then :
13576 else
13577 as_fn_error $? "zlib header not found
13578 If you have zlib already installed, see config.log for details on the
13579 failure. It is possible the compiler isn't looking in the proper directory.
13580 Use --without-zlib to disable zlib support." "$LINENO" 5
13586 if test "$with_gssapi" = yes ; then
13587 for ac_header in gssapi/gssapi.h
13588 do :
13589 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13590 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13591 cat >>confdefs.h <<_ACEOF
13592 #define HAVE_GSSAPI_GSSAPI_H 1
13593 _ACEOF
13595 else
13596 for ac_header in gssapi.h
13597 do :
13598 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13599 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13600 cat >>confdefs.h <<_ACEOF
13601 #define HAVE_GSSAPI_H 1
13602 _ACEOF
13604 else
13605 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13608 done
13612 done
13616 if test "$with_openssl" = yes ; then
13617 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13618 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13620 else
13621 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13625 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13626 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13628 else
13629 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13635 if test "$with_pam" = yes ; then
13636 for ac_header in security/pam_appl.h
13637 do :
13638 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13639 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13640 cat >>confdefs.h <<_ACEOF
13641 #define HAVE_SECURITY_PAM_APPL_H 1
13642 _ACEOF
13644 else
13645 for ac_header in pam/pam_appl.h
13646 do :
13647 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13648 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13649 cat >>confdefs.h <<_ACEOF
13650 #define HAVE_PAM_PAM_APPL_H 1
13651 _ACEOF
13653 else
13654 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13657 done
13661 done
13665 if test "$with_bsd_auth" = yes ; then
13666 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13667 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13669 else
13670 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13676 if test "$with_systemd" = yes ; then
13677 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13678 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13680 else
13681 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13687 if test "$with_libxml" = yes ; then
13688 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13689 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13691 else
13692 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13698 if test "$with_libxslt" = yes ; then
13699 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13700 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13702 else
13703 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13709 if test "$with_ldap" = yes ; then
13710 if test "$PORTNAME" != "win32"; then
13711 for ac_header in ldap.h
13712 do :
13713 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13714 if test "x$ac_cv_header_ldap_h" = xyes; then :
13715 cat >>confdefs.h <<_ACEOF
13716 #define HAVE_LDAP_H 1
13717 _ACEOF
13719 else
13720 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13723 done
13725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13726 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13727 if ${pgac_cv_ldap_safe+:} false; then :
13728 $as_echo_n "(cached) " >&6
13729 else
13730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13731 /* end confdefs.h. */
13732 #include <ldap.h>
13733 #if !defined(LDAP_VENDOR_VERSION) || \
13734 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13735 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13736 choke me
13737 #endif
13739 main ()
13743 return 0;
13745 _ACEOF
13746 if ac_fn_c_try_compile "$LINENO"; then :
13747 pgac_cv_ldap_safe=yes
13748 else
13749 pgac_cv_ldap_safe=no
13751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13754 $as_echo "$pgac_cv_ldap_safe" >&6; }
13756 if test "$pgac_cv_ldap_safe" != yes; then
13757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13758 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13759 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13760 *** also uses LDAP will crash on exit." >&5
13761 $as_echo "$as_me: WARNING:
13762 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13763 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13764 *** also uses LDAP will crash on exit." >&2;}
13766 else
13767 for ac_header in winldap.h
13768 do :
13769 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13770 #include <windows.h>
13773 if test "x$ac_cv_header_winldap_h" = xyes; then :
13774 cat >>confdefs.h <<_ACEOF
13775 #define HAVE_WINLDAP_H 1
13776 _ACEOF
13778 else
13779 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13782 done
13787 if test "$with_bonjour" = yes ; then
13788 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13789 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13791 else
13792 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13798 # for contrib/uuid-ossp
13799 if test "$with_uuid" = bsd ; then
13800 for ac_header in uuid.h
13801 do :
13802 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13803 if test "x$ac_cv_header_uuid_h" = xyes; then :
13804 cat >>confdefs.h <<_ACEOF
13805 #define HAVE_UUID_H 1
13806 _ACEOF
13807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13808 /* end confdefs.h. */
13809 #include <uuid.h>
13811 _ACEOF
13812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13813 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13815 else
13816 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13818 rm -f conftest*
13820 else
13821 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13824 done
13826 elif test "$with_uuid" = e2fs ; then
13827 for ac_header in uuid/uuid.h
13828 do :
13829 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13830 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13831 cat >>confdefs.h <<_ACEOF
13832 #define HAVE_UUID_UUID_H 1
13833 _ACEOF
13834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13835 /* end confdefs.h. */
13836 #include <uuid/uuid.h>
13838 _ACEOF
13839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13840 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13842 else
13843 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13845 rm -f conftest*
13847 else
13848 for ac_header in uuid.h
13849 do :
13850 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13851 if test "x$ac_cv_header_uuid_h" = xyes; then :
13852 cat >>confdefs.h <<_ACEOF
13853 #define HAVE_UUID_H 1
13854 _ACEOF
13855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13856 /* end confdefs.h. */
13857 #include <uuid.h>
13859 _ACEOF
13860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13861 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13863 else
13864 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13866 rm -f conftest*
13868 else
13869 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13872 done
13876 done
13878 elif test "$with_uuid" = ossp ; then
13879 for ac_header in ossp/uuid.h
13880 do :
13881 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13882 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13883 cat >>confdefs.h <<_ACEOF
13884 #define HAVE_OSSP_UUID_H 1
13885 _ACEOF
13886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887 /* end confdefs.h. */
13888 #include <ossp/uuid.h>
13890 _ACEOF
13891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13892 $EGREP "uuid_export" >/dev/null 2>&1; then :
13894 else
13895 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13897 rm -f conftest*
13899 else
13900 for ac_header in uuid.h
13901 do :
13902 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13903 if test "x$ac_cv_header_uuid_h" = xyes; then :
13904 cat >>confdefs.h <<_ACEOF
13905 #define HAVE_UUID_H 1
13906 _ACEOF
13907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13908 /* end confdefs.h. */
13909 #include <uuid.h>
13911 _ACEOF
13912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13913 $EGREP "uuid_export" >/dev/null 2>&1; then :
13915 else
13916 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13918 rm -f conftest*
13920 else
13921 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13924 done
13928 done
13932 if test "$PORTNAME" = "win32" ; then
13933 for ac_header in crtdefs.h
13934 do :
13935 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13936 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13937 cat >>confdefs.h <<_ACEOF
13938 #define HAVE_CRTDEFS_H 1
13939 _ACEOF
13943 done
13948 ## Types, structures, compiler characteristics
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13952 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13953 if ${ac_cv_c_bigendian+:} false; then :
13954 $as_echo_n "(cached) " >&6
13955 else
13956 ac_cv_c_bigendian=unknown
13957 # See if we're dealing with a universal compiler.
13958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959 /* end confdefs.h. */
13960 #ifndef __APPLE_CC__
13961 not a universal capable compiler
13962 #endif
13963 typedef int dummy;
13965 _ACEOF
13966 if ac_fn_c_try_compile "$LINENO"; then :
13968 # Check for potential -arch flags. It is not universal unless
13969 # there are at least two -arch flags with different values.
13970 ac_arch=
13971 ac_prev=
13972 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13973 if test -n "$ac_prev"; then
13974 case $ac_word in
13975 i?86 | x86_64 | ppc | ppc64)
13976 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13977 ac_arch=$ac_word
13978 else
13979 ac_cv_c_bigendian=universal
13980 break
13983 esac
13984 ac_prev=
13985 elif test "x$ac_word" = "x-arch"; then
13986 ac_prev=arch
13988 done
13990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13991 if test $ac_cv_c_bigendian = unknown; then
13992 # See if sys/param.h defines the BYTE_ORDER macro.
13993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994 /* end confdefs.h. */
13995 #include <sys/types.h>
13996 #include <sys/param.h>
13999 main ()
14001 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14002 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14003 && LITTLE_ENDIAN)
14004 bogus endian macros
14005 #endif
14008 return 0;
14010 _ACEOF
14011 if ac_fn_c_try_compile "$LINENO"; then :
14012 # It does; now see whether it defined to BIG_ENDIAN or not.
14013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14014 /* end confdefs.h. */
14015 #include <sys/types.h>
14016 #include <sys/param.h>
14019 main ()
14021 #if BYTE_ORDER != BIG_ENDIAN
14022 not big endian
14023 #endif
14026 return 0;
14028 _ACEOF
14029 if ac_fn_c_try_compile "$LINENO"; then :
14030 ac_cv_c_bigendian=yes
14031 else
14032 ac_cv_c_bigendian=no
14034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14038 if test $ac_cv_c_bigendian = unknown; then
14039 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14041 /* end confdefs.h. */
14042 #include <limits.h>
14045 main ()
14047 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14048 bogus endian macros
14049 #endif
14052 return 0;
14054 _ACEOF
14055 if ac_fn_c_try_compile "$LINENO"; then :
14056 # It does; now see whether it defined to _BIG_ENDIAN or not.
14057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14058 /* end confdefs.h. */
14059 #include <limits.h>
14062 main ()
14064 #ifndef _BIG_ENDIAN
14065 not big endian
14066 #endif
14069 return 0;
14071 _ACEOF
14072 if ac_fn_c_try_compile "$LINENO"; then :
14073 ac_cv_c_bigendian=yes
14074 else
14075 ac_cv_c_bigendian=no
14077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14081 if test $ac_cv_c_bigendian = unknown; then
14082 # Compile a test program.
14083 if test "$cross_compiling" = yes; then :
14084 # Try to guess by grepping values from an object file.
14085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14086 /* end confdefs.h. */
14087 short int ascii_mm[] =
14088 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14089 short int ascii_ii[] =
14090 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14091 int use_ascii (int i) {
14092 return ascii_mm[i] + ascii_ii[i];
14094 short int ebcdic_ii[] =
14095 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14096 short int ebcdic_mm[] =
14097 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14098 int use_ebcdic (int i) {
14099 return ebcdic_mm[i] + ebcdic_ii[i];
14101 extern int foo;
14104 main ()
14106 return use_ascii (foo) == use_ebcdic (foo);
14108 return 0;
14110 _ACEOF
14111 if ac_fn_c_try_compile "$LINENO"; then :
14112 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14113 ac_cv_c_bigendian=yes
14115 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14116 if test "$ac_cv_c_bigendian" = unknown; then
14117 ac_cv_c_bigendian=no
14118 else
14119 # finding both strings is unlikely to happen, but who knows?
14120 ac_cv_c_bigendian=unknown
14124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14125 else
14126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14127 /* end confdefs.h. */
14128 $ac_includes_default
14130 main ()
14133 /* Are we little or big endian? From Harbison&Steele. */
14134 union
14136 long int l;
14137 char c[sizeof (long int)];
14138 } u;
14139 u.l = 1;
14140 return u.c[sizeof (long int) - 1] == 1;
14143 return 0;
14145 _ACEOF
14146 if ac_fn_c_try_run "$LINENO"; then :
14147 ac_cv_c_bigendian=no
14148 else
14149 ac_cv_c_bigendian=yes
14151 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14152 conftest.$ac_objext conftest.beam conftest.$ac_ext
14157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14158 $as_echo "$ac_cv_c_bigendian" >&6; }
14159 case $ac_cv_c_bigendian in #(
14160 yes)
14161 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14162 ;; #(
14164 ;; #(
14165 universal)
14167 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14169 ;; #(
14171 as_fn_error $? "unknown endianness
14172 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14173 esac
14175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14176 $as_echo_n "checking for inline... " >&6; }
14177 if ${ac_cv_c_inline+:} false; then :
14178 $as_echo_n "(cached) " >&6
14179 else
14180 ac_cv_c_inline=no
14181 for ac_kw in inline __inline__ __inline; do
14182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14183 /* end confdefs.h. */
14184 #ifndef __cplusplus
14185 typedef int foo_t;
14186 static $ac_kw foo_t static_foo () {return 0; }
14187 $ac_kw foo_t foo () {return 0; }
14188 #endif
14190 _ACEOF
14191 if ac_fn_c_try_compile "$LINENO"; then :
14192 ac_cv_c_inline=$ac_kw
14194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14195 test "$ac_cv_c_inline" != no && break
14196 done
14199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14200 $as_echo "$ac_cv_c_inline" >&6; }
14202 case $ac_cv_c_inline in
14203 inline | yes) ;;
14205 case $ac_cv_c_inline in
14206 no) ac_val=;;
14207 *) ac_val=$ac_cv_c_inline;;
14208 esac
14209 cat >>confdefs.h <<_ACEOF
14210 #ifndef __cplusplus
14211 #define inline $ac_val
14212 #endif
14213 _ACEOF
14215 esac
14217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14218 $as_echo_n "checking for printf format archetype... " >&6; }
14219 if ${pgac_cv_printf_archetype+:} false; then :
14220 $as_echo_n "(cached) " >&6
14221 else
14222 pgac_cv_printf_archetype=gnu_printf
14223 ac_save_c_werror_flag=$ac_c_werror_flag
14224 ac_c_werror_flag=yes
14225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14226 /* end confdefs.h. */
14227 extern void pgac_write(int ignore, const char *fmt,...)
14228 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14230 main ()
14232 pgac_write(0, "error %s: %m", "foo");
14234 return 0;
14236 _ACEOF
14237 if ac_fn_c_try_compile "$LINENO"; then :
14238 ac_archetype_ok=yes
14239 else
14240 ac_archetype_ok=no
14242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14243 ac_c_werror_flag=$ac_save_c_werror_flag
14245 if [ "$ac_archetype_ok" = no ]; then
14246 pgac_cv_printf_archetype=__syslog__
14247 ac_save_c_werror_flag=$ac_c_werror_flag
14248 ac_c_werror_flag=yes
14249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14250 /* end confdefs.h. */
14251 extern void pgac_write(int ignore, const char *fmt,...)
14252 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14254 main ()
14256 pgac_write(0, "error %s: %m", "foo");
14258 return 0;
14260 _ACEOF
14261 if ac_fn_c_try_compile "$LINENO"; then :
14262 ac_archetype_ok=yes
14263 else
14264 ac_archetype_ok=no
14266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14267 ac_c_werror_flag=$ac_save_c_werror_flag
14269 if [ "$ac_archetype_ok" = no ]; then
14270 pgac_cv_printf_archetype=printf
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14275 $as_echo "$pgac_cv_printf_archetype" >&6; }
14277 cat >>confdefs.h <<_ACEOF
14278 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14279 _ACEOF
14283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
14284 $as_echo_n "checking for flexible array members... " >&6; }
14285 if ${ac_cv_c_flexmember+:} false; then :
14286 $as_echo_n "(cached) " >&6
14287 else
14288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14289 /* end confdefs.h. */
14290 #include <stdlib.h>
14291 #include <stdio.h>
14292 #include <stddef.h>
14293 struct s { int n; double d[]; };
14295 main ()
14297 int m = getchar ();
14298 struct s *p = malloc (offsetof (struct s, d)
14299 + m * sizeof (double));
14300 p->d[0] = 0.0;
14301 return p->d != (double *) NULL;
14303 return 0;
14305 _ACEOF
14306 if ac_fn_c_try_compile "$LINENO"; then :
14307 ac_cv_c_flexmember=yes
14308 else
14309 ac_cv_c_flexmember=no
14311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
14314 $as_echo "$ac_cv_c_flexmember" >&6; }
14315 if test $ac_cv_c_flexmember = yes; then
14317 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
14319 else
14320 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
14325 $as_echo_n "checking for signed types... " >&6; }
14326 if ${pgac_cv_c_signed+:} false; then :
14327 $as_echo_n "(cached) " >&6
14328 else
14329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14330 /* end confdefs.h. */
14333 main ()
14335 signed char c; signed short s; signed int i;
14337 return 0;
14339 _ACEOF
14340 if ac_fn_c_try_compile "$LINENO"; then :
14341 pgac_cv_c_signed=yes
14342 else
14343 pgac_cv_c_signed=no
14345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
14348 $as_echo "$pgac_cv_c_signed" >&6; }
14349 if test x"$pgac_cv_c_signed" = xno ; then
14351 $as_echo "#define signed /**/" >>confdefs.h
14354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
14355 $as_echo_n "checking for __func__... " >&6; }
14356 if ${pgac_cv_funcname_func_support+:} false; then :
14357 $as_echo_n "(cached) " >&6
14358 else
14359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14360 /* end confdefs.h. */
14361 #include <stdio.h>
14363 main ()
14365 printf("%s\n", __func__);
14367 return 0;
14369 _ACEOF
14370 if ac_fn_c_try_compile "$LINENO"; then :
14371 pgac_cv_funcname_func_support=yes
14372 else
14373 pgac_cv_funcname_func_support=no
14375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
14378 $as_echo "$pgac_cv_funcname_func_support" >&6; }
14379 if test x"$pgac_cv_funcname_func_support" = xyes ; then
14381 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
14383 else
14384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
14385 $as_echo_n "checking for __FUNCTION__... " >&6; }
14386 if ${pgac_cv_funcname_function_support+:} false; then :
14387 $as_echo_n "(cached) " >&6
14388 else
14389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14390 /* end confdefs.h. */
14391 #include <stdio.h>
14393 main ()
14395 printf("%s\n", __FUNCTION__);
14397 return 0;
14399 _ACEOF
14400 if ac_fn_c_try_compile "$LINENO"; then :
14401 pgac_cv_funcname_function_support=yes
14402 else
14403 pgac_cv_funcname_function_support=no
14405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
14408 $as_echo "$pgac_cv_funcname_function_support" >&6; }
14409 if test x"$pgac_cv_funcname_function_support" = xyes ; then
14411 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14416 $as_echo_n "checking for _Static_assert... " >&6; }
14417 if ${pgac_cv__static_assert+:} false; then :
14418 $as_echo_n "(cached) " >&6
14419 else
14420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14421 /* end confdefs.h. */
14424 main ()
14426 ({ _Static_assert(1, "foo"); })
14428 return 0;
14430 _ACEOF
14431 if ac_fn_c_try_link "$LINENO"; then :
14432 pgac_cv__static_assert=yes
14433 else
14434 pgac_cv__static_assert=no
14436 rm -f core conftest.err conftest.$ac_objext \
14437 conftest$ac_exeext conftest.$ac_ext
14439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14440 $as_echo "$pgac_cv__static_assert" >&6; }
14441 if test x"$pgac_cv__static_assert" = xyes ; then
14443 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14447 $as_echo_n "checking for typeof... " >&6; }
14448 if ${pgac_cv_c_typeof+:} false; then :
14449 $as_echo_n "(cached) " >&6
14450 else
14451 pgac_cv_c_typeof=no
14452 for pgac_kw in typeof __typeof__ decltype; do
14453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14454 /* end confdefs.h. */
14457 main ()
14459 int x = 0;
14460 $pgac_kw(x) y;
14461 y = x;
14462 return y;
14464 return 0;
14466 _ACEOF
14467 if ac_fn_c_try_compile "$LINENO"; then :
14468 pgac_cv_c_typeof=$pgac_kw
14470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14471 test "$pgac_cv_c_typeof" != no && break
14472 done
14474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14475 $as_echo "$pgac_cv_c_typeof" >&6; }
14476 if test "$pgac_cv_c_typeof" != no; then
14478 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14480 if test "$pgac_cv_c_typeof" != typeof; then
14482 cat >>confdefs.h <<_ACEOF
14483 #define typeof $pgac_cv_c_typeof
14484 _ACEOF
14488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14489 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14490 if ${pgac_cv__types_compatible+:} false; then :
14491 $as_echo_n "(cached) " >&6
14492 else
14493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14494 /* end confdefs.h. */
14497 main ()
14499 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14501 return 0;
14503 _ACEOF
14504 if ac_fn_c_try_compile "$LINENO"; then :
14505 pgac_cv__types_compatible=yes
14506 else
14507 pgac_cv__types_compatible=no
14509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14512 $as_echo "$pgac_cv__types_compatible" >&6; }
14513 if test x"$pgac_cv__types_compatible" = xyes ; then
14515 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14519 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14520 if ${pgac_cv__builtin_constant_p+:} false; then :
14521 $as_echo_n "(cached) " >&6
14522 else
14523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14524 /* end confdefs.h. */
14525 static int x;
14526 static int y[__builtin_constant_p(x) ? x : 1];
14527 static int z[__builtin_constant_p("string literal") ? 1 : x];
14530 _ACEOF
14531 if ac_fn_c_try_compile "$LINENO"; then :
14532 pgac_cv__builtin_constant_p=yes
14533 else
14534 pgac_cv__builtin_constant_p=no
14536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14539 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14540 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14542 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14546 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14547 if ${pgac_cv__builtin_unreachable+:} false; then :
14548 $as_echo_n "(cached) " >&6
14549 else
14550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14551 /* end confdefs.h. */
14554 main ()
14556 __builtin_unreachable();
14558 return 0;
14560 _ACEOF
14561 if ac_fn_c_try_link "$LINENO"; then :
14562 pgac_cv__builtin_unreachable=yes
14563 else
14564 pgac_cv__builtin_unreachable=no
14566 rm -f core conftest.err conftest.$ac_objext \
14567 conftest$ac_exeext conftest.$ac_ext
14569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14570 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14571 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14573 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14577 $as_echo_n "checking for computed goto support... " >&6; }
14578 if ${pgac_cv_computed_goto+:} false; then :
14579 $as_echo_n "(cached) " >&6
14580 else
14581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14582 /* end confdefs.h. */
14585 main ()
14587 void *labeladdrs[] = {&&my_label};
14588 goto *labeladdrs[0];
14589 my_label:
14590 return 1;
14593 return 0;
14595 _ACEOF
14596 if ac_fn_c_try_compile "$LINENO"; then :
14597 pgac_cv_computed_goto=yes
14598 else
14599 pgac_cv_computed_goto=no
14601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14604 $as_echo "$pgac_cv_computed_goto" >&6; }
14605 if test x"$pgac_cv_computed_goto" = xyes ; then
14607 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14611 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14612 if ${ac_cv_struct_tm+:} false; then :
14613 $as_echo_n "(cached) " >&6
14614 else
14615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616 /* end confdefs.h. */
14617 #include <sys/types.h>
14618 #include <time.h>
14621 main ()
14623 struct tm tm;
14624 int *p = &tm.tm_sec;
14625 return !p;
14627 return 0;
14629 _ACEOF
14630 if ac_fn_c_try_compile "$LINENO"; then :
14631 ac_cv_struct_tm=time.h
14632 else
14633 ac_cv_struct_tm=sys/time.h
14635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14638 $as_echo "$ac_cv_struct_tm" >&6; }
14639 if test $ac_cv_struct_tm = sys/time.h; then
14641 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14645 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14646 #include <$ac_cv_struct_tm>
14649 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14651 cat >>confdefs.h <<_ACEOF
14652 #define HAVE_STRUCT_TM_TM_ZONE 1
14653 _ACEOF
14658 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14660 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14664 $as_echo_n "checking for tzname... " >&6; }
14665 if ${ac_cv_var_tzname+:} false; then :
14666 $as_echo_n "(cached) " >&6
14667 else
14668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14669 /* end confdefs.h. */
14670 #include <stdlib.h>
14671 #include <time.h>
14672 #ifndef tzname /* For SGI. */
14673 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
14674 #endif
14677 main ()
14679 atoi(*tzname);
14681 return 0;
14683 _ACEOF
14684 if ac_fn_c_try_link "$LINENO"; then :
14685 ac_cv_var_tzname=yes
14686 else
14687 ac_cv_var_tzname=no
14689 rm -f core conftest.err conftest.$ac_objext \
14690 conftest$ac_exeext conftest.$ac_ext
14692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14693 $as_echo "$ac_cv_var_tzname" >&6; }
14694 if test $ac_cv_var_tzname = yes; then
14696 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14700 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14701 #ifdef HAVE_SYS_IPC_H
14702 #include <sys/ipc.h>
14703 #endif
14704 #ifdef HAVE_SYS_SEM_H
14705 #include <sys/sem.h>
14706 #endif
14708 if test "x$ac_cv_type_union_semun" = xyes; then :
14710 cat >>confdefs.h <<_ACEOF
14711 #define HAVE_UNION_SEMUN 1
14712 _ACEOF
14717 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14718 #ifdef HAVE_SYS_UN_H
14719 #include <sys/un.h>
14720 #endif
14723 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14725 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14729 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14730 #include <sys/socket.h>
14733 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14735 cat >>confdefs.h <<_ACEOF
14736 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14737 _ACEOF
14742 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14743 #include <sys/socket.h>
14746 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14748 cat >>confdefs.h <<_ACEOF
14749 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14750 _ACEOF
14754 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14755 #include <sys/socket.h>
14758 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14760 cat >>confdefs.h <<_ACEOF
14761 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14762 _ACEOF
14766 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14767 #include <sys/socket.h>
14770 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14772 cat >>confdefs.h <<_ACEOF
14773 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14774 _ACEOF
14778 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14779 #include <sys/socket.h>
14782 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14784 cat >>confdefs.h <<_ACEOF
14785 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14786 _ACEOF
14790 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14791 #include <sys/socket.h>
14794 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14796 cat >>confdefs.h <<_ACEOF
14797 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14798 _ACEOF
14803 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14804 #include <sys/socket.h>
14805 #include <netdb.h>
14808 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14810 cat >>confdefs.h <<_ACEOF
14811 #define HAVE_STRUCT_ADDRINFO 1
14812 _ACEOF
14818 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14819 if test "x$ac_cv_type_intptr_t" = xyes; then :
14821 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14823 else
14824 for ac_type in 'int' 'long int' 'long long int'; do
14825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14826 /* end confdefs.h. */
14827 $ac_includes_default
14829 main ()
14831 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14832 test_array [0] = 0;
14833 return test_array [0];
14836 return 0;
14838 _ACEOF
14839 if ac_fn_c_try_compile "$LINENO"; then :
14841 cat >>confdefs.h <<_ACEOF
14842 #define intptr_t $ac_type
14843 _ACEOF
14845 ac_type=
14847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14848 test -z "$ac_type" && break
14849 done
14854 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14855 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14857 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14859 else
14860 for ac_type in 'unsigned int' 'unsigned long int' \
14861 'unsigned long long int'; do
14862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14863 /* end confdefs.h. */
14864 $ac_includes_default
14866 main ()
14868 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14869 test_array [0] = 0;
14870 return test_array [0];
14873 return 0;
14875 _ACEOF
14876 if ac_fn_c_try_compile "$LINENO"; then :
14878 cat >>confdefs.h <<_ACEOF
14879 #define uintptr_t $ac_type
14880 _ACEOF
14882 ac_type=
14884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14885 test -z "$ac_type" && break
14886 done
14891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14892 $as_echo_n "checking for unsigned long long int... " >&6; }
14893 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14894 $as_echo_n "(cached) " >&6
14895 else
14896 ac_cv_type_unsigned_long_long_int=yes
14897 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14899 /* end confdefs.h. */
14901 /* For now, do not test the preprocessor; as of 2007 there are too many
14902 implementations with broken preprocessors. Perhaps this can
14903 be revisited in 2012. In the meantime, code should not expect
14904 #if to work with literals wider than 32 bits. */
14905 /* Test literals. */
14906 long long int ll = 9223372036854775807ll;
14907 long long int nll = -9223372036854775807LL;
14908 unsigned long long int ull = 18446744073709551615ULL;
14909 /* Test constant expressions. */
14910 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14911 ? 1 : -1)];
14912 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14913 ? 1 : -1)];
14914 int i = 63;
14916 main ()
14918 /* Test availability of runtime routines for shift and division. */
14919 long long int llmax = 9223372036854775807ll;
14920 unsigned long long int ullmax = 18446744073709551615ull;
14921 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14922 | (llmax / ll) | (llmax % ll)
14923 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14924 | (ullmax / ull) | (ullmax % ull));
14926 return 0;
14929 _ACEOF
14930 if ac_fn_c_try_link "$LINENO"; then :
14932 else
14933 ac_cv_type_unsigned_long_long_int=no
14935 rm -f core conftest.err conftest.$ac_objext \
14936 conftest$ac_exeext conftest.$ac_ext
14939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14940 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14941 if test $ac_cv_type_unsigned_long_long_int = yes; then
14943 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14950 $as_echo_n "checking for long long int... " >&6; }
14951 if ${ac_cv_type_long_long_int+:} false; then :
14952 $as_echo_n "(cached) " >&6
14953 else
14954 ac_cv_type_long_long_int=yes
14955 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14956 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14957 if test $ac_cv_type_long_long_int = yes; then
14958 if test "$cross_compiling" = yes; then :
14960 else
14961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14962 /* end confdefs.h. */
14963 #include <limits.h>
14964 #ifndef LLONG_MAX
14965 # define HALF \
14966 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14967 # define LLONG_MAX (HALF - 1 + HALF)
14968 #endif
14970 main ()
14972 long long int n = 1;
14973 int i;
14974 for (i = 0; ; i++)
14976 long long int m = n << i;
14977 if (m >> i != n)
14978 return 1;
14979 if (LLONG_MAX / 2 < m)
14980 break;
14982 return 0;
14984 return 0;
14986 _ACEOF
14987 if ac_fn_c_try_run "$LINENO"; then :
14989 else
14990 ac_cv_type_long_long_int=no
14992 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14993 conftest.$ac_objext conftest.beam conftest.$ac_ext
14999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
15000 $as_echo "$ac_cv_type_long_long_int" >&6; }
15001 if test $ac_cv_type_long_long_int = yes; then
15003 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
15008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
15009 $as_echo_n "checking for locale_t... " >&6; }
15010 if ${pgac_cv_type_locale_t+:} false; then :
15011 $as_echo_n "(cached) " >&6
15012 else
15013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15014 /* end confdefs.h. */
15015 #include <locale.h>
15016 locale_t x;
15018 main ()
15022 return 0;
15024 _ACEOF
15025 if ac_fn_c_try_compile "$LINENO"; then :
15026 pgac_cv_type_locale_t=yes
15027 else
15028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15029 /* end confdefs.h. */
15030 #include <xlocale.h>
15031 locale_t x;
15033 main ()
15037 return 0;
15039 _ACEOF
15040 if ac_fn_c_try_compile "$LINENO"; then :
15041 pgac_cv_type_locale_t='yes (in xlocale.h)'
15042 else
15043 pgac_cv_type_locale_t=no
15045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
15050 $as_echo "$pgac_cv_type_locale_t" >&6; }
15051 if test "$pgac_cv_type_locale_t" != no; then
15053 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
15056 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
15058 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
15062 # MSVC doesn't cope well with defining restrict to __restrict, the
15063 # spelling it understands, because it conflicts with
15064 # __declspec(restrict). Therefore we define pg_restrict to the
15065 # appropriate definition, which presumably won't conflict.
15067 # Allow platforms with buggy compilers to force restrict to not be
15068 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
15069 # template.
15070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15071 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15072 if ${ac_cv_c_restrict+:} false; then :
15073 $as_echo_n "(cached) " >&6
15074 else
15075 ac_cv_c_restrict=no
15076 # The order here caters to the fact that C++ does not require restrict.
15077 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15079 /* end confdefs.h. */
15080 typedef int * int_ptr;
15081 int foo (int_ptr $ac_kw ip) {
15082 return ip[0];
15085 main ()
15087 int s[1];
15088 int * $ac_kw t = s;
15089 t[0] = 0;
15090 return foo(t)
15092 return 0;
15094 _ACEOF
15095 if ac_fn_c_try_compile "$LINENO"; then :
15096 ac_cv_c_restrict=$ac_kw
15098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15099 test "$ac_cv_c_restrict" != no && break
15100 done
15103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15104 $as_echo "$ac_cv_c_restrict" >&6; }
15106 case $ac_cv_c_restrict in
15107 restrict) ;;
15108 no) $as_echo "#define restrict /**/" >>confdefs.h
15110 *) cat >>confdefs.h <<_ACEOF
15111 #define restrict $ac_cv_c_restrict
15112 _ACEOF
15114 esac
15116 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15117 pg_restrict=""
15118 else
15119 pg_restrict="$ac_cv_c_restrict"
15122 cat >>confdefs.h <<_ACEOF
15123 #define pg_restrict $pg_restrict
15124 _ACEOF
15127 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
15128 #include <sys/param.h>
15129 #ifdef HAVE_SYS_UCRED_H
15130 #include <sys/ucred.h>
15131 #endif
15133 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
15135 cat >>confdefs.h <<_ACEOF
15136 #define HAVE_STRUCT_CMSGCRED 1
15137 _ACEOF
15143 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15144 #include <getopt.h>
15145 #endif
15147 if test "x$ac_cv_type_struct_option" = xyes; then :
15149 cat >>confdefs.h <<_ACEOF
15150 #define HAVE_STRUCT_OPTION 1
15151 _ACEOF
15157 if test "$with_zlib" = yes; then
15158 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
15159 # did not). While we could work around the lack of z_streamp, it
15160 # seems unwise to encourage people to use such old zlib versions...
15161 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
15163 if test "x$ac_cv_type_z_streamp" = xyes; then :
15165 else
15166 as_fn_error $? "zlib version is too old
15167 Use --without-zlib to disable zlib support." "$LINENO" 5
15172 case $host_cpu in
15173 x86_64)
15174 # On x86_64, check if we can compile a popcntq instruction
15175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15176 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15177 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15178 $as_echo_n "(cached) " >&6
15179 else
15180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15181 /* end confdefs.h. */
15184 main ()
15186 long long x = 1; long long r;
15187 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15189 return 0;
15191 _ACEOF
15192 if ac_fn_c_try_compile "$LINENO"; then :
15193 pgac_cv_have_x86_64_popcntq=yes
15194 else
15195 pgac_cv_have_x86_64_popcntq=no
15197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15200 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15201 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15203 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15207 ppc*|powerpc*)
15208 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
15209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
15210 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
15211 if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
15212 $as_echo_n "(cached) " >&6
15213 else
15214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15215 /* end confdefs.h. */
15218 main ()
15220 int a = 0; int *p = &a; int r;
15221 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
15223 return 0;
15225 _ACEOF
15226 if ac_fn_c_try_compile "$LINENO"; then :
15227 pgac_cv_have_ppc_mutex_hint=yes
15228 else
15229 pgac_cv_have_ppc_mutex_hint=no
15231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
15234 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
15235 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
15237 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
15241 esac
15243 # Check largefile support. You might think this is a system service not a
15244 # compiler characteristic, but you'd be wrong. We must check this before
15245 # probing existence of related functions such as fseeko, since the largefile
15246 # defines can affect what is generated for that.
15247 if test "$PORTNAME" != "win32"; then
15248 # Check whether --enable-largefile was given.
15249 if test "${enable_largefile+set}" = set; then :
15250 enableval=$enable_largefile;
15253 if test "$enable_largefile" != no; then
15255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15256 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15257 if ${ac_cv_sys_largefile_CC+:} false; then :
15258 $as_echo_n "(cached) " >&6
15259 else
15260 ac_cv_sys_largefile_CC=no
15261 if test "$GCC" != yes; then
15262 ac_save_CC=$CC
15263 while :; do
15264 # IRIX 6.2 and later do not support large files by default,
15265 # so use the C compiler's -n32 option if that helps.
15266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15267 /* end confdefs.h. */
15268 #include <sys/types.h>
15269 /* Check that off_t can represent 2**63 - 1 correctly.
15270 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15271 since some C++ compilers masquerading as C compilers
15272 incorrectly reject 9223372036854775807. */
15273 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15274 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15275 && LARGE_OFF_T % 2147483647 == 1)
15276 ? 1 : -1];
15278 main ()
15282 return 0;
15284 _ACEOF
15285 if ac_fn_c_try_compile "$LINENO"; then :
15286 break
15288 rm -f core conftest.err conftest.$ac_objext
15289 CC="$CC -n32"
15290 if ac_fn_c_try_compile "$LINENO"; then :
15291 ac_cv_sys_largefile_CC=' -n32'; break
15293 rm -f core conftest.err conftest.$ac_objext
15294 break
15295 done
15296 CC=$ac_save_CC
15297 rm -f conftest.$ac_ext
15300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15301 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15302 if test "$ac_cv_sys_largefile_CC" != no; then
15303 CC=$CC$ac_cv_sys_largefile_CC
15306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15307 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15308 if ${ac_cv_sys_file_offset_bits+:} false; then :
15309 $as_echo_n "(cached) " >&6
15310 else
15311 while :; do
15312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15313 /* end confdefs.h. */
15314 #include <sys/types.h>
15315 /* Check that off_t can represent 2**63 - 1 correctly.
15316 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15317 since some C++ compilers masquerading as C compilers
15318 incorrectly reject 9223372036854775807. */
15319 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15320 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15321 && LARGE_OFF_T % 2147483647 == 1)
15322 ? 1 : -1];
15324 main ()
15328 return 0;
15330 _ACEOF
15331 if ac_fn_c_try_compile "$LINENO"; then :
15332 ac_cv_sys_file_offset_bits=no; break
15334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336 /* end confdefs.h. */
15337 #define _FILE_OFFSET_BITS 64
15338 #include <sys/types.h>
15339 /* Check that off_t can represent 2**63 - 1 correctly.
15340 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15341 since some C++ compilers masquerading as C compilers
15342 incorrectly reject 9223372036854775807. */
15343 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15344 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15345 && LARGE_OFF_T % 2147483647 == 1)
15346 ? 1 : -1];
15348 main ()
15352 return 0;
15354 _ACEOF
15355 if ac_fn_c_try_compile "$LINENO"; then :
15356 ac_cv_sys_file_offset_bits=64; break
15358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15359 ac_cv_sys_file_offset_bits=unknown
15360 break
15361 done
15363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15364 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15365 case $ac_cv_sys_file_offset_bits in #(
15366 no | unknown) ;;
15368 cat >>confdefs.h <<_ACEOF
15369 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15370 _ACEOF
15372 esac
15373 rm -rf conftest*
15374 if test $ac_cv_sys_file_offset_bits = unknown; then
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15376 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15377 if ${ac_cv_sys_large_files+:} false; then :
15378 $as_echo_n "(cached) " >&6
15379 else
15380 while :; do
15381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15382 /* end confdefs.h. */
15383 #include <sys/types.h>
15384 /* Check that off_t can represent 2**63 - 1 correctly.
15385 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15386 since some C++ compilers masquerading as C compilers
15387 incorrectly reject 9223372036854775807. */
15388 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15389 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15390 && LARGE_OFF_T % 2147483647 == 1)
15391 ? 1 : -1];
15393 main ()
15397 return 0;
15399 _ACEOF
15400 if ac_fn_c_try_compile "$LINENO"; then :
15401 ac_cv_sys_large_files=no; break
15403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15405 /* end confdefs.h. */
15406 #define _LARGE_FILES 1
15407 #include <sys/types.h>
15408 /* Check that off_t can represent 2**63 - 1 correctly.
15409 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15410 since some C++ compilers masquerading as C compilers
15411 incorrectly reject 9223372036854775807. */
15412 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15413 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15414 && LARGE_OFF_T % 2147483647 == 1)
15415 ? 1 : -1];
15417 main ()
15421 return 0;
15423 _ACEOF
15424 if ac_fn_c_try_compile "$LINENO"; then :
15425 ac_cv_sys_large_files=1; break
15427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15428 ac_cv_sys_large_files=unknown
15429 break
15430 done
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15433 $as_echo "$ac_cv_sys_large_files" >&6; }
15434 case $ac_cv_sys_large_files in #(
15435 no | unknown) ;;
15437 cat >>confdefs.h <<_ACEOF
15438 #define _LARGE_FILES $ac_cv_sys_large_files
15439 _ACEOF
15441 esac
15442 rm -rf conftest*
15451 # The cast to long int works around a bug in the HP C Compiler
15452 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15453 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15454 # This bug is HP SR number 8606223364.
15455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15456 $as_echo_n "checking size of off_t... " >&6; }
15457 if ${ac_cv_sizeof_off_t+:} false; then :
15458 $as_echo_n "(cached) " >&6
15459 else
15460 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15462 else
15463 if test "$ac_cv_type_off_t" = yes; then
15464 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15465 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15466 as_fn_error 77 "cannot compute sizeof (off_t)
15467 See \`config.log' for more details" "$LINENO" 5; }
15468 else
15469 ac_cv_sizeof_off_t=0
15474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15475 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15479 cat >>confdefs.h <<_ACEOF
15480 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15481 _ACEOF
15485 # If we don't have largefile support, can't handle segsize >= 2GB.
15486 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15487 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15490 # The cast to long int works around a bug in the HP C Compiler
15491 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15492 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15493 # This bug is HP SR number 8606223364.
15494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15495 $as_echo_n "checking size of bool... " >&6; }
15496 if ${ac_cv_sizeof_bool+:} false; then :
15497 $as_echo_n "(cached) " >&6
15498 else
15499 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15500 #include <stdbool.h>
15501 #endif
15502 "; then :
15504 else
15505 if test "$ac_cv_type_bool" = yes; then
15506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15507 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15508 as_fn_error 77 "cannot compute sizeof (bool)
15509 See \`config.log' for more details" "$LINENO" 5; }
15510 else
15511 ac_cv_sizeof_bool=0
15516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15517 $as_echo "$ac_cv_sizeof_bool" >&6; }
15521 cat >>confdefs.h <<_ACEOF
15522 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15523 _ACEOF
15529 ## Functions, global variables
15532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15533 $as_echo_n "checking for int timezone... " >&6; }
15534 if ${pgac_cv_var_int_timezone+:} false; then :
15535 $as_echo_n "(cached) " >&6
15536 else
15537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15538 /* end confdefs.h. */
15539 #include <time.h>
15540 int res;
15542 main ()
15544 #ifndef __CYGWIN__
15545 res = timezone / 60;
15546 #else
15547 res = _timezone / 60;
15548 #endif
15550 return 0;
15552 _ACEOF
15553 if ac_fn_c_try_link "$LINENO"; then :
15554 pgac_cv_var_int_timezone=yes
15555 else
15556 pgac_cv_var_int_timezone=no
15558 rm -f core conftest.err conftest.$ac_objext \
15559 conftest$ac_exeext conftest.$ac_ext
15561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15562 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15563 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15565 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15569 $as_echo_n "checking types of arguments for accept()... " >&6; }
15570 if ${ac_cv_func_accept_return+:} false; then :
15571 $as_echo_n "(cached) " >&6
15572 else
15573 if ${ac_cv_func_accept_arg1+:} false; then :
15574 $as_echo_n "(cached) " >&6
15575 else
15576 if ${ac_cv_func_accept_arg2+:} false; then :
15577 $as_echo_n "(cached) " >&6
15578 else
15579 if ${ac_cv_func_accept_arg3+:} false; then :
15580 $as_echo_n "(cached) " >&6
15581 else
15582 for ac_cv_func_accept_return in 'int' 'SOCKET WSAAPI' 'unsigned int PASCAL'; do
15583 for ac_cv_func_accept_arg1 in 'int' 'SOCKET' 'unsigned int'; do
15584 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15585 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15587 /* end confdefs.h. */
15588 #include <sys/types.h>
15589 #include <sys/socket.h>
15590 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15591 _ACEOF
15592 if ac_fn_c_try_compile "$LINENO"; then :
15593 ac_not_found=no; break 4
15594 else
15595 ac_not_found=yes
15597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15598 done
15599 done
15600 done
15601 done
15602 if test "$ac_not_found" = yes; then
15603 as_fn_error $? "could not determine argument types" "$LINENO" 5
15605 if test "$ac_cv_func_accept_arg3" = "void"; then
15606 ac_cv_func_accept_arg3=int
15616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
15617 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15619 cat >>confdefs.h <<_ACEOF
15620 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15621 _ACEOF
15624 cat >>confdefs.h <<_ACEOF
15625 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15626 _ACEOF
15629 cat >>confdefs.h <<_ACEOF
15630 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15631 _ACEOF
15634 cat >>confdefs.h <<_ACEOF
15635 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15636 _ACEOF
15639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15640 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15641 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15642 $as_echo_n "(cached) " >&6
15643 else
15644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15645 /* end confdefs.h. */
15646 #include <sys/time.h>
15648 main ()
15650 struct timeval *tp;
15651 struct timezone *tzp;
15652 gettimeofday(tp,tzp);
15654 return 0;
15656 _ACEOF
15657 if ac_fn_c_try_compile "$LINENO"; then :
15658 pgac_cv_func_gettimeofday_1arg=no
15659 else
15660 pgac_cv_func_gettimeofday_1arg=yes
15662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15665 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15666 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15668 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15673 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15674 if ${pgac_cv_func_wcstombs_l+:} false; then :
15675 $as_echo_n "(cached) " >&6
15676 else
15677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15678 /* end confdefs.h. */
15679 #include <stdlib.h>
15680 #include <locale.h>
15682 main ()
15684 #ifndef wcstombs_l
15685 (void) wcstombs_l;
15686 #endif
15688 return 0;
15690 _ACEOF
15691 if ac_fn_c_try_compile "$LINENO"; then :
15692 pgac_cv_func_wcstombs_l='yes'
15693 else
15694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15695 /* end confdefs.h. */
15696 #include <stdlib.h>
15697 #include <locale.h>
15698 #include <xlocale.h>
15700 main ()
15702 #ifndef wcstombs_l
15703 (void) wcstombs_l;
15704 #endif
15706 return 0;
15708 _ACEOF
15709 if ac_fn_c_try_compile "$LINENO"; then :
15710 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15711 else
15712 pgac_cv_func_wcstombs_l='no'
15714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15719 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15720 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15722 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15726 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15727 # symbols that that library has no business exposing to the world. Pending
15728 # acquisition of a clue by those developers, ignore libedit (including its
15729 # possible alias of libreadline) while checking for everything else.
15730 LIBS_including_readline="$LIBS"
15731 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15733 for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale utime utimes wcstombs_l
15734 do :
15735 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15736 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15737 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15738 cat >>confdefs.h <<_ACEOF
15739 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15740 _ACEOF
15743 done
15746 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15748 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15749 if ${pgac_cv__builtin_bswap16+:} false; then :
15750 $as_echo_n "(cached) " >&6
15751 else
15752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15753 /* end confdefs.h. */
15756 call__builtin_bswap16(int x)
15758 return __builtin_bswap16(x);
15761 main ()
15765 return 0;
15767 _ACEOF
15768 if ac_fn_c_try_link "$LINENO"; then :
15769 pgac_cv__builtin_bswap16=yes
15770 else
15771 pgac_cv__builtin_bswap16=no
15773 rm -f core conftest.err conftest.$ac_objext \
15774 conftest$ac_exeext conftest.$ac_ext
15776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15777 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15778 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15780 cat >>confdefs.h <<_ACEOF
15781 #define HAVE__BUILTIN_BSWAP16 1
15782 _ACEOF
15785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15786 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15787 if ${pgac_cv__builtin_bswap32+:} false; then :
15788 $as_echo_n "(cached) " >&6
15789 else
15790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15791 /* end confdefs.h. */
15794 call__builtin_bswap32(int x)
15796 return __builtin_bswap32(x);
15799 main ()
15803 return 0;
15805 _ACEOF
15806 if ac_fn_c_try_link "$LINENO"; then :
15807 pgac_cv__builtin_bswap32=yes
15808 else
15809 pgac_cv__builtin_bswap32=no
15811 rm -f core conftest.err conftest.$ac_objext \
15812 conftest$ac_exeext conftest.$ac_ext
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15815 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15816 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15818 cat >>confdefs.h <<_ACEOF
15819 #define HAVE__BUILTIN_BSWAP32 1
15820 _ACEOF
15823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15824 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15825 if ${pgac_cv__builtin_bswap64+:} false; then :
15826 $as_echo_n "(cached) " >&6
15827 else
15828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15829 /* end confdefs.h. */
15832 call__builtin_bswap64(long int x)
15834 return __builtin_bswap64(x);
15837 main ()
15841 return 0;
15843 _ACEOF
15844 if ac_fn_c_try_link "$LINENO"; then :
15845 pgac_cv__builtin_bswap64=yes
15846 else
15847 pgac_cv__builtin_bswap64=no
15849 rm -f core conftest.err conftest.$ac_objext \
15850 conftest$ac_exeext conftest.$ac_ext
15852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15853 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15854 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15856 cat >>confdefs.h <<_ACEOF
15857 #define HAVE__BUILTIN_BSWAP64 1
15858 _ACEOF
15861 # We assume that we needn't test all widths of these explicitly:
15862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15863 $as_echo_n "checking for __builtin_clz... " >&6; }
15864 if ${pgac_cv__builtin_clz+:} false; then :
15865 $as_echo_n "(cached) " >&6
15866 else
15867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15868 /* end confdefs.h. */
15871 call__builtin_clz(unsigned int x)
15873 return __builtin_clz(x);
15876 main ()
15880 return 0;
15882 _ACEOF
15883 if ac_fn_c_try_link "$LINENO"; then :
15884 pgac_cv__builtin_clz=yes
15885 else
15886 pgac_cv__builtin_clz=no
15888 rm -f core conftest.err conftest.$ac_objext \
15889 conftest$ac_exeext conftest.$ac_ext
15891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15892 $as_echo "$pgac_cv__builtin_clz" >&6; }
15893 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15895 cat >>confdefs.h <<_ACEOF
15896 #define HAVE__BUILTIN_CLZ 1
15897 _ACEOF
15900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15901 $as_echo_n "checking for __builtin_ctz... " >&6; }
15902 if ${pgac_cv__builtin_ctz+:} false; then :
15903 $as_echo_n "(cached) " >&6
15904 else
15905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15906 /* end confdefs.h. */
15909 call__builtin_ctz(unsigned int x)
15911 return __builtin_ctz(x);
15914 main ()
15918 return 0;
15920 _ACEOF
15921 if ac_fn_c_try_link "$LINENO"; then :
15922 pgac_cv__builtin_ctz=yes
15923 else
15924 pgac_cv__builtin_ctz=no
15926 rm -f core conftest.err conftest.$ac_objext \
15927 conftest$ac_exeext conftest.$ac_ext
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15930 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15931 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15933 cat >>confdefs.h <<_ACEOF
15934 #define HAVE__BUILTIN_CTZ 1
15935 _ACEOF
15938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15939 $as_echo_n "checking for __builtin_popcount... " >&6; }
15940 if ${pgac_cv__builtin_popcount+:} false; then :
15941 $as_echo_n "(cached) " >&6
15942 else
15943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15944 /* end confdefs.h. */
15947 call__builtin_popcount(unsigned int x)
15949 return __builtin_popcount(x);
15952 main ()
15956 return 0;
15958 _ACEOF
15959 if ac_fn_c_try_link "$LINENO"; then :
15960 pgac_cv__builtin_popcount=yes
15961 else
15962 pgac_cv__builtin_popcount=no
15964 rm -f core conftest.err conftest.$ac_objext \
15965 conftest$ac_exeext conftest.$ac_ext
15967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15968 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15969 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15971 cat >>confdefs.h <<_ACEOF
15972 #define HAVE__BUILTIN_POPCOUNT 1
15973 _ACEOF
15976 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15977 # so it needs a different test function.
15978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15979 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15980 if ${pgac_cv__builtin_frame_address+:} false; then :
15981 $as_echo_n "(cached) " >&6
15982 else
15983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15984 /* end confdefs.h. */
15986 void *
15987 call__builtin_frame_address(void)
15989 return __builtin_frame_address(0);
15992 main ()
15996 return 0;
15998 _ACEOF
15999 if ac_fn_c_try_link "$LINENO"; then :
16000 pgac_cv__builtin_frame_address=yes
16001 else
16002 pgac_cv__builtin_frame_address=no
16004 rm -f core conftest.err conftest.$ac_objext \
16005 conftest$ac_exeext conftest.$ac_ext
16007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
16008 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
16009 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
16011 cat >>confdefs.h <<_ACEOF
16012 #define HAVE__BUILTIN_FRAME_ADDRESS 1
16013 _ACEOF
16017 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
16018 if test "x$ac_cv_func_fseeko" = xyes; then :
16019 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
16021 else
16022 case " $LIBOBJS " in
16023 *" fseeko.$ac_objext "* ) ;;
16024 *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
16026 esac
16031 case $host_os in
16032 # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
16033 # Mingw uses macros to access Win32 API calls
16034 netbsd*|mingw*)
16036 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
16038 ac_cv_func_fseeko=yes;;
16040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16041 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
16042 if ${ac_cv_sys_largefile_source+:} false; then :
16043 $as_echo_n "(cached) " >&6
16044 else
16045 while :; do
16046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16047 /* end confdefs.h. */
16048 #include <sys/types.h> /* for off_t */
16049 #include <stdio.h>
16051 main ()
16053 int (*fp) (FILE *, off_t, int) = fseeko;
16054 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16056 return 0;
16058 _ACEOF
16059 if ac_fn_c_try_link "$LINENO"; then :
16060 ac_cv_sys_largefile_source=no; break
16062 rm -f core conftest.err conftest.$ac_objext \
16063 conftest$ac_exeext conftest.$ac_ext
16064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065 /* end confdefs.h. */
16066 #define _LARGEFILE_SOURCE 1
16067 #include <sys/types.h> /* for off_t */
16068 #include <stdio.h>
16070 main ()
16072 int (*fp) (FILE *, off_t, int) = fseeko;
16073 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16075 return 0;
16077 _ACEOF
16078 if ac_fn_c_try_link "$LINENO"; then :
16079 ac_cv_sys_largefile_source=1; break
16081 rm -f core conftest.err conftest.$ac_objext \
16082 conftest$ac_exeext conftest.$ac_ext
16083 ac_cv_sys_largefile_source=unknown
16084 break
16085 done
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
16088 $as_echo "$ac_cv_sys_largefile_source" >&6; }
16089 case $ac_cv_sys_largefile_source in #(
16090 no | unknown) ;;
16092 cat >>confdefs.h <<_ACEOF
16093 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16094 _ACEOF
16096 esac
16097 rm -rf conftest*
16099 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16100 # in glibc 2.1.3, but that breaks too many other things.
16101 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16102 if test $ac_cv_sys_largefile_source != unknown; then
16104 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
16108 esac
16110 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
16111 # by calling it, 2009-04-02
16112 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
16113 # The Clang compiler raises a warning for an undeclared identifier that matches
16114 # a compiler builtin function. All extant Clang versions are affected, as of
16115 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
16116 # C and Objective C languages, but Clang does report an error under C++ and
16117 # Objective C++.
16119 # Passing -fno-builtin to the compiler would suppress this problem. That
16120 # strategy would have the advantage of being insensitive to stray warnings, but
16121 # it would make tests less realistic.
16122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
16123 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
16124 if ${ac_cv_c_decl_report+:} false; then :
16125 $as_echo_n "(cached) " >&6
16126 else
16127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16128 /* end confdefs.h. */
16131 main ()
16133 (void) strchr;
16135 return 0;
16137 _ACEOF
16138 if ac_fn_c_try_compile "$LINENO"; then :
16139 if test -s conftest.err; then :
16140 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
16141 # valid AC_CHECK_DECL input. No library function is consistently available
16142 # on freestanding implementations, so test against a dummy declaration.
16143 # Include always-available headers on the off chance that they somehow
16144 # elicit warnings.
16145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16146 /* end confdefs.h. */
16147 #include <float.h>
16148 #include <limits.h>
16149 #include <stdarg.h>
16150 #include <stddef.h>
16151 extern void ac_decl (int, char *);
16153 main ()
16155 #ifdef __cplusplus
16156 (void) ac_decl ((int) 0, (char *) 0);
16157 (void) ac_decl;
16158 #else
16159 (void) ac_decl;
16160 #endif
16163 return 0;
16165 _ACEOF
16166 if ac_fn_c_try_compile "$LINENO"; then :
16167 if test -s conftest.err; then :
16168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16169 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16170 as_fn_error $? "cannot detect from compiler exit status or warnings
16171 See \`config.log' for more details" "$LINENO" 5; }
16172 else
16173 ac_cv_c_decl_report=warning
16175 else
16176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16177 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16178 as_fn_error $? "cannot compile a simple declaration test
16179 See \`config.log' for more details" "$LINENO" 5; }
16181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16182 else
16183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16184 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16185 as_fn_error $? "compiler does not report undeclared identifiers
16186 See \`config.log' for more details" "$LINENO" 5; }
16188 else
16189 ac_cv_c_decl_report=error
16191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16194 $as_echo "$ac_cv_c_decl_report" >&6; }
16196 case $ac_cv_c_decl_report in
16197 warning) ac_c_decl_warn_flag=yes ;;
16198 *) ac_c_decl_warn_flag= ;;
16199 esac
16201 if test "$PORTNAME" != "solaris"; then :
16203 for ac_func in posix_fadvise
16204 do :
16205 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16206 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16207 cat >>confdefs.h <<_ACEOF
16208 #define HAVE_POSIX_FADVISE 1
16209 _ACEOF
16212 done
16214 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16216 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16217 ac_have_decl=1
16218 else
16219 ac_have_decl=0
16222 cat >>confdefs.h <<_ACEOF
16223 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16224 _ACEOF
16227 fi # fi
16229 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16231 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16232 ac_have_decl=1
16233 else
16234 ac_have_decl=0
16237 cat >>confdefs.h <<_ACEOF
16238 #define HAVE_DECL_FDATASYNC $ac_have_decl
16239 _ACEOF
16241 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16242 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16243 ac_have_decl=1
16244 else
16245 ac_have_decl=0
16248 cat >>confdefs.h <<_ACEOF
16249 #define HAVE_DECL_STRLCAT $ac_have_decl
16250 _ACEOF
16251 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16252 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16253 ac_have_decl=1
16254 else
16255 ac_have_decl=0
16258 cat >>confdefs.h <<_ACEOF
16259 #define HAVE_DECL_STRLCPY $ac_have_decl
16260 _ACEOF
16261 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16262 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16263 ac_have_decl=1
16264 else
16265 ac_have_decl=0
16268 cat >>confdefs.h <<_ACEOF
16269 #define HAVE_DECL_STRNLEN $ac_have_decl
16270 _ACEOF
16272 # This is probably only present on macOS, but may as well check always
16273 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16275 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16276 ac_have_decl=1
16277 else
16278 ac_have_decl=0
16281 cat >>confdefs.h <<_ACEOF
16282 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16283 _ACEOF
16286 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
16288 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
16289 ac_have_decl=1
16290 else
16291 ac_have_decl=0
16294 cat >>confdefs.h <<_ACEOF
16295 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
16296 _ACEOF
16297 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
16299 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
16300 ac_have_decl=1
16301 else
16302 ac_have_decl=0
16305 cat >>confdefs.h <<_ACEOF
16306 #define HAVE_DECL_RTLD_NOW $ac_have_decl
16307 _ACEOF
16310 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
16311 #include <netinet/in.h>
16313 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
16315 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
16320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
16321 $as_echo_n "checking for PS_STRINGS... " >&6; }
16322 if ${pgac_cv_var_PS_STRINGS+:} false; then :
16323 $as_echo_n "(cached) " >&6
16324 else
16325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16326 /* end confdefs.h. */
16327 #include <machine/vmparam.h>
16328 #include <sys/exec.h>
16331 main ()
16333 PS_STRINGS->ps_nargvstr = 1;
16334 PS_STRINGS->ps_argvstr = "foo";
16336 return 0;
16338 _ACEOF
16339 if ac_fn_c_try_link "$LINENO"; then :
16340 pgac_cv_var_PS_STRINGS=yes
16341 else
16342 pgac_cv_var_PS_STRINGS=no
16344 rm -f core conftest.err conftest.$ac_objext \
16345 conftest$ac_exeext conftest.$ac_ext
16347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16348 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16349 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16351 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
16357 $as_echo_n "checking for isinf... " >&6; }
16358 if ${ac_cv_func_isinf+:} false; then :
16359 $as_echo_n "(cached) " >&6
16360 else
16361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16362 /* end confdefs.h. */
16364 #include <math.h>
16365 double glob_double;
16368 main ()
16370 return isinf(glob_double) ? 0 : 1;
16372 return 0;
16374 _ACEOF
16375 if ac_fn_c_try_link "$LINENO"; then :
16376 ac_cv_func_isinf=yes
16377 else
16378 ac_cv_func_isinf=no
16380 rm -f core conftest.err conftest.$ac_objext \
16381 conftest$ac_exeext conftest.$ac_ext
16383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
16384 $as_echo "$ac_cv_func_isinf" >&6; }
16386 if test $ac_cv_func_isinf = yes ; then
16388 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
16390 else
16391 case " $LIBOBJS " in
16392 *" isinf.$ac_objext "* ) ;;
16393 *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
16395 esac
16397 # Look for a way to implement a substitute for isinf()
16398 for ac_func in fpclass fp_class fp_class_d class
16399 do :
16400 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16401 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16402 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16403 cat >>confdefs.h <<_ACEOF
16404 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16405 _ACEOF
16406 break
16408 done
16412 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
16413 if test "x$ac_cv_func_crypt" = xyes; then :
16414 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
16416 else
16417 case " $LIBOBJS " in
16418 *" crypt.$ac_objext "* ) ;;
16419 *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
16421 esac
16425 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16426 if test "x$ac_cv_func_dlopen" = xyes; then :
16427 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
16429 else
16430 case " $LIBOBJS " in
16431 *" dlopen.$ac_objext "* ) ;;
16432 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
16434 esac
16438 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
16439 if test "x$ac_cv_func_fls" = xyes; then :
16440 $as_echo "#define HAVE_FLS 1" >>confdefs.h
16442 else
16443 case " $LIBOBJS " in
16444 *" fls.$ac_objext "* ) ;;
16445 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
16447 esac
16451 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16452 if test "x$ac_cv_func_getopt" = xyes; then :
16453 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16455 else
16456 case " $LIBOBJS " in
16457 *" getopt.$ac_objext "* ) ;;
16458 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16460 esac
16464 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
16465 if test "x$ac_cv_func_getrusage" = xyes; then :
16466 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
16468 else
16469 case " $LIBOBJS " in
16470 *" getrusage.$ac_objext "* ) ;;
16471 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16473 esac
16477 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16478 if test "x$ac_cv_func_inet_aton" = xyes; then :
16479 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16481 else
16482 case " $LIBOBJS " in
16483 *" inet_aton.$ac_objext "* ) ;;
16484 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16486 esac
16490 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16491 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16492 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16494 else
16495 case " $LIBOBJS " in
16496 *" mkdtemp.$ac_objext "* ) ;;
16497 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16499 esac
16503 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
16504 if test "x$ac_cv_func_pread" = xyes; then :
16505 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
16507 else
16508 case " $LIBOBJS " in
16509 *" pread.$ac_objext "* ) ;;
16510 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
16512 esac
16516 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
16517 if test "x$ac_cv_func_pwrite" = xyes; then :
16518 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
16520 else
16521 case " $LIBOBJS " in
16522 *" pwrite.$ac_objext "* ) ;;
16523 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
16525 esac
16529 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
16530 if test "x$ac_cv_func_random" = xyes; then :
16531 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
16533 else
16534 case " $LIBOBJS " in
16535 *" random.$ac_objext "* ) ;;
16536 *) LIBOBJS="$LIBOBJS random.$ac_objext"
16538 esac
16542 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
16543 if test "x$ac_cv_func_rint" = xyes; then :
16544 $as_echo "#define HAVE_RINT 1" >>confdefs.h
16546 else
16547 case " $LIBOBJS " in
16548 *" rint.$ac_objext "* ) ;;
16549 *) LIBOBJS="$LIBOBJS rint.$ac_objext"
16551 esac
16555 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
16556 if test "x$ac_cv_func_srandom" = xyes; then :
16557 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
16559 else
16560 case " $LIBOBJS " in
16561 *" srandom.$ac_objext "* ) ;;
16562 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
16564 esac
16568 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16569 if test "x$ac_cv_func_strlcat" = xyes; then :
16570 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16572 else
16573 case " $LIBOBJS " in
16574 *" strlcat.$ac_objext "* ) ;;
16575 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16577 esac
16581 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16582 if test "x$ac_cv_func_strlcpy" = xyes; then :
16583 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16585 else
16586 case " $LIBOBJS " in
16587 *" strlcpy.$ac_objext "* ) ;;
16588 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16590 esac
16594 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16595 if test "x$ac_cv_func_strnlen" = xyes; then :
16596 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16598 else
16599 case " $LIBOBJS " in
16600 *" strnlen.$ac_objext "* ) ;;
16601 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16603 esac
16607 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
16608 if test "x$ac_cv_func_strtof" = xyes; then :
16609 $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
16611 else
16612 case " $LIBOBJS " in
16613 *" strtof.$ac_objext "* ) ;;
16614 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16616 esac
16622 case $host_os in
16623 # Cygwin and (apparently, based on test results) Mingw both
16624 # have a broken strtof(), so substitute the same replacement
16625 # code we use with VS2013. That's not a perfect fix, since
16626 # (unlike with VS2013) it doesn't avoid double-rounding, but
16627 # we have no better options. To get that, though, we have to
16628 # force the file to be compiled despite HAVE_STRTOF.
16629 mingw*|cygwin*)
16630 case " $LIBOBJS " in
16631 *" strtof.$ac_objext "* ) ;;
16632 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16634 esac
16636 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16637 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16639 esac
16641 case $host_os in
16643 # Windows uses a specialised env handler
16644 # and doesn't need a replacement getpeereid because it doesn't use
16645 # Unix sockets.
16646 mingw*)
16648 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16651 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16654 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16656 ac_cv_func_setenv=yes
16657 ac_cv_func_unsetenv=yes
16658 ac_cv_func_getpeereid=yes;;
16660 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
16661 if test "x$ac_cv_func_setenv" = xyes; then :
16662 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16664 else
16665 case " $LIBOBJS " in
16666 *" setenv.$ac_objext "* ) ;;
16667 *) LIBOBJS="$LIBOBJS setenv.$ac_objext"
16669 esac
16673 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16674 if test "x$ac_cv_func_unsetenv" = xyes; then :
16675 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16677 else
16678 case " $LIBOBJS " in
16679 *" unsetenv.$ac_objext "* ) ;;
16680 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16682 esac
16686 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16687 if test "x$ac_cv_func_getpeereid" = xyes; then :
16688 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16690 else
16691 case " $LIBOBJS " in
16692 *" getpeereid.$ac_objext "* ) ;;
16693 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16695 esac
16701 esac
16703 # System's version of getaddrinfo(), if any, may be used only if we found
16704 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16705 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16706 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16707 test "$PORTNAME" != "win32"; then
16708 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16709 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16710 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16712 else
16713 case " $LIBOBJS " in
16714 *" getaddrinfo.$ac_objext "* ) ;;
16715 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16717 esac
16722 else
16723 case " $LIBOBJS " in
16724 *" getaddrinfo.$ac_objext "* ) ;;
16725 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16727 esac
16731 # Similarly, use system's getopt_long() only if system provides struct option.
16732 if test x"$ac_cv_type_struct_option" = xyes ; then
16733 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16734 if test "x$ac_cv_func_getopt_long" = xyes; then :
16735 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16737 else
16738 case " $LIBOBJS " in
16739 *" getopt_long.$ac_objext "* ) ;;
16740 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16742 esac
16747 else
16748 case " $LIBOBJS " in
16749 *" getopt_long.$ac_objext "* ) ;;
16750 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16752 esac
16756 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16757 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16758 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16759 case " $LIBOBJS " in
16760 *" getopt.$ac_objext "* ) ;;
16761 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16763 esac
16767 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16768 # so always use our version on Windows.
16769 if test "$PORTNAME" = "win32"; then
16770 case " $LIBOBJS " in
16771 *" getopt.$ac_objext "* ) ;;
16772 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16774 esac
16776 case " $LIBOBJS " in
16777 *" getopt_long.$ac_objext "* ) ;;
16778 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16780 esac
16784 # Win32 (really MinGW) support
16785 if test "$PORTNAME" = "win32"; then
16786 for ac_func in _configthreadlocale
16787 do :
16788 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16789 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16790 cat >>confdefs.h <<_ACEOF
16791 #define HAVE__CONFIGTHREADLOCALE 1
16792 _ACEOF
16795 done
16797 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16798 if test "x$ac_cv_func_gettimeofday" = xyes; then :
16799 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16801 else
16802 case " $LIBOBJS " in
16803 *" gettimeofday.$ac_objext "* ) ;;
16804 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16806 esac
16811 case " $LIBOBJS " in
16812 *" dirmod.$ac_objext "* ) ;;
16813 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16815 esac
16817 case " $LIBOBJS " in
16818 *" kill.$ac_objext "* ) ;;
16819 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16821 esac
16823 case " $LIBOBJS " in
16824 *" open.$ac_objext "* ) ;;
16825 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16827 esac
16829 case " $LIBOBJS " in
16830 *" system.$ac_objext "* ) ;;
16831 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16833 esac
16835 case " $LIBOBJS " in
16836 *" win32env.$ac_objext "* ) ;;
16837 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16839 esac
16841 case " $LIBOBJS " in
16842 *" win32error.$ac_objext "* ) ;;
16843 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16845 esac
16847 case " $LIBOBJS " in
16848 *" win32security.$ac_objext "* ) ;;
16849 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16851 esac
16853 case " $LIBOBJS " in
16854 *" win32setlocale.$ac_objext "* ) ;;
16855 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16857 esac
16860 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16862 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16863 #define WIN32_LEAN_AND_MEAN
16864 #include <windows.h>
16865 #include <string.h>
16866 #include <dbghelp.h>
16868 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16870 cat >>confdefs.h <<_ACEOF
16871 #define HAVE_MINIDUMP_TYPE 1
16872 _ACEOF
16874 pgac_minidump_type=yes
16875 else
16876 pgac_minidump_type=no
16880 if test x"$pgac_minidump_type" = x"yes" ; then
16881 have_win32_dbghelp=yes
16883 else
16884 have_win32_dbghelp=no
16888 # Cygwin needs only a bit of that
16889 if test "$PORTNAME" = "cygwin"; then
16890 case " $LIBOBJS " in
16891 *" dirmod.$ac_objext "* ) ;;
16892 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16894 esac
16898 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16899 if test "x$ac_cv_func_syslog" = xyes; then :
16900 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16901 if test "x$ac_cv_header_syslog_h" = xyes; then :
16903 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16912 $as_echo_n "checking for opterr... " >&6; }
16913 if ${pgac_cv_var_int_opterr+:} false; then :
16914 $as_echo_n "(cached) " >&6
16915 else
16916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16917 /* end confdefs.h. */
16918 #include <unistd.h>
16920 main ()
16922 extern int opterr; opterr = 1;
16924 return 0;
16926 _ACEOF
16927 if ac_fn_c_try_link "$LINENO"; then :
16928 pgac_cv_var_int_opterr=yes
16929 else
16930 pgac_cv_var_int_opterr=no
16932 rm -f core conftest.err conftest.$ac_objext \
16933 conftest$ac_exeext conftest.$ac_ext
16935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16936 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16937 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16939 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16944 $as_echo_n "checking for optreset... " >&6; }
16945 if ${pgac_cv_var_int_optreset+:} false; then :
16946 $as_echo_n "(cached) " >&6
16947 else
16948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16949 /* end confdefs.h. */
16950 #include <unistd.h>
16952 main ()
16954 extern int optreset; optreset = 1;
16956 return 0;
16958 _ACEOF
16959 if ac_fn_c_try_link "$LINENO"; then :
16960 pgac_cv_var_int_optreset=yes
16961 else
16962 pgac_cv_var_int_optreset=no
16964 rm -f core conftest.err conftest.$ac_objext \
16965 conftest$ac_exeext conftest.$ac_ext
16967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16968 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16969 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16971 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16975 for ac_func in strtoll __strtoll strtoq
16976 do :
16977 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16978 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16979 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16980 cat >>confdefs.h <<_ACEOF
16981 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16982 _ACEOF
16983 break
16985 done
16987 for ac_func in strtoull __strtoull strtouq
16988 do :
16989 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16990 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16991 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16992 cat >>confdefs.h <<_ACEOF
16993 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16994 _ACEOF
16995 break
16997 done
16999 # strto[u]ll may exist but not be declared
17000 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
17001 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
17002 ac_have_decl=1
17003 else
17004 ac_have_decl=0
17007 cat >>confdefs.h <<_ACEOF
17008 #define HAVE_DECL_STRTOLL $ac_have_decl
17009 _ACEOF
17010 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
17011 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
17012 ac_have_decl=1
17013 else
17014 ac_have_decl=0
17017 cat >>confdefs.h <<_ACEOF
17018 #define HAVE_DECL_STRTOULL $ac_have_decl
17019 _ACEOF
17022 if test "$with_icu" = yes; then
17023 ac_save_CPPFLAGS=$CPPFLAGS
17024 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
17026 # Verify we have ICU's header files
17027 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
17028 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
17030 else
17031 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
17036 CPPFLAGS=$ac_save_CPPFLAGS
17039 if test "$with_llvm" = yes; then
17041 # Check which functionality is present
17042 SAVE_CPPFLAGS="$CPPFLAGS"
17043 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
17044 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
17046 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
17047 ac_have_decl=1
17048 else
17049 ac_have_decl=0
17052 cat >>confdefs.h <<_ACEOF
17053 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
17054 _ACEOF
17056 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
17058 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
17059 ac_have_decl=1
17060 else
17061 ac_have_decl=0
17064 cat >>confdefs.h <<_ACEOF
17065 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
17066 _ACEOF
17067 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
17069 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
17070 ac_have_decl=1
17071 else
17072 ac_have_decl=0
17075 cat >>confdefs.h <<_ACEOF
17076 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
17077 _ACEOF
17079 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
17081 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
17082 ac_have_decl=1
17083 else
17084 ac_have_decl=0
17087 cat >>confdefs.h <<_ACEOF
17088 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
17089 _ACEOF
17090 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
17092 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
17093 ac_have_decl=1
17094 else
17095 ac_have_decl=0
17098 cat >>confdefs.h <<_ACEOF
17099 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
17100 _ACEOF
17102 CPPFLAGS="$SAVE_CPPFLAGS"
17106 # Lastly, restore full LIBS list and check for readline/libedit symbols
17107 LIBS="$LIBS_including_readline"
17109 if test "$with_readline" = yes; then
17110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
17111 $as_echo_n "checking for rl_completion_append_character... " >&6; }
17112 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
17113 $as_echo_n "(cached) " >&6
17114 else
17115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17116 /* end confdefs.h. */
17117 #include <stdio.h>
17118 #ifdef HAVE_READLINE_READLINE_H
17119 # include <readline/readline.h>
17120 #elif defined(HAVE_READLINE_H)
17121 # include <readline.h>
17122 #endif
17125 main ()
17127 rl_completion_append_character = 'x';
17129 return 0;
17131 _ACEOF
17132 if ac_fn_c_try_link "$LINENO"; then :
17133 pgac_cv_var_rl_completion_append_character=yes
17134 else
17135 pgac_cv_var_rl_completion_append_character=no
17137 rm -f core conftest.err conftest.$ac_objext \
17138 conftest$ac_exeext conftest.$ac_ext
17140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
17141 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
17142 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
17144 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
17147 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
17148 do :
17149 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17150 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17151 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17152 cat >>confdefs.h <<_ACEOF
17153 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17154 _ACEOF
17157 done
17159 for ac_func in append_history history_truncate_file
17160 do :
17161 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17162 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17163 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17164 cat >>confdefs.h <<_ACEOF
17165 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17166 _ACEOF
17169 done
17174 # This test makes sure that run tests work at all. Sometimes a shared
17175 # library is found by the linker, but the runtime linker can't find it.
17176 # This check should come after all modifications of compiler or linker
17177 # variables, and before any other run tests.
17178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
17179 $as_echo_n "checking test program... " >&6; }
17180 if test "$cross_compiling" = yes; then :
17181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
17182 $as_echo "cross-compiling" >&6; }
17183 else
17184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17185 /* end confdefs.h. */
17186 int main() { return 0; }
17187 _ACEOF
17188 if ac_fn_c_try_run "$LINENO"; then :
17189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17190 $as_echo "ok" >&6; }
17191 else
17192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17193 $as_echo "failed" >&6; }
17194 as_fn_error $? "
17195 Could not execute a simple test program. This may be a problem
17196 related to locating shared libraries. Check the file 'config.log'
17197 for the exact reason." "$LINENO" 5
17199 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17200 conftest.$ac_objext conftest.beam conftest.$ac_ext
17204 # --------------------
17205 # Run tests below here
17206 # --------------------
17209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
17210 $as_echo_n "checking whether long int is 64 bits... " >&6; }
17211 if ${pgac_cv_type_long_int_64+:} false; then :
17212 $as_echo_n "(cached) " >&6
17213 else
17214 if test "$cross_compiling" = yes; then :
17215 # If cross-compiling, check the size reported by the compiler and
17216 # trust that the arithmetic works.
17217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17218 /* end confdefs.h. */
17221 main ()
17223 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17224 test_array [0] = 0;
17225 return test_array [0];
17228 return 0;
17230 _ACEOF
17231 if ac_fn_c_try_compile "$LINENO"; then :
17232 pgac_cv_type_long_int_64=yes
17233 else
17234 pgac_cv_type_long_int_64=no
17236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17237 else
17238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17239 /* end confdefs.h. */
17240 typedef long int ac_int64;
17243 * These are globals to discourage the compiler from folding all the
17244 * arithmetic tests down to compile-time constants.
17246 ac_int64 a = 20000001;
17247 ac_int64 b = 40000005;
17249 int does_int64_work()
17251 ac_int64 c,d;
17253 if (sizeof(ac_int64) != 8)
17254 return 0; /* definitely not the right size */
17256 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17257 c = a * b;
17258 d = (c + b) / b;
17259 if (d != a+1)
17260 return 0;
17261 return 1;
17265 main() {
17266 return (! does_int64_work());
17268 _ACEOF
17269 if ac_fn_c_try_run "$LINENO"; then :
17270 pgac_cv_type_long_int_64=yes
17271 else
17272 pgac_cv_type_long_int_64=no
17274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17275 conftest.$ac_objext conftest.beam conftest.$ac_ext
17279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
17280 $as_echo "$pgac_cv_type_long_int_64" >&6; }
17282 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17283 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17285 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
17290 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
17291 pg_int64_type="long int"
17292 else
17293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
17294 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
17295 if ${pgac_cv_type_long_long_int_64+:} false; then :
17296 $as_echo_n "(cached) " >&6
17297 else
17298 if test "$cross_compiling" = yes; then :
17299 # If cross-compiling, check the size reported by the compiler and
17300 # trust that the arithmetic works.
17301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17302 /* end confdefs.h. */
17305 main ()
17307 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17308 test_array [0] = 0;
17309 return test_array [0];
17312 return 0;
17314 _ACEOF
17315 if ac_fn_c_try_compile "$LINENO"; then :
17316 pgac_cv_type_long_long_int_64=yes
17317 else
17318 pgac_cv_type_long_long_int_64=no
17320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17321 else
17322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17323 /* end confdefs.h. */
17324 typedef long long int ac_int64;
17327 * These are globals to discourage the compiler from folding all the
17328 * arithmetic tests down to compile-time constants.
17330 ac_int64 a = 20000001;
17331 ac_int64 b = 40000005;
17333 int does_int64_work()
17335 ac_int64 c,d;
17337 if (sizeof(ac_int64) != 8)
17338 return 0; /* definitely not the right size */
17340 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17341 c = a * b;
17342 d = (c + b) / b;
17343 if (d != a+1)
17344 return 0;
17345 return 1;
17349 main() {
17350 return (! does_int64_work());
17352 _ACEOF
17353 if ac_fn_c_try_run "$LINENO"; then :
17354 pgac_cv_type_long_long_int_64=yes
17355 else
17356 pgac_cv_type_long_long_int_64=no
17358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17359 conftest.$ac_objext conftest.beam conftest.$ac_ext
17363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17364 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17366 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17367 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17369 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17373 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17374 pg_int64_type="long long int"
17375 else
17376 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17381 cat >>confdefs.h <<_ACEOF
17382 #define PG_INT64_TYPE $pg_int64_type
17383 _ACEOF
17386 # Select the printf length modifier that goes with that, too.
17387 if test x"$pg_int64_type" = x"long long int" ; then
17388 INT64_MODIFIER='"ll"'
17389 else
17390 INT64_MODIFIER='"l"'
17394 cat >>confdefs.h <<_ACEOF
17395 #define INT64_MODIFIER $INT64_MODIFIER
17396 _ACEOF
17399 # has to be down here, rather than with the other builtins, because
17400 # the test uses PG_INT64_TYPE.
17401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17402 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17403 if ${pgac_cv__builtin_op_overflow+:} false; then :
17404 $as_echo_n "(cached) " >&6
17405 else
17406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17407 /* end confdefs.h. */
17409 PG_INT64_TYPE a = 1;
17410 PG_INT64_TYPE b = 1;
17411 PG_INT64_TYPE result;
17412 int oflo;
17415 main ()
17417 oflo = __builtin_mul_overflow(a, b, &result);
17419 return 0;
17421 _ACEOF
17422 if ac_fn_c_try_link "$LINENO"; then :
17423 pgac_cv__builtin_op_overflow=yes
17424 else
17425 pgac_cv__builtin_op_overflow=no
17427 rm -f core conftest.err conftest.$ac_objext \
17428 conftest$ac_exeext conftest.$ac_ext
17430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17431 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17432 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17434 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17438 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17439 # The cast to long int works around a bug in the HP C Compiler
17440 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17441 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17442 # This bug is HP SR number 8606223364.
17443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17444 $as_echo_n "checking size of void *... " >&6; }
17445 if ${ac_cv_sizeof_void_p+:} false; then :
17446 $as_echo_n "(cached) " >&6
17447 else
17448 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17450 else
17451 if test "$ac_cv_type_void_p" = yes; then
17452 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17453 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17454 as_fn_error 77 "cannot compute sizeof (void *)
17455 See \`config.log' for more details" "$LINENO" 5; }
17456 else
17457 ac_cv_sizeof_void_p=0
17462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17463 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17467 cat >>confdefs.h <<_ACEOF
17468 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17469 _ACEOF
17472 # The cast to long int works around a bug in the HP C Compiler
17473 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17474 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17475 # This bug is HP SR number 8606223364.
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17477 $as_echo_n "checking size of size_t... " >&6; }
17478 if ${ac_cv_sizeof_size_t+:} false; then :
17479 $as_echo_n "(cached) " >&6
17480 else
17481 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17483 else
17484 if test "$ac_cv_type_size_t" = yes; then
17485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17486 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17487 as_fn_error 77 "cannot compute sizeof (size_t)
17488 See \`config.log' for more details" "$LINENO" 5; }
17489 else
17490 ac_cv_sizeof_size_t=0
17495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17496 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17500 cat >>confdefs.h <<_ACEOF
17501 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17502 _ACEOF
17505 # The cast to long int works around a bug in the HP C Compiler
17506 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17507 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17508 # This bug is HP SR number 8606223364.
17509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17510 $as_echo_n "checking size of long... " >&6; }
17511 if ${ac_cv_sizeof_long+:} false; then :
17512 $as_echo_n "(cached) " >&6
17513 else
17514 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17516 else
17517 if test "$ac_cv_type_long" = yes; then
17518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17519 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17520 as_fn_error 77 "cannot compute sizeof (long)
17521 See \`config.log' for more details" "$LINENO" 5; }
17522 else
17523 ac_cv_sizeof_long=0
17528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17529 $as_echo "$ac_cv_sizeof_long" >&6; }
17533 cat >>confdefs.h <<_ACEOF
17534 #define SIZEOF_LONG $ac_cv_sizeof_long
17535 _ACEOF
17539 # Decide whether float4 is passed by value: user-selectable, enabled by default
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
17541 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
17544 # Check whether --enable-float4-byval was given.
17545 if test "${enable_float4_byval+set}" = set; then :
17546 enableval=$enable_float4_byval;
17547 case $enableval in
17548 yes)
17550 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
17552 float4passbyval=true
17555 float4passbyval=false
17558 as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
17560 esac
17562 else
17563 enable_float4_byval=yes
17565 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
17567 float4passbyval=true
17571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
17572 $as_echo "$enable_float4_byval" >&6; }
17574 cat >>confdefs.h <<_ACEOF
17575 #define FLOAT4PASSBYVAL $float4passbyval
17576 _ACEOF
17579 # Decide whether float8 is passed by value.
17580 # Note: this setting also controls int8 and related types such as timestamp.
17581 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
17582 # If not, trying to select it is an error.
17583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
17584 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
17585 if test $ac_cv_sizeof_void_p -ge 8 ; then
17588 # Check whether --enable-float8-byval was given.
17589 if test "${enable_float8_byval+set}" = set; then :
17590 enableval=$enable_float8_byval;
17591 case $enableval in
17592 yes)
17599 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
17601 esac
17603 else
17604 enable_float8_byval=yes
17609 else
17612 # Check whether --enable-float8-byval was given.
17613 if test "${enable_float8_byval+set}" = set; then :
17614 enableval=$enable_float8_byval;
17615 case $enableval in
17616 yes)
17623 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
17625 esac
17627 else
17628 enable_float8_byval=no
17633 if test "$enable_float8_byval" = yes ; then
17634 as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
17637 if test "$enable_float8_byval" = yes ; then
17639 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
17641 float8passbyval=true
17642 else
17643 float8passbyval=false
17645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
17646 $as_echo "$enable_float8_byval" >&6; }
17648 cat >>confdefs.h <<_ACEOF
17649 #define FLOAT8PASSBYVAL $float8passbyval
17650 _ACEOF
17653 # Determine memory alignment requirements for the basic C data types.
17655 # The cast to long int works around a bug in the HP C Compiler,
17656 # see AC_CHECK_SIZEOF for more information.
17657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17658 $as_echo_n "checking alignment of short... " >&6; }
17659 if ${ac_cv_alignof_short+:} false; then :
17660 $as_echo_n "(cached) " >&6
17661 else
17662 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17663 #ifndef offsetof
17664 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17665 #endif
17666 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17668 else
17669 if test "$ac_cv_type_short" = yes; then
17670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17672 as_fn_error 77 "cannot compute alignment of short
17673 See \`config.log' for more details" "$LINENO" 5; }
17674 else
17675 ac_cv_alignof_short=0
17680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17681 $as_echo "$ac_cv_alignof_short" >&6; }
17685 cat >>confdefs.h <<_ACEOF
17686 #define ALIGNOF_SHORT $ac_cv_alignof_short
17687 _ACEOF
17690 # The cast to long int works around a bug in the HP C Compiler,
17691 # see AC_CHECK_SIZEOF for more information.
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17693 $as_echo_n "checking alignment of int... " >&6; }
17694 if ${ac_cv_alignof_int+:} false; then :
17695 $as_echo_n "(cached) " >&6
17696 else
17697 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17698 #ifndef offsetof
17699 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17700 #endif
17701 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17703 else
17704 if test "$ac_cv_type_int" = yes; then
17705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17706 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17707 as_fn_error 77 "cannot compute alignment of int
17708 See \`config.log' for more details" "$LINENO" 5; }
17709 else
17710 ac_cv_alignof_int=0
17715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17716 $as_echo "$ac_cv_alignof_int" >&6; }
17720 cat >>confdefs.h <<_ACEOF
17721 #define ALIGNOF_INT $ac_cv_alignof_int
17722 _ACEOF
17725 # The cast to long int works around a bug in the HP C Compiler,
17726 # see AC_CHECK_SIZEOF for more information.
17727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17728 $as_echo_n "checking alignment of long... " >&6; }
17729 if ${ac_cv_alignof_long+:} false; then :
17730 $as_echo_n "(cached) " >&6
17731 else
17732 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17733 #ifndef offsetof
17734 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17735 #endif
17736 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17738 else
17739 if test "$ac_cv_type_long" = yes; then
17740 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17741 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17742 as_fn_error 77 "cannot compute alignment of long
17743 See \`config.log' for more details" "$LINENO" 5; }
17744 else
17745 ac_cv_alignof_long=0
17750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17751 $as_echo "$ac_cv_alignof_long" >&6; }
17755 cat >>confdefs.h <<_ACEOF
17756 #define ALIGNOF_LONG $ac_cv_alignof_long
17757 _ACEOF
17760 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17761 # The cast to long int works around a bug in the HP C Compiler,
17762 # see AC_CHECK_SIZEOF for more information.
17763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17764 $as_echo_n "checking alignment of long long int... " >&6; }
17765 if ${ac_cv_alignof_long_long_int+:} false; then :
17766 $as_echo_n "(cached) " >&6
17767 else
17768 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17769 #ifndef offsetof
17770 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17771 #endif
17772 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17774 else
17775 if test "$ac_cv_type_long_long_int" = yes; then
17776 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17777 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17778 as_fn_error 77 "cannot compute alignment of long long int
17779 See \`config.log' for more details" "$LINENO" 5; }
17780 else
17781 ac_cv_alignof_long_long_int=0
17786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17787 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17791 cat >>confdefs.h <<_ACEOF
17792 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17793 _ACEOF
17797 # The cast to long int works around a bug in the HP C Compiler,
17798 # see AC_CHECK_SIZEOF for more information.
17799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17800 $as_echo_n "checking alignment of double... " >&6; }
17801 if ${ac_cv_alignof_double+:} false; then :
17802 $as_echo_n "(cached) " >&6
17803 else
17804 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17805 #ifndef offsetof
17806 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17807 #endif
17808 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17810 else
17811 if test "$ac_cv_type_double" = yes; then
17812 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17813 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17814 as_fn_error 77 "cannot compute alignment of double
17815 See \`config.log' for more details" "$LINENO" 5; }
17816 else
17817 ac_cv_alignof_double=0
17822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17823 $as_echo "$ac_cv_alignof_double" >&6; }
17827 cat >>confdefs.h <<_ACEOF
17828 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17829 _ACEOF
17833 # Compute maximum alignment of any basic type.
17834 # We assume long's alignment is at least as strong as char, short, or int;
17835 # but we must check long long (if it is being used for int64) and double.
17836 # Note that we intentionally do not consider any types wider than 64 bits,
17837 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17838 # for disk and memory space.
17840 MAX_ALIGNOF=$ac_cv_alignof_long
17841 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17842 MAX_ALIGNOF=$ac_cv_alignof_double
17844 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17845 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17848 cat >>confdefs.h <<_ACEOF
17849 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17850 _ACEOF
17854 # Some platforms predefine the types int8, int16, etc. Only check
17855 # a (hopefully) representative subset.
17856 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17858 if test "x$ac_cv_type_int8" = xyes; then :
17860 cat >>confdefs.h <<_ACEOF
17861 #define HAVE_INT8 1
17862 _ACEOF
17866 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17868 if test "x$ac_cv_type_uint8" = xyes; then :
17870 cat >>confdefs.h <<_ACEOF
17871 #define HAVE_UINT8 1
17872 _ACEOF
17876 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17878 if test "x$ac_cv_type_int64" = xyes; then :
17880 cat >>confdefs.h <<_ACEOF
17881 #define HAVE_INT64 1
17882 _ACEOF
17886 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17888 if test "x$ac_cv_type_uint64" = xyes; then :
17890 cat >>confdefs.h <<_ACEOF
17891 #define HAVE_UINT64 1
17892 _ACEOF
17898 # Some compilers offer a 128-bit integer scalar type.
17899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17900 $as_echo_n "checking for __int128... " >&6; }
17901 if ${pgac_cv__128bit_int+:} false; then :
17902 $as_echo_n "(cached) " >&6
17903 else
17904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17905 /* end confdefs.h. */
17908 * We don't actually run this test, just link it to verify that any support
17909 * functions needed for __int128 are present.
17911 * These are globals to discourage the compiler from folding all the
17912 * arithmetic tests down to compile-time constants. We do not have
17913 * convenient support for 128bit literals at this point...
17915 __int128 a = 48828125;
17916 __int128 b = 97656250;
17919 main ()
17922 __int128 c,d;
17923 a = (a << 12) + 1; /* 200000000001 */
17924 b = (b << 12) + 5; /* 400000000005 */
17925 /* try the most relevant arithmetic ops */
17926 c = a * b;
17927 d = (c + b) / b;
17928 /* must use the results, else compiler may optimize arithmetic away */
17929 if (d != a+1)
17930 return 1;
17933 return 0;
17935 _ACEOF
17936 if ac_fn_c_try_link "$LINENO"; then :
17937 pgac_cv__128bit_int=yes
17938 else
17939 pgac_cv__128bit_int=no
17941 rm -f core conftest.err conftest.$ac_objext \
17942 conftest$ac_exeext conftest.$ac_ext
17944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17945 $as_echo "$pgac_cv__128bit_int" >&6; }
17946 if test x"$pgac_cv__128bit_int" = xyes ; then
17947 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17948 # If not cross-compiling, we can test for bugs and disable use of __int128
17949 # with buggy compilers. If cross-compiling, hope for the best.
17950 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17952 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17953 if ${pgac_cv__128bit_int_bug+:} false; then :
17954 $as_echo_n "(cached) " >&6
17955 else
17956 if test "$cross_compiling" = yes; then :
17957 pgac_cv__128bit_int_bug="assuming ok"
17958 else
17959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17960 /* end confdefs.h. */
17962 /* This must match the corresponding code in c.h: */
17963 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17964 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17965 #endif
17966 typedef __int128 int128a
17967 #if defined(pg_attribute_aligned)
17968 pg_attribute_aligned(8)
17969 #endif
17971 int128a holder;
17972 void pass_by_val(void *buffer, int128a par) { holder = par; }
17975 main ()
17978 long int i64 = 97656225L << 12;
17979 int128a q;
17980 pass_by_val(main, (int128a) i64);
17981 q = (int128a) i64;
17982 if (q != holder)
17983 return 1;
17986 return 0;
17988 _ACEOF
17989 if ac_fn_c_try_run "$LINENO"; then :
17990 pgac_cv__128bit_int_bug=ok
17991 else
17992 pgac_cv__128bit_int_bug=broken
17994 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17995 conftest.$ac_objext conftest.beam conftest.$ac_ext
17999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
18000 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
18001 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
18003 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
18005 # The cast to long int works around a bug in the HP C Compiler,
18006 # see AC_CHECK_SIZEOF for more information.
18007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
18008 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
18009 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
18010 $as_echo_n "(cached) " >&6
18011 else
18012 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
18013 #ifndef offsetof
18014 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
18015 #endif
18016 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
18018 else
18019 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
18020 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18021 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18022 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
18023 See \`config.log' for more details" "$LINENO" 5; }
18024 else
18025 ac_cv_alignof_PG_INT128_TYPE=0
18030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
18031 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
18035 cat >>confdefs.h <<_ACEOF
18036 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
18037 _ACEOF
18043 # Check for various atomic operations now that we have checked how to declare
18044 # 64bit integers.
18045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
18046 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
18047 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
18048 $as_echo_n "(cached) " >&6
18049 else
18050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18051 /* end confdefs.h. */
18054 main ()
18056 char lock = 0;
18057 __sync_lock_test_and_set(&lock, 1);
18058 __sync_lock_release(&lock);
18060 return 0;
18062 _ACEOF
18063 if ac_fn_c_try_link "$LINENO"; then :
18064 pgac_cv_gcc_sync_char_tas="yes"
18065 else
18066 pgac_cv_gcc_sync_char_tas="no"
18068 rm -f core conftest.err conftest.$ac_objext \
18069 conftest$ac_exeext conftest.$ac_ext
18071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
18072 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
18073 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
18075 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
18078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
18079 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
18080 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
18081 $as_echo_n "(cached) " >&6
18082 else
18083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18084 /* end confdefs.h. */
18087 main ()
18089 int lock = 0;
18090 __sync_lock_test_and_set(&lock, 1);
18091 __sync_lock_release(&lock);
18093 return 0;
18095 _ACEOF
18096 if ac_fn_c_try_link "$LINENO"; then :
18097 pgac_cv_gcc_sync_int32_tas="yes"
18098 else
18099 pgac_cv_gcc_sync_int32_tas="no"
18101 rm -f core conftest.err conftest.$ac_objext \
18102 conftest$ac_exeext conftest.$ac_ext
18104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
18105 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
18106 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
18108 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
18111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
18112 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
18113 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
18114 $as_echo_n "(cached) " >&6
18115 else
18116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18117 /* end confdefs.h. */
18120 main ()
18122 int val = 0;
18123 __sync_val_compare_and_swap(&val, 0, 37);
18125 return 0;
18127 _ACEOF
18128 if ac_fn_c_try_link "$LINENO"; then :
18129 pgac_cv_gcc_sync_int32_cas="yes"
18130 else
18131 pgac_cv_gcc_sync_int32_cas="no"
18133 rm -f core conftest.err conftest.$ac_objext \
18134 conftest$ac_exeext conftest.$ac_ext
18136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
18137 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
18138 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
18140 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
18143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
18144 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
18145 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
18146 $as_echo_n "(cached) " >&6
18147 else
18148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18149 /* end confdefs.h. */
18152 main ()
18154 PG_INT64_TYPE lock = 0;
18155 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
18157 return 0;
18159 _ACEOF
18160 if ac_fn_c_try_link "$LINENO"; then :
18161 pgac_cv_gcc_sync_int64_cas="yes"
18162 else
18163 pgac_cv_gcc_sync_int64_cas="no"
18165 rm -f core conftest.err conftest.$ac_objext \
18166 conftest$ac_exeext conftest.$ac_ext
18168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
18169 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
18170 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
18172 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
18175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
18176 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
18177 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
18178 $as_echo_n "(cached) " >&6
18179 else
18180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18181 /* end confdefs.h. */
18184 main ()
18186 int val = 0;
18187 int expect = 0;
18188 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
18190 return 0;
18192 _ACEOF
18193 if ac_fn_c_try_link "$LINENO"; then :
18194 pgac_cv_gcc_atomic_int32_cas="yes"
18195 else
18196 pgac_cv_gcc_atomic_int32_cas="no"
18198 rm -f core conftest.err conftest.$ac_objext \
18199 conftest$ac_exeext conftest.$ac_ext
18201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
18202 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
18203 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
18205 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
18208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
18209 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
18210 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
18211 $as_echo_n "(cached) " >&6
18212 else
18213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18214 /* end confdefs.h. */
18217 main ()
18219 PG_INT64_TYPE val = 0;
18220 PG_INT64_TYPE expect = 0;
18221 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
18223 return 0;
18225 _ACEOF
18226 if ac_fn_c_try_link "$LINENO"; then :
18227 pgac_cv_gcc_atomic_int64_cas="yes"
18228 else
18229 pgac_cv_gcc_atomic_int64_cas="no"
18231 rm -f core conftest.err conftest.$ac_objext \
18232 conftest$ac_exeext conftest.$ac_ext
18234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
18235 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
18236 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
18238 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
18243 # Check for x86 cpuid instruction
18244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
18245 $as_echo_n "checking for __get_cpuid... " >&6; }
18246 if ${pgac_cv__get_cpuid+:} false; then :
18247 $as_echo_n "(cached) " >&6
18248 else
18249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18250 /* end confdefs.h. */
18251 #include <cpuid.h>
18253 main ()
18255 unsigned int exx[4] = {0, 0, 0, 0};
18256 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
18259 return 0;
18261 _ACEOF
18262 if ac_fn_c_try_link "$LINENO"; then :
18263 pgac_cv__get_cpuid="yes"
18264 else
18265 pgac_cv__get_cpuid="no"
18267 rm -f core conftest.err conftest.$ac_objext \
18268 conftest$ac_exeext conftest.$ac_ext
18270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
18271 $as_echo "$pgac_cv__get_cpuid" >&6; }
18272 if test x"$pgac_cv__get_cpuid" = x"yes"; then
18274 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
18278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
18279 $as_echo_n "checking for __cpuid... " >&6; }
18280 if ${pgac_cv__cpuid+:} false; then :
18281 $as_echo_n "(cached) " >&6
18282 else
18283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18284 /* end confdefs.h. */
18285 #include <intrin.h>
18287 main ()
18289 unsigned int exx[4] = {0, 0, 0, 0};
18290 __get_cpuid(exx[0], 1);
18293 return 0;
18295 _ACEOF
18296 if ac_fn_c_try_link "$LINENO"; then :
18297 pgac_cv__cpuid="yes"
18298 else
18299 pgac_cv__cpuid="no"
18301 rm -f core conftest.err conftest.$ac_objext \
18302 conftest$ac_exeext conftest.$ac_ext
18304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
18305 $as_echo "$pgac_cv__cpuid" >&6; }
18306 if test x"$pgac_cv__cpuid" = x"yes"; then
18308 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
18312 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
18314 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
18315 # with the default compiler flags. If not, check if adding the -msse4.2
18316 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
18317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
18318 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
18319 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
18320 $as_echo_n "(cached) " >&6
18321 else
18322 pgac_save_CFLAGS=$CFLAGS
18323 CFLAGS="$pgac_save_CFLAGS "
18324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18325 /* end confdefs.h. */
18326 #include <nmmintrin.h>
18328 main ()
18330 unsigned int crc = 0;
18331 crc = _mm_crc32_u8(crc, 0);
18332 crc = _mm_crc32_u32(crc, 0);
18333 /* return computed value, to prevent the above being optimized away */
18334 return crc == 0;
18336 return 0;
18338 _ACEOF
18339 if ac_fn_c_try_link "$LINENO"; then :
18340 pgac_cv_sse42_crc32_intrinsics_=yes
18341 else
18342 pgac_cv_sse42_crc32_intrinsics_=no
18344 rm -f core conftest.err conftest.$ac_objext \
18345 conftest$ac_exeext conftest.$ac_ext
18346 CFLAGS="$pgac_save_CFLAGS"
18348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
18349 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
18350 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
18351 CFLAGS_SSE42=""
18352 pgac_sse42_crc32_intrinsics=yes
18355 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
18356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
18357 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
18358 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
18359 $as_echo_n "(cached) " >&6
18360 else
18361 pgac_save_CFLAGS=$CFLAGS
18362 CFLAGS="$pgac_save_CFLAGS -msse4.2"
18363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18364 /* end confdefs.h. */
18365 #include <nmmintrin.h>
18367 main ()
18369 unsigned int crc = 0;
18370 crc = _mm_crc32_u8(crc, 0);
18371 crc = _mm_crc32_u32(crc, 0);
18372 /* return computed value, to prevent the above being optimized away */
18373 return crc == 0;
18375 return 0;
18377 _ACEOF
18378 if ac_fn_c_try_link "$LINENO"; then :
18379 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
18380 else
18381 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
18383 rm -f core conftest.err conftest.$ac_objext \
18384 conftest$ac_exeext conftest.$ac_ext
18385 CFLAGS="$pgac_save_CFLAGS"
18387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
18388 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
18389 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
18390 CFLAGS_SSE42="-msse4.2"
18391 pgac_sse42_crc32_intrinsics=yes
18397 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18398 # define __SSE4_2__ in that case.
18399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18400 /* end confdefs.h. */
18403 main ()
18406 #ifndef __SSE4_2__
18407 #error __SSE4_2__ not defined
18408 #endif
18411 return 0;
18413 _ACEOF
18414 if ac_fn_c_try_compile "$LINENO"; then :
18415 SSE4_2_TARGETED=1
18417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18419 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18421 # First check if __crc32c* intrinsics can be used with the default compiler
18422 # flags. If not, check if adding -march=armv8-a+crc flag helps.
18423 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
18424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18425 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18426 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18427 $as_echo_n "(cached) " >&6
18428 else
18429 pgac_save_CFLAGS=$CFLAGS
18430 CFLAGS="$pgac_save_CFLAGS "
18431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18432 /* end confdefs.h. */
18433 #include <arm_acle.h>
18435 main ()
18437 unsigned int crc = 0;
18438 crc = __crc32cb(crc, 0);
18439 crc = __crc32ch(crc, 0);
18440 crc = __crc32cw(crc, 0);
18441 crc = __crc32cd(crc, 0);
18442 /* return computed value, to prevent the above being optimized away */
18443 return crc == 0;
18445 return 0;
18447 _ACEOF
18448 if ac_fn_c_try_link "$LINENO"; then :
18449 pgac_cv_armv8_crc32c_intrinsics_=yes
18450 else
18451 pgac_cv_armv8_crc32c_intrinsics_=no
18453 rm -f core conftest.err conftest.$ac_objext \
18454 conftest$ac_exeext conftest.$ac_ext
18455 CFLAGS="$pgac_save_CFLAGS"
18457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18458 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18459 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18460 CFLAGS_ARMV8_CRC32C=""
18461 pgac_armv8_crc32c_intrinsics=yes
18464 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18466 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18467 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18468 $as_echo_n "(cached) " >&6
18469 else
18470 pgac_save_CFLAGS=$CFLAGS
18471 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18473 /* end confdefs.h. */
18474 #include <arm_acle.h>
18476 main ()
18478 unsigned int crc = 0;
18479 crc = __crc32cb(crc, 0);
18480 crc = __crc32ch(crc, 0);
18481 crc = __crc32cw(crc, 0);
18482 crc = __crc32cd(crc, 0);
18483 /* return computed value, to prevent the above being optimized away */
18484 return crc == 0;
18486 return 0;
18488 _ACEOF
18489 if ac_fn_c_try_link "$LINENO"; then :
18490 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18491 else
18492 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18494 rm -f core conftest.err conftest.$ac_objext \
18495 conftest$ac_exeext conftest.$ac_ext
18496 CFLAGS="$pgac_save_CFLAGS"
18498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18499 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18500 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18501 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18502 pgac_armv8_crc32c_intrinsics=yes
18508 # Select CRC-32C implementation.
18510 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18511 # use the special CRC instructions for calculating CRC-32C. If we're not
18512 # targeting such a processor, but we can nevertheless produce code that uses
18513 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18514 # implementations and select which one to use at runtime, depending on whether
18515 # SSE 4.2 is supported by the processor we're running on.
18517 # Similarly, if we are targeting an ARM processor that has the CRC
18518 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18519 # we're not targeting such a processor, but can nevertheless produce code that
18520 # uses the CRC instructions, compile both, and select at runtime.
18522 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18523 # in the template or configure command line.
18524 if test x"$USE_SLICING_BY_8_CRC32C" = x"" && test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_ARMV8_CRC32C" = x"" && test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x""; then
18525 # Use Intel SSE 4.2 if available.
18526 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18527 USE_SSE42_CRC32C=1
18528 else
18529 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18530 # the runtime check.
18531 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
18532 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18533 else
18534 # Use ARM CRC Extension if available.
18535 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18536 USE_ARMV8_CRC32C=1
18537 else
18538 # ARM CRC Extension, with runtime check?
18539 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18540 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18541 else
18542 # fall back to slicing-by-8 algorithm, which doesn't require any
18543 # special CPU support.
18544 USE_SLICING_BY_8_CRC32C=1
18551 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18553 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18554 if test x"$USE_SSE42_CRC32C" = x"1"; then
18556 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18558 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18560 $as_echo "SSE 4.2" >&6; }
18561 else
18562 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18564 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18566 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18568 $as_echo "SSE 4.2 with runtime check" >&6; }
18569 else
18570 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18572 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18574 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18576 $as_echo "ARMv8 CRC instructions" >&6; }
18577 else
18578 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18580 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18582 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18584 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18585 else
18587 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18589 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18591 $as_echo "slicing-by-8" >&6; }
18599 # Select semaphore implementation type.
18600 if test "$PORTNAME" != "win32"; then
18601 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18602 # Need sem_open for this
18603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18604 $as_echo_n "checking for library containing sem_open... " >&6; }
18605 if ${ac_cv_search_sem_open+:} false; then :
18606 $as_echo_n "(cached) " >&6
18607 else
18608 ac_func_search_save_LIBS=$LIBS
18609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18610 /* end confdefs.h. */
18612 /* Override any GCC internal prototype to avoid an error.
18613 Use char because int might match the return type of a GCC
18614 builtin and then its argument prototype would still apply. */
18615 #ifdef __cplusplus
18616 extern "C"
18617 #endif
18618 char sem_open ();
18620 main ()
18622 return sem_open ();
18624 return 0;
18626 _ACEOF
18627 for ac_lib in '' rt pthread; do
18628 if test -z "$ac_lib"; then
18629 ac_res="none required"
18630 else
18631 ac_res=-l$ac_lib
18632 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18634 if ac_fn_c_try_link "$LINENO"; then :
18635 ac_cv_search_sem_open=$ac_res
18637 rm -f core conftest.err conftest.$ac_objext \
18638 conftest$ac_exeext
18639 if ${ac_cv_search_sem_open+:} false; then :
18640 break
18642 done
18643 if ${ac_cv_search_sem_open+:} false; then :
18645 else
18646 ac_cv_search_sem_open=no
18648 rm conftest.$ac_ext
18649 LIBS=$ac_func_search_save_LIBS
18651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18652 $as_echo "$ac_cv_search_sem_open" >&6; }
18653 ac_res=$ac_cv_search_sem_open
18654 if test "$ac_res" != no; then :
18655 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18656 USE_NAMED_POSIX_SEMAPHORES=1
18660 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18661 # Need sem_init for this
18662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18663 $as_echo_n "checking for library containing sem_init... " >&6; }
18664 if ${ac_cv_search_sem_init+:} false; then :
18665 $as_echo_n "(cached) " >&6
18666 else
18667 ac_func_search_save_LIBS=$LIBS
18668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18669 /* end confdefs.h. */
18671 /* Override any GCC internal prototype to avoid an error.
18672 Use char because int might match the return type of a GCC
18673 builtin and then its argument prototype would still apply. */
18674 #ifdef __cplusplus
18675 extern "C"
18676 #endif
18677 char sem_init ();
18679 main ()
18681 return sem_init ();
18683 return 0;
18685 _ACEOF
18686 for ac_lib in '' rt pthread; do
18687 if test -z "$ac_lib"; then
18688 ac_res="none required"
18689 else
18690 ac_res=-l$ac_lib
18691 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18693 if ac_fn_c_try_link "$LINENO"; then :
18694 ac_cv_search_sem_init=$ac_res
18696 rm -f core conftest.err conftest.$ac_objext \
18697 conftest$ac_exeext
18698 if ${ac_cv_search_sem_init+:} false; then :
18699 break
18701 done
18702 if ${ac_cv_search_sem_init+:} false; then :
18704 else
18705 ac_cv_search_sem_init=no
18707 rm conftest.$ac_ext
18708 LIBS=$ac_func_search_save_LIBS
18710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18711 $as_echo "$ac_cv_search_sem_init" >&6; }
18712 ac_res=$ac_cv_search_sem_init
18713 if test "$ac_res" != no; then :
18714 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18715 USE_UNNAMED_POSIX_SEMAPHORES=1
18719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18720 $as_echo_n "checking which semaphore API to use... " >&6; }
18721 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18723 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18725 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18726 sematype="named POSIX"
18727 else
18728 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18730 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18732 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18733 sematype="unnamed POSIX"
18734 else
18736 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18738 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18739 sematype="System V"
18742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18743 $as_echo "$sematype" >&6; }
18744 else
18746 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18748 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18752 # Select shared-memory implementation type.
18753 if test "$PORTNAME" != "win32"; then
18755 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18757 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18758 else
18760 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18762 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18765 # Select random number source
18767 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
18768 # in the template or configure command line.
18770 # If not selected manually, try to select a source automatically.
18771 if test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
18772 if test x"$with_openssl" = x"yes" ; then
18773 USE_OPENSSL_RANDOM=1
18774 elif test "$PORTNAME" = "win32" ; then
18775 USE_WIN32_RANDOM=1
18776 else
18777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18778 $as_echo_n "checking for /dev/urandom... " >&6; }
18779 if ${ac_cv_file__dev_urandom+:} false; then :
18780 $as_echo_n "(cached) " >&6
18781 else
18782 test "$cross_compiling" = yes &&
18783 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18784 if test -r "/dev/urandom"; then
18785 ac_cv_file__dev_urandom=yes
18786 else
18787 ac_cv_file__dev_urandom=no
18790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18791 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18792 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18797 if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
18798 USE_DEV_URANDOM=1
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18804 $as_echo_n "checking which random number source to use... " >&6; }
18805 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
18807 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
18809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18810 $as_echo "OpenSSL" >&6; }
18811 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
18813 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
18815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18816 $as_echo "Windows native" >&6; }
18817 elif test x"$USE_DEV_URANDOM" = x"1" ; then
18819 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
18821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18822 $as_echo "/dev/urandom" >&6; }
18823 else
18824 as_fn_error $? "
18825 no source of strong random numbers was found
18826 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers." "$LINENO" 5
18829 # If not set in template file, set bytes to use libc memset()
18830 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18831 MEMSET_LOOP_LIMIT=1024
18834 cat >>confdefs.h <<_ACEOF
18835 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18836 _ACEOF
18840 if test "$enable_nls" = yes ; then
18842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18843 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18844 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18845 $as_echo_n "(cached) " >&6
18846 else
18847 ac_func_search_save_LIBS=$LIBS
18848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18849 /* end confdefs.h. */
18851 /* Override any GCC internal prototype to avoid an error.
18852 Use char because int might match the return type of a GCC
18853 builtin and then its argument prototype would still apply. */
18854 #ifdef __cplusplus
18855 extern "C"
18856 #endif
18857 char bind_textdomain_codeset ();
18859 main ()
18861 return bind_textdomain_codeset ();
18863 return 0;
18865 _ACEOF
18866 for ac_lib in '' intl; do
18867 if test -z "$ac_lib"; then
18868 ac_res="none required"
18869 else
18870 ac_res=-l$ac_lib
18871 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18873 if ac_fn_c_try_link "$LINENO"; then :
18874 ac_cv_search_bind_textdomain_codeset=$ac_res
18876 rm -f core conftest.err conftest.$ac_objext \
18877 conftest$ac_exeext
18878 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18879 break
18881 done
18882 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18884 else
18885 ac_cv_search_bind_textdomain_codeset=no
18887 rm conftest.$ac_ext
18888 LIBS=$ac_func_search_save_LIBS
18890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18891 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18892 ac_res=$ac_cv_search_bind_textdomain_codeset
18893 if test "$ac_res" != no; then :
18894 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18896 else
18897 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18900 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18901 if test "x$ac_cv_header_libintl_h" = xyes; then :
18903 else
18904 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18908 if test -z "$MSGFMT"; then
18909 for ac_prog in msgfmt
18911 # Extract the first word of "$ac_prog", so it can be a program name with args.
18912 set dummy $ac_prog; ac_word=$2
18913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18914 $as_echo_n "checking for $ac_word... " >&6; }
18915 if ${ac_cv_path_MSGFMT+:} false; then :
18916 $as_echo_n "(cached) " >&6
18917 else
18918 case $MSGFMT in
18919 [\\/]* | ?:[\\/]*)
18920 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18924 for as_dir in $PATH
18926 IFS=$as_save_IFS
18927 test -z "$as_dir" && as_dir=.
18928 for ac_exec_ext in '' $ac_executable_extensions; do
18929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18930 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18932 break 2
18934 done
18935 done
18936 IFS=$as_save_IFS
18939 esac
18941 MSGFMT=$ac_cv_path_MSGFMT
18942 if test -n "$MSGFMT"; then
18943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18944 $as_echo "$MSGFMT" >&6; }
18945 else
18946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18947 $as_echo "no" >&6; }
18951 test -n "$MSGFMT" && break
18952 done
18954 else
18955 # Report the value of MSGFMT in configure's output in all cases.
18956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18957 $as_echo_n "checking for MSGFMT... " >&6; }
18958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18959 $as_echo "$MSGFMT" >&6; }
18962 if test -z "$MSGFMT"; then
18963 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18966 $as_echo_n "checking for msgfmt flags... " >&6; }
18967 if ${pgac_cv_msgfmt_flags+:} false; then :
18968 $as_echo_n "(cached) " >&6
18969 else
18970 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18971 pgac_cv_msgfmt_flags=-c
18974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18975 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18976 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18978 if test -z "$MSGMERGE"; then
18979 for ac_prog in msgmerge
18981 # Extract the first word of "$ac_prog", so it can be a program name with args.
18982 set dummy $ac_prog; ac_word=$2
18983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18984 $as_echo_n "checking for $ac_word... " >&6; }
18985 if ${ac_cv_path_MSGMERGE+:} false; then :
18986 $as_echo_n "(cached) " >&6
18987 else
18988 case $MSGMERGE in
18989 [\\/]* | ?:[\\/]*)
18990 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18994 for as_dir in $PATH
18996 IFS=$as_save_IFS
18997 test -z "$as_dir" && as_dir=.
18998 for ac_exec_ext in '' $ac_executable_extensions; do
18999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19000 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
19001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19002 break 2
19004 done
19005 done
19006 IFS=$as_save_IFS
19009 esac
19011 MSGMERGE=$ac_cv_path_MSGMERGE
19012 if test -n "$MSGMERGE"; then
19013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
19014 $as_echo "$MSGMERGE" >&6; }
19015 else
19016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19017 $as_echo "no" >&6; }
19021 test -n "$MSGMERGE" && break
19022 done
19024 else
19025 # Report the value of MSGMERGE in configure's output in all cases.
19026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
19027 $as_echo_n "checking for MSGMERGE... " >&6; }
19028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
19029 $as_echo "$MSGMERGE" >&6; }
19032 if test -z "$XGETTEXT"; then
19033 for ac_prog in xgettext
19035 # Extract the first word of "$ac_prog", so it can be a program name with args.
19036 set dummy $ac_prog; ac_word=$2
19037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19038 $as_echo_n "checking for $ac_word... " >&6; }
19039 if ${ac_cv_path_XGETTEXT+:} false; then :
19040 $as_echo_n "(cached) " >&6
19041 else
19042 case $XGETTEXT in
19043 [\\/]* | ?:[\\/]*)
19044 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
19047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19048 for as_dir in $PATH
19050 IFS=$as_save_IFS
19051 test -z "$as_dir" && as_dir=.
19052 for ac_exec_ext in '' $ac_executable_extensions; do
19053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19054 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
19055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19056 break 2
19058 done
19059 done
19060 IFS=$as_save_IFS
19063 esac
19065 XGETTEXT=$ac_cv_path_XGETTEXT
19066 if test -n "$XGETTEXT"; then
19067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
19068 $as_echo "$XGETTEXT" >&6; }
19069 else
19070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19071 $as_echo "no" >&6; }
19075 test -n "$XGETTEXT" && break
19076 done
19078 else
19079 # Report the value of XGETTEXT in configure's output in all cases.
19080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
19081 $as_echo_n "checking for XGETTEXT... " >&6; }
19082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
19083 $as_echo "$XGETTEXT" >&6; }
19089 # Check for Tcl configuration script tclConfig.sh
19090 if test "$with_tcl" = yes; then
19091 if test -z "$TCLSH"; then
19092 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
19094 # Extract the first word of "$ac_prog", so it can be a program name with args.
19095 set dummy $ac_prog; ac_word=$2
19096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19097 $as_echo_n "checking for $ac_word... " >&6; }
19098 if ${ac_cv_path_TCLSH+:} false; then :
19099 $as_echo_n "(cached) " >&6
19100 else
19101 case $TCLSH in
19102 [\\/]* | ?:[\\/]*)
19103 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
19106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19107 for as_dir in $PATH
19109 IFS=$as_save_IFS
19110 test -z "$as_dir" && as_dir=.
19111 for ac_exec_ext in '' $ac_executable_extensions; do
19112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19113 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
19114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19115 break 2
19117 done
19118 done
19119 IFS=$as_save_IFS
19122 esac
19124 TCLSH=$ac_cv_path_TCLSH
19125 if test -n "$TCLSH"; then
19126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
19127 $as_echo "$TCLSH" >&6; }
19128 else
19129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19130 $as_echo "no" >&6; }
19134 test -n "$TCLSH" && break
19135 done
19137 else
19138 # Report the value of TCLSH in configure's output in all cases.
19139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
19140 $as_echo_n "checking for TCLSH... " >&6; }
19141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
19142 $as_echo "$TCLSH" >&6; }
19145 if test x"$TCLSH" = x""; then
19146 as_fn_error $? "Tcl shell not found" "$LINENO" 5
19149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
19150 $as_echo_n "checking for tclConfig.sh... " >&6; }
19151 # Let user override test
19152 if test -z "$TCL_CONFIG_SH"; then
19153 pgac_test_dirs="$with_tclconfig"
19155 set X $pgac_test_dirs; shift
19156 if test $# -eq 0; then
19157 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
19158 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
19159 # On newer macOS, $auto_path frequently doesn't include the place
19160 # where tclConfig.sh actually lives. Append that to the end, so as not
19161 # to break cases where a non-default Tcl installation is being used.
19162 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
19163 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
19165 set X $pgac_test_dirs; shift
19168 for pgac_dir do
19169 if test -r "$pgac_dir/tclConfig.sh"; then
19170 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
19171 break
19173 done
19176 if test -z "$TCL_CONFIG_SH"; then
19177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19178 $as_echo "no" >&6; }
19179 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
19180 else
19181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
19182 $as_echo "$TCL_CONFIG_SH" >&6; }
19187 . "$TCL_CONFIG_SH"
19188 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
19189 eval TCL_LIBS=\"$TCL_LIBS\"
19190 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
19191 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
19193 if test "$TCL_SHARED_BUILD" != 1; then
19194 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
19195 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
19197 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
19198 ac_save_CPPFLAGS=$CPPFLAGS
19199 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
19200 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
19201 if test "x$ac_cv_header_tcl_h" = xyes; then :
19203 else
19204 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
19208 CPPFLAGS=$ac_save_CPPFLAGS
19211 # check for <perl.h>
19212 if test "$with_perl" = yes; then
19213 ac_save_CPPFLAGS=$CPPFLAGS
19214 CPPFLAGS="$CPPFLAGS $perl_includespec"
19215 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
19217 if test "x$ac_cv_header_perl_h" = xyes; then :
19219 else
19220 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
19224 # While we're at it, check that we can link to libperl.
19225 # On most platforms, if perl.h is there then libperl.so will be too, but at
19226 # this writing Debian packages them separately. There is no known reason to
19227 # waste cycles on separate probes for the Tcl or Python libraries, though.
19228 # On some Red Hat platforms, the link attempt can fail if we don't use
19229 # CFLAGS_SL while building the test program.
19230 ac_save_CFLAGS=$CFLAGS
19231 CFLAGS="$CFLAGS $CFLAGS_SL"
19232 pgac_save_LIBS=$LIBS
19233 LIBS="$perl_embed_ldflags"
19234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
19235 $as_echo_n "checking for libperl... " >&6; }
19236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19237 /* end confdefs.h. */
19239 #include <EXTERN.h>
19240 #include <perl.h>
19243 main ()
19245 perl_alloc();
19247 return 0;
19249 _ACEOF
19250 if ac_fn_c_try_link "$LINENO"; then :
19251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19252 $as_echo "yes" >&6; }
19253 else
19254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19255 $as_echo "no" >&6; }
19256 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
19258 rm -f core conftest.err conftest.$ac_objext \
19259 conftest$ac_exeext conftest.$ac_ext
19260 LIBS=$pgac_save_LIBS
19261 CFLAGS=$ac_save_CFLAGS
19262 CPPFLAGS=$ac_save_CPPFLAGS
19265 # check for <Python.h>
19266 if test "$with_python" = yes; then
19267 ac_save_CPPFLAGS=$CPPFLAGS
19268 CPPFLAGS="$python_includespec $CPPFLAGS"
19269 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
19270 if test "x$ac_cv_header_Python_h" = xyes; then :
19272 else
19273 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
19277 CPPFLAGS=$ac_save_CPPFLAGS
19281 # Check for documentation-building tools
19283 if test -z "$XMLLINT"; then
19284 for ac_prog in xmllint
19286 # Extract the first word of "$ac_prog", so it can be a program name with args.
19287 set dummy $ac_prog; ac_word=$2
19288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19289 $as_echo_n "checking for $ac_word... " >&6; }
19290 if ${ac_cv_path_XMLLINT+:} false; then :
19291 $as_echo_n "(cached) " >&6
19292 else
19293 case $XMLLINT in
19294 [\\/]* | ?:[\\/]*)
19295 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
19298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19299 for as_dir in $PATH
19301 IFS=$as_save_IFS
19302 test -z "$as_dir" && as_dir=.
19303 for ac_exec_ext in '' $ac_executable_extensions; do
19304 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19305 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
19306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19307 break 2
19309 done
19310 done
19311 IFS=$as_save_IFS
19314 esac
19316 XMLLINT=$ac_cv_path_XMLLINT
19317 if test -n "$XMLLINT"; then
19318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19319 $as_echo "$XMLLINT" >&6; }
19320 else
19321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19322 $as_echo "no" >&6; }
19326 test -n "$XMLLINT" && break
19327 done
19329 else
19330 # Report the value of XMLLINT in configure's output in all cases.
19331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
19332 $as_echo_n "checking for XMLLINT... " >&6; }
19333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19334 $as_echo "$XMLLINT" >&6; }
19337 if test -z "$XSLTPROC"; then
19338 for ac_prog in xsltproc
19340 # Extract the first word of "$ac_prog", so it can be a program name with args.
19341 set dummy $ac_prog; ac_word=$2
19342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19343 $as_echo_n "checking for $ac_word... " >&6; }
19344 if ${ac_cv_path_XSLTPROC+:} false; then :
19345 $as_echo_n "(cached) " >&6
19346 else
19347 case $XSLTPROC in
19348 [\\/]* | ?:[\\/]*)
19349 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19353 for as_dir in $PATH
19355 IFS=$as_save_IFS
19356 test -z "$as_dir" && as_dir=.
19357 for ac_exec_ext in '' $ac_executable_extensions; do
19358 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19359 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19360 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19361 break 2
19363 done
19364 done
19365 IFS=$as_save_IFS
19368 esac
19370 XSLTPROC=$ac_cv_path_XSLTPROC
19371 if test -n "$XSLTPROC"; then
19372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19373 $as_echo "$XSLTPROC" >&6; }
19374 else
19375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19376 $as_echo "no" >&6; }
19380 test -n "$XSLTPROC" && break
19381 done
19383 else
19384 # Report the value of XSLTPROC in configure's output in all cases.
19385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
19386 $as_echo_n "checking for XSLTPROC... " >&6; }
19387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19388 $as_echo "$XSLTPROC" >&6; }
19391 if test -z "$FOP"; then
19392 for ac_prog in fop
19394 # Extract the first word of "$ac_prog", so it can be a program name with args.
19395 set dummy $ac_prog; ac_word=$2
19396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19397 $as_echo_n "checking for $ac_word... " >&6; }
19398 if ${ac_cv_path_FOP+:} false; then :
19399 $as_echo_n "(cached) " >&6
19400 else
19401 case $FOP in
19402 [\\/]* | ?:[\\/]*)
19403 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19407 for as_dir in $PATH
19409 IFS=$as_save_IFS
19410 test -z "$as_dir" && as_dir=.
19411 for ac_exec_ext in '' $ac_executable_extensions; do
19412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19413 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19415 break 2
19417 done
19418 done
19419 IFS=$as_save_IFS
19422 esac
19424 FOP=$ac_cv_path_FOP
19425 if test -n "$FOP"; then
19426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19427 $as_echo "$FOP" >&6; }
19428 else
19429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19430 $as_echo "no" >&6; }
19434 test -n "$FOP" && break
19435 done
19437 else
19438 # Report the value of FOP in configure's output in all cases.
19439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19440 $as_echo_n "checking for FOP... " >&6; }
19441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19442 $as_echo "$FOP" >&6; }
19445 if test -z "$DBTOEPUB"; then
19446 for ac_prog in dbtoepub
19448 # Extract the first word of "$ac_prog", so it can be a program name with args.
19449 set dummy $ac_prog; ac_word=$2
19450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19451 $as_echo_n "checking for $ac_word... " >&6; }
19452 if ${ac_cv_path_DBTOEPUB+:} false; then :
19453 $as_echo_n "(cached) " >&6
19454 else
19455 case $DBTOEPUB in
19456 [\\/]* | ?:[\\/]*)
19457 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19461 for as_dir in $PATH
19463 IFS=$as_save_IFS
19464 test -z "$as_dir" && as_dir=.
19465 for ac_exec_ext in '' $ac_executable_extensions; do
19466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19467 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19469 break 2
19471 done
19472 done
19473 IFS=$as_save_IFS
19476 esac
19478 DBTOEPUB=$ac_cv_path_DBTOEPUB
19479 if test -n "$DBTOEPUB"; then
19480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19481 $as_echo "$DBTOEPUB" >&6; }
19482 else
19483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19484 $as_echo "no" >&6; }
19488 test -n "$DBTOEPUB" && break
19489 done
19491 else
19492 # Report the value of DBTOEPUB in configure's output in all cases.
19493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19494 $as_echo_n "checking for DBTOEPUB... " >&6; }
19495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19496 $as_echo "$DBTOEPUB" >&6; }
19501 # Check for test tools
19503 if test "$enable_tap_tests" = yes; then
19504 # Make sure we know where prove is.
19505 if test -z "$PROVE"; then
19506 for ac_prog in prove
19508 # Extract the first word of "$ac_prog", so it can be a program name with args.
19509 set dummy $ac_prog; ac_word=$2
19510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19511 $as_echo_n "checking for $ac_word... " >&6; }
19512 if ${ac_cv_path_PROVE+:} false; then :
19513 $as_echo_n "(cached) " >&6
19514 else
19515 case $PROVE in
19516 [\\/]* | ?:[\\/]*)
19517 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19521 for as_dir in $PATH
19523 IFS=$as_save_IFS
19524 test -z "$as_dir" && as_dir=.
19525 for ac_exec_ext in '' $ac_executable_extensions; do
19526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19527 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19529 break 2
19531 done
19532 done
19533 IFS=$as_save_IFS
19536 esac
19538 PROVE=$ac_cv_path_PROVE
19539 if test -n "$PROVE"; then
19540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19541 $as_echo "$PROVE" >&6; }
19542 else
19543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19544 $as_echo "no" >&6; }
19548 test -n "$PROVE" && break
19549 done
19551 else
19552 # Report the value of PROVE in configure's output in all cases.
19553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19554 $as_echo_n "checking for PROVE... " >&6; }
19555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19556 $as_echo "$PROVE" >&6; }
19559 if test -z "$PROVE"; then
19560 as_fn_error $? "prove not found" "$LINENO" 5
19562 # Check for necessary Perl modules. You might think we should use
19563 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19564 # installation than perl, eg on MSys, so we have to check using prove.
19565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19566 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19567 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19568 if test $? -eq 0; then
19569 # log the module version details, but don't show them interactively
19570 echo "$modulestderr" >&5
19571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19572 $as_echo "yes" >&6; }
19573 else
19574 # on failure, though, show the results to the user
19575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19576 $as_echo "$modulestderr" >&6; }
19577 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19581 # Thread testing
19583 # We have to run the thread test near the end so we have all our symbols
19584 # defined. Cross compiling throws a warning.
19586 if test "$enable_thread_safety" = yes; then
19587 if test "$PORTNAME" != "win32"
19588 then
19589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
19590 $as_echo_n "checking thread safety of required library functions... " >&6; }
19592 _CFLAGS="$CFLAGS"
19593 _LIBS="$LIBS"
19594 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
19595 LIBS="$LIBS $PTHREAD_LIBS"
19596 if test "$cross_compiling" = yes; then :
19597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
19598 $as_echo "maybe" >&6; }
19599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19600 *** Skipping thread test program because of cross-compile build.
19601 *** Run the program in src/test/thread on the target machine.
19602 " >&5
19603 $as_echo "$as_me: WARNING:
19604 *** Skipping thread test program because of cross-compile build.
19605 *** Run the program in src/test/thread on the target machine.
19606 " >&2;}
19607 else
19608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19609 /* end confdefs.h. */
19610 #include "$srcdir/src/test/thread/thread_test.c"
19611 _ACEOF
19612 if ac_fn_c_try_run "$LINENO"; then :
19613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19614 $as_echo "yes" >&6; }
19615 else
19616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19617 $as_echo "no" >&6; }
19618 as_fn_error $? "thread test program failed
19619 This platform is not thread-safe. Check the file 'config.log' or compile
19620 and run src/test/thread/thread_test for the exact reason.
19621 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
19623 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19624 conftest.$ac_objext conftest.beam conftest.$ac_ext
19627 CFLAGS="$_CFLAGS"
19628 LIBS="$_LIBS"
19629 else
19630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
19631 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
19635 # If compiler will take -Wl,--as-needed (or various platform-specific
19636 # spellings thereof) then add that to LDFLAGS. This is much easier than
19637 # trying to filter LIBS to the minimum for each executable.
19638 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19639 # libreadline; therefore we postpone testing it until we know what library
19640 # dependencies readline has. The test code will try to link with $LIBS.
19641 if test "$with_readline" = yes; then
19642 link_test_func=readline
19643 else
19644 link_test_func=exit
19647 if test "$PORTNAME" = "darwin"; then
19648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19649 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19650 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19651 $as_echo_n "(cached) " >&6
19652 else
19653 pgac_save_LDFLAGS=$LDFLAGS
19654 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19655 if test "$cross_compiling" = yes; then :
19656 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19657 else
19658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19659 /* end confdefs.h. */
19660 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19662 main ()
19666 return 0;
19668 _ACEOF
19669 if ac_fn_c_try_run "$LINENO"; then :
19670 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19671 else
19672 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19675 conftest.$ac_objext conftest.beam conftest.$ac_ext
19678 LDFLAGS="$pgac_save_LDFLAGS"
19680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19681 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19682 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19683 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19686 elif test "$PORTNAME" = "openbsd"; then
19687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19688 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19689 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19690 $as_echo_n "(cached) " >&6
19691 else
19692 pgac_save_LDFLAGS=$LDFLAGS
19693 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19694 if test "$cross_compiling" = yes; then :
19695 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19696 else
19697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19698 /* end confdefs.h. */
19699 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19701 main ()
19705 return 0;
19707 _ACEOF
19708 if ac_fn_c_try_run "$LINENO"; then :
19709 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19710 else
19711 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19713 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19714 conftest.$ac_objext conftest.beam conftest.$ac_ext
19717 LDFLAGS="$pgac_save_LDFLAGS"
19719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19720 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19721 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19722 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19725 else
19726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19727 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19728 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19729 $as_echo_n "(cached) " >&6
19730 else
19731 pgac_save_LDFLAGS=$LDFLAGS
19732 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19733 if test "$cross_compiling" = yes; then :
19734 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19735 else
19736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19737 /* end confdefs.h. */
19738 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19740 main ()
19744 return 0;
19746 _ACEOF
19747 if ac_fn_c_try_run "$LINENO"; then :
19748 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19749 else
19750 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19753 conftest.$ac_objext conftest.beam conftest.$ac_ext
19756 LDFLAGS="$pgac_save_LDFLAGS"
19758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19759 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19760 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19761 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19766 # Create compiler version string
19767 if test x"$GCC" = x"yes" ; then
19768 cc_string=`${CC} --version | sed q`
19769 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19770 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19771 cc_string=`${CC} -V 2>&1 | sed q`
19772 else
19773 cc_string=$CC
19777 cat >>confdefs.h <<_ACEOF
19778 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19779 _ACEOF
19782 # Supply a numeric version string for use by 3rd party add-ons
19783 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19784 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
19785 tr '.' ' ' |
19786 $AWK '{printf "%d%04d", $1, $2}'`"
19788 cat >>confdefs.h <<_ACEOF
19789 #define PG_VERSION_NUM $PG_VERSION_NUM
19790 _ACEOF
19794 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19795 # literally, so that it's possible to override it at build time using
19796 # a command like "make ... PG_SYSROOT=path". This has to be done after
19797 # we've finished all configure checks that depend on CPPFLAGS.
19798 # The same for LDFLAGS, too.
19799 if test x"$PG_SYSROOT" != x; then
19800 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19801 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19806 # Begin output steps
19808 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19809 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19810 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19811 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19812 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19813 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19814 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19815 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19816 # Currently only used when LLVM is used
19817 if test "$with_llvm" = yes ; then
19818 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19819 $as_echo "$as_me: using CXX=$CXX" >&6;}
19820 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19821 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19822 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19823 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19824 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19825 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19826 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19827 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19830 # prepare build tree if outside source tree
19831 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19832 # Note 2: /bin/pwd might be better than shell's built-in at getting
19833 # a symlink-free name.
19834 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19835 vpath_build=no
19836 else
19837 vpath_build=yes
19838 if test "$no_create" != yes; then
19839 $as_echo_n "preparing build tree... " >&6
19840 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19841 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19842 || as_fn_error $? "failed" "$LINENO" 5
19843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19844 $as_echo "done" >&6; }
19850 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19853 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}"
19856 if test "$PORTNAME" = "win32"; then
19857 ac_config_commands="$ac_config_commands check_win32_symlinks"
19861 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19864 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19867 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19870 cat >confcache <<\_ACEOF
19871 # This file is a shell script that caches the results of configure
19872 # tests run on this system so they can be shared between configure
19873 # scripts and configure runs, see configure's option --config-cache.
19874 # It is not useful on other systems. If it contains results you don't
19875 # want to keep, you may remove or edit it.
19877 # config.status only pays attention to the cache file if you give it
19878 # the --recheck option to rerun configure.
19880 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19881 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19882 # following values.
19884 _ACEOF
19886 # The following way of writing the cache mishandles newlines in values,
19887 # but we know of no workaround that is simple, portable, and efficient.
19888 # So, we kill variables containing newlines.
19889 # Ultrix sh set writes to stderr and can't be redirected directly,
19890 # and sets the high bit in the cache file unless we assign to the vars.
19892 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19893 eval ac_val=\$$ac_var
19894 case $ac_val in #(
19895 *${as_nl}*)
19896 case $ac_var in #(
19897 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19898 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19899 esac
19900 case $ac_var in #(
19901 _ | IFS | as_nl) ;; #(
19902 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19903 *) { eval $ac_var=; unset $ac_var;} ;;
19904 esac ;;
19905 esac
19906 done
19908 (set) 2>&1 |
19909 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19910 *${as_nl}ac_space=\ *)
19911 # `set' does not quote correctly, so add quotes: double-quote
19912 # substitution turns \\\\ into \\, and sed turns \\ into \.
19913 sed -n \
19914 "s/'/'\\\\''/g;
19915 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19916 ;; #(
19918 # `set' quotes correctly as required by POSIX, so do not add quotes.
19919 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19921 esac |
19922 sort
19924 sed '
19925 /^ac_cv_env_/b end
19926 t clear
19927 :clear
19928 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19929 t end
19930 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19931 :end' >>confcache
19932 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19933 if test -w "$cache_file"; then
19934 if test "x$cache_file" != "x/dev/null"; then
19935 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19936 $as_echo "$as_me: updating cache $cache_file" >&6;}
19937 if test ! -f "$cache_file" || test -h "$cache_file"; then
19938 cat confcache >"$cache_file"
19939 else
19940 case $cache_file in #(
19941 */* | ?:*)
19942 mv -f confcache "$cache_file"$$ &&
19943 mv -f "$cache_file"$$ "$cache_file" ;; #(
19945 mv -f confcache "$cache_file" ;;
19946 esac
19949 else
19950 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19951 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19954 rm -f confcache
19956 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19957 # Let make expand exec_prefix.
19958 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19960 DEFS=-DHAVE_CONFIG_H
19962 ac_libobjs=
19963 ac_ltlibobjs=
19965 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19966 # 1. Remove the extension, and $U if already installed.
19967 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19968 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19969 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19970 # will be set to the directory where LIBOBJS objects are built.
19971 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19972 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19973 done
19974 LIBOBJS=$ac_libobjs
19976 LTLIBOBJS=$ac_ltlibobjs
19981 : "${CONFIG_STATUS=./config.status}"
19982 ac_write_fail=0
19983 ac_clean_files_save=$ac_clean_files
19984 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19985 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19986 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19987 as_write_fail=0
19988 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19989 #! $SHELL
19990 # Generated by $as_me.
19991 # Run this file to recreate the current configuration.
19992 # Compiler output produced by configure, useful for debugging
19993 # configure, is in config.log if it exists.
19995 debug=false
19996 ac_cs_recheck=false
19997 ac_cs_silent=false
19999 SHELL=\${CONFIG_SHELL-$SHELL}
20000 export SHELL
20001 _ASEOF
20002 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20003 ## -------------------- ##
20004 ## M4sh Initialization. ##
20005 ## -------------------- ##
20007 # Be more Bourne compatible
20008 DUALCASE=1; export DUALCASE # for MKS sh
20009 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20010 emulate sh
20011 NULLCMD=:
20012 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20013 # is contrary to our usage. Disable this feature.
20014 alias -g '${1+"$@"}'='"$@"'
20015 setopt NO_GLOB_SUBST
20016 else
20017 case `(set -o) 2>/dev/null` in #(
20018 *posix*) :
20019 set -o posix ;; #(
20020 *) :
20022 esac
20026 as_nl='
20028 export as_nl
20029 # Printing a long string crashes Solaris 7 /usr/bin/printf.
20030 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20031 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20032 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20033 # Prefer a ksh shell builtin over an external printf program on Solaris,
20034 # but without wasting forks for bash or zsh.
20035 if test -z "$BASH_VERSION$ZSH_VERSION" \
20036 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20037 as_echo='print -r --'
20038 as_echo_n='print -rn --'
20039 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20040 as_echo='printf %s\n'
20041 as_echo_n='printf %s'
20042 else
20043 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20044 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20045 as_echo_n='/usr/ucb/echo -n'
20046 else
20047 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20048 as_echo_n_body='eval
20049 arg=$1;
20050 case $arg in #(
20051 *"$as_nl"*)
20052 expr "X$arg" : "X\\(.*\\)$as_nl";
20053 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20054 esac;
20055 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20057 export as_echo_n_body
20058 as_echo_n='sh -c $as_echo_n_body as_echo'
20060 export as_echo_body
20061 as_echo='sh -c $as_echo_body as_echo'
20064 # The user is always right.
20065 if test "${PATH_SEPARATOR+set}" != set; then
20066 PATH_SEPARATOR=:
20067 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20068 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20069 PATH_SEPARATOR=';'
20074 # IFS
20075 # We need space, tab and new line, in precisely that order. Quoting is
20076 # there to prevent editors from complaining about space-tab.
20077 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20078 # splitting by setting IFS to empty value.)
20079 IFS=" "" $as_nl"
20081 # Find who we are. Look in the path if we contain no directory separator.
20082 as_myself=
20083 case $0 in #((
20084 *[\\/]* ) as_myself=$0 ;;
20085 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20086 for as_dir in $PATH
20088 IFS=$as_save_IFS
20089 test -z "$as_dir" && as_dir=.
20090 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20091 done
20092 IFS=$as_save_IFS
20095 esac
20096 # We did not find ourselves, most probably we were run as `sh COMMAND'
20097 # in which case we are not to be found in the path.
20098 if test "x$as_myself" = x; then
20099 as_myself=$0
20101 if test ! -f "$as_myself"; then
20102 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20103 exit 1
20106 # Unset variables that we do not need and which cause bugs (e.g. in
20107 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20108 # suppresses any "Segmentation fault" message there. '((' could
20109 # trigger a bug in pdksh 5.2.14.
20110 for as_var in BASH_ENV ENV MAIL MAILPATH
20111 do eval test x\${$as_var+set} = xset \
20112 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20113 done
20114 PS1='$ '
20115 PS2='> '
20116 PS4='+ '
20118 # NLS nuisances.
20119 LC_ALL=C
20120 export LC_ALL
20121 LANGUAGE=C
20122 export LANGUAGE
20124 # CDPATH.
20125 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20128 # as_fn_error STATUS ERROR [LINENO LOG_FD]
20129 # ----------------------------------------
20130 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20131 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20132 # script with STATUS, using 1 if that was 0.
20133 as_fn_error ()
20135 as_status=$1; test $as_status -eq 0 && as_status=1
20136 if test "$4"; then
20137 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20138 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20140 $as_echo "$as_me: error: $2" >&2
20141 as_fn_exit $as_status
20142 } # as_fn_error
20145 # as_fn_set_status STATUS
20146 # -----------------------
20147 # Set $? to STATUS, without forking.
20148 as_fn_set_status ()
20150 return $1
20151 } # as_fn_set_status
20153 # as_fn_exit STATUS
20154 # -----------------
20155 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20156 as_fn_exit ()
20158 set +e
20159 as_fn_set_status $1
20160 exit $1
20161 } # as_fn_exit
20163 # as_fn_unset VAR
20164 # ---------------
20165 # Portably unset VAR.
20166 as_fn_unset ()
20168 { eval $1=; unset $1;}
20170 as_unset=as_fn_unset
20171 # as_fn_append VAR VALUE
20172 # ----------------------
20173 # Append the text in VALUE to the end of the definition contained in VAR. Take
20174 # advantage of any shell optimizations that allow amortized linear growth over
20175 # repeated appends, instead of the typical quadratic growth present in naive
20176 # implementations.
20177 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20178 eval 'as_fn_append ()
20180 eval $1+=\$2
20182 else
20183 as_fn_append ()
20185 eval $1=\$$1\$2
20187 fi # as_fn_append
20189 # as_fn_arith ARG...
20190 # ------------------
20191 # Perform arithmetic evaluation on the ARGs, and store the result in the
20192 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20193 # must be portable across $(()) and expr.
20194 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20195 eval 'as_fn_arith ()
20197 as_val=$(( $* ))
20199 else
20200 as_fn_arith ()
20202 as_val=`expr "$@" || test $? -eq 1`
20204 fi # as_fn_arith
20207 if expr a : '\(a\)' >/dev/null 2>&1 &&
20208 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20209 as_expr=expr
20210 else
20211 as_expr=false
20214 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20215 as_basename=basename
20216 else
20217 as_basename=false
20220 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20221 as_dirname=dirname
20222 else
20223 as_dirname=false
20226 as_me=`$as_basename -- "$0" ||
20227 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20228 X"$0" : 'X\(//\)$' \| \
20229 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20230 $as_echo X/"$0" |
20231 sed '/^.*\/\([^/][^/]*\)\/*$/{
20232 s//\1/
20235 /^X\/\(\/\/\)$/{
20236 s//\1/
20239 /^X\/\(\/\).*/{
20240 s//\1/
20243 s/.*/./; q'`
20245 # Avoid depending upon Character Ranges.
20246 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20247 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20248 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20249 as_cr_digits='0123456789'
20250 as_cr_alnum=$as_cr_Letters$as_cr_digits
20252 ECHO_C= ECHO_N= ECHO_T=
20253 case `echo -n x` in #(((((
20254 -n*)
20255 case `echo 'xy\c'` in
20256 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20257 xy) ECHO_C='\c';;
20258 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20259 ECHO_T=' ';;
20260 esac;;
20262 ECHO_N='-n';;
20263 esac
20265 rm -f conf$$ conf$$.exe conf$$.file
20266 if test -d conf$$.dir; then
20267 rm -f conf$$.dir/conf$$.file
20268 else
20269 rm -f conf$$.dir
20270 mkdir conf$$.dir 2>/dev/null
20272 if (echo >conf$$.file) 2>/dev/null; then
20273 if ln -s conf$$.file conf$$ 2>/dev/null; then
20274 as_ln_s='ln -s'
20275 # ... but there are two gotchas:
20276 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20277 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20278 # In both cases, we have to default to `cp -pR'.
20279 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20280 as_ln_s='cp -pR'
20281 elif ln conf$$.file conf$$ 2>/dev/null; then
20282 as_ln_s=ln
20283 else
20284 as_ln_s='cp -pR'
20286 else
20287 as_ln_s='cp -pR'
20289 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20290 rmdir conf$$.dir 2>/dev/null
20293 # as_fn_mkdir_p
20294 # -------------
20295 # Create "$as_dir" as a directory, including parents if necessary.
20296 as_fn_mkdir_p ()
20299 case $as_dir in #(
20300 -*) as_dir=./$as_dir;;
20301 esac
20302 test -d "$as_dir" || eval $as_mkdir_p || {
20303 as_dirs=
20304 while :; do
20305 case $as_dir in #(
20306 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20307 *) as_qdir=$as_dir;;
20308 esac
20309 as_dirs="'$as_qdir' $as_dirs"
20310 as_dir=`$as_dirname -- "$as_dir" ||
20311 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20312 X"$as_dir" : 'X\(//\)[^/]' \| \
20313 X"$as_dir" : 'X\(//\)$' \| \
20314 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20315 $as_echo X"$as_dir" |
20316 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20317 s//\1/
20320 /^X\(\/\/\)[^/].*/{
20321 s//\1/
20324 /^X\(\/\/\)$/{
20325 s//\1/
20328 /^X\(\/\).*/{
20329 s//\1/
20332 s/.*/./; q'`
20333 test -d "$as_dir" && break
20334 done
20335 test -z "$as_dirs" || eval "mkdir $as_dirs"
20336 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20339 } # as_fn_mkdir_p
20340 if mkdir -p . 2>/dev/null; then
20341 as_mkdir_p='mkdir -p "$as_dir"'
20342 else
20343 test -d ./-p && rmdir ./-p
20344 as_mkdir_p=false
20348 # as_fn_executable_p FILE
20349 # -----------------------
20350 # Test if FILE is an executable regular file.
20351 as_fn_executable_p ()
20353 test -f "$1" && test -x "$1"
20354 } # as_fn_executable_p
20355 as_test_x='test -x'
20356 as_executable_p=as_fn_executable_p
20358 # Sed expression to map a string onto a valid CPP name.
20359 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20361 # Sed expression to map a string onto a valid variable name.
20362 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20365 exec 6>&1
20366 ## ----------------------------------- ##
20367 ## Main body of $CONFIG_STATUS script. ##
20368 ## ----------------------------------- ##
20369 _ASEOF
20370 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20372 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20373 # Save the log message, to keep $0 and so on meaningful, and to
20374 # report actual input values of CONFIG_FILES etc. instead of their
20375 # values after options handling.
20376 ac_log="
20377 This file was extended by PostgreSQL $as_me 12.22, which was
20378 generated by GNU Autoconf 2.69. Invocation command line was
20380 CONFIG_FILES = $CONFIG_FILES
20381 CONFIG_HEADERS = $CONFIG_HEADERS
20382 CONFIG_LINKS = $CONFIG_LINKS
20383 CONFIG_COMMANDS = $CONFIG_COMMANDS
20384 $ $0 $@
20386 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20389 _ACEOF
20391 case $ac_config_files in *"
20392 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20393 esac
20395 case $ac_config_headers in *"
20396 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20397 esac
20400 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20401 # Files that config.status was made for.
20402 config_files="$ac_config_files"
20403 config_headers="$ac_config_headers"
20404 config_links="$ac_config_links"
20405 config_commands="$ac_config_commands"
20407 _ACEOF
20409 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20410 ac_cs_usage="\
20411 \`$as_me' instantiates files and other configuration actions
20412 from templates according to the current configuration. Unless the files
20413 and actions are specified as TAGs, all are instantiated by default.
20415 Usage: $0 [OPTION]... [TAG]...
20417 -h, --help print this help, then exit
20418 -V, --version print version number and configuration settings, then exit
20419 --config print configuration, then exit
20420 -q, --quiet, --silent
20421 do not print progress messages
20422 -d, --debug don't remove temporary files
20423 --recheck update $as_me by reconfiguring in the same conditions
20424 --file=FILE[:TEMPLATE]
20425 instantiate the configuration file FILE
20426 --header=FILE[:TEMPLATE]
20427 instantiate the configuration header FILE
20429 Configuration files:
20430 $config_files
20432 Configuration headers:
20433 $config_headers
20435 Configuration links:
20436 $config_links
20438 Configuration commands:
20439 $config_commands
20441 Report bugs to <pgsql-bugs@lists.postgresql.org>."
20443 _ACEOF
20444 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20445 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20446 ac_cs_version="\\
20447 PostgreSQL config.status 12.22
20448 configured by $0, generated by GNU Autoconf 2.69,
20449 with options \\"\$ac_cs_config\\"
20451 Copyright (C) 2012 Free Software Foundation, Inc.
20452 This config.status script is free software; the Free Software Foundation
20453 gives unlimited permission to copy, distribute and modify it."
20455 ac_pwd='$ac_pwd'
20456 srcdir='$srcdir'
20457 INSTALL='$INSTALL'
20458 MKDIR_P='$MKDIR_P'
20459 AWK='$AWK'
20460 test -n "\$AWK" || AWK=awk
20461 _ACEOF
20463 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20464 # The default lists apply if the user does not specify any file.
20465 ac_need_defaults=:
20466 while test $# != 0
20468 case $1 in
20469 --*=?*)
20470 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20471 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20472 ac_shift=:
20474 --*=)
20475 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20476 ac_optarg=
20477 ac_shift=:
20480 ac_option=$1
20481 ac_optarg=$2
20482 ac_shift=shift
20484 esac
20486 case $ac_option in
20487 # Handling of the options.
20488 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20489 ac_cs_recheck=: ;;
20490 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20491 $as_echo "$ac_cs_version"; exit ;;
20492 --config | --confi | --conf | --con | --co | --c )
20493 $as_echo "$ac_cs_config"; exit ;;
20494 --debug | --debu | --deb | --de | --d | -d )
20495 debug=: ;;
20496 --file | --fil | --fi | --f )
20497 $ac_shift
20498 case $ac_optarg in
20499 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20500 '') as_fn_error $? "missing file argument" ;;
20501 esac
20502 as_fn_append CONFIG_FILES " '$ac_optarg'"
20503 ac_need_defaults=false;;
20504 --header | --heade | --head | --hea )
20505 $ac_shift
20506 case $ac_optarg in
20507 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20508 esac
20509 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20510 ac_need_defaults=false;;
20511 --he | --h)
20512 # Conflict between --help and --header
20513 as_fn_error $? "ambiguous option: \`$1'
20514 Try \`$0 --help' for more information.";;
20515 --help | --hel | -h )
20516 $as_echo "$ac_cs_usage"; exit ;;
20517 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20518 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20519 ac_cs_silent=: ;;
20521 # This is an error.
20522 -*) as_fn_error $? "unrecognized option: \`$1'
20523 Try \`$0 --help' for more information." ;;
20525 *) as_fn_append ac_config_targets " $1"
20526 ac_need_defaults=false ;;
20528 esac
20529 shift
20530 done
20532 ac_configure_extra_args=
20534 if $ac_cs_silent; then
20535 exec 6>/dev/null
20536 ac_configure_extra_args="$ac_configure_extra_args --silent"
20539 _ACEOF
20540 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20541 if \$ac_cs_recheck; then
20542 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20543 shift
20544 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20545 CONFIG_SHELL='$SHELL'
20546 export CONFIG_SHELL
20547 exec "\$@"
20550 _ACEOF
20551 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20552 exec 5>>config.log
20554 echo
20555 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20556 ## Running $as_me. ##
20557 _ASBOX
20558 $as_echo "$ac_log"
20559 } >&5
20561 _ACEOF
20562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20563 _ACEOF
20565 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20567 # Handling of arguments.
20568 for ac_config_target in $ac_config_targets
20570 case $ac_config_target in
20571 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20572 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20573 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20574 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20575 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20576 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20577 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20578 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20579 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20580 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20581 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20583 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20584 esac
20585 done
20588 # If the user did not use the arguments to specify the items to instantiate,
20589 # then the envvar interface is used. Set only those that are not.
20590 # We use the long form for the default assignment because of an extremely
20591 # bizarre bug on SunOS 4.1.3.
20592 if $ac_need_defaults; then
20593 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20594 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20595 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20596 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20599 # Have a temporary directory for convenience. Make it in the build tree
20600 # simply because there is no reason against having it here, and in addition,
20601 # creating and moving files from /tmp can sometimes cause problems.
20602 # Hook for its removal unless debugging.
20603 # Note that there is a small window in which the directory will not be cleaned:
20604 # after its creation but before its name has been assigned to `$tmp'.
20605 $debug ||
20607 tmp= ac_tmp=
20608 trap 'exit_status=$?
20609 : "${ac_tmp:=$tmp}"
20610 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20612 trap 'as_fn_exit 1' 1 2 13 15
20614 # Create a (secure) tmp directory for tmp files.
20617 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20618 test -d "$tmp"
20619 } ||
20621 tmp=./conf$$-$RANDOM
20622 (umask 077 && mkdir "$tmp")
20623 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20624 ac_tmp=$tmp
20626 # Set up the scripts for CONFIG_FILES section.
20627 # No need to generate them if there are no CONFIG_FILES.
20628 # This happens for instance with `./config.status config.h'.
20629 if test -n "$CONFIG_FILES"; then
20632 ac_cr=`echo X | tr X '\015'`
20633 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20634 # But we know of no other shell where ac_cr would be empty at this
20635 # point, so we can use a bashism as a fallback.
20636 if test "x$ac_cr" = x; then
20637 eval ac_cr=\$\'\\r\'
20639 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20640 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20641 ac_cs_awk_cr='\\r'
20642 else
20643 ac_cs_awk_cr=$ac_cr
20646 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20647 _ACEOF
20651 echo "cat >conf$$subs.awk <<_ACEOF" &&
20652 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20653 echo "_ACEOF"
20654 } >conf$$subs.sh ||
20655 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20656 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20657 ac_delim='%!_!# '
20658 for ac_last_try in false false false false false :; do
20659 . ./conf$$subs.sh ||
20660 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20662 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20663 if test $ac_delim_n = $ac_delim_num; then
20664 break
20665 elif $ac_last_try; then
20666 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20667 else
20668 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20670 done
20671 rm -f conf$$subs.sh
20673 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20674 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20675 _ACEOF
20676 sed -n '
20678 s/^/S["/; s/!.*/"]=/
20681 s/^[^!]*!//
20682 :repl
20683 t repl
20684 s/'"$ac_delim"'$//
20685 t delim
20688 s/\(.\{148\}\)..*/\1/
20689 t more1
20690 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20693 b repl
20694 :more1
20695 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20698 s/.\{148\}//
20699 t nl
20700 :delim
20702 s/\(.\{148\}\)..*/\1/
20703 t more2
20704 s/["\\]/\\&/g; s/^/"/; s/$/"/
20707 :more2
20708 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20711 s/.\{148\}//
20712 t delim
20713 ' <conf$$subs.awk | sed '
20714 /^[^""]/{
20716 s/\n//
20718 ' >>$CONFIG_STATUS || ac_write_fail=1
20719 rm -f conf$$subs.awk
20720 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20721 _ACAWK
20722 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20723 for (key in S) S_is_set[key] = 1
20724 FS = "\a"
20728 line = $ 0
20729 nfields = split(line, field, "@")
20730 substed = 0
20731 len = length(field[1])
20732 for (i = 2; i < nfields; i++) {
20733 key = field[i]
20734 keylen = length(key)
20735 if (S_is_set[key]) {
20736 value = S[key]
20737 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20738 len += length(value) + length(field[++i])
20739 substed = 1
20740 } else
20741 len += 1 + keylen
20744 print line
20747 _ACAWK
20748 _ACEOF
20749 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20750 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20751 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20752 else
20754 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20755 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20756 _ACEOF
20758 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20759 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20760 # trailing colons and then remove the whole line if VPATH becomes empty
20761 # (actually we leave an empty line to preserve line numbers).
20762 if test "x$srcdir" = x.; then
20763 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20765 s///
20766 s/^/:/
20767 s/[ ]*$/:/
20768 s/:\$(srcdir):/:/g
20769 s/:\${srcdir}:/:/g
20770 s/:@srcdir@:/:/g
20771 s/^:*//
20772 s/:*$//
20774 s/\(=[ ]*\).*/\1/
20776 s/\n//
20777 s/^[^=]*=[ ]*$//
20781 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20782 fi # test -n "$CONFIG_FILES"
20784 # Set up the scripts for CONFIG_HEADERS section.
20785 # No need to generate them if there are no CONFIG_HEADERS.
20786 # This happens for instance with `./config.status Makefile'.
20787 if test -n "$CONFIG_HEADERS"; then
20788 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20789 BEGIN {
20790 _ACEOF
20792 # Transform confdefs.h into an awk script `defines.awk', embedded as
20793 # here-document in config.status, that substitutes the proper values into
20794 # config.h.in to produce config.h.
20796 # Create a delimiter string that does not exist in confdefs.h, to ease
20797 # handling of long lines.
20798 ac_delim='%!_!# '
20799 for ac_last_try in false false :; do
20800 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20801 if test -z "$ac_tt"; then
20802 break
20803 elif $ac_last_try; then
20804 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20805 else
20806 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20808 done
20810 # For the awk script, D is an array of macro values keyed by name,
20811 # likewise P contains macro parameters if any. Preserve backslash
20812 # newline sequences.
20814 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20815 sed -n '
20816 s/.\{148\}/&'"$ac_delim"'/g
20817 t rset
20818 :rset
20819 s/^[ ]*#[ ]*define[ ][ ]*/ /
20820 t def
20822 :def
20823 s/\\$//
20824 t bsnl
20825 s/["\\]/\\&/g
20826 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20827 D["\1"]=" \3"/p
20828 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20830 :bsnl
20831 s/["\\]/\\&/g
20832 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20833 D["\1"]=" \3\\\\\\n"\\/p
20834 t cont
20835 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20836 t cont
20838 :cont
20840 s/.\{148\}/&'"$ac_delim"'/g
20841 t clear
20842 :clear
20843 s/\\$//
20844 t bsnlc
20845 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20847 :bsnlc
20848 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20849 b cont
20850 ' <confdefs.h | sed '
20851 s/'"$ac_delim"'/"\\\
20852 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20854 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20855 for (key in D) D_is_set[key] = 1
20856 FS = "\a"
20858 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20859 line = \$ 0
20860 split(line, arg, " ")
20861 if (arg[1] == "#") {
20862 defundef = arg[2]
20863 mac1 = arg[3]
20864 } else {
20865 defundef = substr(arg[1], 2)
20866 mac1 = arg[2]
20868 split(mac1, mac2, "(") #)
20869 macro = mac2[1]
20870 prefix = substr(line, 1, index(line, defundef) - 1)
20871 if (D_is_set[macro]) {
20872 # Preserve the white space surrounding the "#".
20873 print prefix "define", macro P[macro] D[macro]
20874 next
20875 } else {
20876 # Replace #undef with comments. This is necessary, for example,
20877 # in the case of _POSIX_SOURCE, which is predefined and required
20878 # on some systems where configure will not decide to define it.
20879 if (defundef == "undef") {
20880 print "/*", prefix defundef, macro, "*/"
20881 next
20885 { print }
20886 _ACAWK
20887 _ACEOF
20888 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20889 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20890 fi # test -n "$CONFIG_HEADERS"
20893 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20894 shift
20895 for ac_tag
20897 case $ac_tag in
20898 :[FHLC]) ac_mode=$ac_tag; continue;;
20899 esac
20900 case $ac_mode$ac_tag in
20901 :[FHL]*:*);;
20902 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20903 :[FH]-) ac_tag=-:-;;
20904 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20905 esac
20906 ac_save_IFS=$IFS
20907 IFS=:
20908 set x $ac_tag
20909 IFS=$ac_save_IFS
20910 shift
20911 ac_file=$1
20912 shift
20914 case $ac_mode in
20915 :L) ac_source=$1;;
20916 :[FH])
20917 ac_file_inputs=
20918 for ac_f
20920 case $ac_f in
20921 -) ac_f="$ac_tmp/stdin";;
20922 *) # Look for the file first in the build tree, then in the source tree
20923 # (if the path is not absolute). The absolute path cannot be DOS-style,
20924 # because $ac_f cannot contain `:'.
20925 test -f "$ac_f" ||
20926 case $ac_f in
20927 [\\/$]*) false;;
20928 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20929 esac ||
20930 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20931 esac
20932 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20933 as_fn_append ac_file_inputs " '$ac_f'"
20934 done
20936 # Let's still pretend it is `configure' which instantiates (i.e., don't
20937 # use $as_me), people would be surprised to read:
20938 # /* config.h. Generated by config.status. */
20939 configure_input='Generated from '`
20940 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20941 `' by configure.'
20942 if test x"$ac_file" != x-; then
20943 configure_input="$ac_file. $configure_input"
20944 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20945 $as_echo "$as_me: creating $ac_file" >&6;}
20947 # Neutralize special characters interpreted by sed in replacement strings.
20948 case $configure_input in #(
20949 *\&* | *\|* | *\\* )
20950 ac_sed_conf_input=`$as_echo "$configure_input" |
20951 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20952 *) ac_sed_conf_input=$configure_input;;
20953 esac
20955 case $ac_tag in
20956 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20957 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20958 esac
20960 esac
20962 ac_dir=`$as_dirname -- "$ac_file" ||
20963 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20964 X"$ac_file" : 'X\(//\)[^/]' \| \
20965 X"$ac_file" : 'X\(//\)$' \| \
20966 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20967 $as_echo X"$ac_file" |
20968 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20969 s//\1/
20972 /^X\(\/\/\)[^/].*/{
20973 s//\1/
20976 /^X\(\/\/\)$/{
20977 s//\1/
20980 /^X\(\/\).*/{
20981 s//\1/
20984 s/.*/./; q'`
20985 as_dir="$ac_dir"; as_fn_mkdir_p
20986 ac_builddir=.
20988 case "$ac_dir" in
20989 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20991 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20992 # A ".." for each directory in $ac_dir_suffix.
20993 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20994 case $ac_top_builddir_sub in
20995 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20996 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20997 esac ;;
20998 esac
20999 ac_abs_top_builddir=$ac_pwd
21000 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21001 # for backward compatibility:
21002 ac_top_builddir=$ac_top_build_prefix
21004 case $srcdir in
21005 .) # We are building in place.
21006 ac_srcdir=.
21007 ac_top_srcdir=$ac_top_builddir_sub
21008 ac_abs_top_srcdir=$ac_pwd ;;
21009 [\\/]* | ?:[\\/]* ) # Absolute name.
21010 ac_srcdir=$srcdir$ac_dir_suffix;
21011 ac_top_srcdir=$srcdir
21012 ac_abs_top_srcdir=$srcdir ;;
21013 *) # Relative name.
21014 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21015 ac_top_srcdir=$ac_top_build_prefix$srcdir
21016 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21017 esac
21018 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21021 case $ac_mode in
21024 # CONFIG_FILE
21027 case $INSTALL in
21028 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21029 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21030 esac
21031 ac_MKDIR_P=$MKDIR_P
21032 case $MKDIR_P in
21033 [\\/$]* | ?:[\\/]* ) ;;
21034 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21035 esac
21036 _ACEOF
21038 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21039 # If the template does not know about datarootdir, expand it.
21040 # FIXME: This hack should be removed a few years after 2.60.
21041 ac_datarootdir_hack=; ac_datarootdir_seen=
21042 ac_sed_dataroot='
21043 /datarootdir/ {
21047 /@datadir@/p
21048 /@docdir@/p
21049 /@infodir@/p
21050 /@localedir@/p
21051 /@mandir@/p'
21052 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21053 *datarootdir*) ac_datarootdir_seen=yes;;
21054 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21055 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21056 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21057 _ACEOF
21058 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21059 ac_datarootdir_hack='
21060 s&@datadir@&$datadir&g
21061 s&@docdir@&$docdir&g
21062 s&@infodir@&$infodir&g
21063 s&@localedir@&$localedir&g
21064 s&@mandir@&$mandir&g
21065 s&\\\${datarootdir}&$datarootdir&g' ;;
21066 esac
21067 _ACEOF
21069 # Neutralize VPATH when `$srcdir' = `.'.
21070 # Shell code in configure.ac might set extrasub.
21071 # FIXME: do we really want to maintain this feature?
21072 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21073 ac_sed_extra="$ac_vpsub
21074 $extrasub
21075 _ACEOF
21076 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21078 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21079 s|@configure_input@|$ac_sed_conf_input|;t t
21080 s&@top_builddir@&$ac_top_builddir_sub&;t t
21081 s&@top_build_prefix@&$ac_top_build_prefix&;t t
21082 s&@srcdir@&$ac_srcdir&;t t
21083 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21084 s&@top_srcdir@&$ac_top_srcdir&;t t
21085 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21086 s&@builddir@&$ac_builddir&;t t
21087 s&@abs_builddir@&$ac_abs_builddir&;t t
21088 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21089 s&@INSTALL@&$ac_INSTALL&;t t
21090 s&@MKDIR_P@&$ac_MKDIR_P&;t t
21091 $ac_datarootdir_hack
21093 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21094 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21096 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21097 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21098 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21099 "$ac_tmp/out"`; test -z "$ac_out"; } &&
21100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21101 which seems to be undefined. Please make sure it is defined" >&5
21102 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21103 which seems to be undefined. Please make sure it is defined" >&2;}
21105 rm -f "$ac_tmp/stdin"
21106 case $ac_file in
21107 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21108 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21109 esac \
21110 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21114 # CONFIG_HEADER
21116 if test x"$ac_file" != x-; then
21118 $as_echo "/* $configure_input */" \
21119 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21120 } >"$ac_tmp/config.h" \
21121 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21122 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21123 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21124 $as_echo "$as_me: $ac_file is unchanged" >&6;}
21125 else
21126 rm -f "$ac_file"
21127 mv "$ac_tmp/config.h" "$ac_file" \
21128 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21130 else
21131 $as_echo "/* $configure_input */" \
21132 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21133 || as_fn_error $? "could not create -" "$LINENO" 5
21138 # CONFIG_LINK
21141 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21143 else
21144 # Prefer the file from the source tree if names are identical.
21145 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21146 ac_source=$srcdir/$ac_source
21149 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21150 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
21152 if test ! -r "$ac_source"; then
21153 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
21155 rm -f "$ac_file"
21157 # Try a relative symlink, then a hard link, then a copy.
21158 case $ac_source in
21159 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21160 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21161 esac
21162 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21163 ln "$ac_source" "$ac_file" 2>/dev/null ||
21164 cp -p "$ac_source" "$ac_file" ||
21165 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
21168 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21169 $as_echo "$as_me: executing $ac_file commands" >&6;}
21171 esac
21174 case $ac_file$ac_mode in
21175 "check_win32_symlinks":C)
21176 # Links sometimes fail undetected on Mingw -
21177 # so here we detect it and warn the user
21178 for FILE in $CONFIG_LINKS
21180 # test -e works for symlinks in the MinGW console
21181 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
21182 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
21183 done
21185 "src/include/pg_config.h":H)
21186 # Update timestamp for pg_config.h (see Makefile.global)
21187 echo >src/include/stamp-h
21189 "src/include/pg_config_ext.h":H)
21190 # Update timestamp for pg_config_ext.h (see Makefile.global)
21191 echo >src/include/stamp-ext-h
21193 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
21195 esac
21196 done # for ac_tag
21199 as_fn_exit 0
21200 _ACEOF
21201 ac_clean_files=$ac_clean_files_save
21203 test $ac_write_fail = 0 ||
21204 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21207 # configure is writing to config.log, and then calls config.status.
21208 # config.status does its own redirection, appending to config.log.
21209 # Unfortunately, on DOS this fails, as config.log is still kept open
21210 # by configure, so config.status won't be able to write to it; its
21211 # output is simply discarded. So we exec the FD to /dev/null,
21212 # effectively closing config.log, so it can be properly (re)opened and
21213 # appended to by config.status. When coming back to configure, we
21214 # need to make the FD available again.
21215 if test "$no_create" != yes; then
21216 ac_cs_success=:
21217 ac_config_status_args=
21218 test "$silent" = yes &&
21219 ac_config_status_args="$ac_config_status_args --quiet"
21220 exec 5>/dev/null
21221 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21222 exec 5>>config.log
21223 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21224 # would make configure fail if this is the last instruction.
21225 $ac_cs_success || as_fn_exit 1
21227 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21228 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21229 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}