doc: PG 14 relnotes fixes
[pgsql.git] / configure
blobe9b98f442fe3e630f7e7f8452df0bca391c1323e
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 14beta1.
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-2021, 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='14beta1'
586 PACKAGE_STRING='PostgreSQL 14beta1'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 DBTOEPUB
635 XSLTPROC
636 XMLLINT
637 TCL_SHLIB_LD_LIBS
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_ARMV8_CRC32C
650 CFLAGS_SSE42
651 have_win32_dbghelp
652 LIBOBJS
653 UUID_LIBS
654 LDAP_LIBS_BE
655 LDAP_LIBS_FE
656 with_ssl
657 PTHREAD_CFLAGS
658 PTHREAD_LIBS
659 PTHREAD_CC
660 ax_pthread_config
661 EGREP
662 GREP
665 python_additional_libs
666 python_libspec
667 python_libdir
668 python_includespec
669 python_version
670 python_majorversion
671 PYTHON
672 perl_embed_ldflags
673 perl_embed_ccflags
674 perl_includespec
675 perl_useshrplib
676 perl_privlibexp
677 perl_archlibexp
678 PERL
679 FLEXFLAGS
680 FLEX
681 BISONFLAGS
682 BISON
683 MKDIR_P
684 LN_S
686 install_bin
687 INSTALL_DATA
688 INSTALL_SCRIPT
689 INSTALL_PROGRAM
690 WINDRES
691 DLLWRAP
692 DLLTOOL
694 STRIP_SHARED_LIB
695 STRIP_STATIC_LIB
696 STRIP
697 RANLIB
698 with_gnu_ld
700 LDFLAGS_SL
701 LDFLAGS_EX
702 LZ4_LIBS
703 LZ4_CFLAGS
704 with_lz4
705 with_zlib
706 with_system_tzdata
707 with_libxslt
708 XML2_LIBS
709 XML2_CFLAGS
710 XML2_CONFIG
711 with_libxml
712 with_uuid
713 with_readline
714 with_systemd
715 with_selinux
716 with_ldap
717 with_krb_srvnam
718 krb_srvtab
719 with_gssapi
720 with_python
721 with_perl
722 with_tcl
723 ICU_LIBS
724 ICU_CFLAGS
725 with_icu
726 enable_thread_safety
727 INCLUDES
728 autodepend
729 PKG_CONFIG_LIBDIR
730 PKG_CONFIG_PATH
731 PKG_CONFIG
735 CFLAGS_SL
736 BITCODE_CXXFLAGS
737 BITCODE_CFLAGS
738 CFLAGS_VECTORIZE
739 CFLAGS_UNROLL_LOOPS
740 PERMIT_DECLARATION_AFTER_STATEMENT
741 LLVM_BINPATH
742 LLVM_CXXFLAGS
743 LLVM_CFLAGS
744 LLVM_CPPFLAGS
745 LLVM_LIBS
746 CLANG
747 LLVM_CONFIG
749 with_llvm
750 SUN_STUDIO_CC
751 ac_ct_CXX
752 CXXFLAGS
754 OBJEXT
755 EXEEXT
756 ac_ct_CC
757 CPPFLAGS
758 LDFLAGS
759 CFLAGS
761 enable_tap_tests
762 enable_dtrace
763 DTRACEFLAGS
764 DTRACE
765 enable_coverage
766 GENHTML
767 LCOV
768 GCOV
769 enable_debug
770 enable_rpath
771 default_port
772 WANTED_LANGUAGES
773 enable_nls
774 PORTNAME
775 host_os
776 host_vendor
777 host_cpu
778 host
779 build_os
780 build_vendor
781 build_cpu
782 build
783 PG_MAJORVERSION
784 target_alias
785 host_alias
786 build_alias
787 LIBS
788 ECHO_T
789 ECHO_N
790 ECHO_C
791 DEFS
792 mandir
793 localedir
794 libdir
795 psdir
796 pdfdir
797 dvidir
798 htmldir
799 infodir
800 docdir
801 oldincludedir
802 includedir
803 localstatedir
804 sharedstatedir
805 sysconfdir
806 datadir
807 datarootdir
808 libexecdir
809 sbindir
810 bindir
811 program_transform_name
812 prefix
813 exec_prefix
814 PACKAGE_URL
815 PACKAGE_BUGREPORT
816 PACKAGE_STRING
817 PACKAGE_VERSION
818 PACKAGE_TARNAME
819 PACKAGE_NAME
820 PATH_SEPARATOR
821 SHELL'
822 ac_subst_files=''
823 ac_user_opts='
824 enable_option_checking
825 with_extra_version
826 with_template
827 with_includes
828 with_libraries
829 with_libs
830 enable_integer_datetimes
831 enable_nls
832 with_pgport
833 enable_rpath
834 enable_spinlocks
835 enable_atomics
836 enable_debug
837 enable_profiling
838 enable_coverage
839 enable_dtrace
840 enable_tap_tests
841 with_blocksize
842 with_segsize
843 with_wal_blocksize
844 with_CC
845 with_llvm
846 enable_depend
847 enable_cassert
848 enable_thread_safety
849 with_icu
850 with_tcl
851 with_tclconfig
852 with_perl
853 with_python
854 with_gssapi
855 with_krb_srvnam
856 with_pam
857 with_bsd_auth
858 with_ldap
859 with_bonjour
860 with_selinux
861 with_systemd
862 with_readline
863 with_libedit_preferred
864 with_uuid
865 with_ossp_uuid
866 with_libxml
867 with_libxslt
868 with_system_tzdata
869 with_zlib
870 with_lz4
871 with_gnu_ld
872 with_ssl
873 with_openssl
874 enable_largefile
876 ac_precious_vars='build_alias
877 host_alias
878 target_alias
880 CFLAGS
881 LDFLAGS
882 LIBS
883 CPPFLAGS
885 CXXFLAGS
887 LLVM_CONFIG
888 CLANG
890 PKG_CONFIG
891 PKG_CONFIG_PATH
892 PKG_CONFIG_LIBDIR
893 ICU_CFLAGS
894 ICU_LIBS
895 XML2_CONFIG
896 XML2_CFLAGS
897 XML2_LIBS
898 LZ4_CFLAGS
899 LZ4_LIBS
900 LDFLAGS_EX
901 LDFLAGS_SL
902 PERL
903 PYTHON
904 MSGFMT
905 TCLSH'
908 # Initialize some variables set by options.
909 ac_init_help=
910 ac_init_version=false
911 ac_unrecognized_opts=
912 ac_unrecognized_sep=
913 # The variables have the same names as the options, with
914 # dashes changed to underlines.
915 cache_file=/dev/null
916 exec_prefix=NONE
917 no_create=
918 no_recursion=
919 prefix=NONE
920 program_prefix=NONE
921 program_suffix=NONE
922 program_transform_name=s,x,x,
923 silent=
924 site=
925 srcdir=
926 verbose=
927 x_includes=NONE
928 x_libraries=NONE
930 # Installation directory options.
931 # These are left unexpanded so users can "make install exec_prefix=/foo"
932 # and all the variables that are supposed to be based on exec_prefix
933 # by default will actually change.
934 # Use braces instead of parens because sh, perl, etc. also accept them.
935 # (The list follows the same order as the GNU Coding Standards.)
936 bindir='${exec_prefix}/bin'
937 sbindir='${exec_prefix}/sbin'
938 libexecdir='${exec_prefix}/libexec'
939 datarootdir='${prefix}/share'
940 datadir='${datarootdir}'
941 sysconfdir='${prefix}/etc'
942 sharedstatedir='${prefix}/com'
943 localstatedir='${prefix}/var'
944 includedir='${prefix}/include'
945 oldincludedir='/usr/include'
946 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
947 infodir='${datarootdir}/info'
948 htmldir='${docdir}'
949 dvidir='${docdir}'
950 pdfdir='${docdir}'
951 psdir='${docdir}'
952 libdir='${exec_prefix}/lib'
953 localedir='${datarootdir}/locale'
954 mandir='${datarootdir}/man'
956 ac_prev=
957 ac_dashdash=
958 for ac_option
960 # If the previous option needs an argument, assign it.
961 if test -n "$ac_prev"; then
962 eval $ac_prev=\$ac_option
963 ac_prev=
964 continue
967 case $ac_option in
968 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
969 *=) ac_optarg= ;;
970 *) ac_optarg=yes ;;
971 esac
973 # Accept the important Cygnus configure options, so we can diagnose typos.
975 case $ac_dashdash$ac_option in
977 ac_dashdash=yes ;;
979 -bindir | --bindir | --bindi | --bind | --bin | --bi)
980 ac_prev=bindir ;;
981 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
982 bindir=$ac_optarg ;;
984 -build | --build | --buil | --bui | --bu)
985 ac_prev=build_alias ;;
986 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
987 build_alias=$ac_optarg ;;
989 -cache-file | --cache-file | --cache-fil | --cache-fi \
990 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
991 ac_prev=cache_file ;;
992 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
993 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
994 cache_file=$ac_optarg ;;
996 --config-cache | -C)
997 cache_file=config.cache ;;
999 -datadir | --datadir | --datadi | --datad)
1000 ac_prev=datadir ;;
1001 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1002 datadir=$ac_optarg ;;
1004 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1005 | --dataroo | --dataro | --datar)
1006 ac_prev=datarootdir ;;
1007 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1008 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1009 datarootdir=$ac_optarg ;;
1011 -disable-* | --disable-*)
1012 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1013 # Reject names that are not valid shell variable names.
1014 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1015 as_fn_error $? "invalid feature name: $ac_useropt"
1016 ac_useropt_orig=$ac_useropt
1017 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1018 case $ac_user_opts in
1020 "enable_$ac_useropt"
1021 "*) ;;
1022 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1023 ac_unrecognized_sep=', ';;
1024 esac
1025 eval enable_$ac_useropt=no ;;
1027 -docdir | --docdir | --docdi | --doc | --do)
1028 ac_prev=docdir ;;
1029 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1030 docdir=$ac_optarg ;;
1032 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1033 ac_prev=dvidir ;;
1034 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1035 dvidir=$ac_optarg ;;
1037 -enable-* | --enable-*)
1038 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1039 # Reject names that are not valid shell variable names.
1040 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1041 as_fn_error $? "invalid feature name: $ac_useropt"
1042 ac_useropt_orig=$ac_useropt
1043 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1044 case $ac_user_opts in
1046 "enable_$ac_useropt"
1047 "*) ;;
1048 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1049 ac_unrecognized_sep=', ';;
1050 esac
1051 eval enable_$ac_useropt=\$ac_optarg ;;
1053 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1054 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1055 | --exec | --exe | --ex)
1056 ac_prev=exec_prefix ;;
1057 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1058 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1059 | --exec=* | --exe=* | --ex=*)
1060 exec_prefix=$ac_optarg ;;
1062 -gas | --gas | --ga | --g)
1063 # Obsolete; use --with-gas.
1064 with_gas=yes ;;
1066 -help | --help | --hel | --he | -h)
1067 ac_init_help=long ;;
1068 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1069 ac_init_help=recursive ;;
1070 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1071 ac_init_help=short ;;
1073 -host | --host | --hos | --ho)
1074 ac_prev=host_alias ;;
1075 -host=* | --host=* | --hos=* | --ho=*)
1076 host_alias=$ac_optarg ;;
1078 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1079 ac_prev=htmldir ;;
1080 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1081 | --ht=*)
1082 htmldir=$ac_optarg ;;
1084 -includedir | --includedir | --includedi | --included | --include \
1085 | --includ | --inclu | --incl | --inc)
1086 ac_prev=includedir ;;
1087 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1088 | --includ=* | --inclu=* | --incl=* | --inc=*)
1089 includedir=$ac_optarg ;;
1091 -infodir | --infodir | --infodi | --infod | --info | --inf)
1092 ac_prev=infodir ;;
1093 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1094 infodir=$ac_optarg ;;
1096 -libdir | --libdir | --libdi | --libd)
1097 ac_prev=libdir ;;
1098 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1099 libdir=$ac_optarg ;;
1101 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1102 | --libexe | --libex | --libe)
1103 ac_prev=libexecdir ;;
1104 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1105 | --libexe=* | --libex=* | --libe=*)
1106 libexecdir=$ac_optarg ;;
1108 -localedir | --localedir | --localedi | --localed | --locale)
1109 ac_prev=localedir ;;
1110 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1111 localedir=$ac_optarg ;;
1113 -localstatedir | --localstatedir | --localstatedi | --localstated \
1114 | --localstate | --localstat | --localsta | --localst | --locals)
1115 ac_prev=localstatedir ;;
1116 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1117 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1118 localstatedir=$ac_optarg ;;
1120 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1121 ac_prev=mandir ;;
1122 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1123 mandir=$ac_optarg ;;
1125 -nfp | --nfp | --nf)
1126 # Obsolete; use --without-fp.
1127 with_fp=no ;;
1129 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1130 | --no-cr | --no-c | -n)
1131 no_create=yes ;;
1133 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1134 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1135 no_recursion=yes ;;
1137 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1138 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1139 | --oldin | --oldi | --old | --ol | --o)
1140 ac_prev=oldincludedir ;;
1141 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1142 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1143 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1144 oldincludedir=$ac_optarg ;;
1146 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1147 ac_prev=prefix ;;
1148 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1149 prefix=$ac_optarg ;;
1151 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1152 | --program-pre | --program-pr | --program-p)
1153 ac_prev=program_prefix ;;
1154 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1155 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1156 program_prefix=$ac_optarg ;;
1158 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1159 | --program-suf | --program-su | --program-s)
1160 ac_prev=program_suffix ;;
1161 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1162 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1163 program_suffix=$ac_optarg ;;
1165 -program-transform-name | --program-transform-name \
1166 | --program-transform-nam | --program-transform-na \
1167 | --program-transform-n | --program-transform- \
1168 | --program-transform | --program-transfor \
1169 | --program-transfo | --program-transf \
1170 | --program-trans | --program-tran \
1171 | --progr-tra | --program-tr | --program-t)
1172 ac_prev=program_transform_name ;;
1173 -program-transform-name=* | --program-transform-name=* \
1174 | --program-transform-nam=* | --program-transform-na=* \
1175 | --program-transform-n=* | --program-transform-=* \
1176 | --program-transform=* | --program-transfor=* \
1177 | --program-transfo=* | --program-transf=* \
1178 | --program-trans=* | --program-tran=* \
1179 | --progr-tra=* | --program-tr=* | --program-t=*)
1180 program_transform_name=$ac_optarg ;;
1182 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1183 ac_prev=pdfdir ;;
1184 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1185 pdfdir=$ac_optarg ;;
1187 -psdir | --psdir | --psdi | --psd | --ps)
1188 ac_prev=psdir ;;
1189 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1190 psdir=$ac_optarg ;;
1192 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1193 | -silent | --silent | --silen | --sile | --sil)
1194 silent=yes ;;
1196 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1197 ac_prev=sbindir ;;
1198 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1199 | --sbi=* | --sb=*)
1200 sbindir=$ac_optarg ;;
1202 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1203 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1204 | --sharedst | --shareds | --shared | --share | --shar \
1205 | --sha | --sh)
1206 ac_prev=sharedstatedir ;;
1207 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1208 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1209 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1210 | --sha=* | --sh=*)
1211 sharedstatedir=$ac_optarg ;;
1213 -site | --site | --sit)
1214 ac_prev=site ;;
1215 -site=* | --site=* | --sit=*)
1216 site=$ac_optarg ;;
1218 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1219 ac_prev=srcdir ;;
1220 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1221 srcdir=$ac_optarg ;;
1223 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1224 | --syscon | --sysco | --sysc | --sys | --sy)
1225 ac_prev=sysconfdir ;;
1226 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1227 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1228 sysconfdir=$ac_optarg ;;
1230 -target | --target | --targe | --targ | --tar | --ta | --t)
1231 ac_prev=target_alias ;;
1232 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1233 target_alias=$ac_optarg ;;
1235 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1236 verbose=yes ;;
1238 -version | --version | --versio | --versi | --vers | -V)
1239 ac_init_version=: ;;
1241 -with-* | --with-*)
1242 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1243 # Reject names that are not valid shell variable names.
1244 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1245 as_fn_error $? "invalid package name: $ac_useropt"
1246 ac_useropt_orig=$ac_useropt
1247 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1248 case $ac_user_opts in
1250 "with_$ac_useropt"
1251 "*) ;;
1252 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1253 ac_unrecognized_sep=', ';;
1254 esac
1255 eval with_$ac_useropt=\$ac_optarg ;;
1257 -without-* | --without-*)
1258 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1259 # Reject names that are not valid shell variable names.
1260 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1261 as_fn_error $? "invalid package name: $ac_useropt"
1262 ac_useropt_orig=$ac_useropt
1263 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1264 case $ac_user_opts in
1266 "with_$ac_useropt"
1267 "*) ;;
1268 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1269 ac_unrecognized_sep=', ';;
1270 esac
1271 eval with_$ac_useropt=no ;;
1273 --x)
1274 # Obsolete; use --with-x.
1275 with_x=yes ;;
1277 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1278 | --x-incl | --x-inc | --x-in | --x-i)
1279 ac_prev=x_includes ;;
1280 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1281 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1282 x_includes=$ac_optarg ;;
1284 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1285 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1286 ac_prev=x_libraries ;;
1287 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1288 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1289 x_libraries=$ac_optarg ;;
1291 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1292 Try \`$0 --help' for more information"
1295 *=*)
1296 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1297 # Reject names that are not valid shell variable names.
1298 case $ac_envvar in #(
1299 '' | [0-9]* | *[!_$as_cr_alnum]* )
1300 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1301 esac
1302 eval $ac_envvar=\$ac_optarg
1303 export $ac_envvar ;;
1306 # FIXME: should be removed in autoconf 3.0.
1307 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1308 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1309 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1310 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1313 esac
1314 done
1316 if test -n "$ac_prev"; then
1317 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1318 as_fn_error $? "missing argument to $ac_option"
1321 if test -n "$ac_unrecognized_opts"; then
1322 case $enable_option_checking in
1323 no) ;;
1324 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1325 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1326 esac
1329 # Check all directory arguments for consistency.
1330 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1331 datadir sysconfdir sharedstatedir localstatedir includedir \
1332 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1333 libdir localedir mandir
1335 eval ac_val=\$$ac_var
1336 # Remove trailing slashes.
1337 case $ac_val in
1338 */ )
1339 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1340 eval $ac_var=\$ac_val;;
1341 esac
1342 # Be sure to have absolute directory names.
1343 case $ac_val in
1344 [\\/$]* | ?:[\\/]* ) continue;;
1345 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1346 esac
1347 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1348 done
1350 # There might be people who depend on the old broken behavior: `$host'
1351 # used to hold the argument of --host etc.
1352 # FIXME: To remove some day.
1353 build=$build_alias
1354 host=$host_alias
1355 target=$target_alias
1357 # FIXME: To remove some day.
1358 if test "x$host_alias" != x; then
1359 if test "x$build_alias" = x; then
1360 cross_compiling=maybe
1361 elif test "x$build_alias" != "x$host_alias"; then
1362 cross_compiling=yes
1366 ac_tool_prefix=
1367 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1369 test "$silent" = yes && exec 6>/dev/null
1372 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1373 ac_ls_di=`ls -di .` &&
1374 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1375 as_fn_error $? "working directory cannot be determined"
1376 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1377 as_fn_error $? "pwd does not report name of working directory"
1380 # Find the source files, if location was not specified.
1381 if test -z "$srcdir"; then
1382 ac_srcdir_defaulted=yes
1383 # Try the directory containing this script, then the parent directory.
1384 ac_confdir=`$as_dirname -- "$as_myself" ||
1385 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1386 X"$as_myself" : 'X\(//\)[^/]' \| \
1387 X"$as_myself" : 'X\(//\)$' \| \
1388 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1389 $as_echo X"$as_myself" |
1390 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1391 s//\1/
1394 /^X\(\/\/\)[^/].*/{
1395 s//\1/
1398 /^X\(\/\/\)$/{
1399 s//\1/
1402 /^X\(\/\).*/{
1403 s//\1/
1406 s/.*/./; q'`
1407 srcdir=$ac_confdir
1408 if test ! -r "$srcdir/$ac_unique_file"; then
1409 srcdir=..
1411 else
1412 ac_srcdir_defaulted=no
1414 if test ! -r "$srcdir/$ac_unique_file"; then
1415 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1416 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1418 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1419 ac_abs_confdir=`(
1420 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1421 pwd)`
1422 # When building in place, set srcdir=.
1423 if test "$ac_abs_confdir" = "$ac_pwd"; then
1424 srcdir=.
1426 # Remove unnecessary trailing slashes from srcdir.
1427 # Double slashes in file names in object file debugging info
1428 # mess up M-x gdb in Emacs.
1429 case $srcdir in
1430 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1431 esac
1432 for ac_var in $ac_precious_vars; do
1433 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1434 eval ac_env_${ac_var}_value=\$${ac_var}
1435 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1436 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1437 done
1440 # Report the --help message.
1442 if test "$ac_init_help" = "long"; then
1443 # Omit some internal or obsolete options to make the list less imposing.
1444 # This message is too long to be a string in the A/UX 3.1 sh.
1445 cat <<_ACEOF
1446 \`configure' configures PostgreSQL 14beta1 to adapt to many kinds of systems.
1448 Usage: $0 [OPTION]... [VAR=VALUE]...
1450 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1451 VAR=VALUE. See below for descriptions of some of the useful variables.
1453 Defaults for the options are specified in brackets.
1455 Configuration:
1456 -h, --help display this help and exit
1457 --help=short display options specific to this package
1458 --help=recursive display the short help of all the included packages
1459 -V, --version display version information and exit
1460 -q, --quiet, --silent do not print \`checking ...' messages
1461 --cache-file=FILE cache test results in FILE [disabled]
1462 -C, --config-cache alias for \`--cache-file=config.cache'
1463 -n, --no-create do not create output files
1464 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1466 Installation directories:
1467 --prefix=PREFIX install architecture-independent files in PREFIX
1468 [$ac_default_prefix]
1469 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1470 [PREFIX]
1472 By default, \`make install' will install all the files in
1473 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1474 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1475 for instance \`--prefix=\$HOME'.
1477 For better control, use the options below.
1479 Fine tuning of the installation directories:
1480 --bindir=DIR user executables [EPREFIX/bin]
1481 --sbindir=DIR system admin executables [EPREFIX/sbin]
1482 --libexecdir=DIR program executables [EPREFIX/libexec]
1483 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1484 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1485 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1486 --libdir=DIR object code libraries [EPREFIX/lib]
1487 --includedir=DIR C header files [PREFIX/include]
1488 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1489 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1490 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1491 --infodir=DIR info documentation [DATAROOTDIR/info]
1492 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1493 --mandir=DIR man documentation [DATAROOTDIR/man]
1494 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1495 --htmldir=DIR html documentation [DOCDIR]
1496 --dvidir=DIR dvi documentation [DOCDIR]
1497 --pdfdir=DIR pdf documentation [DOCDIR]
1498 --psdir=DIR ps documentation [DOCDIR]
1499 _ACEOF
1501 cat <<\_ACEOF
1503 System types:
1504 --build=BUILD configure for building on BUILD [guessed]
1505 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1506 _ACEOF
1509 if test -n "$ac_init_help"; then
1510 case $ac_init_help in
1511 short | recursive ) echo "Configuration of PostgreSQL 14beta1:";;
1512 esac
1513 cat <<\_ACEOF
1515 Optional Features:
1516 --disable-option-checking ignore unrecognized --enable/--with options
1517 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1518 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1519 --disable-integer-datetimes
1520 obsolete option, no longer supported
1521 --enable-nls[=LANGUAGES]
1522 enable Native Language Support
1523 --disable-rpath do not embed shared library search path in
1524 executables
1525 --disable-spinlocks do not use spinlocks
1526 --disable-atomics do not use atomic operations
1527 --enable-debug build with debugging symbols (-g)
1528 --enable-profiling build with profiling enabled
1529 --enable-coverage build with coverage testing instrumentation
1530 --enable-dtrace build with DTrace support
1531 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1532 --enable-depend turn on automatic dependency tracking
1533 --enable-cassert enable assertion checks (for debugging)
1534 --disable-thread-safety disable thread-safety in client libraries
1535 --disable-largefile omit support for large files
1537 Optional Packages:
1538 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1539 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1540 --with-extra-version=STRING
1541 append STRING to version
1542 --with-template=NAME override operating system template
1543 --with-includes=DIRS look for additional header files in DIRS
1544 --with-libraries=DIRS look for additional libraries in DIRS
1545 --with-libs=DIRS alternative spelling of --with-libraries
1546 --with-pgport=PORTNUM set default port number [5432]
1547 --with-blocksize=BLOCKSIZE
1548 set table block size in kB [8]
1549 --with-segsize=SEGSIZE set table segment size in GB [1]
1550 --with-wal-blocksize=BLOCKSIZE
1551 set WAL block size in kB [8]
1552 --with-CC=CMD set compiler (deprecated)
1553 --with-llvm build with LLVM based JIT support
1554 --with-icu build with ICU support
1555 --with-tcl build Tcl modules (PL/Tcl)
1556 --with-tclconfig=DIR tclConfig.sh is in DIR
1557 --with-perl build Perl modules (PL/Perl)
1558 --with-python build Python modules (PL/Python)
1559 --with-gssapi build with GSSAPI support
1560 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1561 [postgres]
1562 --with-pam build with PAM support
1563 --with-bsd-auth build with BSD Authentication support
1564 --with-ldap build with LDAP support
1565 --with-bonjour build with Bonjour support
1566 --with-selinux build with SELinux support
1567 --with-systemd build with systemd support
1568 --without-readline do not use GNU Readline nor BSD Libedit for editing
1569 --with-libedit-preferred
1570 prefer BSD Libedit over GNU Readline
1571 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1572 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1573 --with-libxml build with XML support
1574 --with-libxslt use XSLT support when building contrib/xml2
1575 --with-system-tzdata=DIR
1576 use system time zone data in DIR
1577 --without-zlib do not use Zlib
1578 --with-lz4 build with LZ4 support
1579 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1580 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1581 --with-openssl obsolete spelling of --with-ssl=openssl
1583 Some influential environment variables:
1584 CC C compiler command
1585 CFLAGS C compiler flags
1586 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1587 nonstandard directory <lib dir>
1588 LIBS libraries to pass to the linker, e.g. -l<library>
1589 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1590 you have headers in a nonstandard directory <include dir>
1591 CXX C++ compiler command
1592 CXXFLAGS C++ compiler flags
1593 LLVM_CONFIG path to llvm-config command
1594 CLANG path to clang compiler to generate bitcode
1595 CPP C preprocessor
1596 PKG_CONFIG path to pkg-config utility
1597 PKG_CONFIG_PATH
1598 directories to add to pkg-config's search path
1599 PKG_CONFIG_LIBDIR
1600 path overriding pkg-config's built-in search path
1601 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1602 ICU_LIBS linker flags for ICU, overriding pkg-config
1603 XML2_CONFIG path to xml2-config utility
1604 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1605 XML2_LIBS linker flags for XML2, overriding pkg-config
1606 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1607 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1608 LDFLAGS_EX extra linker flags for linking executables only
1609 LDFLAGS_SL extra linker flags for linking shared libraries only
1610 PERL Perl program
1611 PYTHON Python program
1612 MSGFMT msgfmt program for NLS
1613 TCLSH Tcl interpreter program (tclsh)
1615 Use these variables to override the choices made by `configure' or to help
1616 it to find libraries and programs with nonstandard names/locations.
1618 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1619 PostgreSQL home page: <https://www.postgresql.org/>.
1620 _ACEOF
1621 ac_status=$?
1624 if test "$ac_init_help" = "recursive"; then
1625 # If there are subdirs, report their specific --help.
1626 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1627 test -d "$ac_dir" ||
1628 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1629 continue
1630 ac_builddir=.
1632 case "$ac_dir" in
1633 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1635 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1636 # A ".." for each directory in $ac_dir_suffix.
1637 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1638 case $ac_top_builddir_sub in
1639 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1640 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1641 esac ;;
1642 esac
1643 ac_abs_top_builddir=$ac_pwd
1644 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1645 # for backward compatibility:
1646 ac_top_builddir=$ac_top_build_prefix
1648 case $srcdir in
1649 .) # We are building in place.
1650 ac_srcdir=.
1651 ac_top_srcdir=$ac_top_builddir_sub
1652 ac_abs_top_srcdir=$ac_pwd ;;
1653 [\\/]* | ?:[\\/]* ) # Absolute name.
1654 ac_srcdir=$srcdir$ac_dir_suffix;
1655 ac_top_srcdir=$srcdir
1656 ac_abs_top_srcdir=$srcdir ;;
1657 *) # Relative name.
1658 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1659 ac_top_srcdir=$ac_top_build_prefix$srcdir
1660 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1661 esac
1662 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1664 cd "$ac_dir" || { ac_status=$?; continue; }
1665 # Check for guested configure.
1666 if test -f "$ac_srcdir/configure.gnu"; then
1667 echo &&
1668 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1669 elif test -f "$ac_srcdir/configure"; then
1670 echo &&
1671 $SHELL "$ac_srcdir/configure" --help=recursive
1672 else
1673 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1674 fi || ac_status=$?
1675 cd "$ac_pwd" || { ac_status=$?; break; }
1676 done
1679 test -n "$ac_init_help" && exit $ac_status
1680 if $ac_init_version; then
1681 cat <<\_ACEOF
1682 PostgreSQL configure 14beta1
1683 generated by GNU Autoconf 2.69
1685 Copyright (C) 2012 Free Software Foundation, Inc.
1686 This configure script is free software; the Free Software Foundation
1687 gives unlimited permission to copy, distribute and modify it.
1689 Copyright (c) 1996-2021, PostgreSQL Global Development Group
1690 _ACEOF
1691 exit
1694 ## ------------------------ ##
1695 ## Autoconf initialization. ##
1696 ## ------------------------ ##
1698 # ac_fn_c_try_compile LINENO
1699 # --------------------------
1700 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1701 ac_fn_c_try_compile ()
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1704 rm -f conftest.$ac_objext
1705 if { { ac_try="$ac_compile"
1706 case "(($ac_try" in
1707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708 *) ac_try_echo=$ac_try;;
1709 esac
1710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711 $as_echo "$ac_try_echo"; } >&5
1712 (eval "$ac_compile") 2>conftest.err
1713 ac_status=$?
1714 if test -s conftest.err; then
1715 grep -v '^ *+' conftest.err >conftest.er1
1716 cat conftest.er1 >&5
1717 mv -f conftest.er1 conftest.err
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } && {
1721 test -z "$ac_c_werror_flag" ||
1722 test ! -s conftest.err
1723 } && test -s conftest.$ac_objext; then :
1724 ac_retval=0
1725 else
1726 $as_echo "$as_me: failed program was:" >&5
1727 sed 's/^/| /' conftest.$ac_ext >&5
1729 ac_retval=1
1731 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1732 as_fn_set_status $ac_retval
1734 } # ac_fn_c_try_compile
1736 # ac_fn_cxx_try_compile LINENO
1737 # ----------------------------
1738 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1739 ac_fn_cxx_try_compile ()
1741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742 rm -f conftest.$ac_objext
1743 if { { ac_try="$ac_compile"
1744 case "(($ac_try" in
1745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1746 *) ac_try_echo=$ac_try;;
1747 esac
1748 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1749 $as_echo "$ac_try_echo"; } >&5
1750 (eval "$ac_compile") 2>conftest.err
1751 ac_status=$?
1752 if test -s conftest.err; then
1753 grep -v '^ *+' conftest.err >conftest.er1
1754 cat conftest.er1 >&5
1755 mv -f conftest.er1 conftest.err
1757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758 test $ac_status = 0; } && {
1759 test -z "$ac_cxx_werror_flag" ||
1760 test ! -s conftest.err
1761 } && test -s conftest.$ac_objext; then :
1762 ac_retval=0
1763 else
1764 $as_echo "$as_me: failed program was:" >&5
1765 sed 's/^/| /' conftest.$ac_ext >&5
1767 ac_retval=1
1769 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1770 as_fn_set_status $ac_retval
1772 } # ac_fn_cxx_try_compile
1774 # ac_fn_c_try_link LINENO
1775 # -----------------------
1776 # Try to link conftest.$ac_ext, and return whether this succeeded.
1777 ac_fn_c_try_link ()
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 rm -f conftest.$ac_objext conftest$ac_exeext
1781 if { { ac_try="$ac_link"
1782 case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785 esac
1786 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787 $as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_link") 2>conftest.err
1789 ac_status=$?
1790 if test -s conftest.err; then
1791 grep -v '^ *+' conftest.err >conftest.er1
1792 cat conftest.er1 >&5
1793 mv -f conftest.er1 conftest.err
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; } && {
1797 test -z "$ac_c_werror_flag" ||
1798 test ! -s conftest.err
1799 } && test -s conftest$ac_exeext && {
1800 test "$cross_compiling" = yes ||
1801 test -x conftest$ac_exeext
1802 }; then :
1803 ac_retval=0
1804 else
1805 $as_echo "$as_me: failed program was:" >&5
1806 sed 's/^/| /' conftest.$ac_ext >&5
1808 ac_retval=1
1810 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1811 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1812 # interfere with the next link command; also delete a directory that is
1813 # left behind by Apple's compiler. We do this before executing the actions.
1814 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1816 as_fn_set_status $ac_retval
1818 } # ac_fn_c_try_link
1820 # ac_fn_c_try_cpp LINENO
1821 # ----------------------
1822 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1823 ac_fn_c_try_cpp ()
1825 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826 if { { ac_try="$ac_cpp conftest.$ac_ext"
1827 case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830 esac
1831 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832 $as_echo "$ac_try_echo"; } >&5
1833 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1834 ac_status=$?
1835 if test -s conftest.err; then
1836 grep -v '^ *+' conftest.err >conftest.er1
1837 cat conftest.er1 >&5
1838 mv -f conftest.er1 conftest.err
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; } > conftest.i && {
1842 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1843 test ! -s conftest.err
1844 }; then :
1845 ac_retval=0
1846 else
1847 $as_echo "$as_me: failed program was:" >&5
1848 sed 's/^/| /' conftest.$ac_ext >&5
1850 ac_retval=1
1852 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1853 as_fn_set_status $ac_retval
1855 } # ac_fn_c_try_cpp
1857 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1858 # -------------------------------------------------------
1859 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1860 # the include files in INCLUDES and setting the cache variable VAR
1861 # accordingly.
1862 ac_fn_c_check_header_mongrel ()
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 if eval \${$3+:} false; then :
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1867 $as_echo_n "checking for $2... " >&6; }
1868 if eval \${$3+:} false; then :
1869 $as_echo_n "(cached) " >&6
1871 eval ac_res=\$$3
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1873 $as_echo "$ac_res" >&6; }
1874 else
1875 # Is the header compilable?
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1877 $as_echo_n "checking $2 usability... " >&6; }
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879 /* end confdefs.h. */
1881 #include <$2>
1882 _ACEOF
1883 if ac_fn_c_try_compile "$LINENO"; then :
1884 ac_header_compiler=yes
1885 else
1886 ac_header_compiler=no
1888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1890 $as_echo "$ac_header_compiler" >&6; }
1892 # Is the header present?
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1894 $as_echo_n "checking $2 presence... " >&6; }
1895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1896 /* end confdefs.h. */
1897 #include <$2>
1898 _ACEOF
1899 if ac_fn_c_try_cpp "$LINENO"; then :
1900 ac_header_preproc=yes
1901 else
1902 ac_header_preproc=no
1904 rm -f conftest.err conftest.i conftest.$ac_ext
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1906 $as_echo "$ac_header_preproc" >&6; }
1908 # So? What about this header?
1909 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1910 yes:no: )
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1912 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1914 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1916 no:yes:* )
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1918 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1920 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1922 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1924 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1926 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1927 ( $as_echo "## ---------------------------------------------- ##
1928 ## Report this to pgsql-bugs@lists.postgresql.org ##
1929 ## ---------------------------------------------- ##"
1930 ) | sed "s/^/$as_me: WARNING: /" >&2
1932 esac
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934 $as_echo_n "checking for $2... " >&6; }
1935 if eval \${$3+:} false; then :
1936 $as_echo_n "(cached) " >&6
1937 else
1938 eval "$3=\$ac_header_compiler"
1940 eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942 $as_echo "$ac_res" >&6; }
1944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1946 } # ac_fn_c_check_header_mongrel
1948 # ac_fn_c_try_run LINENO
1949 # ----------------------
1950 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1951 # that executables *can* be run.
1952 ac_fn_c_try_run ()
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 if { { ac_try="$ac_link"
1956 case "(($ac_try" in
1957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958 *) ac_try_echo=$ac_try;;
1959 esac
1960 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961 $as_echo "$ac_try_echo"; } >&5
1962 (eval "$ac_link") 2>&5
1963 ac_status=$?
1964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1965 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1966 { { case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969 esac
1970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971 $as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_try") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; }; }; then :
1976 ac_retval=0
1977 else
1978 $as_echo "$as_me: program exited with status $ac_status" >&5
1979 $as_echo "$as_me: failed program was:" >&5
1980 sed 's/^/| /' conftest.$ac_ext >&5
1982 ac_retval=$ac_status
1984 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1986 as_fn_set_status $ac_retval
1988 } # ac_fn_c_try_run
1990 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1991 # -------------------------------------------------------
1992 # Tests whether HEADER exists and can be compiled using the include files in
1993 # INCLUDES, setting the cache variable VAR accordingly.
1994 ac_fn_c_check_header_compile ()
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1998 $as_echo_n "checking for $2... " >&6; }
1999 if eval \${$3+:} false; then :
2000 $as_echo_n "(cached) " >&6
2001 else
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003 /* end confdefs.h. */
2005 #include <$2>
2006 _ACEOF
2007 if ac_fn_c_try_compile "$LINENO"; then :
2008 eval "$3=yes"
2009 else
2010 eval "$3=no"
2012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2014 eval ac_res=\$$3
2015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2016 $as_echo "$ac_res" >&6; }
2017 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2019 } # ac_fn_c_check_header_compile
2021 # ac_fn_c_check_func LINENO FUNC VAR
2022 # ----------------------------------
2023 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2024 ac_fn_c_check_func ()
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2028 $as_echo_n "checking for $2... " >&6; }
2029 if eval \${$3+:} false; then :
2030 $as_echo_n "(cached) " >&6
2031 else
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033 /* end confdefs.h. */
2034 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2035 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2036 #define $2 innocuous_$2
2038 /* System header to define __stub macros and hopefully few prototypes,
2039 which can conflict with char $2 (); below.
2040 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2041 <limits.h> exists even on freestanding compilers. */
2043 #ifdef __STDC__
2044 # include <limits.h>
2045 #else
2046 # include <assert.h>
2047 #endif
2049 #undef $2
2051 /* Override any GCC internal prototype to avoid an error.
2052 Use char because int might match the return type of a GCC
2053 builtin and then its argument prototype would still apply. */
2054 #ifdef __cplusplus
2055 extern "C"
2056 #endif
2057 char $2 ();
2058 /* The GNU C library defines this for functions which it implements
2059 to always fail with ENOSYS. Some functions are actually named
2060 something starting with __ and the normal name is an alias. */
2061 #if defined __stub_$2 || defined __stub___$2
2062 choke me
2063 #endif
2066 main ()
2068 return $2 ();
2070 return 0;
2072 _ACEOF
2073 if ac_fn_c_try_link "$LINENO"; then :
2074 eval "$3=yes"
2075 else
2076 eval "$3=no"
2078 rm -f core conftest.err conftest.$ac_objext \
2079 conftest$ac_exeext conftest.$ac_ext
2081 eval ac_res=\$$3
2082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2083 $as_echo "$ac_res" >&6; }
2084 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2086 } # ac_fn_c_check_func
2088 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2089 # -------------------------------------------
2090 # Tests whether TYPE exists after having included INCLUDES, setting cache
2091 # variable VAR accordingly.
2092 ac_fn_c_check_type ()
2094 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2096 $as_echo_n "checking for $2... " >&6; }
2097 if eval \${$3+:} false; then :
2098 $as_echo_n "(cached) " >&6
2099 else
2100 eval "$3=no"
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102 /* end confdefs.h. */
2105 main ()
2107 if (sizeof ($2))
2108 return 0;
2110 return 0;
2112 _ACEOF
2113 if ac_fn_c_try_compile "$LINENO"; then :
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115 /* end confdefs.h. */
2118 main ()
2120 if (sizeof (($2)))
2121 return 0;
2123 return 0;
2125 _ACEOF
2126 if ac_fn_c_try_compile "$LINENO"; then :
2128 else
2129 eval "$3=yes"
2131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135 eval ac_res=\$$3
2136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137 $as_echo "$ac_res" >&6; }
2138 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2140 } # ac_fn_c_check_type
2142 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2143 # ----------------------------------------------------
2144 # Tries to find if the field MEMBER exists in type AGGR, after including
2145 # INCLUDES, setting cache variable VAR accordingly.
2146 ac_fn_c_check_member ()
2148 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2150 $as_echo_n "checking for $2.$3... " >&6; }
2151 if eval \${$4+:} false; then :
2152 $as_echo_n "(cached) " >&6
2153 else
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155 /* end confdefs.h. */
2158 main ()
2160 static $2 ac_aggr;
2161 if (ac_aggr.$3)
2162 return 0;
2164 return 0;
2166 _ACEOF
2167 if ac_fn_c_try_compile "$LINENO"; then :
2168 eval "$4=yes"
2169 else
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171 /* end confdefs.h. */
2174 main ()
2176 static $2 ac_aggr;
2177 if (sizeof ac_aggr.$3)
2178 return 0;
2180 return 0;
2182 _ACEOF
2183 if ac_fn_c_try_compile "$LINENO"; then :
2184 eval "$4=yes"
2185 else
2186 eval "$4=no"
2188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192 eval ac_res=\$$4
2193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2194 $as_echo "$ac_res" >&6; }
2195 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2197 } # ac_fn_c_check_member
2199 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2200 # --------------------------------------------
2201 # Tries to find the compile-time value of EXPR in a program that includes
2202 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2203 # computed
2204 ac_fn_c_compute_int ()
2206 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2207 if test "$cross_compiling" = yes; then
2208 # Depending upon the size, compute the lo and hi bounds.
2209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210 /* end confdefs.h. */
2213 main ()
2215 static int test_array [1 - 2 * !(($2) >= 0)];
2216 test_array [0] = 0;
2217 return test_array [0];
2220 return 0;
2222 _ACEOF
2223 if ac_fn_c_try_compile "$LINENO"; then :
2224 ac_lo=0 ac_mid=0
2225 while :; do
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227 /* end confdefs.h. */
2230 main ()
2232 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2233 test_array [0] = 0;
2234 return test_array [0];
2237 return 0;
2239 _ACEOF
2240 if ac_fn_c_try_compile "$LINENO"; then :
2241 ac_hi=$ac_mid; break
2242 else
2243 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2244 if test $ac_lo -le $ac_mid; then
2245 ac_lo= ac_hi=
2246 break
2248 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2251 done
2252 else
2253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254 /* end confdefs.h. */
2257 main ()
2259 static int test_array [1 - 2 * !(($2) < 0)];
2260 test_array [0] = 0;
2261 return test_array [0];
2264 return 0;
2266 _ACEOF
2267 if ac_fn_c_try_compile "$LINENO"; then :
2268 ac_hi=-1 ac_mid=-1
2269 while :; do
2270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271 /* end confdefs.h. */
2274 main ()
2276 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2277 test_array [0] = 0;
2278 return test_array [0];
2281 return 0;
2283 _ACEOF
2284 if ac_fn_c_try_compile "$LINENO"; then :
2285 ac_lo=$ac_mid; break
2286 else
2287 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2288 if test $ac_mid -le $ac_hi; then
2289 ac_lo= ac_hi=
2290 break
2292 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295 done
2296 else
2297 ac_lo= ac_hi=
2299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302 # Binary search between lo and hi bounds.
2303 while test "x$ac_lo" != "x$ac_hi"; do
2304 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306 /* end confdefs.h. */
2309 main ()
2311 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2312 test_array [0] = 0;
2313 return test_array [0];
2316 return 0;
2318 _ACEOF
2319 if ac_fn_c_try_compile "$LINENO"; then :
2320 ac_hi=$ac_mid
2321 else
2322 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325 done
2326 case $ac_lo in #((
2327 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2328 '') ac_retval=1 ;;
2329 esac
2330 else
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332 /* end confdefs.h. */
2334 static long int longval () { return $2; }
2335 static unsigned long int ulongval () { return $2; }
2336 #include <stdio.h>
2337 #include <stdlib.h>
2339 main ()
2342 FILE *f = fopen ("conftest.val", "w");
2343 if (! f)
2344 return 1;
2345 if (($2) < 0)
2347 long int i = longval ();
2348 if (i != ($2))
2349 return 1;
2350 fprintf (f, "%ld", i);
2352 else
2354 unsigned long int i = ulongval ();
2355 if (i != ($2))
2356 return 1;
2357 fprintf (f, "%lu", i);
2359 /* Do not output a trailing newline, as this causes \r\n confusion
2360 on some platforms. */
2361 return ferror (f) || fclose (f) != 0;
2364 return 0;
2366 _ACEOF
2367 if ac_fn_c_try_run "$LINENO"; then :
2368 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2369 else
2370 ac_retval=1
2372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2373 conftest.$ac_objext conftest.beam conftest.$ac_ext
2374 rm -f conftest.val
2377 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2378 as_fn_set_status $ac_retval
2380 } # ac_fn_c_compute_int
2382 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2383 # ---------------------------------------------
2384 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2385 # accordingly.
2386 ac_fn_c_check_decl ()
2388 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2389 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2390 as_decl_name=`echo $2|sed 's/ *(.*//'`
2391 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2393 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2394 if eval \${$3+:} false; then :
2395 $as_echo_n "(cached) " >&6
2396 else
2397 ac_save_werror_flag=$ac_c_werror_flag
2398 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400 /* end confdefs.h. */
2403 main ()
2405 #ifndef $as_decl_name
2406 #ifdef __cplusplus
2407 (void) $as_decl_use;
2408 #else
2409 (void) $as_decl_name;
2410 #endif
2411 #endif
2414 return 0;
2416 _ACEOF
2417 if ac_fn_c_try_compile "$LINENO"; then :
2418 eval "$3=yes"
2419 else
2420 eval "$3=no"
2422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423 ac_c_werror_flag=$ac_save_werror_flag
2425 eval ac_res=\$$3
2426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2427 $as_echo "$ac_res" >&6; }
2428 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2430 } # ac_fn_c_check_decl
2431 cat >config.log <<_ACEOF
2432 This file contains any messages produced by compilers while
2433 running configure, to aid debugging if configure makes a mistake.
2435 It was created by PostgreSQL $as_me 14beta1, which was
2436 generated by GNU Autoconf 2.69. Invocation command line was
2438 $ $0 $@
2440 _ACEOF
2441 exec 5>>config.log
2443 cat <<_ASUNAME
2444 ## --------- ##
2445 ## Platform. ##
2446 ## --------- ##
2448 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2449 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2450 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2451 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2452 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2454 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2455 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2457 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2458 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2459 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2460 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2461 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2462 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2463 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2465 _ASUNAME
2467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2468 for as_dir in $PATH
2470 IFS=$as_save_IFS
2471 test -z "$as_dir" && as_dir=.
2472 $as_echo "PATH: $as_dir"
2473 done
2474 IFS=$as_save_IFS
2476 } >&5
2478 cat >&5 <<_ACEOF
2481 ## ----------- ##
2482 ## Core tests. ##
2483 ## ----------- ##
2485 _ACEOF
2488 # Keep a trace of the command line.
2489 # Strip out --no-create and --no-recursion so they do not pile up.
2490 # Strip out --silent because we don't want to record it for future runs.
2491 # Also quote any args containing shell meta-characters.
2492 # Make two passes to allow for proper duplicate-argument suppression.
2493 ac_configure_args=
2494 ac_configure_args0=
2495 ac_configure_args1=
2496 ac_must_keep_next=false
2497 for ac_pass in 1 2
2499 for ac_arg
2501 case $ac_arg in
2502 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2503 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2504 | -silent | --silent | --silen | --sile | --sil)
2505 continue ;;
2506 *\'*)
2507 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2508 esac
2509 case $ac_pass in
2510 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2512 as_fn_append ac_configure_args1 " '$ac_arg'"
2513 if test $ac_must_keep_next = true; then
2514 ac_must_keep_next=false # Got value, back to normal.
2515 else
2516 case $ac_arg in
2517 *=* | --config-cache | -C | -disable-* | --disable-* \
2518 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2519 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2520 | -with-* | --with-* | -without-* | --without-* | --x)
2521 case "$ac_configure_args0 " in
2522 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2523 esac
2525 -* ) ac_must_keep_next=true ;;
2526 esac
2528 as_fn_append ac_configure_args " '$ac_arg'"
2530 esac
2531 done
2532 done
2533 { ac_configure_args0=; unset ac_configure_args0;}
2534 { ac_configure_args1=; unset ac_configure_args1;}
2536 # When interrupted or exit'd, cleanup temporary files, and complete
2537 # config.log. We remove comments because anyway the quotes in there
2538 # would cause problems or look ugly.
2539 # WARNING: Use '\'' to represent an apostrophe within the trap.
2540 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2541 trap 'exit_status=$?
2542 # Save into config.log some information that might help in debugging.
2544 echo
2546 $as_echo "## ---------------- ##
2547 ## Cache variables. ##
2548 ## ---------------- ##"
2549 echo
2550 # The following way of writing the cache mishandles newlines in values,
2552 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2553 eval ac_val=\$$ac_var
2554 case $ac_val in #(
2555 *${as_nl}*)
2556 case $ac_var in #(
2557 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2558 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2559 esac
2560 case $ac_var in #(
2561 _ | IFS | as_nl) ;; #(
2562 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2563 *) { eval $ac_var=; unset $ac_var;} ;;
2564 esac ;;
2565 esac
2566 done
2567 (set) 2>&1 |
2568 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2569 *${as_nl}ac_space=\ *)
2570 sed -n \
2571 "s/'\''/'\''\\\\'\'''\''/g;
2572 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2573 ;; #(
2575 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2577 esac |
2578 sort
2580 echo
2582 $as_echo "## ----------------- ##
2583 ## Output variables. ##
2584 ## ----------------- ##"
2585 echo
2586 for ac_var in $ac_subst_vars
2588 eval ac_val=\$$ac_var
2589 case $ac_val in
2590 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2591 esac
2592 $as_echo "$ac_var='\''$ac_val'\''"
2593 done | sort
2594 echo
2596 if test -n "$ac_subst_files"; then
2597 $as_echo "## ------------------- ##
2598 ## File substitutions. ##
2599 ## ------------------- ##"
2600 echo
2601 for ac_var in $ac_subst_files
2603 eval ac_val=\$$ac_var
2604 case $ac_val in
2605 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2606 esac
2607 $as_echo "$ac_var='\''$ac_val'\''"
2608 done | sort
2609 echo
2612 if test -s confdefs.h; then
2613 $as_echo "## ----------- ##
2614 ## confdefs.h. ##
2615 ## ----------- ##"
2616 echo
2617 cat confdefs.h
2618 echo
2620 test "$ac_signal" != 0 &&
2621 $as_echo "$as_me: caught signal $ac_signal"
2622 $as_echo "$as_me: exit $exit_status"
2623 } >&5
2624 rm -f core *.core core.conftest.* &&
2625 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2626 exit $exit_status
2628 for ac_signal in 1 2 13 15; do
2629 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2630 done
2631 ac_signal=0
2633 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2634 rm -f -r conftest* confdefs.h
2636 $as_echo "/* confdefs.h */" > confdefs.h
2638 # Predefined preprocessor variables.
2640 cat >>confdefs.h <<_ACEOF
2641 #define PACKAGE_NAME "$PACKAGE_NAME"
2642 _ACEOF
2644 cat >>confdefs.h <<_ACEOF
2645 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2646 _ACEOF
2648 cat >>confdefs.h <<_ACEOF
2649 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2650 _ACEOF
2652 cat >>confdefs.h <<_ACEOF
2653 #define PACKAGE_STRING "$PACKAGE_STRING"
2654 _ACEOF
2656 cat >>confdefs.h <<_ACEOF
2657 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2658 _ACEOF
2660 cat >>confdefs.h <<_ACEOF
2661 #define PACKAGE_URL "$PACKAGE_URL"
2662 _ACEOF
2665 # Let the site file select an alternate cache file if it wants to.
2666 # Prefer an explicitly selected file to automatically selected ones.
2667 ac_site_file1=NONE
2668 ac_site_file2=NONE
2669 if test -n "$CONFIG_SITE"; then
2670 # We do not want a PATH search for config.site.
2671 case $CONFIG_SITE in #((
2672 -*) ac_site_file1=./$CONFIG_SITE;;
2673 */*) ac_site_file1=$CONFIG_SITE;;
2674 *) ac_site_file1=./$CONFIG_SITE;;
2675 esac
2676 elif test "x$prefix" != xNONE; then
2677 ac_site_file1=$prefix/share/config.site
2678 ac_site_file2=$prefix/etc/config.site
2679 else
2680 ac_site_file1=$ac_default_prefix/share/config.site
2681 ac_site_file2=$ac_default_prefix/etc/config.site
2683 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2685 test "x$ac_site_file" = xNONE && continue
2686 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2688 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2689 sed 's/^/| /' "$ac_site_file" >&5
2690 . "$ac_site_file" \
2691 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2692 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2693 as_fn_error $? "failed to load site script $ac_site_file
2694 See \`config.log' for more details" "$LINENO" 5; }
2696 done
2698 if test -r "$cache_file"; then
2699 # Some versions of bash will fail to source /dev/null (special files
2700 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2701 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2703 $as_echo "$as_me: loading cache $cache_file" >&6;}
2704 case $cache_file in
2705 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2706 *) . "./$cache_file";;
2707 esac
2709 else
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2711 $as_echo "$as_me: creating cache $cache_file" >&6;}
2712 >$cache_file
2715 # Check that the precious variables saved in the cache have kept the same
2716 # value.
2717 ac_cache_corrupted=false
2718 for ac_var in $ac_precious_vars; do
2719 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2720 eval ac_new_set=\$ac_env_${ac_var}_set
2721 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2722 eval ac_new_val=\$ac_env_${ac_var}_value
2723 case $ac_old_set,$ac_new_set in
2724 set,)
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2726 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2727 ac_cache_corrupted=: ;;
2728 ,set)
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2730 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2731 ac_cache_corrupted=: ;;
2732 ,);;
2734 if test "x$ac_old_val" != "x$ac_new_val"; then
2735 # differences in whitespace do not lead to failure.
2736 ac_old_val_w=`echo x $ac_old_val`
2737 ac_new_val_w=`echo x $ac_new_val`
2738 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2740 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2741 ac_cache_corrupted=:
2742 else
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2744 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2745 eval $ac_var=\$ac_old_val
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2748 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2750 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2751 fi;;
2752 esac
2753 # Pass precious variables to config.status.
2754 if test "$ac_new_set" = set; then
2755 case $ac_new_val in
2756 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2757 *) ac_arg=$ac_var=$ac_new_val ;;
2758 esac
2759 case " $ac_configure_args " in
2760 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2761 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2762 esac
2764 done
2765 if $ac_cache_corrupted; then
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2767 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2769 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2770 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2772 ## -------------------- ##
2773 ## Main body of script. ##
2774 ## -------------------- ##
2776 ac_ext=c
2777 ac_cpp='$CPP $CPPFLAGS'
2778 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2779 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2780 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2787 ac_aux_dir=
2788 for ac_dir in config "$srcdir"/config; do
2789 if test -f "$ac_dir/install-sh"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/install-sh -c"
2792 break
2793 elif test -f "$ac_dir/install.sh"; then
2794 ac_aux_dir=$ac_dir
2795 ac_install_sh="$ac_aux_dir/install.sh -c"
2796 break
2797 elif test -f "$ac_dir/shtool"; then
2798 ac_aux_dir=$ac_dir
2799 ac_install_sh="$ac_aux_dir/shtool install -c"
2800 break
2802 done
2803 if test -z "$ac_aux_dir"; then
2804 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2807 # These three variables are undocumented and unsupported,
2808 # and are intended to be withdrawn in a future Autoconf release.
2809 # They can cause serious problems if a builder's source tree is in a directory
2810 # whose full name contains unusual characters.
2811 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2812 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2813 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2818 cat >>confdefs.h <<_ACEOF
2819 #define CONFIGURE_ARGS "$ac_configure_args"
2820 _ACEOF
2823 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2824 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2825 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2828 cat >>confdefs.h <<_ACEOF
2829 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2830 _ACEOF
2833 cat >>confdefs.h <<_ACEOF
2834 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2835 _ACEOF
2838 cat >>confdefs.h <<_ACEOF
2839 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2840 _ACEOF
2846 # Check whether --with-extra-version was given.
2847 if test "${with_extra_version+set}" = set; then :
2848 withval=$with_extra_version;
2849 case $withval in
2850 yes)
2851 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2854 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2857 PG_VERSION="$PACKAGE_VERSION$withval"
2859 esac
2861 else
2862 PG_VERSION="$PACKAGE_VERSION"
2867 cat >>confdefs.h <<_ACEOF
2868 #define PG_VERSION "$PG_VERSION"
2869 _ACEOF
2872 # Make sure we can run config.sub.
2873 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2874 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2877 $as_echo_n "checking build system type... " >&6; }
2878 if ${ac_cv_build+:} false; then :
2879 $as_echo_n "(cached) " >&6
2880 else
2881 ac_build_alias=$build_alias
2882 test "x$ac_build_alias" = x &&
2883 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2884 test "x$ac_build_alias" = x &&
2885 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2886 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2887 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2891 $as_echo "$ac_cv_build" >&6; }
2892 case $ac_cv_build in
2893 *-*-*) ;;
2894 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2895 esac
2896 build=$ac_cv_build
2897 ac_save_IFS=$IFS; IFS='-'
2898 set x $ac_cv_build
2899 shift
2900 build_cpu=$1
2901 build_vendor=$2
2902 shift; shift
2903 # Remember, the first character of IFS is used to create $*,
2904 # except with old shells:
2905 build_os=$*
2906 IFS=$ac_save_IFS
2907 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2911 $as_echo_n "checking host system type... " >&6; }
2912 if ${ac_cv_host+:} false; then :
2913 $as_echo_n "(cached) " >&6
2914 else
2915 if test "x$host_alias" = x; then
2916 ac_cv_host=$ac_cv_build
2917 else
2918 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2919 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2924 $as_echo "$ac_cv_host" >&6; }
2925 case $ac_cv_host in
2926 *-*-*) ;;
2927 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2928 esac
2929 host=$ac_cv_host
2930 ac_save_IFS=$IFS; IFS='-'
2931 set x $ac_cv_host
2932 shift
2933 host_cpu=$1
2934 host_vendor=$2
2935 shift; shift
2936 # Remember, the first character of IFS is used to create $*,
2937 # except with old shells:
2938 host_os=$*
2939 IFS=$ac_save_IFS
2940 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2944 template=
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2946 $as_echo_n "checking which template to use... " >&6; }
2951 # Check whether --with-template was given.
2952 if test "${with_template+set}" = set; then :
2953 withval=$with_template;
2954 case $withval in
2955 yes)
2956 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2959 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2963 case $withval in
2964 list) echo; ls "$srcdir/src/template"; exit;;
2965 *) if test -f "$srcdir/src/template/$with_template" ; then
2966 template=$withval
2967 else
2968 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2969 fi;;
2970 esac
2973 esac
2975 else
2977 # --with-template not given
2979 case $host_os in
2980 aix*) template=aix ;;
2981 cygwin*|msys*) template=cygwin ;;
2982 darwin*) template=darwin ;;
2983 dragonfly*) template=netbsd ;;
2984 freebsd*) template=freebsd ;;
2985 hpux*) template=hpux ;;
2986 linux*|gnu*|k*bsd*-gnu)
2987 template=linux ;;
2988 mingw*) template=win32 ;;
2989 netbsd*) template=netbsd ;;
2990 openbsd*) template=openbsd ;;
2991 solaris*) template=solaris ;;
2992 esac
2994 if test x"$template" = x"" ; then
2995 as_fn_error $? "
2996 *******************************************************************
2997 PostgreSQL has apparently not been ported to your platform yet.
2998 To try a manual configuration, look into the src/template directory
2999 for a similar platform and use the '--with-template=' option.
3001 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3002 rectifying this. Include the above 'checking host system type...'
3003 line.
3004 *******************************************************************
3005 " "$LINENO" 5
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3014 $as_echo "$template" >&6; }
3016 PORTNAME=$template
3019 # Initialize default assumption that we do not need separate assembly code
3020 # for TAS (test-and-set). This can be overridden by the template file
3021 # when it's executed.
3022 need_tas=no
3023 tas_file=dummy.s
3028 ## Command line options
3032 # Add non-standard directories to the include path
3037 # Check whether --with-includes was given.
3038 if test "${with_includes+set}" = set; then :
3039 withval=$with_includes;
3040 case $withval in
3041 yes)
3042 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3045 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3050 esac
3058 # Add non-standard directories to the library search path
3063 # Check whether --with-libraries was given.
3064 if test "${with_libraries+set}" = set; then :
3065 withval=$with_libraries;
3066 case $withval in
3067 yes)
3068 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3071 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3074 LIBRARY_DIRS=$withval
3076 esac
3085 # Check whether --with-libs was given.
3086 if test "${with_libs+set}" = set; then :
3087 withval=$with_libs;
3088 case $withval in
3089 yes)
3090 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3093 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3096 LIBRARY_DIRS=$withval
3098 esac
3106 # 64-bit integer date/time storage is now the only option, but to avoid
3107 # unnecessary breakage of build scripts, continue to accept an explicit
3108 # "--enable-integer-datetimes" switch.
3112 # Check whether --enable-integer-datetimes was given.
3113 if test "${enable_integer_datetimes+set}" = set; then :
3114 enableval=$enable_integer_datetimes;
3115 case $enableval in
3116 yes)
3120 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3123 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3125 esac
3127 else
3128 enable_integer_datetimes=yes
3136 # NLS
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3139 $as_echo_n "checking whether NLS is wanted... " >&6; }
3142 # Check whether --enable-nls was given.
3143 if test "${enable_nls+set}" = set; then :
3144 enableval=$enable_nls;
3145 case $enableval in
3146 yes)
3153 enable_nls=yes
3154 WANTED_LANGUAGES=$enableval
3156 esac
3158 else
3159 enable_nls=no
3164 if test "$enable_nls" = yes; then
3166 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3171 $as_echo "$enable_nls" >&6; }
3176 # Default port number (--with-pgport), default 5432
3178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3179 $as_echo_n "checking for default port number... " >&6; }
3183 # Check whether --with-pgport was given.
3184 if test "${with_pgport+set}" = set; then :
3185 withval=$with_pgport;
3186 case $withval in
3187 yes)
3188 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3191 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3194 default_port=$withval
3196 esac
3198 else
3199 default_port=5432
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3204 $as_echo "$default_port" >&6; }
3205 # Need both of these because some places want an integer and some a string
3207 cat >>confdefs.h <<_ACEOF
3208 #define DEF_PGPORT ${default_port}
3209 _ACEOF
3212 cat >>confdefs.h <<_ACEOF
3213 #define DEF_PGPORT_STR "${default_port}"
3214 _ACEOF
3218 # It's worth validating port; you can get very confusing errors otherwise
3219 if test x"$default_port" = x""; then
3220 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3221 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3222 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3223 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3224 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3225 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3226 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3230 # '-rpath'-like feature can be disabled
3234 # Check whether --enable-rpath was given.
3235 if test "${enable_rpath+set}" = set; then :
3236 enableval=$enable_rpath;
3237 case $enableval in
3238 yes)
3245 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3247 esac
3249 else
3250 enable_rpath=yes
3258 # Spinlocks
3262 # Check whether --enable-spinlocks was given.
3263 if test "${enable_spinlocks+set}" = set; then :
3264 enableval=$enable_spinlocks;
3265 case $enableval in
3266 yes)
3273 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3275 esac
3277 else
3278 enable_spinlocks=yes
3285 # Atomic operations
3289 # Check whether --enable-atomics was given.
3290 if test "${enable_atomics+set}" = set; then :
3291 enableval=$enable_atomics;
3292 case $enableval in
3293 yes)
3300 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3302 esac
3304 else
3305 enable_atomics=yes
3312 # --enable-debug adds -g to compiler flags
3316 # Check whether --enable-debug was given.
3317 if test "${enable_debug+set}" = set; then :
3318 enableval=$enable_debug;
3319 case $enableval in
3320 yes)
3327 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3329 esac
3331 else
3332 enable_debug=no
3340 # --enable-profiling enables gcc profiling
3344 # Check whether --enable-profiling was given.
3345 if test "${enable_profiling+set}" = set; then :
3346 enableval=$enable_profiling;
3347 case $enableval in
3348 yes)
3355 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3357 esac
3359 else
3360 enable_profiling=no
3367 # --enable-coverage enables generation of code coverage metrics with gcov
3371 # Check whether --enable-coverage was given.
3372 if test "${enable_coverage+set}" = set; then :
3373 enableval=$enable_coverage;
3374 case $enableval in
3375 yes)
3376 if test -z "$GCOV"; then
3377 for ac_prog in gcov
3379 # Extract the first word of "$ac_prog", so it can be a program name with args.
3380 set dummy $ac_prog; ac_word=$2
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3382 $as_echo_n "checking for $ac_word... " >&6; }
3383 if ${ac_cv_path_GCOV+:} false; then :
3384 $as_echo_n "(cached) " >&6
3385 else
3386 case $GCOV in
3387 [\\/]* | ?:[\\/]*)
3388 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3392 for as_dir in $PATH
3394 IFS=$as_save_IFS
3395 test -z "$as_dir" && as_dir=.
3396 for ac_exec_ext in '' $ac_executable_extensions; do
3397 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3398 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3400 break 2
3402 done
3403 done
3404 IFS=$as_save_IFS
3407 esac
3409 GCOV=$ac_cv_path_GCOV
3410 if test -n "$GCOV"; then
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3412 $as_echo "$GCOV" >&6; }
3413 else
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3415 $as_echo "no" >&6; }
3419 test -n "$GCOV" && break
3420 done
3422 else
3423 # Report the value of GCOV in configure's output in all cases.
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3425 $as_echo_n "checking for GCOV... " >&6; }
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3427 $as_echo "$GCOV" >&6; }
3430 if test -z "$GCOV"; then
3431 as_fn_error $? "gcov not found" "$LINENO" 5
3433 if test -z "$LCOV"; then
3434 for ac_prog in lcov
3436 # Extract the first word of "$ac_prog", so it can be a program name with args.
3437 set dummy $ac_prog; ac_word=$2
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3439 $as_echo_n "checking for $ac_word... " >&6; }
3440 if ${ac_cv_path_LCOV+:} false; then :
3441 $as_echo_n "(cached) " >&6
3442 else
3443 case $LCOV in
3444 [\\/]* | ?:[\\/]*)
3445 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3449 for as_dir in $PATH
3451 IFS=$as_save_IFS
3452 test -z "$as_dir" && as_dir=.
3453 for ac_exec_ext in '' $ac_executable_extensions; do
3454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3455 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3457 break 2
3459 done
3460 done
3461 IFS=$as_save_IFS
3464 esac
3466 LCOV=$ac_cv_path_LCOV
3467 if test -n "$LCOV"; then
3468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3469 $as_echo "$LCOV" >&6; }
3470 else
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3472 $as_echo "no" >&6; }
3476 test -n "$LCOV" && break
3477 done
3479 else
3480 # Report the value of LCOV in configure's output in all cases.
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3482 $as_echo_n "checking for LCOV... " >&6; }
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3484 $as_echo "$LCOV" >&6; }
3487 if test -z "$LCOV"; then
3488 as_fn_error $? "lcov not found" "$LINENO" 5
3490 if test -z "$GENHTML"; then
3491 for ac_prog in genhtml
3493 # Extract the first word of "$ac_prog", so it can be a program name with args.
3494 set dummy $ac_prog; ac_word=$2
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3496 $as_echo_n "checking for $ac_word... " >&6; }
3497 if ${ac_cv_path_GENHTML+:} false; then :
3498 $as_echo_n "(cached) " >&6
3499 else
3500 case $GENHTML in
3501 [\\/]* | ?:[\\/]*)
3502 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506 for as_dir in $PATH
3508 IFS=$as_save_IFS
3509 test -z "$as_dir" && as_dir=.
3510 for ac_exec_ext in '' $ac_executable_extensions; do
3511 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3512 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3514 break 2
3516 done
3517 done
3518 IFS=$as_save_IFS
3521 esac
3523 GENHTML=$ac_cv_path_GENHTML
3524 if test -n "$GENHTML"; then
3525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3526 $as_echo "$GENHTML" >&6; }
3527 else
3528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3529 $as_echo "no" >&6; }
3533 test -n "$GENHTML" && break
3534 done
3536 else
3537 # Report the value of GENHTML in configure's output in all cases.
3538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3539 $as_echo_n "checking for GENHTML... " >&6; }
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3541 $as_echo "$GENHTML" >&6; }
3544 if test -z "$GENHTML"; then
3545 as_fn_error $? "genhtml not found" "$LINENO" 5
3552 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3554 esac
3556 else
3557 enable_coverage=no
3565 # DTrace
3569 # Check whether --enable-dtrace was given.
3570 if test "${enable_dtrace+set}" = set; then :
3571 enableval=$enable_dtrace;
3572 case $enableval in
3573 yes)
3574 if test -z "$DTRACE"; then
3575 for ac_prog in dtrace
3577 # Extract the first word of "$ac_prog", so it can be a program name with args.
3578 set dummy $ac_prog; ac_word=$2
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3580 $as_echo_n "checking for $ac_word... " >&6; }
3581 if ${ac_cv_path_DTRACE+:} false; then :
3582 $as_echo_n "(cached) " >&6
3583 else
3584 case $DTRACE in
3585 [\\/]* | ?:[\\/]*)
3586 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590 for as_dir in $PATH
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
3594 for ac_exec_ext in '' $ac_executable_extensions; do
3595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3596 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3598 break 2
3600 done
3601 done
3602 IFS=$as_save_IFS
3605 esac
3607 DTRACE=$ac_cv_path_DTRACE
3608 if test -n "$DTRACE"; then
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3610 $as_echo "$DTRACE" >&6; }
3611 else
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613 $as_echo "no" >&6; }
3617 test -n "$DTRACE" && break
3618 done
3620 else
3621 # Report the value of DTRACE in configure's output in all cases.
3622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3623 $as_echo_n "checking for DTRACE... " >&6; }
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3625 $as_echo "$DTRACE" >&6; }
3628 if test -z "$DTRACE"; then
3629 as_fn_error $? "dtrace not found" "$LINENO" 5
3637 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3639 esac
3641 else
3642 enable_dtrace=no
3650 # TAP tests
3654 # Check whether --enable-tap-tests was given.
3655 if test "${enable_tap_tests+set}" = set; then :
3656 enableval=$enable_tap_tests;
3657 case $enableval in
3658 yes)
3665 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3667 esac
3669 else
3670 enable_tap_tests=no
3678 # Block size
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3681 $as_echo_n "checking for block size... " >&6; }
3685 # Check whether --with-blocksize was given.
3686 if test "${with_blocksize+set}" = set; then :
3687 withval=$with_blocksize;
3688 case $withval in
3689 yes)
3690 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3693 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3696 blocksize=$withval
3698 esac
3700 else
3701 blocksize=8
3705 case ${blocksize} in
3706 1) BLCKSZ=1024;;
3707 2) BLCKSZ=2048;;
3708 4) BLCKSZ=4096;;
3709 8) BLCKSZ=8192;;
3710 16) BLCKSZ=16384;;
3711 32) BLCKSZ=32768;;
3712 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3713 esac
3714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3715 $as_echo "${blocksize}kB" >&6; }
3718 cat >>confdefs.h <<_ACEOF
3719 #define BLCKSZ ${BLCKSZ}
3720 _ACEOF
3724 # Relation segment size
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3727 $as_echo_n "checking for segment size... " >&6; }
3731 # Check whether --with-segsize was given.
3732 if test "${with_segsize+set}" = set; then :
3733 withval=$with_segsize;
3734 case $withval in
3735 yes)
3736 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3739 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3742 segsize=$withval
3744 esac
3746 else
3747 segsize=1
3751 # this expression is set up to avoid unnecessary integer overflow
3752 # blocksize is already guaranteed to be a factor of 1024
3753 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3754 test $? -eq 0 || exit 1
3755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3756 $as_echo "${segsize}GB" >&6; }
3759 cat >>confdefs.h <<_ACEOF
3760 #define RELSEG_SIZE ${RELSEG_SIZE}
3761 _ACEOF
3765 # WAL block size
3767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3768 $as_echo_n "checking for WAL block size... " >&6; }
3772 # Check whether --with-wal-blocksize was given.
3773 if test "${with_wal_blocksize+set}" = set; then :
3774 withval=$with_wal_blocksize;
3775 case $withval in
3776 yes)
3777 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3780 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3783 wal_blocksize=$withval
3785 esac
3787 else
3788 wal_blocksize=8
3792 case ${wal_blocksize} in
3793 1) XLOG_BLCKSZ=1024;;
3794 2) XLOG_BLCKSZ=2048;;
3795 4) XLOG_BLCKSZ=4096;;
3796 8) XLOG_BLCKSZ=8192;;
3797 16) XLOG_BLCKSZ=16384;;
3798 32) XLOG_BLCKSZ=32768;;
3799 64) XLOG_BLCKSZ=65536;;
3800 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3801 esac
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3803 $as_echo "${wal_blocksize}kB" >&6; }
3806 cat >>confdefs.h <<_ACEOF
3807 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3808 _ACEOF
3812 # C compiler
3815 # For historical reasons you can also use --with-CC to specify the C compiler
3816 # to use, although the standard way to do this is to set the CC environment
3817 # variable.
3821 # Check whether --with-CC was given.
3822 if test "${with_CC+set}" = set; then :
3823 withval=$with_CC;
3824 case $withval in
3825 yes)
3826 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3829 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3832 CC=$with_CC
3834 esac
3840 case $template in
3841 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3842 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3843 esac
3845 ac_ext=c
3846 ac_cpp='$CPP $CPPFLAGS'
3847 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3848 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3850 if test -n "$ac_tool_prefix"; then
3851 for ac_prog in $pgac_cc_list
3853 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3854 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3856 $as_echo_n "checking for $ac_word... " >&6; }
3857 if ${ac_cv_prog_CC+:} false; then :
3858 $as_echo_n "(cached) " >&6
3859 else
3860 if test -n "$CC"; then
3861 ac_cv_prog_CC="$CC" # Let the user override the test.
3862 else
3863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3864 for as_dir in $PATH
3866 IFS=$as_save_IFS
3867 test -z "$as_dir" && as_dir=.
3868 for ac_exec_ext in '' $ac_executable_extensions; do
3869 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3870 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3872 break 2
3874 done
3875 done
3876 IFS=$as_save_IFS
3880 CC=$ac_cv_prog_CC
3881 if test -n "$CC"; then
3882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3883 $as_echo "$CC" >&6; }
3884 else
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3886 $as_echo "no" >&6; }
3890 test -n "$CC" && break
3891 done
3893 if test -z "$CC"; then
3894 ac_ct_CC=$CC
3895 for ac_prog in $pgac_cc_list
3897 # Extract the first word of "$ac_prog", so it can be a program name with args.
3898 set dummy $ac_prog; ac_word=$2
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3900 $as_echo_n "checking for $ac_word... " >&6; }
3901 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3902 $as_echo_n "(cached) " >&6
3903 else
3904 if test -n "$ac_ct_CC"; then
3905 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3906 else
3907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3908 for as_dir in $PATH
3910 IFS=$as_save_IFS
3911 test -z "$as_dir" && as_dir=.
3912 for ac_exec_ext in '' $ac_executable_extensions; do
3913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3914 ac_cv_prog_ac_ct_CC="$ac_prog"
3915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3916 break 2
3918 done
3919 done
3920 IFS=$as_save_IFS
3924 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3925 if test -n "$ac_ct_CC"; then
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3927 $as_echo "$ac_ct_CC" >&6; }
3928 else
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3930 $as_echo "no" >&6; }
3934 test -n "$ac_ct_CC" && break
3935 done
3937 if test "x$ac_ct_CC" = x; then
3938 CC=""
3939 else
3940 case $cross_compiling:$ac_tool_warned in
3941 yes:)
3942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3943 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3944 ac_tool_warned=yes ;;
3945 esac
3946 CC=$ac_ct_CC
3951 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3952 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3953 as_fn_error $? "no acceptable C compiler found in \$PATH
3954 See \`config.log' for more details" "$LINENO" 5; }
3956 # Provide some information about the compiler.
3957 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3958 set X $ac_compile
3959 ac_compiler=$2
3960 for ac_option in --version -v -V -qversion; do
3961 { { ac_try="$ac_compiler $ac_option >&5"
3962 case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965 esac
3966 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967 $as_echo "$ac_try_echo"; } >&5
3968 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3969 ac_status=$?
3970 if test -s conftest.err; then
3971 sed '10a\
3972 ... rest of stderr output deleted ...
3973 10q' conftest.err >conftest.er1
3974 cat conftest.er1 >&5
3976 rm -f conftest.er1 conftest.err
3977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978 test $ac_status = 0; }
3979 done
3981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3982 /* end confdefs.h. */
3985 main ()
3989 return 0;
3991 _ACEOF
3992 ac_clean_files_save=$ac_clean_files
3993 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3994 # Try to create an executable without -o first, disregard a.out.
3995 # It will help us diagnose broken compilers, and finding out an intuition
3996 # of exeext.
3997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3998 $as_echo_n "checking whether the C compiler works... " >&6; }
3999 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4001 # The possible output files:
4002 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4004 ac_rmfiles=
4005 for ac_file in $ac_files
4007 case $ac_file in
4008 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4009 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4010 esac
4011 done
4012 rm -f $ac_rmfiles
4014 if { { ac_try="$ac_link_default"
4015 case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018 esac
4019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020 $as_echo "$ac_try_echo"; } >&5
4021 (eval "$ac_link_default") 2>&5
4022 ac_status=$?
4023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; then :
4025 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4026 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4027 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4028 # so that the user can short-circuit this test for compilers unknown to
4029 # Autoconf.
4030 for ac_file in $ac_files ''
4032 test -f "$ac_file" || continue
4033 case $ac_file in
4034 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4036 [ab].out )
4037 # We found the default executable, but exeext='' is most
4038 # certainly right.
4039 break;;
4040 *.* )
4041 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4042 then :; else
4043 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4045 # We set ac_cv_exeext here because the later test for it is not
4046 # safe: cross compilers may not add the suffix if given an `-o'
4047 # argument, so we may need to know it at that point already.
4048 # Even if this section looks crufty: it has the advantage of
4049 # actually working.
4050 break;;
4052 break;;
4053 esac
4054 done
4055 test "$ac_cv_exeext" = no && ac_cv_exeext=
4057 else
4058 ac_file=''
4060 if test -z "$ac_file"; then :
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4062 $as_echo "no" >&6; }
4063 $as_echo "$as_me: failed program was:" >&5
4064 sed 's/^/| /' conftest.$ac_ext >&5
4066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4068 as_fn_error 77 "C compiler cannot create executables
4069 See \`config.log' for more details" "$LINENO" 5; }
4070 else
4071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4072 $as_echo "yes" >&6; }
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4075 $as_echo_n "checking for C compiler default output file name... " >&6; }
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4077 $as_echo "$ac_file" >&6; }
4078 ac_exeext=$ac_cv_exeext
4080 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4081 ac_clean_files=$ac_clean_files_save
4082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4083 $as_echo_n "checking for suffix of executables... " >&6; }
4084 if { { ac_try="$ac_link"
4085 case "(($ac_try" in
4086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087 *) ac_try_echo=$ac_try;;
4088 esac
4089 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4090 $as_echo "$ac_try_echo"; } >&5
4091 (eval "$ac_link") 2>&5
4092 ac_status=$?
4093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4094 test $ac_status = 0; }; then :
4095 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4096 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4097 # work properly (i.e., refer to `conftest.exe'), while it won't with
4098 # `rm'.
4099 for ac_file in conftest.exe conftest conftest.*; do
4100 test -f "$ac_file" || continue
4101 case $ac_file in
4102 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4103 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4104 break;;
4105 * ) break;;
4106 esac
4107 done
4108 else
4109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4111 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4112 See \`config.log' for more details" "$LINENO" 5; }
4114 rm -f conftest conftest$ac_cv_exeext
4115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4116 $as_echo "$ac_cv_exeext" >&6; }
4118 rm -f conftest.$ac_ext
4119 EXEEXT=$ac_cv_exeext
4120 ac_exeext=$EXEEXT
4121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4122 /* end confdefs.h. */
4123 #include <stdio.h>
4125 main ()
4127 FILE *f = fopen ("conftest.out", "w");
4128 return ferror (f) || fclose (f) != 0;
4131 return 0;
4133 _ACEOF
4134 ac_clean_files="$ac_clean_files conftest.out"
4135 # Check that the compiler produces executables we can run. If not, either
4136 # the compiler is broken, or we cross compile.
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4138 $as_echo_n "checking whether we are cross compiling... " >&6; }
4139 if test "$cross_compiling" != yes; then
4140 { { ac_try="$ac_link"
4141 case "(($ac_try" in
4142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4143 *) ac_try_echo=$ac_try;;
4144 esac
4145 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4146 $as_echo "$ac_try_echo"; } >&5
4147 (eval "$ac_link") 2>&5
4148 ac_status=$?
4149 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150 test $ac_status = 0; }
4151 if { ac_try='./conftest$ac_cv_exeext'
4152 { { case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155 esac
4156 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157 $as_echo "$ac_try_echo"; } >&5
4158 (eval "$ac_try") 2>&5
4159 ac_status=$?
4160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; }; then
4162 cross_compiling=no
4163 else
4164 if test "$cross_compiling" = maybe; then
4165 cross_compiling=yes
4166 else
4167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4169 as_fn_error $? "cannot run C compiled programs.
4170 If you meant to cross compile, use \`--host'.
4171 See \`config.log' for more details" "$LINENO" 5; }
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4176 $as_echo "$cross_compiling" >&6; }
4178 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4179 ac_clean_files=$ac_clean_files_save
4180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4181 $as_echo_n "checking for suffix of object files... " >&6; }
4182 if ${ac_cv_objext+:} false; then :
4183 $as_echo_n "(cached) " >&6
4184 else
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186 /* end confdefs.h. */
4189 main ()
4193 return 0;
4195 _ACEOF
4196 rm -f conftest.o conftest.obj
4197 if { { ac_try="$ac_compile"
4198 case "(($ac_try" in
4199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4200 *) ac_try_echo=$ac_try;;
4201 esac
4202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4203 $as_echo "$ac_try_echo"; } >&5
4204 (eval "$ac_compile") 2>&5
4205 ac_status=$?
4206 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4207 test $ac_status = 0; }; then :
4208 for ac_file in conftest.o conftest.obj conftest.*; do
4209 test -f "$ac_file" || continue;
4210 case $ac_file in
4211 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4212 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4213 break;;
4214 esac
4215 done
4216 else
4217 $as_echo "$as_me: failed program was:" >&5
4218 sed 's/^/| /' conftest.$ac_ext >&5
4220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4222 as_fn_error $? "cannot compute suffix of object files: cannot compile
4223 See \`config.log' for more details" "$LINENO" 5; }
4225 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4228 $as_echo "$ac_cv_objext" >&6; }
4229 OBJEXT=$ac_cv_objext
4230 ac_objext=$OBJEXT
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4232 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4233 if ${ac_cv_c_compiler_gnu+:} false; then :
4234 $as_echo_n "(cached) " >&6
4235 else
4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h. */
4240 main ()
4242 #ifndef __GNUC__
4243 choke me
4244 #endif
4247 return 0;
4249 _ACEOF
4250 if ac_fn_c_try_compile "$LINENO"; then :
4251 ac_compiler_gnu=yes
4252 else
4253 ac_compiler_gnu=no
4255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4260 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4261 if test $ac_compiler_gnu = yes; then
4262 GCC=yes
4263 else
4264 GCC=
4266 ac_test_CFLAGS=${CFLAGS+set}
4267 ac_save_CFLAGS=$CFLAGS
4268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4269 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4270 if ${ac_cv_prog_cc_g+:} false; then :
4271 $as_echo_n "(cached) " >&6
4272 else
4273 ac_save_c_werror_flag=$ac_c_werror_flag
4274 ac_c_werror_flag=yes
4275 ac_cv_prog_cc_g=no
4276 CFLAGS="-g"
4277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4278 /* end confdefs.h. */
4281 main ()
4285 return 0;
4287 _ACEOF
4288 if ac_fn_c_try_compile "$LINENO"; then :
4289 ac_cv_prog_cc_g=yes
4290 else
4291 CFLAGS=""
4292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4293 /* end confdefs.h. */
4296 main ()
4300 return 0;
4302 _ACEOF
4303 if ac_fn_c_try_compile "$LINENO"; then :
4305 else
4306 ac_c_werror_flag=$ac_save_c_werror_flag
4307 CFLAGS="-g"
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4309 /* end confdefs.h. */
4312 main ()
4316 return 0;
4318 _ACEOF
4319 if ac_fn_c_try_compile "$LINENO"; then :
4320 ac_cv_prog_cc_g=yes
4322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4327 ac_c_werror_flag=$ac_save_c_werror_flag
4329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4330 $as_echo "$ac_cv_prog_cc_g" >&6; }
4331 if test "$ac_test_CFLAGS" = set; then
4332 CFLAGS=$ac_save_CFLAGS
4333 elif test $ac_cv_prog_cc_g = yes; then
4334 if test "$GCC" = yes; then
4335 CFLAGS="-g -O2"
4336 else
4337 CFLAGS="-g"
4339 else
4340 if test "$GCC" = yes; then
4341 CFLAGS="-O2"
4342 else
4343 CFLAGS=
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4347 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4348 if ${ac_cv_prog_cc_c89+:} false; then :
4349 $as_echo_n "(cached) " >&6
4350 else
4351 ac_cv_prog_cc_c89=no
4352 ac_save_CC=$CC
4353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4354 /* end confdefs.h. */
4355 #include <stdarg.h>
4356 #include <stdio.h>
4357 struct stat;
4358 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4359 struct buf { int x; };
4360 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4361 static char *e (p, i)
4362 char **p;
4363 int i;
4365 return p[i];
4367 static char *f (char * (*g) (char **, int), char **p, ...)
4369 char *s;
4370 va_list v;
4371 va_start (v,p);
4372 s = g (p, va_arg (v,int));
4373 va_end (v);
4374 return s;
4377 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4378 function prototypes and stuff, but not '\xHH' hex character constants.
4379 These don't provoke an error unfortunately, instead are silently treated
4380 as 'x'. The following induces an error, until -std is added to get
4381 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4382 array size at least. It's necessary to write '\x00'==0 to get something
4383 that's true only with -std. */
4384 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4386 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4387 inside strings and character constants. */
4388 #define FOO(x) 'x'
4389 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4391 int test (int i, double x);
4392 struct s1 {int (*f) (int a);};
4393 struct s2 {int (*f) (double a);};
4394 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4395 int argc;
4396 char **argv;
4398 main ()
4400 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4402 return 0;
4404 _ACEOF
4405 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4406 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4408 CC="$ac_save_CC $ac_arg"
4409 if ac_fn_c_try_compile "$LINENO"; then :
4410 ac_cv_prog_cc_c89=$ac_arg
4412 rm -f core conftest.err conftest.$ac_objext
4413 test "x$ac_cv_prog_cc_c89" != "xno" && break
4414 done
4415 rm -f conftest.$ac_ext
4416 CC=$ac_save_CC
4419 # AC_CACHE_VAL
4420 case "x$ac_cv_prog_cc_c89" in
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4423 $as_echo "none needed" >&6; } ;;
4424 xno)
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4426 $as_echo "unsupported" >&6; } ;;
4428 CC="$CC $ac_cv_prog_cc_c89"
4429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4430 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4431 esac
4432 if test "x$ac_cv_prog_cc_c89" != xno; then :
4436 ac_ext=c
4437 ac_cpp='$CPP $CPPFLAGS'
4438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4443 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4444 if ${ac_cv_prog_cc_c99+:} false; then :
4445 $as_echo_n "(cached) " >&6
4446 else
4447 ac_cv_prog_cc_c99=no
4448 ac_save_CC=$CC
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450 /* end confdefs.h. */
4451 #include <stdarg.h>
4452 #include <stdbool.h>
4453 #include <stdlib.h>
4454 #include <wchar.h>
4455 #include <stdio.h>
4457 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4458 #define debug(...) fprintf (stderr, __VA_ARGS__)
4459 #define showlist(...) puts (#__VA_ARGS__)
4460 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4461 static void
4462 test_varargs_macros (void)
4464 int x = 1234;
4465 int y = 5678;
4466 debug ("Flag");
4467 debug ("X = %d\n", x);
4468 showlist (The first, second, and third items.);
4469 report (x>y, "x is %d but y is %d", x, y);
4472 // Check long long types.
4473 #define BIG64 18446744073709551615ull
4474 #define BIG32 4294967295ul
4475 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4476 #if !BIG_OK
4477 your preprocessor is broken;
4478 #endif
4479 #if BIG_OK
4480 #else
4481 your preprocessor is broken;
4482 #endif
4483 static long long int bignum = -9223372036854775807LL;
4484 static unsigned long long int ubignum = BIG64;
4486 struct incomplete_array
4488 int datasize;
4489 double data[];
4492 struct named_init {
4493 int number;
4494 const wchar_t *name;
4495 double average;
4498 typedef const char *ccp;
4500 static inline int
4501 test_restrict (ccp restrict text)
4503 // See if C++-style comments work.
4504 // Iterate through items via the restricted pointer.
4505 // Also check for declarations in for loops.
4506 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4507 continue;
4508 return 0;
4511 // Check varargs and va_copy.
4512 static void
4513 test_varargs (const char *format, ...)
4515 va_list args;
4516 va_start (args, format);
4517 va_list args_copy;
4518 va_copy (args_copy, args);
4520 const char *str;
4521 int number;
4522 float fnumber;
4524 while (*format)
4526 switch (*format++)
4528 case 's': // string
4529 str = va_arg (args_copy, const char *);
4530 break;
4531 case 'd': // int
4532 number = va_arg (args_copy, int);
4533 break;
4534 case 'f': // float
4535 fnumber = va_arg (args_copy, double);
4536 break;
4537 default:
4538 break;
4541 va_end (args_copy);
4542 va_end (args);
4546 main ()
4549 // Check bool.
4550 _Bool success = false;
4552 // Check restrict.
4553 if (test_restrict ("String literal") == 0)
4554 success = true;
4555 char *restrict newvar = "Another string";
4557 // Check varargs.
4558 test_varargs ("s, d' f .", "string", 65, 34.234);
4559 test_varargs_macros ();
4561 // Check flexible array members.
4562 struct incomplete_array *ia =
4563 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4564 ia->datasize = 10;
4565 for (int i = 0; i < ia->datasize; ++i)
4566 ia->data[i] = i * 1.234;
4568 // Check named initializers.
4569 struct named_init ni = {
4570 .number = 34,
4571 .name = L"Test wide string",
4572 .average = 543.34343,
4575 ni.number = 58;
4577 int dynamic_array[ni.number];
4578 dynamic_array[ni.number - 1] = 543;
4580 // work around unused variable warnings
4581 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4582 || dynamic_array[ni.number - 1] != 543);
4585 return 0;
4587 _ACEOF
4588 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4590 CC="$ac_save_CC $ac_arg"
4591 if ac_fn_c_try_compile "$LINENO"; then :
4592 ac_cv_prog_cc_c99=$ac_arg
4594 rm -f core conftest.err conftest.$ac_objext
4595 test "x$ac_cv_prog_cc_c99" != "xno" && break
4596 done
4597 rm -f conftest.$ac_ext
4598 CC=$ac_save_CC
4601 # AC_CACHE_VAL
4602 case "x$ac_cv_prog_cc_c99" in
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4605 $as_echo "none needed" >&6; } ;;
4606 xno)
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4608 $as_echo "unsupported" >&6; } ;;
4610 CC="$CC $ac_cv_prog_cc_c99"
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4612 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4613 esac
4614 if test "x$ac_cv_prog_cc_c99" != xno; then :
4620 # Error out if the compiler does not support C99, as the codebase
4621 # relies on that.
4622 if test "$ac_cv_prog_cc_c99" = no; then
4623 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4626 ac_ext=cpp
4627 ac_cpp='$CXXCPP $CPPFLAGS'
4628 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4629 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4630 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4631 if test -z "$CXX"; then
4632 if test -n "$CCC"; then
4633 CXX=$CCC
4634 else
4635 if test -n "$ac_tool_prefix"; then
4636 for ac_prog in $pgac_cxx_list
4638 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4639 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4641 $as_echo_n "checking for $ac_word... " >&6; }
4642 if ${ac_cv_prog_CXX+:} false; then :
4643 $as_echo_n "(cached) " >&6
4644 else
4645 if test -n "$CXX"; then
4646 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4647 else
4648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649 for as_dir in $PATH
4651 IFS=$as_save_IFS
4652 test -z "$as_dir" && as_dir=.
4653 for ac_exec_ext in '' $ac_executable_extensions; do
4654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4655 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657 break 2
4659 done
4660 done
4661 IFS=$as_save_IFS
4665 CXX=$ac_cv_prog_CXX
4666 if test -n "$CXX"; then
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4668 $as_echo "$CXX" >&6; }
4669 else
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671 $as_echo "no" >&6; }
4675 test -n "$CXX" && break
4676 done
4678 if test -z "$CXX"; then
4679 ac_ct_CXX=$CXX
4680 for ac_prog in $pgac_cxx_list
4682 # Extract the first word of "$ac_prog", so it can be a program name with args.
4683 set dummy $ac_prog; ac_word=$2
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685 $as_echo_n "checking for $ac_word... " >&6; }
4686 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688 else
4689 if test -n "$ac_ct_CXX"; then
4690 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4691 else
4692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693 for as_dir in $PATH
4695 IFS=$as_save_IFS
4696 test -z "$as_dir" && as_dir=.
4697 for ac_exec_ext in '' $ac_executable_extensions; do
4698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699 ac_cv_prog_ac_ct_CXX="$ac_prog"
4700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701 break 2
4703 done
4704 done
4705 IFS=$as_save_IFS
4709 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4710 if test -n "$ac_ct_CXX"; then
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4712 $as_echo "$ac_ct_CXX" >&6; }
4713 else
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715 $as_echo "no" >&6; }
4719 test -n "$ac_ct_CXX" && break
4720 done
4722 if test "x$ac_ct_CXX" = x; then
4723 CXX="g++"
4724 else
4725 case $cross_compiling:$ac_tool_warned in
4726 yes:)
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4728 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4729 ac_tool_warned=yes ;;
4730 esac
4731 CXX=$ac_ct_CXX
4737 # Provide some information about the compiler.
4738 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4739 set X $ac_compile
4740 ac_compiler=$2
4741 for ac_option in --version -v -V -qversion; do
4742 { { ac_try="$ac_compiler $ac_option >&5"
4743 case "(($ac_try" in
4744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4745 *) ac_try_echo=$ac_try;;
4746 esac
4747 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4748 $as_echo "$ac_try_echo"; } >&5
4749 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4750 ac_status=$?
4751 if test -s conftest.err; then
4752 sed '10a\
4753 ... rest of stderr output deleted ...
4754 10q' conftest.err >conftest.er1
4755 cat conftest.er1 >&5
4757 rm -f conftest.er1 conftest.err
4758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4759 test $ac_status = 0; }
4760 done
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4763 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4764 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4765 $as_echo_n "(cached) " >&6
4766 else
4767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4768 /* end confdefs.h. */
4771 main ()
4773 #ifndef __GNUC__
4774 choke me
4775 #endif
4778 return 0;
4780 _ACEOF
4781 if ac_fn_cxx_try_compile "$LINENO"; then :
4782 ac_compiler_gnu=yes
4783 else
4784 ac_compiler_gnu=no
4786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4787 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4791 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4792 if test $ac_compiler_gnu = yes; then
4793 GXX=yes
4794 else
4795 GXX=
4797 ac_test_CXXFLAGS=${CXXFLAGS+set}
4798 ac_save_CXXFLAGS=$CXXFLAGS
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4800 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4801 if ${ac_cv_prog_cxx_g+:} false; then :
4802 $as_echo_n "(cached) " >&6
4803 else
4804 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4805 ac_cxx_werror_flag=yes
4806 ac_cv_prog_cxx_g=no
4807 CXXFLAGS="-g"
4808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4809 /* end confdefs.h. */
4812 main ()
4816 return 0;
4818 _ACEOF
4819 if ac_fn_cxx_try_compile "$LINENO"; then :
4820 ac_cv_prog_cxx_g=yes
4821 else
4822 CXXFLAGS=""
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824 /* end confdefs.h. */
4827 main ()
4831 return 0;
4833 _ACEOF
4834 if ac_fn_cxx_try_compile "$LINENO"; then :
4836 else
4837 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4838 CXXFLAGS="-g"
4839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4840 /* end confdefs.h. */
4843 main ()
4847 return 0;
4849 _ACEOF
4850 if ac_fn_cxx_try_compile "$LINENO"; then :
4851 ac_cv_prog_cxx_g=yes
4853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4858 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4861 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4862 if test "$ac_test_CXXFLAGS" = set; then
4863 CXXFLAGS=$ac_save_CXXFLAGS
4864 elif test $ac_cv_prog_cxx_g = yes; then
4865 if test "$GXX" = yes; then
4866 CXXFLAGS="-g -O2"
4867 else
4868 CXXFLAGS="-g"
4870 else
4871 if test "$GXX" = yes; then
4872 CXXFLAGS="-O2"
4873 else
4874 CXXFLAGS=
4877 ac_ext=c
4878 ac_cpp='$CPP $CPPFLAGS'
4879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4884 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4885 # but has idiosyncrasies of its own. We assume icc will define
4886 # __INTEL_COMPILER regardless of CFLAGS.
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4892 main ()
4894 #ifndef __INTEL_COMPILER
4895 choke me
4896 #endif
4898 return 0;
4900 _ACEOF
4901 if ac_fn_c_try_compile "$LINENO"; then :
4902 ICC=yes
4903 else
4904 ICC=no
4906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4908 # Check if it's Sun Studio compiler. We assume that
4909 # __SUNPRO_C will be defined for Sun Studio compilers
4910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4911 /* end confdefs.h. */
4914 main ()
4916 #ifndef __SUNPRO_C
4917 choke me
4918 #endif
4920 return 0;
4922 _ACEOF
4923 if ac_fn_c_try_compile "$LINENO"; then :
4924 SUN_STUDIO_CC=yes
4925 else
4926 SUN_STUDIO_CC=no
4928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934 # LLVM
4936 # Checked early because subsequent tests depend on it.
4940 # Check whether --with-llvm was given.
4941 if test "${with_llvm+set}" = set; then :
4942 withval=$with_llvm;
4943 case $withval in
4944 yes)
4946 $as_echo "#define USE_LLVM 1" >>confdefs.h
4953 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4955 esac
4957 else
4958 with_llvm=no
4964 for ac_prog in gawk mawk nawk awk
4966 # Extract the first word of "$ac_prog", so it can be a program name with args.
4967 set dummy $ac_prog; ac_word=$2
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969 $as_echo_n "checking for $ac_word... " >&6; }
4970 if ${ac_cv_prog_AWK+:} false; then :
4971 $as_echo_n "(cached) " >&6
4972 else
4973 if test -n "$AWK"; then
4974 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4975 else
4976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977 for as_dir in $PATH
4979 IFS=$as_save_IFS
4980 test -z "$as_dir" && as_dir=.
4981 for ac_exec_ext in '' $ac_executable_extensions; do
4982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983 ac_cv_prog_AWK="$ac_prog"
4984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985 break 2
4987 done
4988 done
4989 IFS=$as_save_IFS
4993 AWK=$ac_cv_prog_AWK
4994 if test -n "$AWK"; then
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4996 $as_echo "$AWK" >&6; }
4997 else
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999 $as_echo "no" >&6; }
5003 test -n "$AWK" && break
5004 done
5006 if test "$with_llvm" = yes; then :
5012 if test -z "$LLVM_CONFIG"; then
5013 for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
5015 # Extract the first word of "$ac_prog", so it can be a program name with args.
5016 set dummy $ac_prog; ac_word=$2
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018 $as_echo_n "checking for $ac_word... " >&6; }
5019 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5020 $as_echo_n "(cached) " >&6
5021 else
5022 case $LLVM_CONFIG in
5023 [\\/]* | ?:[\\/]*)
5024 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028 for as_dir in $PATH
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
5032 for ac_exec_ext in '' $ac_executable_extensions; do
5033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5034 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5036 break 2
5038 done
5039 done
5040 IFS=$as_save_IFS
5043 esac
5045 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5046 if test -n "$LLVM_CONFIG"; then
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5048 $as_echo "$LLVM_CONFIG" >&6; }
5049 else
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051 $as_echo "no" >&6; }
5055 test -n "$LLVM_CONFIG" && break
5056 done
5058 else
5059 # Report the value of LLVM_CONFIG in configure's output in all cases.
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5061 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5063 $as_echo "$LLVM_CONFIG" >&6; }
5067 # no point continuing if llvm wasn't found
5068 if test -z "$LLVM_CONFIG"; then
5069 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5071 # check if detected $LLVM_CONFIG is executable
5072 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5073 if test "x$pgac_llvm_version" = "xno"; then
5074 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5076 # and whether the version is supported
5077 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5078 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5081 # need clang to create some bitcode files
5083 if test -z "$CLANG"; then
5084 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5086 # Extract the first word of "$ac_prog", so it can be a program name with args.
5087 set dummy $ac_prog; ac_word=$2
5088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089 $as_echo_n "checking for $ac_word... " >&6; }
5090 if ${ac_cv_path_CLANG+:} false; then :
5091 $as_echo_n "(cached) " >&6
5092 else
5093 case $CLANG in
5094 [\\/]* | ?:[\\/]*)
5095 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099 for as_dir in $PATH
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
5103 for ac_exec_ext in '' $ac_executable_extensions; do
5104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5105 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107 break 2
5109 done
5110 done
5111 IFS=$as_save_IFS
5114 esac
5116 CLANG=$ac_cv_path_CLANG
5117 if test -n "$CLANG"; then
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5119 $as_echo "$CLANG" >&6; }
5120 else
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122 $as_echo "no" >&6; }
5126 test -n "$CLANG" && break
5127 done
5129 else
5130 # Report the value of CLANG in configure's output in all cases.
5131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5132 $as_echo_n "checking for CLANG... " >&6; }
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5134 $as_echo "$CLANG" >&6; }
5137 if test -z "$CLANG"; then
5138 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5140 # make sure clang is executable
5141 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5142 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5144 # Could check clang version, but it doesn't seem that
5145 # important. Systems with a new enough LLVM version are usually
5146 # going to have a decent clang version too. It's also not entirely
5147 # clear what the minimum version is.
5149 # Collect compiler flags necessary to build the LLVM dependent
5150 # shared library.
5151 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5152 case $pgac_option in
5153 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5154 esac
5155 done
5157 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5158 case $pgac_option in
5159 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5160 esac
5161 done
5163 # ABI influencing options, standard influencing options
5164 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5165 case $pgac_option in
5166 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5167 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5168 esac
5169 done
5171 # Look for components we're interested in, collect necessary
5172 # libs. As some components are optional, we can't just list all of
5173 # them as it'd raise an error.
5174 pgac_components='';
5175 for pgac_component in `$LLVM_CONFIG --components`; do
5176 case $pgac_component in
5177 engine) pgac_components="$pgac_components $pgac_component";;
5178 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5179 orcjit) pgac_components="$pgac_components $pgac_component";;
5180 passes) pgac_components="$pgac_components $pgac_component";;
5181 native) pgac_components="$pgac_components $pgac_component";;
5182 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5183 esac
5184 done;
5186 # And then get the libraries that need to be linked in for the
5187 # selected components. They're large libraries, we only want to
5188 # link them into the LLVM using shared library.
5189 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5190 case $pgac_option in
5191 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5192 esac
5193 done
5195 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5205 fi # fi
5208 unset CFLAGS
5209 unset CXXFLAGS
5212 # Read the template
5214 . "$srcdir/src/template/$template" || exit
5216 # C[XX]FLAGS are selected so:
5217 # If the user specifies something in the environment, that is used.
5218 # else: If the template file set something, that is used.
5219 # else: If coverage was enabled, don't set anything.
5220 # else: If the compiler is GCC, then we use -O2.
5221 # else: If the compiler is something else, then we use -O, unless debugging.
5223 if test "$ac_env_CFLAGS_set" = set; then
5224 CFLAGS=$ac_env_CFLAGS_value
5225 elif test "${CFLAGS+set}" = set; then
5226 : # (keep what template set)
5227 elif test "$enable_coverage" = yes; then
5228 : # no optimization by default
5229 elif test "$GCC" = yes; then
5230 CFLAGS="-O2"
5231 else
5232 # if the user selected debug mode, don't use -O
5233 if test "$enable_debug" != yes; then
5234 CFLAGS="-O"
5238 if test "$ac_env_CXXFLAGS_set" = set; then
5239 CXXFLAGS=$ac_env_CXXFLAGS_value
5240 elif test "${CXXFLAGS+set}" = set; then
5241 : # (keep what template set)
5242 elif test "$enable_coverage" = yes; then
5243 : # no optimization by default
5244 elif test "$GCC" = yes; then
5245 CXXFLAGS="-O2"
5246 else
5247 # if the user selected debug mode, don't use -O
5248 if test "$enable_debug" != yes; then
5249 CXXFLAGS="-O"
5253 # When generating bitcode (for inlining) we always want to use -O2
5254 # even when --enable-debug is specified. The bitcode it's not going to
5255 # be used for line-by-line debugging, and JIT inlining doesn't work
5256 # without at least -O1 (otherwise clang will emit 'noinline'
5257 # attributes everywhere), which is bad for testing. Still allow the
5258 # environment to override if done explicitly.
5259 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5260 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5261 else
5262 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5264 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5265 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5266 else
5267 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5270 # C[XX]FLAGS we determined above will be added back at the end
5271 user_CFLAGS=$CFLAGS
5272 CFLAGS=""
5273 user_CXXFLAGS=$CXXFLAGS
5274 CXXFLAGS=""
5275 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5276 BITCODE_CFLAGS=""
5277 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5278 BITCODE_CXXFLAGS=""
5280 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5281 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5282 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5284 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5285 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5288 # Some versions of GCC support some additional useful warning flags.
5289 # Check whether they are supported, and add them to CFLAGS if so.
5290 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5291 # but has its own. Also check other compiler-specific flags here.
5293 if test "$GCC" = yes -a "$ICC" = no; then
5294 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5295 CXXFLAGS="-Wall -Wpointer-arith"
5296 # These work in some but not all gcc versions
5297 save_CFLAGS=$CFLAGS
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5300 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5301 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5302 $as_echo_n "(cached) " >&6
5303 else
5304 pgac_save_CFLAGS=$CFLAGS
5305 pgac_save_CC=$CC
5306 CC=${CC}
5307 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5308 ac_save_c_werror_flag=$ac_c_werror_flag
5309 ac_c_werror_flag=yes
5310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5311 /* end confdefs.h. */
5314 main ()
5318 return 0;
5320 _ACEOF
5321 if ac_fn_c_try_compile "$LINENO"; then :
5322 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5323 else
5324 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5327 ac_c_werror_flag=$ac_save_c_werror_flag
5328 CFLAGS="$pgac_save_CFLAGS"
5329 CC="$pgac_save_CC"
5331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5332 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5333 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5334 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5338 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5339 # disable it, so AC_SUBST the negative form.
5340 PERMIT_DECLARATION_AFTER_STATEMENT=
5341 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5342 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5345 # Really don't want VLAs to be used in our dialect of C
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5348 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5349 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5350 $as_echo_n "(cached) " >&6
5351 else
5352 pgac_save_CFLAGS=$CFLAGS
5353 pgac_save_CC=$CC
5354 CC=${CC}
5355 CFLAGS="${CFLAGS} -Werror=vla"
5356 ac_save_c_werror_flag=$ac_c_werror_flag
5357 ac_c_werror_flag=yes
5358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5359 /* end confdefs.h. */
5362 main ()
5366 return 0;
5368 _ACEOF
5369 if ac_fn_c_try_compile "$LINENO"; then :
5370 pgac_cv_prog_CC_cflags__Werror_vla=yes
5371 else
5372 pgac_cv_prog_CC_cflags__Werror_vla=no
5374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5375 ac_c_werror_flag=$ac_save_c_werror_flag
5376 CFLAGS="$pgac_save_CFLAGS"
5377 CC="$pgac_save_CC"
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5380 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5381 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5382 CFLAGS="${CFLAGS} -Werror=vla"
5386 # -Wvla is not applicable for C++
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5389 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5390 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5391 $as_echo_n "(cached) " >&6
5392 else
5393 pgac_save_CFLAGS=$CFLAGS
5394 pgac_save_CC=$CC
5395 CC=${CC}
5396 CFLAGS="${CFLAGS} -Wendif-labels"
5397 ac_save_c_werror_flag=$ac_c_werror_flag
5398 ac_c_werror_flag=yes
5399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5400 /* end confdefs.h. */
5403 main ()
5407 return 0;
5409 _ACEOF
5410 if ac_fn_c_try_compile "$LINENO"; then :
5411 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5412 else
5413 pgac_cv_prog_CC_cflags__Wendif_labels=no
5415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5416 ac_c_werror_flag=$ac_save_c_werror_flag
5417 CFLAGS="$pgac_save_CFLAGS"
5418 CC="$pgac_save_CC"
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5421 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5422 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5423 CFLAGS="${CFLAGS} -Wendif-labels"
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5428 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5429 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5430 $as_echo_n "(cached) " >&6
5431 else
5432 pgac_save_CXXFLAGS=$CXXFLAGS
5433 pgac_save_CXX=$CXX
5434 CXX=${CXX}
5435 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5436 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5437 ac_cxx_werror_flag=yes
5438 ac_ext=cpp
5439 ac_cpp='$CXXCPP $CPPFLAGS'
5440 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5441 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5442 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445 /* end confdefs.h. */
5448 main ()
5452 return 0;
5454 _ACEOF
5455 if ac_fn_cxx_try_compile "$LINENO"; then :
5456 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5457 else
5458 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5461 ac_ext=c
5462 ac_cpp='$CPP $CPPFLAGS'
5463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5467 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5468 CXXFLAGS="$pgac_save_CXXFLAGS"
5469 CXX="$pgac_save_CXX"
5471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5472 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5473 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5474 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5480 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5481 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5482 $as_echo_n "(cached) " >&6
5483 else
5484 pgac_save_CFLAGS=$CFLAGS
5485 pgac_save_CC=$CC
5486 CC=${CC}
5487 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5488 ac_save_c_werror_flag=$ac_c_werror_flag
5489 ac_c_werror_flag=yes
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491 /* end confdefs.h. */
5494 main ()
5498 return 0;
5500 _ACEOF
5501 if ac_fn_c_try_compile "$LINENO"; then :
5502 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5503 else
5504 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5507 ac_c_werror_flag=$ac_save_c_werror_flag
5508 CFLAGS="$pgac_save_CFLAGS"
5509 CC="$pgac_save_CC"
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5512 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5513 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5514 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5519 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5520 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5521 $as_echo_n "(cached) " >&6
5522 else
5523 pgac_save_CXXFLAGS=$CXXFLAGS
5524 pgac_save_CXX=$CXX
5525 CXX=${CXX}
5526 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5527 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5528 ac_cxx_werror_flag=yes
5529 ac_ext=cpp
5530 ac_cpp='$CXXCPP $CPPFLAGS'
5531 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5532 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5533 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5536 /* end confdefs.h. */
5539 main ()
5543 return 0;
5545 _ACEOF
5546 if ac_fn_cxx_try_compile "$LINENO"; then :
5547 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5548 else
5549 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5552 ac_ext=c
5553 ac_cpp='$CPP $CPPFLAGS'
5554 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5555 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5556 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5558 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5559 CXXFLAGS="$pgac_save_CXXFLAGS"
5560 CXX="$pgac_save_CXX"
5562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5563 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5564 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5565 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5571 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5572 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5573 $as_echo_n "(cached) " >&6
5574 else
5575 pgac_save_CFLAGS=$CFLAGS
5576 pgac_save_CC=$CC
5577 CC=${CC}
5578 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5579 ac_save_c_werror_flag=$ac_c_werror_flag
5580 ac_c_werror_flag=yes
5581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5582 /* end confdefs.h. */
5585 main ()
5589 return 0;
5591 _ACEOF
5592 if ac_fn_c_try_compile "$LINENO"; then :
5593 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5594 else
5595 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5598 ac_c_werror_flag=$ac_save_c_werror_flag
5599 CFLAGS="$pgac_save_CFLAGS"
5600 CC="$pgac_save_CC"
5602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5603 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5604 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5605 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5610 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5611 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5612 $as_echo_n "(cached) " >&6
5613 else
5614 pgac_save_CXXFLAGS=$CXXFLAGS
5615 pgac_save_CXX=$CXX
5616 CXX=${CXX}
5617 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5618 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5619 ac_cxx_werror_flag=yes
5620 ac_ext=cpp
5621 ac_cpp='$CXXCPP $CPPFLAGS'
5622 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5623 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5624 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5627 /* end confdefs.h. */
5630 main ()
5634 return 0;
5636 _ACEOF
5637 if ac_fn_cxx_try_compile "$LINENO"; then :
5638 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5639 else
5640 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5643 ac_ext=c
5644 ac_cpp='$CPP $CPPFLAGS'
5645 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5646 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5647 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5649 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5650 CXXFLAGS="$pgac_save_CXXFLAGS"
5651 CXX="$pgac_save_CXX"
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5654 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5655 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5656 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5662 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5663 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5664 $as_echo_n "(cached) " >&6
5665 else
5666 pgac_save_CFLAGS=$CFLAGS
5667 pgac_save_CC=$CC
5668 CC=${CC}
5669 CFLAGS="${CFLAGS} -Wcast-function-type"
5670 ac_save_c_werror_flag=$ac_c_werror_flag
5671 ac_c_werror_flag=yes
5672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5673 /* end confdefs.h. */
5676 main ()
5680 return 0;
5682 _ACEOF
5683 if ac_fn_c_try_compile "$LINENO"; then :
5684 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5685 else
5686 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5689 ac_c_werror_flag=$ac_save_c_werror_flag
5690 CFLAGS="$pgac_save_CFLAGS"
5691 CC="$pgac_save_CC"
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5694 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5695 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5696 CFLAGS="${CFLAGS} -Wcast-function-type"
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5701 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5702 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5703 $as_echo_n "(cached) " >&6
5704 else
5705 pgac_save_CXXFLAGS=$CXXFLAGS
5706 pgac_save_CXX=$CXX
5707 CXX=${CXX}
5708 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5709 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5710 ac_cxx_werror_flag=yes
5711 ac_ext=cpp
5712 ac_cpp='$CXXCPP $CPPFLAGS'
5713 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5714 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5715 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5718 /* end confdefs.h. */
5721 main ()
5725 return 0;
5727 _ACEOF
5728 if ac_fn_cxx_try_compile "$LINENO"; then :
5729 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5730 else
5731 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5734 ac_ext=c
5735 ac_cpp='$CPP $CPPFLAGS'
5736 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5737 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5740 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5741 CXXFLAGS="$pgac_save_CXXFLAGS"
5742 CXX="$pgac_save_CXX"
5744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5745 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5746 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5747 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5751 # This was included in -Wall/-Wformat in older GCC versions
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5754 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5755 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5756 $as_echo_n "(cached) " >&6
5757 else
5758 pgac_save_CFLAGS=$CFLAGS
5759 pgac_save_CC=$CC
5760 CC=${CC}
5761 CFLAGS="${CFLAGS} -Wformat-security"
5762 ac_save_c_werror_flag=$ac_c_werror_flag
5763 ac_c_werror_flag=yes
5764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5765 /* end confdefs.h. */
5768 main ()
5772 return 0;
5774 _ACEOF
5775 if ac_fn_c_try_compile "$LINENO"; then :
5776 pgac_cv_prog_CC_cflags__Wformat_security=yes
5777 else
5778 pgac_cv_prog_CC_cflags__Wformat_security=no
5780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5781 ac_c_werror_flag=$ac_save_c_werror_flag
5782 CFLAGS="$pgac_save_CFLAGS"
5783 CC="$pgac_save_CC"
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5786 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5787 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5788 CFLAGS="${CFLAGS} -Wformat-security"
5792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5793 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5794 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5795 $as_echo_n "(cached) " >&6
5796 else
5797 pgac_save_CXXFLAGS=$CXXFLAGS
5798 pgac_save_CXX=$CXX
5799 CXX=${CXX}
5800 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5801 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5802 ac_cxx_werror_flag=yes
5803 ac_ext=cpp
5804 ac_cpp='$CXXCPP $CPPFLAGS'
5805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5806 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5810 /* end confdefs.h. */
5813 main ()
5817 return 0;
5819 _ACEOF
5820 if ac_fn_cxx_try_compile "$LINENO"; then :
5821 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5822 else
5823 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5826 ac_ext=c
5827 ac_cpp='$CPP $CPPFLAGS'
5828 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5829 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5830 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5832 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5833 CXXFLAGS="$pgac_save_CXXFLAGS"
5834 CXX="$pgac_save_CXX"
5836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5837 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5838 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5839 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5843 # Disable strict-aliasing rules; needed for gcc 3.3+
5845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5846 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5847 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5848 $as_echo_n "(cached) " >&6
5849 else
5850 pgac_save_CFLAGS=$CFLAGS
5851 pgac_save_CC=$CC
5852 CC=${CC}
5853 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5854 ac_save_c_werror_flag=$ac_c_werror_flag
5855 ac_c_werror_flag=yes
5856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5857 /* end confdefs.h. */
5860 main ()
5864 return 0;
5866 _ACEOF
5867 if ac_fn_c_try_compile "$LINENO"; then :
5868 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5869 else
5870 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5873 ac_c_werror_flag=$ac_save_c_werror_flag
5874 CFLAGS="$pgac_save_CFLAGS"
5875 CC="$pgac_save_CC"
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5878 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5879 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5880 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5885 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5886 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5887 $as_echo_n "(cached) " >&6
5888 else
5889 pgac_save_CXXFLAGS=$CXXFLAGS
5890 pgac_save_CXX=$CXX
5891 CXX=${CXX}
5892 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5893 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5894 ac_cxx_werror_flag=yes
5895 ac_ext=cpp
5896 ac_cpp='$CXXCPP $CPPFLAGS'
5897 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5898 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5899 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5902 /* end confdefs.h. */
5905 main ()
5909 return 0;
5911 _ACEOF
5912 if ac_fn_cxx_try_compile "$LINENO"; then :
5913 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5914 else
5915 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5918 ac_ext=c
5919 ac_cpp='$CPP $CPPFLAGS'
5920 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5921 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5922 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5924 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5925 CXXFLAGS="$pgac_save_CXXFLAGS"
5926 CXX="$pgac_save_CXX"
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5929 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5930 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5931 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5935 # Disable optimizations that assume no overflow; needed for gcc 4.3+
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5938 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5939 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5940 $as_echo_n "(cached) " >&6
5941 else
5942 pgac_save_CFLAGS=$CFLAGS
5943 pgac_save_CC=$CC
5944 CC=${CC}
5945 CFLAGS="${CFLAGS} -fwrapv"
5946 ac_save_c_werror_flag=$ac_c_werror_flag
5947 ac_c_werror_flag=yes
5948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5949 /* end confdefs.h. */
5952 main ()
5956 return 0;
5958 _ACEOF
5959 if ac_fn_c_try_compile "$LINENO"; then :
5960 pgac_cv_prog_CC_cflags__fwrapv=yes
5961 else
5962 pgac_cv_prog_CC_cflags__fwrapv=no
5964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5965 ac_c_werror_flag=$ac_save_c_werror_flag
5966 CFLAGS="$pgac_save_CFLAGS"
5967 CC="$pgac_save_CC"
5969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5970 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5971 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5972 CFLAGS="${CFLAGS} -fwrapv"
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5977 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5978 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5979 $as_echo_n "(cached) " >&6
5980 else
5981 pgac_save_CXXFLAGS=$CXXFLAGS
5982 pgac_save_CXX=$CXX
5983 CXX=${CXX}
5984 CXXFLAGS="${CXXFLAGS} -fwrapv"
5985 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5986 ac_cxx_werror_flag=yes
5987 ac_ext=cpp
5988 ac_cpp='$CXXCPP $CPPFLAGS'
5989 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5990 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5991 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5994 /* end confdefs.h. */
5997 main ()
6001 return 0;
6003 _ACEOF
6004 if ac_fn_cxx_try_compile "$LINENO"; then :
6005 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6006 else
6007 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6010 ac_ext=c
6011 ac_cpp='$CPP $CPPFLAGS'
6012 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6013 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6014 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6016 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6017 CXXFLAGS="$pgac_save_CXXFLAGS"
6018 CXX="$pgac_save_CXX"
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6021 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6022 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6023 CXXFLAGS="${CXXFLAGS} -fwrapv"
6027 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6030 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6031 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6032 $as_echo_n "(cached) " >&6
6033 else
6034 pgac_save_CFLAGS=$CFLAGS
6035 pgac_save_CC=$CC
6036 CC=${CC}
6037 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6038 ac_save_c_werror_flag=$ac_c_werror_flag
6039 ac_c_werror_flag=yes
6040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6041 /* end confdefs.h. */
6044 main ()
6048 return 0;
6050 _ACEOF
6051 if ac_fn_c_try_compile "$LINENO"; then :
6052 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6053 else
6054 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6057 ac_c_werror_flag=$ac_save_c_werror_flag
6058 CFLAGS="$pgac_save_CFLAGS"
6059 CC="$pgac_save_CC"
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6062 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6063 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6064 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6069 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6070 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6071 $as_echo_n "(cached) " >&6
6072 else
6073 pgac_save_CXXFLAGS=$CXXFLAGS
6074 pgac_save_CXX=$CXX
6075 CXX=${CXX}
6076 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6077 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6078 ac_cxx_werror_flag=yes
6079 ac_ext=cpp
6080 ac_cpp='$CXXCPP $CPPFLAGS'
6081 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6082 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6083 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6086 /* end confdefs.h. */
6089 main ()
6093 return 0;
6095 _ACEOF
6096 if ac_fn_cxx_try_compile "$LINENO"; then :
6097 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6098 else
6099 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6102 ac_ext=c
6103 ac_cpp='$CPP $CPPFLAGS'
6104 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6105 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6108 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6109 CXXFLAGS="$pgac_save_CXXFLAGS"
6110 CXX="$pgac_save_CXX"
6112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6113 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6114 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6115 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6119 # Optimization flags for specific files that benefit from loop unrolling
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6121 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6122 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6123 $as_echo_n "(cached) " >&6
6124 else
6125 pgac_save_CFLAGS=$CFLAGS
6126 pgac_save_CC=$CC
6127 CC=${CC}
6128 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6129 ac_save_c_werror_flag=$ac_c_werror_flag
6130 ac_c_werror_flag=yes
6131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6132 /* end confdefs.h. */
6135 main ()
6139 return 0;
6141 _ACEOF
6142 if ac_fn_c_try_compile "$LINENO"; then :
6143 pgac_cv_prog_CC_cflags__funroll_loops=yes
6144 else
6145 pgac_cv_prog_CC_cflags__funroll_loops=no
6147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6148 ac_c_werror_flag=$ac_save_c_werror_flag
6149 CFLAGS="$pgac_save_CFLAGS"
6150 CC="$pgac_save_CC"
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6153 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6154 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6155 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6159 # Optimization flags for specific files that benefit from vectorization
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6161 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6162 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6163 $as_echo_n "(cached) " >&6
6164 else
6165 pgac_save_CFLAGS=$CFLAGS
6166 pgac_save_CC=$CC
6167 CC=${CC}
6168 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6169 ac_save_c_werror_flag=$ac_c_werror_flag
6170 ac_c_werror_flag=yes
6171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6172 /* end confdefs.h. */
6175 main ()
6179 return 0;
6181 _ACEOF
6182 if ac_fn_c_try_compile "$LINENO"; then :
6183 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6184 else
6185 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6188 ac_c_werror_flag=$ac_save_c_werror_flag
6189 CFLAGS="$pgac_save_CFLAGS"
6190 CC="$pgac_save_CC"
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6193 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6194 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6195 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6199 # We want to suppress clang's unhelpful unused-command-line-argument warnings
6200 # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
6201 # test for the positive form and if that works, add the negative form
6202 NOT_THE_CFLAGS=""
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6204 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6205 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6206 $as_echo_n "(cached) " >&6
6207 else
6208 pgac_save_CFLAGS=$CFLAGS
6209 pgac_save_CC=$CC
6210 CC=${CC}
6211 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6212 ac_save_c_werror_flag=$ac_c_werror_flag
6213 ac_c_werror_flag=yes
6214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6215 /* end confdefs.h. */
6218 main ()
6222 return 0;
6224 _ACEOF
6225 if ac_fn_c_try_compile "$LINENO"; then :
6226 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6227 else
6228 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6230 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6231 ac_c_werror_flag=$ac_save_c_werror_flag
6232 CFLAGS="$pgac_save_CFLAGS"
6233 CC="$pgac_save_CC"
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6236 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6237 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6238 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6242 if test -n "$NOT_THE_CFLAGS"; then
6243 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6245 # Similarly disable useless truncation warnings from gcc 8+
6246 NOT_THE_CFLAGS=""
6247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6248 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6249 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6250 $as_echo_n "(cached) " >&6
6251 else
6252 pgac_save_CFLAGS=$CFLAGS
6253 pgac_save_CC=$CC
6254 CC=${CC}
6255 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6256 ac_save_c_werror_flag=$ac_c_werror_flag
6257 ac_c_werror_flag=yes
6258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6259 /* end confdefs.h. */
6262 main ()
6266 return 0;
6268 _ACEOF
6269 if ac_fn_c_try_compile "$LINENO"; then :
6270 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6271 else
6272 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6275 ac_c_werror_flag=$ac_save_c_werror_flag
6276 CFLAGS="$pgac_save_CFLAGS"
6277 CC="$pgac_save_CC"
6279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6280 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6281 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6282 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6286 if test -n "$NOT_THE_CFLAGS"; then
6287 CFLAGS="$CFLAGS -Wno-format-truncation"
6289 NOT_THE_CFLAGS=""
6290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6291 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6292 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6293 $as_echo_n "(cached) " >&6
6294 else
6295 pgac_save_CFLAGS=$CFLAGS
6296 pgac_save_CC=$CC
6297 CC=${CC}
6298 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6299 ac_save_c_werror_flag=$ac_c_werror_flag
6300 ac_c_werror_flag=yes
6301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6302 /* end confdefs.h. */
6305 main ()
6309 return 0;
6311 _ACEOF
6312 if ac_fn_c_try_compile "$LINENO"; then :
6313 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6314 else
6315 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6318 ac_c_werror_flag=$ac_save_c_werror_flag
6319 CFLAGS="$pgac_save_CFLAGS"
6320 CC="$pgac_save_CC"
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6323 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6324 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6325 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6329 if test -n "$NOT_THE_CFLAGS"; then
6330 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6332 elif test "$ICC" = yes; then
6333 # Intel's compiler has a bug/misoptimization in checking for
6334 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6337 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6338 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6339 $as_echo_n "(cached) " >&6
6340 else
6341 pgac_save_CFLAGS=$CFLAGS
6342 pgac_save_CC=$CC
6343 CC=${CC}
6344 CFLAGS="${CFLAGS} -mp1"
6345 ac_save_c_werror_flag=$ac_c_werror_flag
6346 ac_c_werror_flag=yes
6347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6348 /* end confdefs.h. */
6351 main ()
6355 return 0;
6357 _ACEOF
6358 if ac_fn_c_try_compile "$LINENO"; then :
6359 pgac_cv_prog_CC_cflags__mp1=yes
6360 else
6361 pgac_cv_prog_CC_cflags__mp1=no
6363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6364 ac_c_werror_flag=$ac_save_c_werror_flag
6365 CFLAGS="$pgac_save_CFLAGS"
6366 CC="$pgac_save_CC"
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6369 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6370 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6371 CFLAGS="${CFLAGS} -mp1"
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6376 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6377 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6378 $as_echo_n "(cached) " >&6
6379 else
6380 pgac_save_CXXFLAGS=$CXXFLAGS
6381 pgac_save_CXX=$CXX
6382 CXX=${CXX}
6383 CXXFLAGS="${CXXFLAGS} -mp1"
6384 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6385 ac_cxx_werror_flag=yes
6386 ac_ext=cpp
6387 ac_cpp='$CXXCPP $CPPFLAGS'
6388 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6389 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6390 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6393 /* end confdefs.h. */
6396 main ()
6400 return 0;
6402 _ACEOF
6403 if ac_fn_cxx_try_compile "$LINENO"; then :
6404 pgac_cv_prog_CXX_cxxflags__mp1=yes
6405 else
6406 pgac_cv_prog_CXX_cxxflags__mp1=no
6408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6409 ac_ext=c
6410 ac_cpp='$CPP $CPPFLAGS'
6411 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6412 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6413 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6415 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6416 CXXFLAGS="$pgac_save_CXXFLAGS"
6417 CXX="$pgac_save_CXX"
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6420 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6421 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6422 CXXFLAGS="${CXXFLAGS} -mp1"
6426 # Make sure strict aliasing is off (though this is said to be the default)
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6429 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6430 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6431 $as_echo_n "(cached) " >&6
6432 else
6433 pgac_save_CFLAGS=$CFLAGS
6434 pgac_save_CC=$CC
6435 CC=${CC}
6436 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6437 ac_save_c_werror_flag=$ac_c_werror_flag
6438 ac_c_werror_flag=yes
6439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6440 /* end confdefs.h. */
6443 main ()
6447 return 0;
6449 _ACEOF
6450 if ac_fn_c_try_compile "$LINENO"; then :
6451 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6452 else
6453 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6456 ac_c_werror_flag=$ac_save_c_werror_flag
6457 CFLAGS="$pgac_save_CFLAGS"
6458 CC="$pgac_save_CC"
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6461 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6462 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6463 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6468 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6469 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6470 $as_echo_n "(cached) " >&6
6471 else
6472 pgac_save_CXXFLAGS=$CXXFLAGS
6473 pgac_save_CXX=$CXX
6474 CXX=${CXX}
6475 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6476 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6477 ac_cxx_werror_flag=yes
6478 ac_ext=cpp
6479 ac_cpp='$CXXCPP $CPPFLAGS'
6480 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6481 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6482 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6485 /* end confdefs.h. */
6488 main ()
6492 return 0;
6494 _ACEOF
6495 if ac_fn_cxx_try_compile "$LINENO"; then :
6496 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6497 else
6498 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6501 ac_ext=c
6502 ac_cpp='$CPP $CPPFLAGS'
6503 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6504 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6505 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6507 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6508 CXXFLAGS="$pgac_save_CXXFLAGS"
6509 CXX="$pgac_save_CXX"
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6512 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6513 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6514 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6518 elif test "$PORTNAME" = "aix"; then
6519 # AIX's xlc has to have strict aliasing turned off too
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6522 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6523 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6524 $as_echo_n "(cached) " >&6
6525 else
6526 pgac_save_CFLAGS=$CFLAGS
6527 pgac_save_CC=$CC
6528 CC=${CC}
6529 CFLAGS="${CFLAGS} -qnoansialias"
6530 ac_save_c_werror_flag=$ac_c_werror_flag
6531 ac_c_werror_flag=yes
6532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6533 /* end confdefs.h. */
6536 main ()
6540 return 0;
6542 _ACEOF
6543 if ac_fn_c_try_compile "$LINENO"; then :
6544 pgac_cv_prog_CC_cflags__qnoansialias=yes
6545 else
6546 pgac_cv_prog_CC_cflags__qnoansialias=no
6548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6549 ac_c_werror_flag=$ac_save_c_werror_flag
6550 CFLAGS="$pgac_save_CFLAGS"
6551 CC="$pgac_save_CC"
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6554 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6555 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6556 CFLAGS="${CFLAGS} -qnoansialias"
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6561 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6562 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6563 $as_echo_n "(cached) " >&6
6564 else
6565 pgac_save_CXXFLAGS=$CXXFLAGS
6566 pgac_save_CXX=$CXX
6567 CXX=${CXX}
6568 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6569 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6570 ac_cxx_werror_flag=yes
6571 ac_ext=cpp
6572 ac_cpp='$CXXCPP $CPPFLAGS'
6573 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6574 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6575 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6578 /* end confdefs.h. */
6581 main ()
6585 return 0;
6587 _ACEOF
6588 if ac_fn_cxx_try_compile "$LINENO"; then :
6589 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6590 else
6591 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6594 ac_ext=c
6595 ac_cpp='$CPP $CPPFLAGS'
6596 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6597 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6598 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6600 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6601 CXXFLAGS="$pgac_save_CXXFLAGS"
6602 CXX="$pgac_save_CXX"
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6605 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6606 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6607 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6613 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6614 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6615 $as_echo_n "(cached) " >&6
6616 else
6617 pgac_save_CFLAGS=$CFLAGS
6618 pgac_save_CC=$CC
6619 CC=${CC}
6620 CFLAGS="${CFLAGS} -qlonglong"
6621 ac_save_c_werror_flag=$ac_c_werror_flag
6622 ac_c_werror_flag=yes
6623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6624 /* end confdefs.h. */
6627 main ()
6631 return 0;
6633 _ACEOF
6634 if ac_fn_c_try_compile "$LINENO"; then :
6635 pgac_cv_prog_CC_cflags__qlonglong=yes
6636 else
6637 pgac_cv_prog_CC_cflags__qlonglong=no
6639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6640 ac_c_werror_flag=$ac_save_c_werror_flag
6641 CFLAGS="$pgac_save_CFLAGS"
6642 CC="$pgac_save_CC"
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6645 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6646 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6647 CFLAGS="${CFLAGS} -qlonglong"
6651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6652 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6653 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6654 $as_echo_n "(cached) " >&6
6655 else
6656 pgac_save_CXXFLAGS=$CXXFLAGS
6657 pgac_save_CXX=$CXX
6658 CXX=${CXX}
6659 CXXFLAGS="${CXXFLAGS} -qlonglong"
6660 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6661 ac_cxx_werror_flag=yes
6662 ac_ext=cpp
6663 ac_cpp='$CXXCPP $CPPFLAGS'
6664 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6665 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6666 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6669 /* end confdefs.h. */
6672 main ()
6676 return 0;
6678 _ACEOF
6679 if ac_fn_cxx_try_compile "$LINENO"; then :
6680 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6681 else
6682 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6685 ac_ext=c
6686 ac_cpp='$CPP $CPPFLAGS'
6687 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6688 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6689 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6691 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6692 CXXFLAGS="$pgac_save_CXXFLAGS"
6693 CXX="$pgac_save_CXX"
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6696 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6697 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6698 CXXFLAGS="${CXXFLAGS} -qlonglong"
6702 elif test "$PORTNAME" = "hpux"; then
6703 # On some versions of HP-UX, libm functions do not set errno by default.
6704 # Fix that by using +Olibmerrno if the compiler recognizes it.
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6707 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6708 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6709 $as_echo_n "(cached) " >&6
6710 else
6711 pgac_save_CFLAGS=$CFLAGS
6712 pgac_save_CC=$CC
6713 CC=${CC}
6714 CFLAGS="${CFLAGS} +Olibmerrno"
6715 ac_save_c_werror_flag=$ac_c_werror_flag
6716 ac_c_werror_flag=yes
6717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6718 /* end confdefs.h. */
6721 main ()
6725 return 0;
6727 _ACEOF
6728 if ac_fn_c_try_compile "$LINENO"; then :
6729 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6730 else
6731 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6734 ac_c_werror_flag=$ac_save_c_werror_flag
6735 CFLAGS="$pgac_save_CFLAGS"
6736 CC="$pgac_save_CC"
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6739 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6740 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6741 CFLAGS="${CFLAGS} +Olibmerrno"
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6746 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6747 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6748 $as_echo_n "(cached) " >&6
6749 else
6750 pgac_save_CXXFLAGS=$CXXFLAGS
6751 pgac_save_CXX=$CXX
6752 CXX=${CXX}
6753 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6754 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6755 ac_cxx_werror_flag=yes
6756 ac_ext=cpp
6757 ac_cpp='$CXXCPP $CPPFLAGS'
6758 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6759 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6760 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6763 /* end confdefs.h. */
6766 main ()
6770 return 0;
6772 _ACEOF
6773 if ac_fn_cxx_try_compile "$LINENO"; then :
6774 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6775 else
6776 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6779 ac_ext=c
6780 ac_cpp='$CPP $CPPFLAGS'
6781 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6782 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6783 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6785 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6786 CXXFLAGS="$pgac_save_CXXFLAGS"
6787 CXX="$pgac_save_CXX"
6789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6790 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6791 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6792 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6801 # Determine flags used to emit bitcode for JIT inlining. Need to test
6802 # for behaviour changing compiler flags, to keep compatibility with
6803 # compiler used for normal postgres code.
6804 if test "$with_llvm" = yes ; then
6805 CLANGXX="$CLANG -xc++"
6807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6808 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6809 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6810 $as_echo_n "(cached) " >&6
6811 else
6812 pgac_save_CFLAGS=$CFLAGS
6813 pgac_save_CC=$CC
6814 CC=${CLANG}
6815 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6816 ac_save_c_werror_flag=$ac_c_werror_flag
6817 ac_c_werror_flag=yes
6818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6819 /* end confdefs.h. */
6822 main ()
6826 return 0;
6828 _ACEOF
6829 if ac_fn_c_try_compile "$LINENO"; then :
6830 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6831 else
6832 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6835 ac_c_werror_flag=$ac_save_c_werror_flag
6836 CFLAGS="$pgac_save_CFLAGS"
6837 CC="$pgac_save_CC"
6839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6840 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6841 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6842 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6846 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6847 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6848 $as_echo_n "(cached) " >&6
6849 else
6850 pgac_save_CXXFLAGS=$CXXFLAGS
6851 pgac_save_CXX=$CXX
6852 CXX=${CLANGXX}
6853 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6854 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6855 ac_cxx_werror_flag=yes
6856 ac_ext=cpp
6857 ac_cpp='$CXXCPP $CPPFLAGS'
6858 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6859 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6860 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6863 /* end confdefs.h. */
6866 main ()
6870 return 0;
6872 _ACEOF
6873 if ac_fn_cxx_try_compile "$LINENO"; then :
6874 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6875 else
6876 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6879 ac_ext=c
6880 ac_cpp='$CPP $CPPFLAGS'
6881 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6882 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6883 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6885 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6886 CXXFLAGS="$pgac_save_CXXFLAGS"
6887 CXX="$pgac_save_CXX"
6889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6890 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6891 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6892 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6896 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6897 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6898 $as_echo_n "(cached) " >&6
6899 else
6900 pgac_save_CFLAGS=$CFLAGS
6901 pgac_save_CC=$CC
6902 CC=${CLANG}
6903 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6904 ac_save_c_werror_flag=$ac_c_werror_flag
6905 ac_c_werror_flag=yes
6906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6907 /* end confdefs.h. */
6910 main ()
6914 return 0;
6916 _ACEOF
6917 if ac_fn_c_try_compile "$LINENO"; then :
6918 pgac_cv_prog_CLANG_cflags__fwrapv=yes
6919 else
6920 pgac_cv_prog_CLANG_cflags__fwrapv=no
6922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6923 ac_c_werror_flag=$ac_save_c_werror_flag
6924 CFLAGS="$pgac_save_CFLAGS"
6925 CC="$pgac_save_CC"
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6928 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6929 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6930 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6934 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6935 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6936 $as_echo_n "(cached) " >&6
6937 else
6938 pgac_save_CXXFLAGS=$CXXFLAGS
6939 pgac_save_CXX=$CXX
6940 CXX=${CLANGXX}
6941 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6942 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6943 ac_cxx_werror_flag=yes
6944 ac_ext=cpp
6945 ac_cpp='$CXXCPP $CPPFLAGS'
6946 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6947 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6948 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951 /* end confdefs.h. */
6954 main ()
6958 return 0;
6960 _ACEOF
6961 if ac_fn_cxx_try_compile "$LINENO"; then :
6962 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6963 else
6964 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6967 ac_ext=c
6968 ac_cpp='$CPP $CPPFLAGS'
6969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6973 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6974 CXXFLAGS="$pgac_save_CXXFLAGS"
6975 CXX="$pgac_save_CXX"
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6978 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6979 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6980 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6984 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6985 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6986 $as_echo_n "(cached) " >&6
6987 else
6988 pgac_save_CFLAGS=$CFLAGS
6989 pgac_save_CC=$CC
6990 CC=${CLANG}
6991 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6992 ac_save_c_werror_flag=$ac_c_werror_flag
6993 ac_c_werror_flag=yes
6994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6995 /* end confdefs.h. */
6998 main ()
7002 return 0;
7004 _ACEOF
7005 if ac_fn_c_try_compile "$LINENO"; then :
7006 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7007 else
7008 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7011 ac_c_werror_flag=$ac_save_c_werror_flag
7012 CFLAGS="$pgac_save_CFLAGS"
7013 CC="$pgac_save_CC"
7015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7016 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7017 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7018 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7022 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7023 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7024 $as_echo_n "(cached) " >&6
7025 else
7026 pgac_save_CXXFLAGS=$CXXFLAGS
7027 pgac_save_CXX=$CXX
7028 CXX=${CLANGXX}
7029 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7030 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7031 ac_cxx_werror_flag=yes
7032 ac_ext=cpp
7033 ac_cpp='$CXXCPP $CPPFLAGS'
7034 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7035 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7036 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7039 /* end confdefs.h. */
7042 main ()
7046 return 0;
7048 _ACEOF
7049 if ac_fn_cxx_try_compile "$LINENO"; then :
7050 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7051 else
7052 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7055 ac_ext=c
7056 ac_cpp='$CPP $CPPFLAGS'
7057 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7058 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7061 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7062 CXXFLAGS="$pgac_save_CXXFLAGS"
7063 CXX="$pgac_save_CXX"
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7066 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7067 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7068 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7073 # supply -g if --enable-debug
7074 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7075 CFLAGS="$CFLAGS -g"
7078 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7079 CXXFLAGS="$CXXFLAGS -g"
7082 # enable code coverage if --enable-coverage
7083 if test "$enable_coverage" = yes; then
7084 if test "$GCC" = yes; then
7085 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7086 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7087 else
7088 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7092 # enable profiling if --enable-profiling
7093 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7094 if test "$GCC" = yes; then
7096 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7098 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7099 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7100 else
7101 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7105 # We already have this in Makefile.win32, but configure needs it too
7106 if test "$PORTNAME" = "win32"; then
7107 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7110 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7111 # user-specified flags (if any) at the end. This lets users override
7112 # the automatic additions.
7113 CFLAGS="$CFLAGS $user_CFLAGS"
7114 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7115 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7116 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7121 # The template file must set up CFLAGS_SL; we don't support user override
7124 # Check if the compiler still works with the final flag settings
7125 # (note, we're not checking that for CXX, which is optional)
7126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7127 $as_echo_n "checking whether the C compiler still works... " >&6; }
7128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7129 /* end confdefs.h. */
7132 main ()
7134 return 0;
7136 return 0;
7138 _ACEOF
7139 if ac_fn_c_try_link "$LINENO"; then :
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7141 $as_echo "yes" >&6; }
7142 else
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7144 $as_echo "no" >&6; }
7145 as_fn_error $? "cannot proceed" "$LINENO" 5
7147 rm -f core conftest.err conftest.$ac_objext \
7148 conftest$ac_exeext conftest.$ac_ext
7150 # Defend against gcc -ffast-math
7151 if test "$GCC" = yes; then
7152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7153 /* end confdefs.h. */
7156 main ()
7158 #ifdef __FAST_MATH__
7159 choke me
7160 #endif
7162 return 0;
7164 _ACEOF
7165 if ac_fn_c_try_compile "$LINENO"; then :
7167 else
7168 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7173 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7174 # versions of clang do not understand -fexcess-precision=standard, the use of
7175 # x87 floating point operations leads to problems like isinf possibly returning
7176 # false for a value that is infinite when converted from the 80bit register to
7177 # the 8byte memory representation.
7179 # Only perform the test if the compiler doesn't understand
7180 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7181 # automatically.
7182 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7184 /* end confdefs.h. */
7187 main ()
7190 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7191 choke me
7192 #endif
7195 return 0;
7197 _ACEOF
7198 if ac_fn_c_try_compile "$LINENO"; then :
7200 else
7201 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7206 ac_ext=c
7207 ac_cpp='$CPP $CPPFLAGS'
7208 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7209 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7210 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7212 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7213 # On Suns, sometimes $CPP names a directory.
7214 if test -n "$CPP" && test -d "$CPP"; then
7215 CPP=
7217 if test -z "$CPP"; then
7218 if ${ac_cv_prog_CPP+:} false; then :
7219 $as_echo_n "(cached) " >&6
7220 else
7221 # Double quotes because CPP needs to be expanded
7222 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7224 ac_preproc_ok=false
7225 for ac_c_preproc_warn_flag in '' yes
7227 # Use a header file that comes with gcc, so configuring glibc
7228 # with a fresh cross-compiler works.
7229 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7230 # <limits.h> exists even on freestanding compilers.
7231 # On the NeXT, cc -E runs the code through the compiler's parser,
7232 # not just through cpp. "Syntax error" is here to catch this case.
7233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7234 /* end confdefs.h. */
7235 #ifdef __STDC__
7236 # include <limits.h>
7237 #else
7238 # include <assert.h>
7239 #endif
7240 Syntax error
7241 _ACEOF
7242 if ac_fn_c_try_cpp "$LINENO"; then :
7244 else
7245 # Broken: fails on valid input.
7246 continue
7248 rm -f conftest.err conftest.i conftest.$ac_ext
7250 # OK, works on sane cases. Now check whether nonexistent headers
7251 # can be detected and how.
7252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7253 /* end confdefs.h. */
7254 #include <ac_nonexistent.h>
7255 _ACEOF
7256 if ac_fn_c_try_cpp "$LINENO"; then :
7257 # Broken: success on invalid input.
7258 continue
7259 else
7260 # Passes both tests.
7261 ac_preproc_ok=:
7262 break
7264 rm -f conftest.err conftest.i conftest.$ac_ext
7266 done
7267 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7268 rm -f conftest.i conftest.err conftest.$ac_ext
7269 if $ac_preproc_ok; then :
7270 break
7273 done
7274 ac_cv_prog_CPP=$CPP
7277 CPP=$ac_cv_prog_CPP
7278 else
7279 ac_cv_prog_CPP=$CPP
7281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7282 $as_echo "$CPP" >&6; }
7283 ac_preproc_ok=false
7284 for ac_c_preproc_warn_flag in '' yes
7286 # Use a header file that comes with gcc, so configuring glibc
7287 # with a fresh cross-compiler works.
7288 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7289 # <limits.h> exists even on freestanding compilers.
7290 # On the NeXT, cc -E runs the code through the compiler's parser,
7291 # not just through cpp. "Syntax error" is here to catch this case.
7292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7293 /* end confdefs.h. */
7294 #ifdef __STDC__
7295 # include <limits.h>
7296 #else
7297 # include <assert.h>
7298 #endif
7299 Syntax error
7300 _ACEOF
7301 if ac_fn_c_try_cpp "$LINENO"; then :
7303 else
7304 # Broken: fails on valid input.
7305 continue
7307 rm -f conftest.err conftest.i conftest.$ac_ext
7309 # OK, works on sane cases. Now check whether nonexistent headers
7310 # can be detected and how.
7311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7312 /* end confdefs.h. */
7313 #include <ac_nonexistent.h>
7314 _ACEOF
7315 if ac_fn_c_try_cpp "$LINENO"; then :
7316 # Broken: success on invalid input.
7317 continue
7318 else
7319 # Passes both tests.
7320 ac_preproc_ok=:
7321 break
7323 rm -f conftest.err conftest.i conftest.$ac_ext
7325 done
7326 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7327 rm -f conftest.i conftest.err conftest.$ac_ext
7328 if $ac_preproc_ok; then :
7330 else
7331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7332 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7333 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7334 See \`config.log' for more details" "$LINENO" 5; }
7337 ac_ext=c
7338 ac_cpp='$CPP $CPPFLAGS'
7339 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7340 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7341 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7347 # Set up TAS assembly code if needed; the template file has now had its
7348 # chance to request this.
7350 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7353 if test "$need_tas" = yes ; then
7354 TAS=tas.o
7355 else
7356 TAS=""
7361 # Set up pkg_config in case we need it below
7370 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7371 if test -n "$ac_tool_prefix"; then
7372 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7373 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7375 $as_echo_n "checking for $ac_word... " >&6; }
7376 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7377 $as_echo_n "(cached) " >&6
7378 else
7379 case $PKG_CONFIG in
7380 [\\/]* | ?:[\\/]*)
7381 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7385 for as_dir in $PATH
7387 IFS=$as_save_IFS
7388 test -z "$as_dir" && as_dir=.
7389 for ac_exec_ext in '' $ac_executable_extensions; do
7390 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7391 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7392 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7393 break 2
7395 done
7396 done
7397 IFS=$as_save_IFS
7400 esac
7402 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7403 if test -n "$PKG_CONFIG"; then
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7405 $as_echo "$PKG_CONFIG" >&6; }
7406 else
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7408 $as_echo "no" >&6; }
7413 if test -z "$ac_cv_path_PKG_CONFIG"; then
7414 ac_pt_PKG_CONFIG=$PKG_CONFIG
7415 # Extract the first word of "pkg-config", so it can be a program name with args.
7416 set dummy pkg-config; ac_word=$2
7417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7418 $as_echo_n "checking for $ac_word... " >&6; }
7419 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7420 $as_echo_n "(cached) " >&6
7421 else
7422 case $ac_pt_PKG_CONFIG in
7423 [\\/]* | ?:[\\/]*)
7424 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7428 for as_dir in $PATH
7430 IFS=$as_save_IFS
7431 test -z "$as_dir" && as_dir=.
7432 for ac_exec_ext in '' $ac_executable_extensions; do
7433 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7434 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7435 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7436 break 2
7438 done
7439 done
7440 IFS=$as_save_IFS
7443 esac
7445 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7446 if test -n "$ac_pt_PKG_CONFIG"; then
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7448 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7449 else
7450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7451 $as_echo "no" >&6; }
7454 if test "x$ac_pt_PKG_CONFIG" = x; then
7455 PKG_CONFIG=""
7456 else
7457 case $cross_compiling:$ac_tool_warned in
7458 yes:)
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7460 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7461 ac_tool_warned=yes ;;
7462 esac
7463 PKG_CONFIG=$ac_pt_PKG_CONFIG
7465 else
7466 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7470 if test -n "$PKG_CONFIG"; then
7471 _pkg_min_version=0.9.0
7472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7473 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7474 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7476 $as_echo "yes" >&6; }
7477 else
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7479 $as_echo "no" >&6; }
7480 PKG_CONFIG=""
7485 # Automatic dependency tracking
7489 # Check whether --enable-depend was given.
7490 if test "${enable_depend+set}" = set; then :
7491 enableval=$enable_depend;
7492 case $enableval in
7493 yes)
7494 autodepend=yes
7500 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7502 esac
7504 else
7505 enable_depend=no
7514 # Enable assert checks
7518 # Check whether --enable-cassert was given.
7519 if test "${enable_cassert+set}" = set; then :
7520 enableval=$enable_cassert;
7521 case $enableval in
7522 yes)
7524 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7531 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7533 esac
7535 else
7536 enable_cassert=no
7544 # Include directories
7546 ac_save_IFS=$IFS
7547 IFS="${IFS}${PATH_SEPARATOR}"
7548 # SRCH_INC comes from the template file
7549 for dir in $with_includes $SRCH_INC; do
7550 if test -d "$dir"; then
7551 INCLUDES="$INCLUDES -I$dir"
7552 else
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7554 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7556 done
7557 IFS=$ac_save_IFS
7562 # Library directories
7564 ac_save_IFS=$IFS
7565 IFS="${IFS}${PATH_SEPARATOR}"
7566 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7567 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7568 if test -d "$dir"; then
7569 LIBDIRS="$LIBDIRS -L$dir"
7570 else
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7572 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7574 done
7575 IFS=$ac_save_IFS
7578 # Enable thread-safe client libraries
7580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7581 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7584 # Check whether --enable-thread-safety was given.
7585 if test "${enable_thread_safety+set}" = set; then :
7586 enableval=$enable_thread_safety;
7587 case $enableval in
7588 yes)
7595 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7597 esac
7599 else
7600 enable_thread_safety=yes
7605 if test "$enable_thread_safety" = yes; then
7607 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7611 $as_echo "$enable_thread_safety" >&6; }
7615 # ICU
7617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7618 $as_echo_n "checking whether to build with ICU support... " >&6; }
7622 # Check whether --with-icu was given.
7623 if test "${with_icu+set}" = set; then :
7624 withval=$with_icu;
7625 case $withval in
7626 yes)
7628 $as_echo "#define USE_ICU 1" >>confdefs.h
7635 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7637 esac
7639 else
7640 with_icu=no
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7646 $as_echo "$with_icu" >&6; }
7649 if test "$with_icu" = yes; then
7651 pkg_failed=no
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7653 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7655 if test -n "$ICU_CFLAGS"; then
7656 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7657 elif test -n "$PKG_CONFIG"; then
7658 if test -n "$PKG_CONFIG" && \
7659 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7660 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7661 ac_status=$?
7662 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7663 test $ac_status = 0; }; then
7664 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7665 test "x$?" != "x0" && pkg_failed=yes
7666 else
7667 pkg_failed=yes
7669 else
7670 pkg_failed=untried
7672 if test -n "$ICU_LIBS"; then
7673 pkg_cv_ICU_LIBS="$ICU_LIBS"
7674 elif test -n "$PKG_CONFIG"; then
7675 if test -n "$PKG_CONFIG" && \
7676 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7677 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7678 ac_status=$?
7679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7680 test $ac_status = 0; }; then
7681 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7682 test "x$?" != "x0" && pkg_failed=yes
7683 else
7684 pkg_failed=yes
7686 else
7687 pkg_failed=untried
7692 if test $pkg_failed = yes; then
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7694 $as_echo "no" >&6; }
7696 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7697 _pkg_short_errors_supported=yes
7698 else
7699 _pkg_short_errors_supported=no
7701 if test $_pkg_short_errors_supported = yes; then
7702 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7703 else
7704 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7706 # Put the nasty error message in config.log where it belongs
7707 echo "$ICU_PKG_ERRORS" >&5
7709 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7711 $ICU_PKG_ERRORS
7713 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7714 installed software in a non-standard prefix.
7716 Alternatively, you may set the environment variables ICU_CFLAGS
7717 and ICU_LIBS to avoid the need to call pkg-config.
7718 See the pkg-config man page for more details." "$LINENO" 5
7719 elif test $pkg_failed = untried; then
7720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7721 $as_echo "no" >&6; }
7722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7723 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7724 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7725 is in your PATH or set the PKG_CONFIG environment variable to the full
7726 path to pkg-config.
7728 Alternatively, you may set the environment variables ICU_CFLAGS
7729 and ICU_LIBS to avoid the need to call pkg-config.
7730 See the pkg-config man page for more details.
7732 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7733 See \`config.log' for more details" "$LINENO" 5; }
7734 else
7735 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7736 ICU_LIBS=$pkg_cv_ICU_LIBS
7737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7738 $as_echo "yes" >&6; }
7744 # Optionally build Tcl modules (PL/Tcl)
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7747 $as_echo_n "checking whether to build with Tcl... " >&6; }
7751 # Check whether --with-tcl was given.
7752 if test "${with_tcl+set}" = set; then :
7753 withval=$with_tcl;
7754 case $withval in
7755 yes)
7762 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7764 esac
7766 else
7767 with_tcl=no
7772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7773 $as_echo "$with_tcl" >&6; }
7776 # We see if the path to the Tcl/Tk configuration scripts is specified.
7777 # This will override the use of tclsh to find the paths to search.
7782 # Check whether --with-tclconfig was given.
7783 if test "${with_tclconfig+set}" = set; then :
7784 withval=$with_tclconfig;
7785 case $withval in
7786 yes)
7787 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7790 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7795 esac
7802 # Optionally build Perl modules (PL/Perl)
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7805 $as_echo_n "checking whether to build Perl modules... " >&6; }
7809 # Check whether --with-perl was given.
7810 if test "${with_perl+set}" = set; then :
7811 withval=$with_perl;
7812 case $withval in
7813 yes)
7820 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7822 esac
7824 else
7825 with_perl=no
7830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7831 $as_echo "$with_perl" >&6; }
7835 # Optionally build Python modules (PL/Python)
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7838 $as_echo_n "checking whether to build Python modules... " >&6; }
7842 # Check whether --with-python was given.
7843 if test "${with_python+set}" = set; then :
7844 withval=$with_python;
7845 case $withval in
7846 yes)
7853 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7855 esac
7857 else
7858 with_python=no
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7864 $as_echo "$with_python" >&6; }
7868 # GSSAPI
7870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7871 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7875 # Check whether --with-gssapi was given.
7876 if test "${with_gssapi+set}" = set; then :
7877 withval=$with_gssapi;
7878 case $withval in
7879 yes)
7882 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7884 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7891 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7893 esac
7895 else
7896 with_gssapi=no
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7902 $as_echo "$with_gssapi" >&6; }
7910 # Kerberos configuration parameters
7915 # Check whether --with-krb-srvnam was given.
7916 if test "${with_krb_srvnam+set}" = set; then :
7917 withval=$with_krb_srvnam;
7918 case $withval in
7919 yes)
7920 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7923 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7928 esac
7930 else
7931 with_krb_srvnam="postgres"
7937 cat >>confdefs.h <<_ACEOF
7938 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7939 _ACEOF
7944 # PAM
7946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7947 $as_echo_n "checking whether to build with PAM support... " >&6; }
7951 # Check whether --with-pam was given.
7952 if test "${with_pam+set}" = set; then :
7953 withval=$with_pam;
7954 case $withval in
7955 yes)
7957 $as_echo "#define USE_PAM 1" >>confdefs.h
7964 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7966 esac
7968 else
7969 with_pam=no
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7975 $as_echo "$with_pam" >&6; }
7979 # BSD AUTH
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7982 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7986 # Check whether --with-bsd-auth was given.
7987 if test "${with_bsd_auth+set}" = set; then :
7988 withval=$with_bsd_auth;
7989 case $withval in
7990 yes)
7992 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7999 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8001 esac
8003 else
8004 with_bsd_auth=no
8009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8010 $as_echo "$with_bsd_auth" >&6; }
8014 # LDAP
8016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8017 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8021 # Check whether --with-ldap was given.
8022 if test "${with_ldap+set}" = set; then :
8023 withval=$with_ldap;
8024 case $withval in
8025 yes)
8027 $as_echo "#define USE_LDAP 1" >>confdefs.h
8034 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8036 esac
8038 else
8039 with_ldap=no
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8045 $as_echo "$with_ldap" >&6; }
8050 # Bonjour
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8053 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8057 # Check whether --with-bonjour was given.
8058 if test "${with_bonjour+set}" = set; then :
8059 withval=$with_bonjour;
8060 case $withval in
8061 yes)
8063 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8070 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8072 esac
8074 else
8075 with_bonjour=no
8080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8081 $as_echo "$with_bonjour" >&6; }
8085 # SELinux
8087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8088 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8092 # Check whether --with-selinux was given.
8093 if test "${with_selinux+set}" = set; then :
8094 withval=$with_selinux;
8095 case $withval in
8096 yes)
8103 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8105 esac
8107 else
8108 with_selinux=no
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8115 $as_echo "$with_selinux" >&6; }
8118 # Systemd
8120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8121 $as_echo_n "checking whether to build with systemd support... " >&6; }
8125 # Check whether --with-systemd was given.
8126 if test "${with_systemd+set}" = set; then :
8127 withval=$with_systemd;
8128 case $withval in
8129 yes)
8131 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8138 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8140 esac
8142 else
8143 with_systemd=no
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8150 $as_echo "$with_systemd" >&6; }
8153 # Readline
8158 # Check whether --with-readline was given.
8159 if test "${with_readline+set}" = set; then :
8160 withval=$with_readline;
8161 case $withval in
8162 yes)
8169 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8171 esac
8173 else
8174 with_readline=yes
8179 # readline on MinGW has problems with backslashes in psql and other bugs.
8180 # This is particularly a problem with non-US code pages.
8181 # Therefore disable its use until we understand the cause. 2004-07-20
8182 if test "$PORTNAME" = "win32"; then
8183 if test "$with_readline" = yes; then
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8185 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8186 with_readline=no
8193 # Prefer libedit
8198 # Check whether --with-libedit-preferred was given.
8199 if test "${with_libedit_preferred+set}" = set; then :
8200 withval=$with_libedit_preferred;
8201 case $withval in
8202 yes)
8209 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8211 esac
8213 else
8214 with_libedit_preferred=no
8222 # UUID library
8224 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8225 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8226 # UUID library. More than one of these might be present on a given platform,
8227 # so we make the user say which one she wants.
8232 # Check whether --with-uuid was given.
8233 if test "${with_uuid+set}" = set; then :
8234 withval=$with_uuid;
8235 case $withval in
8236 yes)
8237 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8240 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8245 esac
8250 if test x"$with_uuid" = x"" ; then
8251 with_uuid=no
8256 # Check whether --with-ossp-uuid was given.
8257 if test "${with_ossp_uuid+set}" = set; then :
8258 withval=$with_ossp_uuid;
8259 case $withval in
8260 yes)
8267 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8269 esac
8271 else
8272 with_ossp_uuid=no
8277 if test "$with_ossp_uuid" = yes ; then
8278 with_uuid=ossp
8281 if test "$with_uuid" != no ; then
8282 if test "$with_uuid" = bsd ; then
8284 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8286 elif test "$with_uuid" = e2fs ; then
8288 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8290 elif test "$with_uuid" = ossp ; then
8292 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8294 else
8295 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8302 # XML
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8305 $as_echo_n "checking whether to build with XML support... " >&6; }
8309 # Check whether --with-libxml was given.
8310 if test "${with_libxml+set}" = set; then :
8311 withval=$with_libxml;
8312 case $withval in
8313 yes)
8315 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8322 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8324 esac
8326 else
8327 with_libxml=no
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8333 $as_echo "$with_libxml" >&6; }
8336 if test "$with_libxml" = yes ; then
8337 # Check pkg-config, then xml2-config. But for backwards compatibility,
8338 # setting XML2_CONFIG overrides pkg-config.
8339 have_libxml2_pkg_config=no
8340 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8342 pkg_failed=no
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8344 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8346 if test -n "$XML2_CFLAGS"; then
8347 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8348 elif test -n "$PKG_CONFIG"; then
8349 if test -n "$PKG_CONFIG" && \
8350 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8351 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8352 ac_status=$?
8353 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8354 test $ac_status = 0; }; then
8355 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8356 test "x$?" != "x0" && pkg_failed=yes
8357 else
8358 pkg_failed=yes
8360 else
8361 pkg_failed=untried
8363 if test -n "$XML2_LIBS"; then
8364 pkg_cv_XML2_LIBS="$XML2_LIBS"
8365 elif test -n "$PKG_CONFIG"; then
8366 if test -n "$PKG_CONFIG" && \
8367 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8368 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8369 ac_status=$?
8370 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8371 test $ac_status = 0; }; then
8372 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8373 test "x$?" != "x0" && pkg_failed=yes
8374 else
8375 pkg_failed=yes
8377 else
8378 pkg_failed=untried
8383 if test $pkg_failed = yes; then
8384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8385 $as_echo "no" >&6; }
8387 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8388 _pkg_short_errors_supported=yes
8389 else
8390 _pkg_short_errors_supported=no
8392 if test $_pkg_short_errors_supported = yes; then
8393 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8394 else
8395 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8397 # Put the nasty error message in config.log where it belongs
8398 echo "$XML2_PKG_ERRORS" >&5
8400 # do nothing
8401 elif test $pkg_failed = untried; then
8402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8403 $as_echo "no" >&6; }
8404 # do nothing
8405 else
8406 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8407 XML2_LIBS=$pkg_cv_XML2_LIBS
8408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8409 $as_echo "yes" >&6; }
8410 have_libxml2_pkg_config=yes
8413 if test "$have_libxml2_pkg_config" = no ; then
8414 if test -z "$XML2_CONFIG"; then
8415 for ac_prog in xml2-config
8417 # Extract the first word of "$ac_prog", so it can be a program name with args.
8418 set dummy $ac_prog; ac_word=$2
8419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8420 $as_echo_n "checking for $ac_word... " >&6; }
8421 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8422 $as_echo_n "(cached) " >&6
8423 else
8424 case $XML2_CONFIG in
8425 [\\/]* | ?:[\\/]*)
8426 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8430 for as_dir in $PATH
8432 IFS=$as_save_IFS
8433 test -z "$as_dir" && as_dir=.
8434 for ac_exec_ext in '' $ac_executable_extensions; do
8435 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8436 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8437 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8438 break 2
8440 done
8441 done
8442 IFS=$as_save_IFS
8445 esac
8447 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8448 if test -n "$XML2_CONFIG"; then
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8450 $as_echo "$XML2_CONFIG" >&6; }
8451 else
8452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453 $as_echo "no" >&6; }
8457 test -n "$XML2_CONFIG" && break
8458 done
8460 else
8461 # Report the value of XML2_CONFIG in configure's output in all cases.
8462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8463 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8465 $as_echo "$XML2_CONFIG" >&6; }
8468 if test -n "$XML2_CONFIG"; then
8469 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8470 XML2_LIBS=`$XML2_CONFIG --libs`
8473 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8474 for pgac_option in $XML2_CFLAGS; do
8475 case $pgac_option in
8476 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8477 esac
8478 done
8479 for pgac_option in $XML2_LIBS; do
8480 case $pgac_option in
8481 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8482 esac
8483 done
8488 # XSLT
8493 # Check whether --with-libxslt was given.
8494 if test "${with_libxslt+set}" = set; then :
8495 withval=$with_libxslt;
8496 case $withval in
8497 yes)
8499 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8506 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8508 esac
8510 else
8511 with_libxslt=no
8521 # tzdata
8526 # Check whether --with-system-tzdata was given.
8527 if test "${with_system_tzdata+set}" = set; then :
8528 withval=$with_system_tzdata;
8529 case $withval in
8530 yes)
8531 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8534 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8539 esac
8547 # Zlib
8552 # Check whether --with-zlib was given.
8553 if test "${with_zlib+set}" = set; then :
8554 withval=$with_zlib;
8555 case $withval in
8556 yes)
8563 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8565 esac
8567 else
8568 with_zlib=yes
8576 # LZ4
8578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
8579 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
8583 # Check whether --with-lz4 was given.
8584 if test "${with_lz4+set}" = set; then :
8585 withval=$with_lz4;
8586 case $withval in
8587 yes)
8589 $as_echo "#define USE_LZ4 1" >>confdefs.h
8596 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
8598 esac
8600 else
8601 with_lz4=no
8606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
8607 $as_echo "$with_lz4" >&6; }
8610 if test "$with_lz4" = yes; then
8612 pkg_failed=no
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
8614 $as_echo_n "checking for liblz4... " >&6; }
8616 if test -n "$LZ4_CFLAGS"; then
8617 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
8618 elif test -n "$PKG_CONFIG"; then
8619 if test -n "$PKG_CONFIG" && \
8620 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8621 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8622 ac_status=$?
8623 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8624 test $ac_status = 0; }; then
8625 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
8626 test "x$?" != "x0" && pkg_failed=yes
8627 else
8628 pkg_failed=yes
8630 else
8631 pkg_failed=untried
8633 if test -n "$LZ4_LIBS"; then
8634 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
8635 elif test -n "$PKG_CONFIG"; then
8636 if test -n "$PKG_CONFIG" && \
8637 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8638 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8639 ac_status=$?
8640 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8641 test $ac_status = 0; }; then
8642 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
8643 test "x$?" != "x0" && pkg_failed=yes
8644 else
8645 pkg_failed=yes
8647 else
8648 pkg_failed=untried
8653 if test $pkg_failed = yes; then
8654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8655 $as_echo "no" >&6; }
8657 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8658 _pkg_short_errors_supported=yes
8659 else
8660 _pkg_short_errors_supported=no
8662 if test $_pkg_short_errors_supported = yes; then
8663 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
8664 else
8665 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
8667 # Put the nasty error message in config.log where it belongs
8668 echo "$LZ4_PKG_ERRORS" >&5
8670 as_fn_error $? "Package requirements (liblz4) were not met:
8672 $LZ4_PKG_ERRORS
8674 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8675 installed software in a non-standard prefix.
8677 Alternatively, you may set the environment variables LZ4_CFLAGS
8678 and LZ4_LIBS to avoid the need to call pkg-config.
8679 See the pkg-config man page for more details." "$LINENO" 5
8680 elif test $pkg_failed = untried; then
8681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8682 $as_echo "no" >&6; }
8683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8684 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8685 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8686 is in your PATH or set the PKG_CONFIG environment variable to the full
8687 path to pkg-config.
8689 Alternatively, you may set the environment variables LZ4_CFLAGS
8690 and LZ4_LIBS to avoid the need to call pkg-config.
8691 See the pkg-config man page for more details.
8693 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8694 See \`config.log' for more details" "$LINENO" 5; }
8695 else
8696 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
8697 LZ4_LIBS=$pkg_cv_LZ4_LIBS
8698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8699 $as_echo "yes" >&6; }
8702 # We only care about -I, -D, and -L switches;
8703 # note that -llz4 will be added by AC_CHECK_LIB below.
8704 for pgac_option in $LZ4_CFLAGS; do
8705 case $pgac_option in
8706 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8707 esac
8708 done
8709 for pgac_option in $LZ4_LIBS; do
8710 case $pgac_option in
8711 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8712 esac
8713 done
8717 # Assignments
8720 CPPFLAGS="$CPPFLAGS $INCLUDES"
8721 LDFLAGS="$LDFLAGS $LIBDIRS"
8727 # Check whether --with-gnu-ld was given.
8728 if test "${with_gnu_ld+set}" = set; then :
8729 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8730 else
8731 with_gnu_ld=no
8734 ac_prog=ld
8735 if test "$GCC" = yes; then
8736 # Check if gcc -print-prog-name=ld gives a path.
8737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8738 $as_echo_n "checking for ld used by GCC... " >&6; }
8739 case $host in
8740 *-*-mingw*)
8741 # gcc leaves a trailing carriage return which upsets mingw
8742 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8744 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8745 esac
8746 case "$ac_prog" in
8747 # Accept absolute paths.
8748 [\\/]* | [A-Za-z]:[\\/]*)
8749 re_direlt='/[^/][^/]*/\.\./'
8750 # Canonicalize the path of ld
8751 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8752 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8753 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8754 done
8755 test -z "$LD" && LD="$ac_prog"
8758 # If it fails, then pretend we aren't using GCC.
8759 ac_prog=ld
8762 # If it is relative, then search for the first ld in PATH.
8763 with_gnu_ld=unknown
8765 esac
8766 elif test "$with_gnu_ld" = yes; then
8767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8768 $as_echo_n "checking for GNU ld... " >&6; }
8769 else
8770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8771 $as_echo_n "checking for non-GNU ld... " >&6; }
8773 if ${ac_cv_path_LD+:} false; then :
8774 $as_echo_n "(cached) " >&6
8775 else
8776 if test -z "$LD"; then
8777 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8778 for ac_dir in $PATH; do
8779 test -z "$ac_dir" && ac_dir=.
8780 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8781 ac_cv_path_LD="$ac_dir/$ac_prog"
8782 # Check to see if the program is GNU ld. I'd rather use --version,
8783 # but apparently some GNU ld's only accept -v.
8784 # Break only if it was the GNU/non-GNU ld that we prefer.
8785 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8786 test "$with_gnu_ld" != no && break
8787 else
8788 test "$with_gnu_ld" != yes && break
8791 done
8792 IFS="$ac_save_ifs"
8793 else
8794 ac_cv_path_LD="$LD" # Let the user override the test with a path.
8798 LD="$ac_cv_path_LD"
8799 if test -n "$LD"; then
8800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8801 $as_echo "$LD" >&6; }
8802 else
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8804 $as_echo "no" >&6; }
8806 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8808 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8809 if ${ac_cv_prog_gnu_ld+:} false; then :
8810 $as_echo_n "(cached) " >&6
8811 else
8812 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8813 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8814 ac_cv_prog_gnu_ld=yes
8815 else
8816 ac_cv_prog_gnu_ld=no
8819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8820 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8821 with_gnu_ld=$ac_cv_prog_gnu_ld
8826 if test -n "$ac_tool_prefix"; then
8827 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8828 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8830 $as_echo_n "checking for $ac_word... " >&6; }
8831 if ${ac_cv_prog_RANLIB+:} false; then :
8832 $as_echo_n "(cached) " >&6
8833 else
8834 if test -n "$RANLIB"; then
8835 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8836 else
8837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8838 for as_dir in $PATH
8840 IFS=$as_save_IFS
8841 test -z "$as_dir" && as_dir=.
8842 for ac_exec_ext in '' $ac_executable_extensions; do
8843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8844 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8846 break 2
8848 done
8849 done
8850 IFS=$as_save_IFS
8854 RANLIB=$ac_cv_prog_RANLIB
8855 if test -n "$RANLIB"; then
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8857 $as_echo "$RANLIB" >&6; }
8858 else
8859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8860 $as_echo "no" >&6; }
8865 if test -z "$ac_cv_prog_RANLIB"; then
8866 ac_ct_RANLIB=$RANLIB
8867 # Extract the first word of "ranlib", so it can be a program name with args.
8868 set dummy ranlib; ac_word=$2
8869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8870 $as_echo_n "checking for $ac_word... " >&6; }
8871 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8872 $as_echo_n "(cached) " >&6
8873 else
8874 if test -n "$ac_ct_RANLIB"; then
8875 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8876 else
8877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8878 for as_dir in $PATH
8880 IFS=$as_save_IFS
8881 test -z "$as_dir" && as_dir=.
8882 for ac_exec_ext in '' $ac_executable_extensions; do
8883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8884 ac_cv_prog_ac_ct_RANLIB="ranlib"
8885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8886 break 2
8888 done
8889 done
8890 IFS=$as_save_IFS
8894 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8895 if test -n "$ac_ct_RANLIB"; then
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8897 $as_echo "$ac_ct_RANLIB" >&6; }
8898 else
8899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8900 $as_echo "no" >&6; }
8903 if test "x$ac_ct_RANLIB" = x; then
8904 RANLIB=":"
8905 else
8906 case $cross_compiling:$ac_tool_warned in
8907 yes:)
8908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8909 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8910 ac_tool_warned=yes ;;
8911 esac
8912 RANLIB=$ac_ct_RANLIB
8914 else
8915 RANLIB="$ac_cv_prog_RANLIB"
8919 if test -n "$ac_tool_prefix"; then
8920 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8921 set dummy ${ac_tool_prefix}strip; ac_word=$2
8922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8923 $as_echo_n "checking for $ac_word... " >&6; }
8924 if ${ac_cv_prog_STRIP+:} false; then :
8925 $as_echo_n "(cached) " >&6
8926 else
8927 if test -n "$STRIP"; then
8928 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8929 else
8930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8931 for as_dir in $PATH
8933 IFS=$as_save_IFS
8934 test -z "$as_dir" && as_dir=.
8935 for ac_exec_ext in '' $ac_executable_extensions; do
8936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8937 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8939 break 2
8941 done
8942 done
8943 IFS=$as_save_IFS
8947 STRIP=$ac_cv_prog_STRIP
8948 if test -n "$STRIP"; then
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8950 $as_echo "$STRIP" >&6; }
8951 else
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8953 $as_echo "no" >&6; }
8958 if test -z "$ac_cv_prog_STRIP"; then
8959 ac_ct_STRIP=$STRIP
8960 # Extract the first word of "strip", so it can be a program name with args.
8961 set dummy strip; ac_word=$2
8962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8963 $as_echo_n "checking for $ac_word... " >&6; }
8964 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8965 $as_echo_n "(cached) " >&6
8966 else
8967 if test -n "$ac_ct_STRIP"; then
8968 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8969 else
8970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8971 for as_dir in $PATH
8973 IFS=$as_save_IFS
8974 test -z "$as_dir" && as_dir=.
8975 for ac_exec_ext in '' $ac_executable_extensions; do
8976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8977 ac_cv_prog_ac_ct_STRIP="strip"
8978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8979 break 2
8981 done
8982 done
8983 IFS=$as_save_IFS
8987 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8988 if test -n "$ac_ct_STRIP"; then
8989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8990 $as_echo "$ac_ct_STRIP" >&6; }
8991 else
8992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8993 $as_echo "no" >&6; }
8996 if test "x$ac_ct_STRIP" = x; then
8997 STRIP=":"
8998 else
8999 case $cross_compiling:$ac_tool_warned in
9000 yes:)
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9002 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9003 ac_tool_warned=yes ;;
9004 esac
9005 STRIP=$ac_ct_STRIP
9007 else
9008 STRIP="$ac_cv_prog_STRIP"
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9013 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9014 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9015 STRIP_STATIC_LIB="$STRIP -x"
9016 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9018 $as_echo "yes" >&6; }
9019 else
9020 case $host_os in
9021 darwin*)
9022 STRIP="$STRIP -x"
9023 STRIP_STATIC_LIB=$STRIP
9024 STRIP_SHARED_LIB=$STRIP
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9026 $as_echo "yes" >&6; }
9029 STRIP_STATIC_LIB=:
9030 STRIP_SHARED_LIB=:
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032 $as_echo "no" >&6; }
9034 esac
9039 if test -n "$ac_tool_prefix"; then
9040 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9041 set dummy ${ac_tool_prefix}ar; ac_word=$2
9042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9043 $as_echo_n "checking for $ac_word... " >&6; }
9044 if ${ac_cv_prog_AR+:} false; then :
9045 $as_echo_n "(cached) " >&6
9046 else
9047 if test -n "$AR"; then
9048 ac_cv_prog_AR="$AR" # Let the user override the test.
9049 else
9050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051 for as_dir in $PATH
9053 IFS=$as_save_IFS
9054 test -z "$as_dir" && as_dir=.
9055 for ac_exec_ext in '' $ac_executable_extensions; do
9056 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057 ac_cv_prog_AR="${ac_tool_prefix}ar"
9058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059 break 2
9061 done
9062 done
9063 IFS=$as_save_IFS
9067 AR=$ac_cv_prog_AR
9068 if test -n "$AR"; then
9069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9070 $as_echo "$AR" >&6; }
9071 else
9072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9073 $as_echo "no" >&6; }
9078 if test -z "$ac_cv_prog_AR"; then
9079 ac_ct_AR=$AR
9080 # Extract the first word of "ar", so it can be a program name with args.
9081 set dummy ar; ac_word=$2
9082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9083 $as_echo_n "checking for $ac_word... " >&6; }
9084 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9085 $as_echo_n "(cached) " >&6
9086 else
9087 if test -n "$ac_ct_AR"; then
9088 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9089 else
9090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9091 for as_dir in $PATH
9093 IFS=$as_save_IFS
9094 test -z "$as_dir" && as_dir=.
9095 for ac_exec_ext in '' $ac_executable_extensions; do
9096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9097 ac_cv_prog_ac_ct_AR="ar"
9098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9099 break 2
9101 done
9102 done
9103 IFS=$as_save_IFS
9107 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9108 if test -n "$ac_ct_AR"; then
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9110 $as_echo "$ac_ct_AR" >&6; }
9111 else
9112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9113 $as_echo "no" >&6; }
9116 if test "x$ac_ct_AR" = x; then
9117 AR="ar"
9118 else
9119 case $cross_compiling:$ac_tool_warned in
9120 yes:)
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9122 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9123 ac_tool_warned=yes ;;
9124 esac
9125 AR=$ac_ct_AR
9127 else
9128 AR="$ac_cv_prog_AR"
9131 if test "$PORTNAME" = "win32"; then
9132 if test -n "$ac_tool_prefix"; then
9133 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9134 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9136 $as_echo_n "checking for $ac_word... " >&6; }
9137 if ${ac_cv_prog_DLLTOOL+:} false; then :
9138 $as_echo_n "(cached) " >&6
9139 else
9140 if test -n "$DLLTOOL"; then
9141 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9142 else
9143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9144 for as_dir in $PATH
9146 IFS=$as_save_IFS
9147 test -z "$as_dir" && as_dir=.
9148 for ac_exec_ext in '' $ac_executable_extensions; do
9149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9150 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9152 break 2
9154 done
9155 done
9156 IFS=$as_save_IFS
9160 DLLTOOL=$ac_cv_prog_DLLTOOL
9161 if test -n "$DLLTOOL"; then
9162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9163 $as_echo "$DLLTOOL" >&6; }
9164 else
9165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166 $as_echo "no" >&6; }
9171 if test -z "$ac_cv_prog_DLLTOOL"; then
9172 ac_ct_DLLTOOL=$DLLTOOL
9173 # Extract the first word of "dlltool", so it can be a program name with args.
9174 set dummy dlltool; ac_word=$2
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9176 $as_echo_n "checking for $ac_word... " >&6; }
9177 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9178 $as_echo_n "(cached) " >&6
9179 else
9180 if test -n "$ac_ct_DLLTOOL"; then
9181 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9182 else
9183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9184 for as_dir in $PATH
9186 IFS=$as_save_IFS
9187 test -z "$as_dir" && as_dir=.
9188 for ac_exec_ext in '' $ac_executable_extensions; do
9189 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9190 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9192 break 2
9194 done
9195 done
9196 IFS=$as_save_IFS
9200 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9201 if test -n "$ac_ct_DLLTOOL"; then
9202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9203 $as_echo "$ac_ct_DLLTOOL" >&6; }
9204 else
9205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9206 $as_echo "no" >&6; }
9209 if test "x$ac_ct_DLLTOOL" = x; then
9210 DLLTOOL="dlltool"
9211 else
9212 case $cross_compiling:$ac_tool_warned in
9213 yes:)
9214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9215 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9216 ac_tool_warned=yes ;;
9217 esac
9218 DLLTOOL=$ac_ct_DLLTOOL
9220 else
9221 DLLTOOL="$ac_cv_prog_DLLTOOL"
9224 if test -n "$ac_tool_prefix"; then
9225 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9226 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9228 $as_echo_n "checking for $ac_word... " >&6; }
9229 if ${ac_cv_prog_DLLWRAP+:} false; then :
9230 $as_echo_n "(cached) " >&6
9231 else
9232 if test -n "$DLLWRAP"; then
9233 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9234 else
9235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236 for as_dir in $PATH
9238 IFS=$as_save_IFS
9239 test -z "$as_dir" && as_dir=.
9240 for ac_exec_ext in '' $ac_executable_extensions; do
9241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9242 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9244 break 2
9246 done
9247 done
9248 IFS=$as_save_IFS
9252 DLLWRAP=$ac_cv_prog_DLLWRAP
9253 if test -n "$DLLWRAP"; then
9254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9255 $as_echo "$DLLWRAP" >&6; }
9256 else
9257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9258 $as_echo "no" >&6; }
9263 if test -z "$ac_cv_prog_DLLWRAP"; then
9264 ac_ct_DLLWRAP=$DLLWRAP
9265 # Extract the first word of "dllwrap", so it can be a program name with args.
9266 set dummy dllwrap; ac_word=$2
9267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268 $as_echo_n "checking for $ac_word... " >&6; }
9269 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9270 $as_echo_n "(cached) " >&6
9271 else
9272 if test -n "$ac_ct_DLLWRAP"; then
9273 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9274 else
9275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9276 for as_dir in $PATH
9278 IFS=$as_save_IFS
9279 test -z "$as_dir" && as_dir=.
9280 for ac_exec_ext in '' $ac_executable_extensions; do
9281 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9282 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9284 break 2
9286 done
9287 done
9288 IFS=$as_save_IFS
9292 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9293 if test -n "$ac_ct_DLLWRAP"; then
9294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9295 $as_echo "$ac_ct_DLLWRAP" >&6; }
9296 else
9297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9298 $as_echo "no" >&6; }
9301 if test "x$ac_ct_DLLWRAP" = x; then
9302 DLLWRAP="dllwrap"
9303 else
9304 case $cross_compiling:$ac_tool_warned in
9305 yes:)
9306 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9307 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9308 ac_tool_warned=yes ;;
9309 esac
9310 DLLWRAP=$ac_ct_DLLWRAP
9312 else
9313 DLLWRAP="$ac_cv_prog_DLLWRAP"
9316 if test -n "$ac_tool_prefix"; then
9317 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9318 set dummy ${ac_tool_prefix}windres; ac_word=$2
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9320 $as_echo_n "checking for $ac_word... " >&6; }
9321 if ${ac_cv_prog_WINDRES+:} false; then :
9322 $as_echo_n "(cached) " >&6
9323 else
9324 if test -n "$WINDRES"; then
9325 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9326 else
9327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9328 for as_dir in $PATH
9330 IFS=$as_save_IFS
9331 test -z "$as_dir" && as_dir=.
9332 for ac_exec_ext in '' $ac_executable_extensions; do
9333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9334 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9336 break 2
9338 done
9339 done
9340 IFS=$as_save_IFS
9344 WINDRES=$ac_cv_prog_WINDRES
9345 if test -n "$WINDRES"; then
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9347 $as_echo "$WINDRES" >&6; }
9348 else
9349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9350 $as_echo "no" >&6; }
9355 if test -z "$ac_cv_prog_WINDRES"; then
9356 ac_ct_WINDRES=$WINDRES
9357 # Extract the first word of "windres", so it can be a program name with args.
9358 set dummy windres; ac_word=$2
9359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9360 $as_echo_n "checking for $ac_word... " >&6; }
9361 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9362 $as_echo_n "(cached) " >&6
9363 else
9364 if test -n "$ac_ct_WINDRES"; then
9365 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9366 else
9367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9368 for as_dir in $PATH
9370 IFS=$as_save_IFS
9371 test -z "$as_dir" && as_dir=.
9372 for ac_exec_ext in '' $ac_executable_extensions; do
9373 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9374 ac_cv_prog_ac_ct_WINDRES="windres"
9375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9376 break 2
9378 done
9379 done
9380 IFS=$as_save_IFS
9384 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9385 if test -n "$ac_ct_WINDRES"; then
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9387 $as_echo "$ac_ct_WINDRES" >&6; }
9388 else
9389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390 $as_echo "no" >&6; }
9393 if test "x$ac_ct_WINDRES" = x; then
9394 WINDRES="windres"
9395 else
9396 case $cross_compiling:$ac_tool_warned in
9397 yes:)
9398 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9399 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9400 ac_tool_warned=yes ;;
9401 esac
9402 WINDRES=$ac_ct_WINDRES
9404 else
9405 WINDRES="$ac_cv_prog_WINDRES"
9410 # Find a good install program. We prefer a C program (faster),
9411 # so one script is as good as another. But avoid the broken or
9412 # incompatible versions:
9413 # SysV /etc/install, /usr/sbin/install
9414 # SunOS /usr/etc/install
9415 # IRIX /sbin/install
9416 # AIX /bin/install
9417 # AmigaOS /C/install, which installs bootblocks on floppy discs
9418 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9419 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9420 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9421 # OS/2's system install, which has a completely different semantic
9422 # ./install, which can be erroneously created by make from ./install.sh.
9423 # Reject install programs that cannot install multiple files.
9424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9425 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9426 if test -z "$INSTALL"; then
9427 if ${ac_cv_path_install+:} false; then :
9428 $as_echo_n "(cached) " >&6
9429 else
9430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9431 for as_dir in $PATH
9433 IFS=$as_save_IFS
9434 test -z "$as_dir" && as_dir=.
9435 # Account for people who put trailing slashes in PATH elements.
9436 case $as_dir/ in #((
9437 ./ | .// | /[cC]/* | \
9438 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9439 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9440 /usr/ucb/* ) ;;
9442 # OSF1 and SCO ODT 3.0 have their own names for install.
9443 # Don't use installbsd from OSF since it installs stuff as root
9444 # by default.
9445 for ac_prog in ginstall scoinst install; do
9446 for ac_exec_ext in '' $ac_executable_extensions; do
9447 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9448 if test $ac_prog = install &&
9449 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9450 # AIX install. It has an incompatible calling convention.
9452 elif test $ac_prog = install &&
9453 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9454 # program-specific install script used by HP pwplus--don't use.
9456 else
9457 rm -rf conftest.one conftest.two conftest.dir
9458 echo one > conftest.one
9459 echo two > conftest.two
9460 mkdir conftest.dir
9461 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9462 test -s conftest.one && test -s conftest.two &&
9463 test -s conftest.dir/conftest.one &&
9464 test -s conftest.dir/conftest.two
9465 then
9466 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9467 break 3
9471 done
9472 done
9474 esac
9476 done
9477 IFS=$as_save_IFS
9479 rm -rf conftest.one conftest.two conftest.dir
9482 if test "${ac_cv_path_install+set}" = set; then
9483 INSTALL=$ac_cv_path_install
9484 else
9485 # As a last resort, use the slow shell script. Don't cache a
9486 # value for INSTALL within a source directory, because that will
9487 # break other packages using the cache if that directory is
9488 # removed, or if the value is a relative name.
9489 INSTALL=$ac_install_sh
9492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9493 $as_echo "$INSTALL" >&6; }
9495 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9496 # It thinks the first close brace ends the variable substitution.
9497 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9499 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9501 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9503 # When Autoconf chooses install-sh as install program it tries to generate
9504 # a relative path to it in each makefile where it substitutes it. This clashes
9505 # with our Makefile.global concept. This workaround helps.
9506 case $INSTALL in
9507 *install-sh*) install_bin='';;
9508 *) install_bin=$INSTALL;;
9509 esac
9512 if test -z "$TAR"; then
9513 for ac_prog in tar
9515 # Extract the first word of "$ac_prog", so it can be a program name with args.
9516 set dummy $ac_prog; ac_word=$2
9517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9518 $as_echo_n "checking for $ac_word... " >&6; }
9519 if ${ac_cv_path_TAR+:} false; then :
9520 $as_echo_n "(cached) " >&6
9521 else
9522 case $TAR in
9523 [\\/]* | ?:[\\/]*)
9524 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9528 for as_dir in $PATH
9530 IFS=$as_save_IFS
9531 test -z "$as_dir" && as_dir=.
9532 for ac_exec_ext in '' $ac_executable_extensions; do
9533 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9534 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9536 break 2
9538 done
9539 done
9540 IFS=$as_save_IFS
9543 esac
9545 TAR=$ac_cv_path_TAR
9546 if test -n "$TAR"; then
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9548 $as_echo "$TAR" >&6; }
9549 else
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551 $as_echo "no" >&6; }
9555 test -n "$TAR" && break
9556 done
9558 else
9559 # Report the value of TAR in configure's output in all cases.
9560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9561 $as_echo_n "checking for TAR... " >&6; }
9562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9563 $as_echo "$TAR" >&6; }
9566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9567 $as_echo_n "checking whether ln -s works... " >&6; }
9568 LN_S=$as_ln_s
9569 if test "$LN_S" = "ln -s"; then
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9571 $as_echo "yes" >&6; }
9572 else
9573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9574 $as_echo "no, using $LN_S" >&6; }
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9578 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9579 if test -z "$MKDIR_P"; then
9580 if ${ac_cv_path_mkdir+:} false; then :
9581 $as_echo_n "(cached) " >&6
9582 else
9583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9584 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9586 IFS=$as_save_IFS
9587 test -z "$as_dir" && as_dir=.
9588 for ac_prog in mkdir gmkdir; do
9589 for ac_exec_ext in '' $ac_executable_extensions; do
9590 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9591 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9592 'mkdir (GNU coreutils) '* | \
9593 'mkdir (coreutils) '* | \
9594 'mkdir (fileutils) '4.1*)
9595 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9596 break 3;;
9597 esac
9598 done
9599 done
9600 done
9601 IFS=$as_save_IFS
9605 test -d ./--version && rmdir ./--version
9606 if test "${ac_cv_path_mkdir+set}" = set; then
9607 MKDIR_P="$ac_cv_path_mkdir -p"
9608 else
9609 # As a last resort, use the slow shell script. Don't cache a
9610 # value for MKDIR_P within a source directory, because that will
9611 # break other packages using the cache if that directory is
9612 # removed, or if the value is a relative name.
9613 MKDIR_P="$ac_install_sh -d"
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9617 $as_echo "$MKDIR_P" >&6; }
9619 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9620 # a relative path to it in each makefile where it substitutes it. This clashes
9621 # with our Makefile.global concept. This workaround helps.
9622 case $MKDIR_P in
9623 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9624 esac
9626 if test -z "$BISON"; then
9627 for ac_prog in bison
9629 # Extract the first word of "$ac_prog", so it can be a program name with args.
9630 set dummy $ac_prog; ac_word=$2
9631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9632 $as_echo_n "checking for $ac_word... " >&6; }
9633 if ${ac_cv_path_BISON+:} false; then :
9634 $as_echo_n "(cached) " >&6
9635 else
9636 case $BISON in
9637 [\\/]* | ?:[\\/]*)
9638 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9642 for as_dir in $PATH
9644 IFS=$as_save_IFS
9645 test -z "$as_dir" && as_dir=.
9646 for ac_exec_ext in '' $ac_executable_extensions; do
9647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9648 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9650 break 2
9652 done
9653 done
9654 IFS=$as_save_IFS
9657 esac
9659 BISON=$ac_cv_path_BISON
9660 if test -n "$BISON"; then
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9662 $as_echo "$BISON" >&6; }
9663 else
9664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665 $as_echo "no" >&6; }
9669 test -n "$BISON" && break
9670 done
9672 else
9673 # Report the value of BISON in configure's output in all cases.
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9675 $as_echo_n "checking for BISON... " >&6; }
9676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9677 $as_echo "$BISON" >&6; }
9681 if test "$BISON"; then
9682 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9684 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9685 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9686 then
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9688 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9689 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9690 $as_echo "$as_me: WARNING:
9691 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9692 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9693 BISON=""
9695 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9696 # of the now preferred %name-prefix "base_yy", but the latter
9697 # doesn't work with Bison 2.3 or less. So for now we silence the
9698 # deprecation warnings.
9699 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9700 then
9701 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9705 if test -z "$BISON"; then
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9707 *** Without Bison you will not be able to build PostgreSQL from Git nor
9708 *** change any of the parser definition files. You can obtain Bison from
9709 *** a GNU mirror site. (If you are using the official distribution of
9710 *** PostgreSQL then you do not need to worry about this, because the Bison
9711 *** output is pre-generated.)" >&5
9712 $as_echo "$as_me: WARNING:
9713 *** Without Bison you will not be able to build PostgreSQL from Git nor
9714 *** change any of the parser definition files. You can obtain Bison from
9715 *** a GNU mirror site. (If you are using the official distribution of
9716 *** PostgreSQL then you do not need to worry about this, because the Bison
9717 *** output is pre-generated.)" >&2;}
9721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9722 $as_echo_n "checking for flex... " >&6; }
9723 if ${pgac_cv_path_flex+:} false; then :
9724 $as_echo_n "(cached) " >&6
9725 else
9726 # Let the user override the test
9727 if test -n "$FLEX"; then
9728 pgac_cv_path_flex=$FLEX
9729 else
9730 pgac_save_IFS=$IFS
9731 IFS=$PATH_SEPARATOR
9732 for pgac_dir in $PATH; do
9733 IFS=$pgac_save_IFS
9734 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9735 pgac_dir=`pwd`
9737 for pgac_prog in flex lex; do
9738 pgac_candidate="$pgac_dir/$pgac_prog"
9739 if test -f "$pgac_candidate" \
9740 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9741 then
9742 echo '%%' > conftest.l
9743 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9744 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9745 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;}'
9746 then
9747 pgac_cv_path_flex=$pgac_candidate
9748 break 2
9749 else
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9751 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9752 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9753 $as_echo "$as_me: WARNING:
9754 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9755 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9759 done
9760 done
9761 rm -f conftest.l lex.yy.c
9762 : ${pgac_cv_path_flex=no}
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9767 $as_echo "$pgac_cv_path_flex" >&6; }
9768 if test x"$pgac_cv_path_flex" = x"no"; then
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9770 *** Without Flex you will not be able to build PostgreSQL from Git nor
9771 *** change any of the scanner definition files. You can obtain Flex from
9772 *** a GNU mirror site. (If you are using the official distribution of
9773 *** PostgreSQL then you do not need to worry about this because the Flex
9774 *** output is pre-generated.)" >&5
9775 $as_echo "$as_me: WARNING:
9776 *** Without Flex you will not be able to build PostgreSQL from Git nor
9777 *** change any of the scanner definition files. You can obtain Flex from
9778 *** a GNU mirror site. (If you are using the official distribution of
9779 *** PostgreSQL then you do not need to worry about this because the Flex
9780 *** output is pre-generated.)" >&2;}
9782 FLEX=
9783 else
9784 FLEX=$pgac_cv_path_flex
9785 pgac_flex_version=`$FLEX --version 2>/dev/null`
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9787 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9794 if test -z "$PERL"; then
9795 for ac_prog in perl
9797 # Extract the first word of "$ac_prog", so it can be a program name with args.
9798 set dummy $ac_prog; ac_word=$2
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9800 $as_echo_n "checking for $ac_word... " >&6; }
9801 if ${ac_cv_path_PERL+:} false; then :
9802 $as_echo_n "(cached) " >&6
9803 else
9804 case $PERL in
9805 [\\/]* | ?:[\\/]*)
9806 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9810 for as_dir in $PATH
9812 IFS=$as_save_IFS
9813 test -z "$as_dir" && as_dir=.
9814 for ac_exec_ext in '' $ac_executable_extensions; do
9815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9816 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9818 break 2
9820 done
9821 done
9822 IFS=$as_save_IFS
9825 esac
9827 PERL=$ac_cv_path_PERL
9828 if test -n "$PERL"; then
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9830 $as_echo "$PERL" >&6; }
9831 else
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9833 $as_echo "no" >&6; }
9837 test -n "$PERL" && break
9838 done
9840 else
9841 # Report the value of PERL in configure's output in all cases.
9842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9843 $as_echo_n "checking for PERL... " >&6; }
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9845 $as_echo "$PERL" >&6; }
9849 if test "$PERL"; then
9850 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'`
9851 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9852 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9853 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9854 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9855 then
9856 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9857 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9858 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9859 $as_echo "$as_me: WARNING:
9860 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9861 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9862 PERL=""
9866 if test -z "$PERL"; then
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9868 *** Without Perl you will not be able to build PostgreSQL from Git.
9869 *** You can obtain Perl from any CPAN mirror site.
9870 *** (If you are using the official distribution of PostgreSQL then you do not
9871 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9872 $as_echo "$as_me: WARNING:
9873 *** Without Perl you will not be able to build PostgreSQL from Git.
9874 *** You can obtain Perl from any CPAN mirror site.
9875 *** (If you are using the official distribution of PostgreSQL then you do not
9876 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9879 if test "$with_perl" = yes; then
9880 if test -z "$PERL"; then
9881 as_fn_error $? "Perl not found" "$LINENO" 5
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9885 $as_echo_n "checking for Perl archlibexp... " >&6; }
9886 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9887 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9889 $as_echo "$perl_archlibexp" >&6; }
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9891 $as_echo_n "checking for Perl privlibexp... " >&6; }
9892 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9893 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9895 $as_echo "$perl_privlibexp" >&6; }
9896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9897 $as_echo_n "checking for Perl useshrplib... " >&6; }
9898 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9899 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9901 $as_echo "$perl_useshrplib" >&6; }
9902 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9903 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9904 You might have to rebuild your Perl installation. Refer to the
9905 documentation for details. Use --without-perl to disable building
9906 PL/Perl." "$LINENO" 5
9908 # On most platforms, archlibexp is also where the Perl include files live ...
9909 perl_includespec="-I$perl_archlibexp/CORE"
9910 # ... but on newer macOS versions, we must use -iwithsysroot to look
9911 # under $PG_SYSROOT
9912 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9913 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9914 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9919 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9920 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9922 $as_echo "$perl_ccflags" >&6; }
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9924 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9925 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9927 $as_echo "$perl_embed_ccflags" >&6; }
9930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9931 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9932 if test "$PORTNAME" = "win32" ; then
9933 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9934 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9935 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9936 else
9937 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9938 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9939 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9942 else
9943 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9944 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9945 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9947 if test -z "$perl_embed_ldflags" ; then
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9949 $as_echo "no" >&6; }
9950 as_fn_error $? "could not determine flags for linking embedded Perl.
9951 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9952 installed." "$LINENO" 5
9953 else
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9955 $as_echo "$perl_embed_ldflags" >&6; }
9960 if test "$with_python" = yes; then
9961 if test -z "$PYTHON"; then
9962 for ac_prog in python python3 python2
9964 # Extract the first word of "$ac_prog", so it can be a program name with args.
9965 set dummy $ac_prog; ac_word=$2
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9967 $as_echo_n "checking for $ac_word... " >&6; }
9968 if ${ac_cv_path_PYTHON+:} false; then :
9969 $as_echo_n "(cached) " >&6
9970 else
9971 case $PYTHON in
9972 [\\/]* | ?:[\\/]*)
9973 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9977 for as_dir in $PATH
9979 IFS=$as_save_IFS
9980 test -z "$as_dir" && as_dir=.
9981 for ac_exec_ext in '' $ac_executable_extensions; do
9982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9983 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9985 break 2
9987 done
9988 done
9989 IFS=$as_save_IFS
9992 esac
9994 PYTHON=$ac_cv_path_PYTHON
9995 if test -n "$PYTHON"; then
9996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9997 $as_echo "$PYTHON" >&6; }
9998 else
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10000 $as_echo "no" >&6; }
10004 test -n "$PYTHON" && break
10005 done
10007 else
10008 # Report the value of PYTHON in configure's output in all cases.
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10010 $as_echo_n "checking for PYTHON... " >&6; }
10011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10012 $as_echo "$PYTHON" >&6; }
10015 if test x"$PYTHON" = x""; then
10016 as_fn_error $? "Python not found" "$LINENO" 5
10020 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10021 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10022 $as_echo "$as_me: using python $python_fullversion" >&6;}
10023 # python_fullversion is typically n.n.n plus some trailing junk
10024 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10025 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10026 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10027 # Reject unsupported Python versions as soon as practical.
10028 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 6; then
10029 as_fn_error $? "Python version $python_version is too old (version 2.6 or later is required)" "$LINENO" 5
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
10033 $as_echo_n "checking for Python distutils module... " >&6; }
10034 if "${PYTHON}" -c 'import distutils' 2>&5
10035 then
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10037 $as_echo "yes" >&6; }
10038 else
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040 $as_echo "no" >&6; }
10041 as_fn_error $? "distutils module not found" "$LINENO" 5
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10045 $as_echo_n "checking Python configuration directory... " >&6; }
10046 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10048 $as_echo "$python_configdir" >&6; }
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
10051 $as_echo_n "checking Python include directories... " >&6; }
10052 python_includespec=`${PYTHON} -c "
10053 import distutils.sysconfig
10054 a = '-I' + distutils.sysconfig.get_python_inc(False)
10055 b = '-I' + distutils.sysconfig.get_python_inc(True)
10056 if a == b:
10057 print(a)
10058 else:
10059 print(a + ' ' + b)"`
10060 if test "$PORTNAME" = win32 ; then
10061 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10064 $as_echo "$python_includespec" >&6; }
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10069 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10071 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
10072 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
10074 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10075 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10076 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10077 then
10078 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10079 found_shlib=1
10080 else
10081 # Otherwise, guess the base name of the shlib.
10082 # LDVERSION was added in Python 3.2, before that use VERSION,
10083 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10084 python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
10085 if test x"${python_ldversion}" != x""; then
10086 ldlibrary="python${python_ldversion}"
10087 else
10088 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
10089 if test x"${python_version_var}" != x""; then
10090 ldlibrary="python${python_version_var}"
10091 else
10092 ldlibrary="python${python_version}"
10095 # Search for a likely-looking file.
10096 found_shlib=0
10097 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10099 # We don't know the platform DLSUFFIX here, so check 'em all.
10100 for e in .so .dll .dylib .sl; do
10101 if test -e "$d/lib${ldlibrary}$e"; then
10102 python_libdir="$d"
10103 found_shlib=1
10104 break 2
10106 done
10107 done
10108 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10109 # (".so.n.n") as well. However, check this only after failing to find
10110 # ".so" anywhere, because yet other platforms (Debian) put the .so
10111 # symlink in a different directory from the underlying versioned shlib.
10112 if test "$found_shlib" != 1; then
10113 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10115 for f in "$d/lib${ldlibrary}.so."* ; do
10116 if test -e "$f"; then
10117 python_libdir="$d"
10118 found_shlib=1
10119 break 2
10121 done
10122 done
10124 # As usual, Windows has its own ideas. Possible default library
10125 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10126 # and the "lib" prefix might not be there.
10127 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10128 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10130 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10131 if test -e "$f"; then
10132 python_libdir="$d"
10133 found_shlib=1
10134 break 2
10136 done
10137 done
10140 if test "$found_shlib" != 1; then
10141 as_fn_error $? "could not find shared library for Python
10142 You might have to rebuild your Python installation. Refer to the
10143 documentation for details. Use --without-python to disable building
10144 PL/Python." "$LINENO" 5
10146 python_libspec="-L${python_libdir} -l${ldlibrary}"
10148 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10151 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10157 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10158 if test -z "$ZIC"; then
10159 for ac_prog in zic
10161 # Extract the first word of "$ac_prog", so it can be a program name with args.
10162 set dummy $ac_prog; ac_word=$2
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10164 $as_echo_n "checking for $ac_word... " >&6; }
10165 if ${ac_cv_path_ZIC+:} false; then :
10166 $as_echo_n "(cached) " >&6
10167 else
10168 case $ZIC in
10169 [\\/]* | ?:[\\/]*)
10170 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10174 for as_dir in $PATH
10176 IFS=$as_save_IFS
10177 test -z "$as_dir" && as_dir=.
10178 for ac_exec_ext in '' $ac_executable_extensions; do
10179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10180 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10182 break 2
10184 done
10185 done
10186 IFS=$as_save_IFS
10189 esac
10191 ZIC=$ac_cv_path_ZIC
10192 if test -n "$ZIC"; then
10193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10194 $as_echo "$ZIC" >&6; }
10195 else
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197 $as_echo "no" >&6; }
10201 test -n "$ZIC" && break
10202 done
10204 else
10205 # Report the value of ZIC in configure's output in all cases.
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10207 $as_echo_n "checking for ZIC... " >&6; }
10208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10209 $as_echo "$ZIC" >&6; }
10212 if test -z "$ZIC"; then
10213 as_fn_error $? "
10214 When cross-compiling, either use the option --with-system-tzdata to use
10215 existing time-zone data, or set the environment variable ZIC to a zic
10216 program to use during the build." "$LINENO" 5
10221 # Pthreads
10223 # For each platform, we need to know about any special compile and link
10224 # libraries, and whether the normal C function names are thread-safe.
10225 # See the comment at the top of src/port/thread.c for more information.
10226 # WIN32 doesn't need the pthread tests; it always uses threads
10228 # These tests are run before the library-tests, because linking with the
10229 # other libraries can pull in the pthread functions as a side-effect. We
10230 # want to use the -pthread or similar flags directly, and not rely on
10231 # the side-effects of linking with some other library.
10233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10234 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10235 if ${ac_cv_path_SED+:} false; then :
10236 $as_echo_n "(cached) " >&6
10237 else
10238 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10239 for ac_i in 1 2 3 4 5 6 7; do
10240 ac_script="$ac_script$as_nl$ac_script"
10241 done
10242 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10243 { ac_script=; unset ac_script;}
10244 if test -z "$SED"; then
10245 ac_path_SED_found=false
10246 # Loop through the user's path and test for each of PROGNAME-LIST
10247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10248 for as_dir in $PATH
10250 IFS=$as_save_IFS
10251 test -z "$as_dir" && as_dir=.
10252 for ac_prog in sed gsed; do
10253 for ac_exec_ext in '' $ac_executable_extensions; do
10254 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10255 as_fn_executable_p "$ac_path_SED" || continue
10256 # Check for GNU ac_path_SED and select it if it is found.
10257 # Check for GNU $ac_path_SED
10258 case `"$ac_path_SED" --version 2>&1` in
10259 *GNU*)
10260 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10262 ac_count=0
10263 $as_echo_n 0123456789 >"conftest.in"
10264 while :
10266 cat "conftest.in" "conftest.in" >"conftest.tmp"
10267 mv "conftest.tmp" "conftest.in"
10268 cp "conftest.in" "conftest.nl"
10269 $as_echo '' >> "conftest.nl"
10270 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10271 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10272 as_fn_arith $ac_count + 1 && ac_count=$as_val
10273 if test $ac_count -gt ${ac_path_SED_max-0}; then
10274 # Best one so far, save it but keep looking for a better one
10275 ac_cv_path_SED="$ac_path_SED"
10276 ac_path_SED_max=$ac_count
10278 # 10*(2^10) chars as input seems more than enough
10279 test $ac_count -gt 10 && break
10280 done
10281 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10282 esac
10284 $ac_path_SED_found && break 3
10285 done
10286 done
10287 done
10288 IFS=$as_save_IFS
10289 if test -z "$ac_cv_path_SED"; then
10290 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10292 else
10293 ac_cv_path_SED=$SED
10297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10298 $as_echo "$ac_cv_path_SED" >&6; }
10299 SED="$ac_cv_path_SED"
10300 rm -f conftest.sed
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10304 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10305 if ${ac_cv_path_GREP+:} false; then :
10306 $as_echo_n "(cached) " >&6
10307 else
10308 if test -z "$GREP"; then
10309 ac_path_GREP_found=false
10310 # Loop through the user's path and test for each of PROGNAME-LIST
10311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10312 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10314 IFS=$as_save_IFS
10315 test -z "$as_dir" && as_dir=.
10316 for ac_prog in grep ggrep; do
10317 for ac_exec_ext in '' $ac_executable_extensions; do
10318 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10319 as_fn_executable_p "$ac_path_GREP" || continue
10320 # Check for GNU ac_path_GREP and select it if it is found.
10321 # Check for GNU $ac_path_GREP
10322 case `"$ac_path_GREP" --version 2>&1` in
10323 *GNU*)
10324 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10326 ac_count=0
10327 $as_echo_n 0123456789 >"conftest.in"
10328 while :
10330 cat "conftest.in" "conftest.in" >"conftest.tmp"
10331 mv "conftest.tmp" "conftest.in"
10332 cp "conftest.in" "conftest.nl"
10333 $as_echo 'GREP' >> "conftest.nl"
10334 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10335 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10336 as_fn_arith $ac_count + 1 && ac_count=$as_val
10337 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10338 # Best one so far, save it but keep looking for a better one
10339 ac_cv_path_GREP="$ac_path_GREP"
10340 ac_path_GREP_max=$ac_count
10342 # 10*(2^10) chars as input seems more than enough
10343 test $ac_count -gt 10 && break
10344 done
10345 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10346 esac
10348 $ac_path_GREP_found && break 3
10349 done
10350 done
10351 done
10352 IFS=$as_save_IFS
10353 if test -z "$ac_cv_path_GREP"; then
10354 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10356 else
10357 ac_cv_path_GREP=$GREP
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10362 $as_echo "$ac_cv_path_GREP" >&6; }
10363 GREP="$ac_cv_path_GREP"
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10367 $as_echo_n "checking for egrep... " >&6; }
10368 if ${ac_cv_path_EGREP+:} false; then :
10369 $as_echo_n "(cached) " >&6
10370 else
10371 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10372 then ac_cv_path_EGREP="$GREP -E"
10373 else
10374 if test -z "$EGREP"; then
10375 ac_path_EGREP_found=false
10376 # Loop through the user's path and test for each of PROGNAME-LIST
10377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10378 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10380 IFS=$as_save_IFS
10381 test -z "$as_dir" && as_dir=.
10382 for ac_prog in egrep; do
10383 for ac_exec_ext in '' $ac_executable_extensions; do
10384 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10385 as_fn_executable_p "$ac_path_EGREP" || continue
10386 # Check for GNU ac_path_EGREP and select it if it is found.
10387 # Check for GNU $ac_path_EGREP
10388 case `"$ac_path_EGREP" --version 2>&1` in
10389 *GNU*)
10390 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10392 ac_count=0
10393 $as_echo_n 0123456789 >"conftest.in"
10394 while :
10396 cat "conftest.in" "conftest.in" >"conftest.tmp"
10397 mv "conftest.tmp" "conftest.in"
10398 cp "conftest.in" "conftest.nl"
10399 $as_echo 'EGREP' >> "conftest.nl"
10400 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10401 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10402 as_fn_arith $ac_count + 1 && ac_count=$as_val
10403 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10404 # Best one so far, save it but keep looking for a better one
10405 ac_cv_path_EGREP="$ac_path_EGREP"
10406 ac_path_EGREP_max=$ac_count
10408 # 10*(2^10) chars as input seems more than enough
10409 test $ac_count -gt 10 && break
10410 done
10411 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10412 esac
10414 $ac_path_EGREP_found && break 3
10415 done
10416 done
10417 done
10418 IFS=$as_save_IFS
10419 if test -z "$ac_cv_path_EGREP"; then
10420 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10422 else
10423 ac_cv_path_EGREP=$EGREP
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10429 $as_echo "$ac_cv_path_EGREP" >&6; }
10430 EGREP="$ac_cv_path_EGREP"
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10434 $as_echo_n "checking for ANSI C header files... " >&6; }
10435 if ${ac_cv_header_stdc+:} false; then :
10436 $as_echo_n "(cached) " >&6
10437 else
10438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10439 /* end confdefs.h. */
10440 #include <stdlib.h>
10441 #include <stdarg.h>
10442 #include <string.h>
10443 #include <float.h>
10446 main ()
10450 return 0;
10452 _ACEOF
10453 if ac_fn_c_try_compile "$LINENO"; then :
10454 ac_cv_header_stdc=yes
10455 else
10456 ac_cv_header_stdc=no
10458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10460 if test $ac_cv_header_stdc = yes; then
10461 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10463 /* end confdefs.h. */
10464 #include <string.h>
10466 _ACEOF
10467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10468 $EGREP "memchr" >/dev/null 2>&1; then :
10470 else
10471 ac_cv_header_stdc=no
10473 rm -f conftest*
10477 if test $ac_cv_header_stdc = yes; then
10478 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10480 /* end confdefs.h. */
10481 #include <stdlib.h>
10483 _ACEOF
10484 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10485 $EGREP "free" >/dev/null 2>&1; then :
10487 else
10488 ac_cv_header_stdc=no
10490 rm -f conftest*
10494 if test $ac_cv_header_stdc = yes; then
10495 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10496 if test "$cross_compiling" = yes; then :
10498 else
10499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10500 /* end confdefs.h. */
10501 #include <ctype.h>
10502 #include <stdlib.h>
10503 #if ((' ' & 0x0FF) == 0x020)
10504 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10505 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10506 #else
10507 # define ISLOWER(c) \
10508 (('a' <= (c) && (c) <= 'i') \
10509 || ('j' <= (c) && (c) <= 'r') \
10510 || ('s' <= (c) && (c) <= 'z'))
10511 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10512 #endif
10514 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10516 main ()
10518 int i;
10519 for (i = 0; i < 256; i++)
10520 if (XOR (islower (i), ISLOWER (i))
10521 || toupper (i) != TOUPPER (i))
10522 return 2;
10523 return 0;
10525 _ACEOF
10526 if ac_fn_c_try_run "$LINENO"; then :
10528 else
10529 ac_cv_header_stdc=no
10531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10532 conftest.$ac_objext conftest.beam conftest.$ac_ext
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10538 $as_echo "$ac_cv_header_stdc" >&6; }
10539 if test $ac_cv_header_stdc = yes; then
10541 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10545 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10546 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10547 inttypes.h stdint.h unistd.h
10548 do :
10549 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10550 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10552 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10553 cat >>confdefs.h <<_ACEOF
10554 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10555 _ACEOF
10559 done
10562 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10563 # then
10568 ac_ext=c
10569 ac_cpp='$CPP $CPPFLAGS'
10570 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10571 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10572 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10574 ax_pthread_ok=no
10576 # We used to check for pthread.h first, but this fails if pthread.h
10577 # requires special compiler flags (e.g. on Tru64 or Sequent).
10578 # It gets checked for in the link test anyway.
10580 # First of all, check if the user has set any of the PTHREAD_LIBS,
10581 # etcetera environment variables, and if threads linking works using
10582 # them:
10583 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10584 ax_pthread_save_CC="$CC"
10585 ax_pthread_save_CFLAGS="$CFLAGS"
10586 ax_pthread_save_LIBS="$LIBS"
10587 if test "x$PTHREAD_CC" != "x"; then :
10588 CC="$PTHREAD_CC"
10590 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10591 LIBS="$PTHREAD_LIBS $LIBS"
10592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10593 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10595 /* end confdefs.h. */
10597 /* Override any GCC internal prototype to avoid an error.
10598 Use char because int might match the return type of a GCC
10599 builtin and then its argument prototype would still apply. */
10600 #ifdef __cplusplus
10601 extern "C"
10602 #endif
10603 char pthread_join ();
10605 main ()
10607 return pthread_join ();
10609 return 0;
10611 _ACEOF
10612 if ac_fn_c_try_link "$LINENO"; then :
10613 ax_pthread_ok=yes
10615 rm -f core conftest.err conftest.$ac_objext \
10616 conftest$ac_exeext conftest.$ac_ext
10617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10618 $as_echo "$ax_pthread_ok" >&6; }
10619 if test "x$ax_pthread_ok" = "xno"; then
10620 PTHREAD_LIBS=""
10621 PTHREAD_CFLAGS=""
10623 CC="$ax_pthread_save_CC"
10624 CFLAGS="$ax_pthread_save_CFLAGS"
10625 LIBS="$ax_pthread_save_LIBS"
10628 # We must check for the threads library under a number of different
10629 # names; the ordering is very important because some systems
10630 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10631 # libraries is broken (non-POSIX).
10633 # Create a list of thread flags to try. Items starting with a "-" are
10634 # C compiler flags, and other items are library names, except for "none"
10635 # which indicates that we try without any flags at all, and "pthread-config"
10636 # which is a program returning the flags for the Pth emulation library.
10638 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10640 # The ordering *is* (sometimes) important. Some notes on the
10641 # individual items follow:
10643 # pthreads: AIX (must check this before -lpthread)
10644 # none: in case threads are in libc; should be tried before -Kthread and
10645 # other compiler flags to prevent continual compiler warnings
10646 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10647 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10648 # (Note: HP C rejects this with "bad form for `-t' option")
10649 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10650 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10651 # doesn't hurt to check since this sometimes defines pthreads and
10652 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10653 # is present but should not be used directly; and before -mthreads,
10654 # because the compiler interprets this as "-mt" + "-hreads")
10655 # -mthreads: Mingw32/gcc, Lynx/gcc
10656 # pthread: Linux, etcetera
10657 # --thread-safe: KAI C++
10658 # pthread-config: use pthread-config program (for GNU Pth library)
10660 case $host_os in
10662 freebsd*)
10664 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10665 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10667 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10670 hpux*)
10672 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10673 # multi-threading and also sets -lpthread."
10675 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10678 openedition*)
10680 # IBM z/OS requires a feature-test macro to be defined in order to
10681 # enable POSIX threads at all, so give the user a hint if this is
10682 # not set. (We don't define these ourselves, as they can affect
10683 # other portions of the system API in unpredictable ways.)
10685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10686 /* end confdefs.h. */
10688 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10689 AX_PTHREAD_ZOS_MISSING
10690 # endif
10692 _ACEOF
10693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10694 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10696 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10698 rm -f conftest*
10702 solaris*)
10704 # On Solaris (at least, for some versions), libc contains stubbed
10705 # (non-functional) versions of the pthreads routines, so link-based
10706 # tests will erroneously succeed. (N.B.: The stubs are missing
10707 # pthread_cleanup_push, or rather a function called by this macro,
10708 # so we could check for that, but who knows whether they'll stub
10709 # that too in a future libc.) So we'll check first for the
10710 # standard Solaris way of linking pthreads (-mt -lpthread).
10712 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10714 esac
10716 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10718 if test "x$GCC" = "xyes"; then :
10719 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10722 # The presence of a feature test macro requesting re-entrant function
10723 # definitions is, on some systems, a strong hint that pthreads support is
10724 # correctly enabled
10726 case $host_os in
10727 darwin* | hpux* | linux* | osf* | solaris*)
10728 ax_pthread_check_macro="_REENTRANT"
10731 aix*)
10732 ax_pthread_check_macro="_THREAD_SAFE"
10736 ax_pthread_check_macro="--"
10738 esac
10739 if test "x$ax_pthread_check_macro" = "x--"; then :
10740 ax_pthread_check_cond=0
10741 else
10742 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10745 # Are we compiling with Clang?
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10748 $as_echo_n "checking whether $CC is Clang... " >&6; }
10749 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10750 $as_echo_n "(cached) " >&6
10751 else
10752 ax_cv_PTHREAD_CLANG=no
10753 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10754 if test "x$GCC" = "xyes"; then
10755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10756 /* end confdefs.h. */
10757 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10758 # if defined(__clang__) && defined(__llvm__)
10759 AX_PTHREAD_CC_IS_CLANG
10760 # endif
10762 _ACEOF
10763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10764 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10765 ax_cv_PTHREAD_CLANG=yes
10767 rm -f conftest*
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10773 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10774 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10776 ax_pthread_clang_warning=no
10778 # Clang needs special handling, because older versions handle the -pthread
10779 # option in a rather... idiosyncratic way
10781 if test "x$ax_pthread_clang" = "xyes"; then
10783 # Clang takes -pthread; it has never supported any other flag
10785 # (Note 1: This will need to be revisited if a system that Clang
10786 # supports has POSIX threads in a separate library. This tends not
10787 # to be the way of modern systems, but it's conceivable.)
10789 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10790 # to get POSIX threads support; the API is always present and
10791 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10792 # -pthread does define _REENTRANT, and while the Darwin headers
10793 # ignore this macro, third-party headers might not.)
10795 PTHREAD_CFLAGS="-pthread"
10796 PTHREAD_LIBS=
10798 ax_pthread_ok=yes
10800 # However, older versions of Clang make a point of warning the user
10801 # that, in an invocation where only linking and no compilation is
10802 # taking place, the -pthread option has no effect ("argument unused
10803 # during compilation"). They expect -pthread to be passed in only
10804 # when source code is being compiled.
10806 # Problem is, this is at odds with the way Automake and most other
10807 # C build frameworks function, which is that the same flags used in
10808 # compilation (CFLAGS) are also used in linking. Many systems
10809 # supported by AX_PTHREAD require exactly this for POSIX threads
10810 # support, and in fact it is often not straightforward to specify a
10811 # flag that is used only in the compilation phase and not in
10812 # linking. Such a scenario is extremely rare in practice.
10814 # Even though use of the -pthread flag in linking would only print
10815 # a warning, this can be a nuisance for well-run software projects
10816 # that build with -Werror. So if the active version of Clang has
10817 # this misfeature, we search for an option to squash it.
10819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10820 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10821 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10822 $as_echo_n "(cached) " >&6
10823 else
10824 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10825 # Create an alternate version of $ac_link that compiles and
10826 # links in two steps (.c -> .o, .o -> exe) instead of one
10827 # (.c -> exe), because the warning occurs only in the second
10828 # step
10829 ax_pthread_save_ac_link="$ac_link"
10830 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10831 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10832 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10833 ax_pthread_save_CFLAGS="$CFLAGS"
10834 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10835 if test "x$ax_pthread_try" = "xunknown"; then :
10836 break
10838 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10839 ac_link="$ax_pthread_save_ac_link"
10840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10841 /* end confdefs.h. */
10842 int main(void){return 0;}
10843 _ACEOF
10844 if ac_fn_c_try_link "$LINENO"; then :
10845 ac_link="$ax_pthread_2step_ac_link"
10846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10847 /* end confdefs.h. */
10848 int main(void){return 0;}
10849 _ACEOF
10850 if ac_fn_c_try_link "$LINENO"; then :
10851 break
10853 rm -f core conftest.err conftest.$ac_objext \
10854 conftest$ac_exeext conftest.$ac_ext
10857 rm -f core conftest.err conftest.$ac_objext \
10858 conftest$ac_exeext conftest.$ac_ext
10859 done
10860 ac_link="$ax_pthread_save_ac_link"
10861 CFLAGS="$ax_pthread_save_CFLAGS"
10862 if test "x$ax_pthread_try" = "x"; then :
10863 ax_pthread_try=no
10865 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10869 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10871 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10872 no | unknown) ;;
10873 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10874 esac
10876 fi # $ax_pthread_clang = yes
10878 if test "x$ax_pthread_ok" = "xno"; then
10879 for ax_pthread_try_flag in $ax_pthread_flags; do
10881 case $ax_pthread_try_flag in
10882 none)
10883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10884 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10887 -mt,pthread)
10888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10889 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10890 PTHREAD_CFLAGS="-mt"
10891 PTHREAD_LIBS="-lpthread"
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10896 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10897 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10900 pthread-config)
10901 # Extract the first word of "pthread-config", so it can be a program name with args.
10902 set dummy pthread-config; ac_word=$2
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10904 $as_echo_n "checking for $ac_word... " >&6; }
10905 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10906 $as_echo_n "(cached) " >&6
10907 else
10908 if test -n "$ax_pthread_config"; then
10909 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10910 else
10911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10912 for as_dir in $PATH
10914 IFS=$as_save_IFS
10915 test -z "$as_dir" && as_dir=.
10916 for ac_exec_ext in '' $ac_executable_extensions; do
10917 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10918 ac_cv_prog_ax_pthread_config="yes"
10919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10920 break 2
10922 done
10923 done
10924 IFS=$as_save_IFS
10926 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10929 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10930 if test -n "$ax_pthread_config"; then
10931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10932 $as_echo "$ax_pthread_config" >&6; }
10933 else
10934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10935 $as_echo "no" >&6; }
10939 if test "x$ax_pthread_config" = "xno"; then :
10940 continue
10942 PTHREAD_CFLAGS="`pthread-config --cflags`"
10943 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10948 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10949 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10951 esac
10953 ax_pthread_save_CFLAGS="$CFLAGS"
10954 ax_pthread_save_LIBS="$LIBS"
10955 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10956 LIBS="$PTHREAD_LIBS $LIBS"
10958 # Check for various functions. We must include pthread.h,
10959 # since some functions may be macros. (On the Sequent, we
10960 # need a special flag -Kthread to make this header compile.)
10961 # We check for pthread_join because it is in -lpthread on IRIX
10962 # while pthread_create is in libc. We check for pthread_attr_init
10963 # due to DEC craziness with -lpthreads. We check for
10964 # pthread_cleanup_push because it is one of the few pthread
10965 # functions on Solaris that doesn't have a non-functional libc stub.
10966 # We try pthread_create on general principles.
10968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10969 /* end confdefs.h. */
10970 #include <pthread.h>
10971 # if $ax_pthread_check_cond
10972 # error "$ax_pthread_check_macro must be defined"
10973 # endif
10974 static void routine(void *a) { a = 0; }
10975 static void *start_routine(void *a) { return a; }
10977 main ()
10979 pthread_t th; pthread_attr_t attr;
10980 pthread_create(&th, 0, start_routine, 0);
10981 pthread_join(th, 0);
10982 pthread_attr_init(&attr);
10983 pthread_cleanup_push(routine, 0);
10984 pthread_cleanup_pop(0) /* ; */
10986 return 0;
10988 _ACEOF
10989 if ac_fn_c_try_link "$LINENO"; then :
10990 ax_pthread_ok=yes
10992 rm -f core conftest.err conftest.$ac_objext \
10993 conftest$ac_exeext conftest.$ac_ext
10995 CFLAGS="$ax_pthread_save_CFLAGS"
10996 LIBS="$ax_pthread_save_LIBS"
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10999 $as_echo "$ax_pthread_ok" >&6; }
11000 if test "x$ax_pthread_ok" = "xyes"; then :
11001 break
11004 PTHREAD_LIBS=""
11005 PTHREAD_CFLAGS=""
11006 done
11009 # Various other checks:
11010 if test "x$ax_pthread_ok" = "xyes"; then
11011 ax_pthread_save_CFLAGS="$CFLAGS"
11012 ax_pthread_save_LIBS="$LIBS"
11013 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11014 LIBS="$PTHREAD_LIBS $LIBS"
11016 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11018 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11019 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11020 $as_echo_n "(cached) " >&6
11021 else
11022 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11023 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11025 /* end confdefs.h. */
11026 #include <pthread.h>
11028 main ()
11030 int attr = $ax_pthread_attr; return attr /* ; */
11032 return 0;
11034 _ACEOF
11035 if ac_fn_c_try_link "$LINENO"; then :
11036 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11038 rm -f core conftest.err conftest.$ac_objext \
11039 conftest$ac_exeext conftest.$ac_ext
11040 done
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11044 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11045 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11046 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11047 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11049 cat >>confdefs.h <<_ACEOF
11050 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11051 _ACEOF
11053 ax_pthread_joinable_attr_defined=yes
11057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11058 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11059 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11060 $as_echo_n "(cached) " >&6
11061 else
11062 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11063 case $host_os in
11064 solaris*)
11065 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11067 esac
11070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11071 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11072 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11073 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11074 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11075 ax_pthread_special_flags_added=yes
11078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11079 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11080 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11081 $as_echo_n "(cached) " >&6
11082 else
11083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11084 /* end confdefs.h. */
11085 #include <pthread.h>
11087 main ()
11089 int i = PTHREAD_PRIO_INHERIT;
11091 return 0;
11093 _ACEOF
11094 if ac_fn_c_try_link "$LINENO"; then :
11095 ax_cv_PTHREAD_PRIO_INHERIT=yes
11096 else
11097 ax_cv_PTHREAD_PRIO_INHERIT=no
11099 rm -f core conftest.err conftest.$ac_objext \
11100 conftest$ac_exeext conftest.$ac_ext
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11104 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11105 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11106 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11108 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11110 ax_pthread_prio_inherit_defined=yes
11114 CFLAGS="$ax_pthread_save_CFLAGS"
11115 LIBS="$ax_pthread_save_LIBS"
11117 # More AIX lossage: compile with *_r variant
11118 if test "x$GCC" != "xyes"; then
11119 case $host_os in
11120 aix*)
11121 case "x/$CC" in #(
11122 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11123 #handle absolute path differently from PATH based program lookup
11124 case "x$CC" in #(
11125 x/*) :
11126 if as_fn_executable_p ${CC}_r; then :
11127 PTHREAD_CC="${CC}_r"
11128 fi ;; #(
11129 *) :
11130 for ac_prog in ${CC}_r
11132 # Extract the first word of "$ac_prog", so it can be a program name with args.
11133 set dummy $ac_prog; ac_word=$2
11134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11135 $as_echo_n "checking for $ac_word... " >&6; }
11136 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11137 $as_echo_n "(cached) " >&6
11138 else
11139 if test -n "$PTHREAD_CC"; then
11140 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11141 else
11142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11143 for as_dir in $PATH
11145 IFS=$as_save_IFS
11146 test -z "$as_dir" && as_dir=.
11147 for ac_exec_ext in '' $ac_executable_extensions; do
11148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11149 ac_cv_prog_PTHREAD_CC="$ac_prog"
11150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11151 break 2
11153 done
11154 done
11155 IFS=$as_save_IFS
11159 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11160 if test -n "$PTHREAD_CC"; then
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11162 $as_echo "$PTHREAD_CC" >&6; }
11163 else
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11165 $as_echo "no" >&6; }
11169 test -n "$PTHREAD_CC" && break
11170 done
11171 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11173 esac ;; #(
11174 *) :
11176 esac
11178 esac
11182 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11188 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11189 if test "x$ax_pthread_ok" = "xyes"; then
11191 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11194 else
11195 ax_pthread_ok=no
11198 ac_ext=c
11199 ac_cpp='$CPP $CPPFLAGS'
11200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11204 # set thread flags
11206 # Some platforms use these, so just define them. They can't hurt if they
11207 # are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
11208 # enables 5-arg getpwuid_r, among other things.
11209 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
11211 # Check for *_r functions
11212 _CFLAGS="$CFLAGS"
11213 _LIBS="$LIBS"
11214 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11215 LIBS="$LIBS $PTHREAD_LIBS"
11217 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11218 if test "x$ac_cv_header_pthread_h" = xyes; then :
11220 else
11221 as_fn_error $? "
11222 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11227 for ac_func in strerror_r getpwuid_r gethostbyname_r
11228 do :
11229 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11230 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11231 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11232 cat >>confdefs.h <<_ACEOF
11233 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11234 _ACEOF
11237 done
11240 # Do test here with the proper thread flags
11241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11242 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11243 if ${pgac_cv_func_strerror_r_int+:} false; then :
11244 $as_echo_n "(cached) " >&6
11245 else
11246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11247 /* end confdefs.h. */
11248 #include <string.h>
11250 main ()
11252 char buf[100];
11253 switch (strerror_r(1, buf, sizeof(buf)))
11254 { case 0: break; default: break; }
11257 return 0;
11259 _ACEOF
11260 if ac_fn_c_try_compile "$LINENO"; then :
11261 pgac_cv_func_strerror_r_int=yes
11262 else
11263 pgac_cv_func_strerror_r_int=no
11265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11268 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11269 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11271 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11276 CFLAGS="$_CFLAGS"
11277 LIBS="$_LIBS"
11280 else
11281 # else
11282 # do not use values from template file
11283 PTHREAD_CFLAGS=
11284 PTHREAD_LIBS=
11286 fi # fi
11293 ## Libraries
11295 ## Most libraries are included only if they demonstrably provide a function
11296 ## we need, but libm is an exception: always include it, because there are
11297 ## too many compilers that play cute optimization games that will break
11298 ## probes for standard functions such as pow().
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11302 $as_echo_n "checking for main in -lm... " >&6; }
11303 if ${ac_cv_lib_m_main+:} false; then :
11304 $as_echo_n "(cached) " >&6
11305 else
11306 ac_check_lib_save_LIBS=$LIBS
11307 LIBS="-lm $LIBS"
11308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11309 /* end confdefs.h. */
11313 main ()
11315 return main ();
11317 return 0;
11319 _ACEOF
11320 if ac_fn_c_try_link "$LINENO"; then :
11321 ac_cv_lib_m_main=yes
11322 else
11323 ac_cv_lib_m_main=no
11325 rm -f core conftest.err conftest.$ac_objext \
11326 conftest$ac_exeext conftest.$ac_ext
11327 LIBS=$ac_check_lib_save_LIBS
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11330 $as_echo "$ac_cv_lib_m_main" >&6; }
11331 if test "x$ac_cv_lib_m_main" = xyes; then :
11332 cat >>confdefs.h <<_ACEOF
11333 #define HAVE_LIBM 1
11334 _ACEOF
11336 LIBS="-lm $LIBS"
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11341 $as_echo_n "checking for library containing setproctitle... " >&6; }
11342 if ${ac_cv_search_setproctitle+:} false; then :
11343 $as_echo_n "(cached) " >&6
11344 else
11345 ac_func_search_save_LIBS=$LIBS
11346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11347 /* end confdefs.h. */
11349 /* Override any GCC internal prototype to avoid an error.
11350 Use char because int might match the return type of a GCC
11351 builtin and then its argument prototype would still apply. */
11352 #ifdef __cplusplus
11353 extern "C"
11354 #endif
11355 char setproctitle ();
11357 main ()
11359 return setproctitle ();
11361 return 0;
11363 _ACEOF
11364 for ac_lib in '' util; do
11365 if test -z "$ac_lib"; then
11366 ac_res="none required"
11367 else
11368 ac_res=-l$ac_lib
11369 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11371 if ac_fn_c_try_link "$LINENO"; then :
11372 ac_cv_search_setproctitle=$ac_res
11374 rm -f core conftest.err conftest.$ac_objext \
11375 conftest$ac_exeext
11376 if ${ac_cv_search_setproctitle+:} false; then :
11377 break
11379 done
11380 if ${ac_cv_search_setproctitle+:} false; then :
11382 else
11383 ac_cv_search_setproctitle=no
11385 rm conftest.$ac_ext
11386 LIBS=$ac_func_search_save_LIBS
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11389 $as_echo "$ac_cv_search_setproctitle" >&6; }
11390 ac_res=$ac_cv_search_setproctitle
11391 if test "$ac_res" != no; then :
11392 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11397 $as_echo_n "checking for library containing dlopen... " >&6; }
11398 if ${ac_cv_search_dlopen+:} false; then :
11399 $as_echo_n "(cached) " >&6
11400 else
11401 ac_func_search_save_LIBS=$LIBS
11402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11403 /* end confdefs.h. */
11405 /* Override any GCC internal prototype to avoid an error.
11406 Use char because int might match the return type of a GCC
11407 builtin and then its argument prototype would still apply. */
11408 #ifdef __cplusplus
11409 extern "C"
11410 #endif
11411 char dlopen ();
11413 main ()
11415 return dlopen ();
11417 return 0;
11419 _ACEOF
11420 for ac_lib in '' dl; do
11421 if test -z "$ac_lib"; then
11422 ac_res="none required"
11423 else
11424 ac_res=-l$ac_lib
11425 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11427 if ac_fn_c_try_link "$LINENO"; then :
11428 ac_cv_search_dlopen=$ac_res
11430 rm -f core conftest.err conftest.$ac_objext \
11431 conftest$ac_exeext
11432 if ${ac_cv_search_dlopen+:} false; then :
11433 break
11435 done
11436 if ${ac_cv_search_dlopen+:} false; then :
11438 else
11439 ac_cv_search_dlopen=no
11441 rm conftest.$ac_ext
11442 LIBS=$ac_func_search_save_LIBS
11444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11445 $as_echo "$ac_cv_search_dlopen" >&6; }
11446 ac_res=$ac_cv_search_dlopen
11447 if test "$ac_res" != no; then :
11448 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11453 $as_echo_n "checking for library containing socket... " >&6; }
11454 if ${ac_cv_search_socket+:} false; then :
11455 $as_echo_n "(cached) " >&6
11456 else
11457 ac_func_search_save_LIBS=$LIBS
11458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11459 /* end confdefs.h. */
11461 /* Override any GCC internal prototype to avoid an error.
11462 Use char because int might match the return type of a GCC
11463 builtin and then its argument prototype would still apply. */
11464 #ifdef __cplusplus
11465 extern "C"
11466 #endif
11467 char socket ();
11469 main ()
11471 return socket ();
11473 return 0;
11475 _ACEOF
11476 for ac_lib in '' socket ws2_32; do
11477 if test -z "$ac_lib"; then
11478 ac_res="none required"
11479 else
11480 ac_res=-l$ac_lib
11481 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11483 if ac_fn_c_try_link "$LINENO"; then :
11484 ac_cv_search_socket=$ac_res
11486 rm -f core conftest.err conftest.$ac_objext \
11487 conftest$ac_exeext
11488 if ${ac_cv_search_socket+:} false; then :
11489 break
11491 done
11492 if ${ac_cv_search_socket+:} false; then :
11494 else
11495 ac_cv_search_socket=no
11497 rm conftest.$ac_ext
11498 LIBS=$ac_func_search_save_LIBS
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11501 $as_echo "$ac_cv_search_socket" >&6; }
11502 ac_res=$ac_cv_search_socket
11503 if test "$ac_res" != no; then :
11504 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11509 $as_echo_n "checking for library containing shl_load... " >&6; }
11510 if ${ac_cv_search_shl_load+:} false; then :
11511 $as_echo_n "(cached) " >&6
11512 else
11513 ac_func_search_save_LIBS=$LIBS
11514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11515 /* end confdefs.h. */
11517 /* Override any GCC internal prototype to avoid an error.
11518 Use char because int might match the return type of a GCC
11519 builtin and then its argument prototype would still apply. */
11520 #ifdef __cplusplus
11521 extern "C"
11522 #endif
11523 char shl_load ();
11525 main ()
11527 return shl_load ();
11529 return 0;
11531 _ACEOF
11532 for ac_lib in '' dld; do
11533 if test -z "$ac_lib"; then
11534 ac_res="none required"
11535 else
11536 ac_res=-l$ac_lib
11537 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11539 if ac_fn_c_try_link "$LINENO"; then :
11540 ac_cv_search_shl_load=$ac_res
11542 rm -f core conftest.err conftest.$ac_objext \
11543 conftest$ac_exeext
11544 if ${ac_cv_search_shl_load+:} false; then :
11545 break
11547 done
11548 if ${ac_cv_search_shl_load+:} false; then :
11550 else
11551 ac_cv_search_shl_load=no
11553 rm conftest.$ac_ext
11554 LIBS=$ac_func_search_save_LIBS
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11557 $as_echo "$ac_cv_search_shl_load" >&6; }
11558 ac_res=$ac_cv_search_shl_load
11559 if test "$ac_res" != no; then :
11560 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11565 $as_echo_n "checking for library containing getopt_long... " >&6; }
11566 if ${ac_cv_search_getopt_long+:} false; then :
11567 $as_echo_n "(cached) " >&6
11568 else
11569 ac_func_search_save_LIBS=$LIBS
11570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11571 /* end confdefs.h. */
11573 /* Override any GCC internal prototype to avoid an error.
11574 Use char because int might match the return type of a GCC
11575 builtin and then its argument prototype would still apply. */
11576 #ifdef __cplusplus
11577 extern "C"
11578 #endif
11579 char getopt_long ();
11581 main ()
11583 return getopt_long ();
11585 return 0;
11587 _ACEOF
11588 for ac_lib in '' getopt gnugetopt; do
11589 if test -z "$ac_lib"; then
11590 ac_res="none required"
11591 else
11592 ac_res=-l$ac_lib
11593 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11595 if ac_fn_c_try_link "$LINENO"; then :
11596 ac_cv_search_getopt_long=$ac_res
11598 rm -f core conftest.err conftest.$ac_objext \
11599 conftest$ac_exeext
11600 if ${ac_cv_search_getopt_long+:} false; then :
11601 break
11603 done
11604 if ${ac_cv_search_getopt_long+:} false; then :
11606 else
11607 ac_cv_search_getopt_long=no
11609 rm conftest.$ac_ext
11610 LIBS=$ac_func_search_save_LIBS
11612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11613 $as_echo "$ac_cv_search_getopt_long" >&6; }
11614 ac_res=$ac_cv_search_getopt_long
11615 if test "$ac_res" != no; then :
11616 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11621 $as_echo_n "checking for library containing shm_open... " >&6; }
11622 if ${ac_cv_search_shm_open+:} false; then :
11623 $as_echo_n "(cached) " >&6
11624 else
11625 ac_func_search_save_LIBS=$LIBS
11626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11627 /* end confdefs.h. */
11629 /* Override any GCC internal prototype to avoid an error.
11630 Use char because int might match the return type of a GCC
11631 builtin and then its argument prototype would still apply. */
11632 #ifdef __cplusplus
11633 extern "C"
11634 #endif
11635 char shm_open ();
11637 main ()
11639 return shm_open ();
11641 return 0;
11643 _ACEOF
11644 for ac_lib in '' rt; do
11645 if test -z "$ac_lib"; then
11646 ac_res="none required"
11647 else
11648 ac_res=-l$ac_lib
11649 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11651 if ac_fn_c_try_link "$LINENO"; then :
11652 ac_cv_search_shm_open=$ac_res
11654 rm -f core conftest.err conftest.$ac_objext \
11655 conftest$ac_exeext
11656 if ${ac_cv_search_shm_open+:} false; then :
11657 break
11659 done
11660 if ${ac_cv_search_shm_open+:} false; then :
11662 else
11663 ac_cv_search_shm_open=no
11665 rm conftest.$ac_ext
11666 LIBS=$ac_func_search_save_LIBS
11668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11669 $as_echo "$ac_cv_search_shm_open" >&6; }
11670 ac_res=$ac_cv_search_shm_open
11671 if test "$ac_res" != no; then :
11672 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11677 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11678 if ${ac_cv_search_shm_unlink+:} false; then :
11679 $as_echo_n "(cached) " >&6
11680 else
11681 ac_func_search_save_LIBS=$LIBS
11682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11683 /* end confdefs.h. */
11685 /* Override any GCC internal prototype to avoid an error.
11686 Use char because int might match the return type of a GCC
11687 builtin and then its argument prototype would still apply. */
11688 #ifdef __cplusplus
11689 extern "C"
11690 #endif
11691 char shm_unlink ();
11693 main ()
11695 return shm_unlink ();
11697 return 0;
11699 _ACEOF
11700 for ac_lib in '' rt; do
11701 if test -z "$ac_lib"; then
11702 ac_res="none required"
11703 else
11704 ac_res=-l$ac_lib
11705 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11707 if ac_fn_c_try_link "$LINENO"; then :
11708 ac_cv_search_shm_unlink=$ac_res
11710 rm -f core conftest.err conftest.$ac_objext \
11711 conftest$ac_exeext
11712 if ${ac_cv_search_shm_unlink+:} false; then :
11713 break
11715 done
11716 if ${ac_cv_search_shm_unlink+:} false; then :
11718 else
11719 ac_cv_search_shm_unlink=no
11721 rm conftest.$ac_ext
11722 LIBS=$ac_func_search_save_LIBS
11724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11725 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11726 ac_res=$ac_cv_search_shm_unlink
11727 if test "$ac_res" != no; then :
11728 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11733 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11734 if ${ac_cv_search_clock_gettime+:} false; then :
11735 $as_echo_n "(cached) " >&6
11736 else
11737 ac_func_search_save_LIBS=$LIBS
11738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11739 /* end confdefs.h. */
11741 /* Override any GCC internal prototype to avoid an error.
11742 Use char because int might match the return type of a GCC
11743 builtin and then its argument prototype would still apply. */
11744 #ifdef __cplusplus
11745 extern "C"
11746 #endif
11747 char clock_gettime ();
11749 main ()
11751 return clock_gettime ();
11753 return 0;
11755 _ACEOF
11756 for ac_lib in '' rt posix4; do
11757 if test -z "$ac_lib"; then
11758 ac_res="none required"
11759 else
11760 ac_res=-l$ac_lib
11761 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11763 if ac_fn_c_try_link "$LINENO"; then :
11764 ac_cv_search_clock_gettime=$ac_res
11766 rm -f core conftest.err conftest.$ac_objext \
11767 conftest$ac_exeext
11768 if ${ac_cv_search_clock_gettime+:} false; then :
11769 break
11771 done
11772 if ${ac_cv_search_clock_gettime+:} false; then :
11774 else
11775 ac_cv_search_clock_gettime=no
11777 rm conftest.$ac_ext
11778 LIBS=$ac_func_search_save_LIBS
11780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11781 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11782 ac_res=$ac_cv_search_clock_gettime
11783 if test "$ac_res" != no; then :
11784 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11788 # Solaris:
11789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11790 $as_echo_n "checking for library containing fdatasync... " >&6; }
11791 if ${ac_cv_search_fdatasync+:} false; then :
11792 $as_echo_n "(cached) " >&6
11793 else
11794 ac_func_search_save_LIBS=$LIBS
11795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11796 /* end confdefs.h. */
11798 /* Override any GCC internal prototype to avoid an error.
11799 Use char because int might match the return type of a GCC
11800 builtin and then its argument prototype would still apply. */
11801 #ifdef __cplusplus
11802 extern "C"
11803 #endif
11804 char fdatasync ();
11806 main ()
11808 return fdatasync ();
11810 return 0;
11812 _ACEOF
11813 for ac_lib in '' rt posix4; do
11814 if test -z "$ac_lib"; then
11815 ac_res="none required"
11816 else
11817 ac_res=-l$ac_lib
11818 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11820 if ac_fn_c_try_link "$LINENO"; then :
11821 ac_cv_search_fdatasync=$ac_res
11823 rm -f core conftest.err conftest.$ac_objext \
11824 conftest$ac_exeext
11825 if ${ac_cv_search_fdatasync+:} false; then :
11826 break
11828 done
11829 if ${ac_cv_search_fdatasync+:} false; then :
11831 else
11832 ac_cv_search_fdatasync=no
11834 rm conftest.$ac_ext
11835 LIBS=$ac_func_search_save_LIBS
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11838 $as_echo "$ac_cv_search_fdatasync" >&6; }
11839 ac_res=$ac_cv_search_fdatasync
11840 if test "$ac_res" != no; then :
11841 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11845 # Required for thread_test.c on Solaris
11846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11847 $as_echo_n "checking for library containing sched_yield... " >&6; }
11848 if ${ac_cv_search_sched_yield+:} false; then :
11849 $as_echo_n "(cached) " >&6
11850 else
11851 ac_func_search_save_LIBS=$LIBS
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h. */
11855 /* Override any GCC internal prototype to avoid an error.
11856 Use char because int might match the return type of a GCC
11857 builtin and then its argument prototype would still apply. */
11858 #ifdef __cplusplus
11859 extern "C"
11860 #endif
11861 char sched_yield ();
11863 main ()
11865 return sched_yield ();
11867 return 0;
11869 _ACEOF
11870 for ac_lib in '' rt; do
11871 if test -z "$ac_lib"; then
11872 ac_res="none required"
11873 else
11874 ac_res=-l$ac_lib
11875 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11877 if ac_fn_c_try_link "$LINENO"; then :
11878 ac_cv_search_sched_yield=$ac_res
11880 rm -f core conftest.err conftest.$ac_objext \
11881 conftest$ac_exeext
11882 if ${ac_cv_search_sched_yield+:} false; then :
11883 break
11885 done
11886 if ${ac_cv_search_sched_yield+:} false; then :
11888 else
11889 ac_cv_search_sched_yield=no
11891 rm conftest.$ac_ext
11892 LIBS=$ac_func_search_save_LIBS
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11895 $as_echo "$ac_cv_search_sched_yield" >&6; }
11896 ac_res=$ac_cv_search_sched_yield
11897 if test "$ac_res" != no; then :
11898 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11902 # Required for thread_test.c on Solaris 2.5:
11903 # Other ports use it too (HP-UX) so test unconditionally
11904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11905 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11906 if ${ac_cv_search_gethostbyname_r+:} 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 gethostbyname_r ();
11921 main ()
11923 return gethostbyname_r ();
11925 return 0;
11927 _ACEOF
11928 for ac_lib in '' nsl; 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_gethostbyname_r=$ac_res
11938 rm -f core conftest.err conftest.$ac_objext \
11939 conftest$ac_exeext
11940 if ${ac_cv_search_gethostbyname_r+:} false; then :
11941 break
11943 done
11944 if ${ac_cv_search_gethostbyname_r+:} false; then :
11946 else
11947 ac_cv_search_gethostbyname_r=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_gethostbyname_r" >&5
11953 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11954 ac_res=$ac_cv_search_gethostbyname_r
11955 if test "$ac_res" != no; then :
11956 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11960 # Cygwin:
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11962 $as_echo_n "checking for library containing shmget... " >&6; }
11963 if ${ac_cv_search_shmget+:} 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 shmget ();
11978 main ()
11980 return shmget ();
11982 return 0;
11984 _ACEOF
11985 for ac_lib in '' cygipc; 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_shmget=$ac_res
11995 rm -f core conftest.err conftest.$ac_objext \
11996 conftest$ac_exeext
11997 if ${ac_cv_search_shmget+:} false; then :
11998 break
12000 done
12001 if ${ac_cv_search_shmget+:} false; then :
12003 else
12004 ac_cv_search_shmget=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_shmget" >&5
12010 $as_echo "$ac_cv_search_shmget" >&6; }
12011 ac_res=$ac_cv_search_shmget
12012 if test "$ac_res" != no; then :
12013 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12017 # *BSD:
12018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12019 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12020 if ${ac_cv_search_backtrace_symbols+:} 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 backtrace_symbols ();
12035 main ()
12037 return backtrace_symbols ();
12039 return 0;
12041 _ACEOF
12042 for ac_lib in '' execinfo; 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_backtrace_symbols=$ac_res
12052 rm -f core conftest.err conftest.$ac_objext \
12053 conftest$ac_exeext
12054 if ${ac_cv_search_backtrace_symbols+:} false; then :
12055 break
12057 done
12058 if ${ac_cv_search_backtrace_symbols+:} false; then :
12060 else
12061 ac_cv_search_backtrace_symbols=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_backtrace_symbols" >&5
12067 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12068 ac_res=$ac_cv_search_backtrace_symbols
12069 if test "$ac_res" != no; then :
12070 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12075 if test "$enable_thread_safety" = yes; then
12076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12077 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12078 if ${ac_cv_search_pthread_barrier_wait+:} 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 pthread_barrier_wait ();
12093 main ()
12095 return pthread_barrier_wait ();
12097 return 0;
12099 _ACEOF
12100 for ac_lib in '' pthread; 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_pthread_barrier_wait=$ac_res
12110 rm -f core conftest.err conftest.$ac_objext \
12111 conftest$ac_exeext
12112 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12113 break
12115 done
12116 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12118 else
12119 ac_cv_search_pthread_barrier_wait=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_pthread_barrier_wait" >&5
12125 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12126 ac_res=$ac_cv_search_pthread_barrier_wait
12127 if test "$ac_res" != no; then :
12128 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12134 if test "$with_readline" = yes; then
12137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12138 $as_echo_n "checking for library containing readline... " >&6; }
12139 if ${pgac_cv_check_readline+:} false; then :
12140 $as_echo_n "(cached) " >&6
12141 else
12142 pgac_cv_check_readline=no
12143 pgac_save_LIBS=$LIBS
12144 if test x"$with_libedit_preferred" != x"yes"
12145 then READLINE_ORDER="-lreadline -ledit"
12146 else READLINE_ORDER="-ledit -lreadline"
12148 for pgac_rllib in $READLINE_ORDER ; do
12149 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12150 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12152 /* end confdefs.h. */
12154 /* Override any GCC internal prototype to avoid an error.
12155 Use char because int might match the return type of a GCC
12156 builtin and then its argument prototype would still apply. */
12157 #ifdef __cplusplus
12158 extern "C"
12159 #endif
12160 char readline ();
12162 main ()
12164 return readline ();
12166 return 0;
12168 _ACEOF
12169 if ac_fn_c_try_link "$LINENO"; then :
12171 # Older NetBSD and OpenBSD have a broken linker that does not
12172 # recognize dependent libraries; assume curses is needed if we didn't
12173 # find any dependency.
12174 case $host_os in
12175 netbsd* | openbsd*)
12176 if test x"$pgac_lib" = x"" ; then
12177 pgac_lib=" -lcurses"
12178 fi ;;
12179 esac
12181 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12182 break
12185 rm -f core conftest.err conftest.$ac_objext \
12186 conftest$ac_exeext conftest.$ac_ext
12187 done
12188 if test "$pgac_cv_check_readline" != no ; then
12189 break
12191 done
12192 LIBS=$pgac_save_LIBS
12195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12196 $as_echo "$pgac_cv_check_readline" >&6; }
12197 if test "$pgac_cv_check_readline" != no ; then
12198 LIBS="$pgac_cv_check_readline $LIBS"
12200 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12205 if test x"$pgac_cv_check_readline" = x"no"; then
12206 as_fn_error $? "readline library not found
12207 If you have readline already installed, see config.log for details on the
12208 failure. It is possible the compiler isn't looking in the proper directory.
12209 Use --without-readline to disable readline support." "$LINENO" 5
12213 if test "$with_zlib" = yes; then
12214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12215 $as_echo_n "checking for inflate in -lz... " >&6; }
12216 if ${ac_cv_lib_z_inflate+:} false; then :
12217 $as_echo_n "(cached) " >&6
12218 else
12219 ac_check_lib_save_LIBS=$LIBS
12220 LIBS="-lz $LIBS"
12221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12222 /* end confdefs.h. */
12224 /* Override any GCC internal prototype to avoid an error.
12225 Use char because int might match the return type of a GCC
12226 builtin and then its argument prototype would still apply. */
12227 #ifdef __cplusplus
12228 extern "C"
12229 #endif
12230 char inflate ();
12232 main ()
12234 return inflate ();
12236 return 0;
12238 _ACEOF
12239 if ac_fn_c_try_link "$LINENO"; then :
12240 ac_cv_lib_z_inflate=yes
12241 else
12242 ac_cv_lib_z_inflate=no
12244 rm -f core conftest.err conftest.$ac_objext \
12245 conftest$ac_exeext conftest.$ac_ext
12246 LIBS=$ac_check_lib_save_LIBS
12248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12249 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12250 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12251 cat >>confdefs.h <<_ACEOF
12252 #define HAVE_LIBZ 1
12253 _ACEOF
12255 LIBS="-lz $LIBS"
12257 else
12258 as_fn_error $? "zlib library not found
12259 If you have zlib already installed, see config.log for details on the
12260 failure. It is possible the compiler isn't looking in the proper directory.
12261 Use --without-zlib to disable zlib support." "$LINENO" 5
12266 if test "$enable_spinlocks" = yes; then
12268 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12270 else
12271 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12272 *** Not using spinlocks will cause poor performance." >&5
12273 $as_echo "$as_me: WARNING:
12274 *** Not using spinlocks will cause poor performance." >&2;}
12277 if test "$enable_atomics" = yes; then
12279 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12281 else
12282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12283 *** Not using atomic operations will cause poor performance." >&5
12284 $as_echo "$as_me: WARNING:
12285 *** Not using atomic operations will cause poor performance." >&2;}
12288 if test "$with_gssapi" = yes ; then
12289 if test "$PORTNAME" != "win32"; then
12290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12291 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12292 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12293 $as_echo_n "(cached) " >&6
12294 else
12295 ac_func_search_save_LIBS=$LIBS
12296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12297 /* end confdefs.h. */
12299 /* Override any GCC internal prototype to avoid an error.
12300 Use char because int might match the return type of a GCC
12301 builtin and then its argument prototype would still apply. */
12302 #ifdef __cplusplus
12303 extern "C"
12304 #endif
12305 char gss_init_sec_context ();
12307 main ()
12309 return gss_init_sec_context ();
12311 return 0;
12313 _ACEOF
12314 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12315 if test -z "$ac_lib"; then
12316 ac_res="none required"
12317 else
12318 ac_res=-l$ac_lib
12319 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12321 if ac_fn_c_try_link "$LINENO"; then :
12322 ac_cv_search_gss_init_sec_context=$ac_res
12324 rm -f core conftest.err conftest.$ac_objext \
12325 conftest$ac_exeext
12326 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12327 break
12329 done
12330 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12332 else
12333 ac_cv_search_gss_init_sec_context=no
12335 rm conftest.$ac_ext
12336 LIBS=$ac_func_search_save_LIBS
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12339 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12340 ac_res=$ac_cv_search_gss_init_sec_context
12341 if test "$ac_res" != no; then :
12342 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12344 else
12345 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12348 else
12349 LIBS="$LIBS -lgssapi32"
12354 # SSL Library
12356 # There is currently only one supported SSL/TLS library: OpenSSL.
12361 # Check whether --with-ssl was given.
12362 if test "${with_ssl+set}" = set; then :
12363 withval=$with_ssl;
12364 case $withval in
12365 yes)
12366 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12369 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12374 esac
12379 if test x"$with_ssl" = x"" ; then
12380 with_ssl=no
12385 # Check whether --with-openssl was given.
12386 if test "${with_openssl+set}" = set; then :
12387 withval=$with_openssl;
12388 case $withval in
12389 yes)
12396 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12398 esac
12400 else
12401 with_openssl=no
12406 if test "$with_openssl" = yes ; then
12407 with_ssl=openssl
12410 if test "$with_ssl" = openssl ; then
12411 # Minimum required OpenSSL version is 1.0.1
12413 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12415 if test "$PORTNAME" != "win32"; then
12416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12417 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12418 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12419 $as_echo_n "(cached) " >&6
12420 else
12421 ac_check_lib_save_LIBS=$LIBS
12422 LIBS="-lcrypto $LIBS"
12423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12424 /* end confdefs.h. */
12426 /* Override any GCC internal prototype to avoid an error.
12427 Use char because int might match the return type of a GCC
12428 builtin and then its argument prototype would still apply. */
12429 #ifdef __cplusplus
12430 extern "C"
12431 #endif
12432 char CRYPTO_new_ex_data ();
12434 main ()
12436 return CRYPTO_new_ex_data ();
12438 return 0;
12440 _ACEOF
12441 if ac_fn_c_try_link "$LINENO"; then :
12442 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12443 else
12444 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12446 rm -f core conftest.err conftest.$ac_objext \
12447 conftest$ac_exeext conftest.$ac_ext
12448 LIBS=$ac_check_lib_save_LIBS
12450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12451 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12452 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12453 cat >>confdefs.h <<_ACEOF
12454 #define HAVE_LIBCRYPTO 1
12455 _ACEOF
12457 LIBS="-lcrypto $LIBS"
12459 else
12460 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12464 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12465 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12466 $as_echo_n "(cached) " >&6
12467 else
12468 ac_check_lib_save_LIBS=$LIBS
12469 LIBS="-lssl $LIBS"
12470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12471 /* end confdefs.h. */
12473 /* Override any GCC internal prototype to avoid an error.
12474 Use char because int might match the return type of a GCC
12475 builtin and then its argument prototype would still apply. */
12476 #ifdef __cplusplus
12477 extern "C"
12478 #endif
12479 char SSL_new ();
12481 main ()
12483 return SSL_new ();
12485 return 0;
12487 _ACEOF
12488 if ac_fn_c_try_link "$LINENO"; then :
12489 ac_cv_lib_ssl_SSL_new=yes
12490 else
12491 ac_cv_lib_ssl_SSL_new=no
12493 rm -f core conftest.err conftest.$ac_objext \
12494 conftest$ac_exeext conftest.$ac_ext
12495 LIBS=$ac_check_lib_save_LIBS
12497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12498 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12499 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12500 cat >>confdefs.h <<_ACEOF
12501 #define HAVE_LIBSSL 1
12502 _ACEOF
12504 LIBS="-lssl $LIBS"
12506 else
12507 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12510 else
12511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12512 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12513 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12514 $as_echo_n "(cached) " >&6
12515 else
12516 ac_func_search_save_LIBS=$LIBS
12517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12518 /* end confdefs.h. */
12520 /* Override any GCC internal prototype to avoid an error.
12521 Use char because int might match the return type of a GCC
12522 builtin and then its argument prototype would still apply. */
12523 #ifdef __cplusplus
12524 extern "C"
12525 #endif
12526 char CRYPTO_new_ex_data ();
12528 main ()
12530 return CRYPTO_new_ex_data ();
12532 return 0;
12534 _ACEOF
12535 for ac_lib in '' eay32 crypto; do
12536 if test -z "$ac_lib"; then
12537 ac_res="none required"
12538 else
12539 ac_res=-l$ac_lib
12540 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12542 if ac_fn_c_try_link "$LINENO"; then :
12543 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12545 rm -f core conftest.err conftest.$ac_objext \
12546 conftest$ac_exeext
12547 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12548 break
12550 done
12551 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12553 else
12554 ac_cv_search_CRYPTO_new_ex_data=no
12556 rm conftest.$ac_ext
12557 LIBS=$ac_func_search_save_LIBS
12559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12560 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12561 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12562 if test "$ac_res" != no; then :
12563 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12565 else
12566 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12570 $as_echo_n "checking for library containing SSL_new... " >&6; }
12571 if ${ac_cv_search_SSL_new+:} false; then :
12572 $as_echo_n "(cached) " >&6
12573 else
12574 ac_func_search_save_LIBS=$LIBS
12575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12576 /* end confdefs.h. */
12578 /* Override any GCC internal prototype to avoid an error.
12579 Use char because int might match the return type of a GCC
12580 builtin and then its argument prototype would still apply. */
12581 #ifdef __cplusplus
12582 extern "C"
12583 #endif
12584 char SSL_new ();
12586 main ()
12588 return SSL_new ();
12590 return 0;
12592 _ACEOF
12593 for ac_lib in '' ssleay32 ssl; do
12594 if test -z "$ac_lib"; then
12595 ac_res="none required"
12596 else
12597 ac_res=-l$ac_lib
12598 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12600 if ac_fn_c_try_link "$LINENO"; then :
12601 ac_cv_search_SSL_new=$ac_res
12603 rm -f core conftest.err conftest.$ac_objext \
12604 conftest$ac_exeext
12605 if ${ac_cv_search_SSL_new+:} false; then :
12606 break
12608 done
12609 if ${ac_cv_search_SSL_new+:} false; then :
12611 else
12612 ac_cv_search_SSL_new=no
12614 rm conftest.$ac_ext
12615 LIBS=$ac_func_search_save_LIBS
12617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12618 $as_echo "$ac_cv_search_SSL_new" >&6; }
12619 ac_res=$ac_cv_search_SSL_new
12620 if test "$ac_res" != no; then :
12621 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12623 else
12624 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12628 # Function introduced in OpenSSL 1.0.2.
12629 for ac_func in X509_get_signature_nid
12630 do :
12631 ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
12632 if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
12633 cat >>confdefs.h <<_ACEOF
12634 #define HAVE_X509_GET_SIGNATURE_NID 1
12635 _ACEOF
12638 done
12640 # Functions introduced in OpenSSL 1.1.0. We used to check for
12641 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12642 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12643 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12644 # functions.
12645 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12646 do :
12647 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12648 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12649 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12650 cat >>confdefs.h <<_ACEOF
12651 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12652 _ACEOF
12655 done
12657 # OpenSSL versions before 1.1.0 required setting callback functions, for
12658 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12659 # function was removed.
12660 for ac_func in CRYPTO_lock
12661 do :
12662 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12663 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12664 cat >>confdefs.h <<_ACEOF
12665 #define HAVE_CRYPTO_LOCK 1
12666 _ACEOF
12669 done
12672 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12674 elif test "$with_ssl" != no ; then
12675 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12679 if test "$with_pam" = yes ; then
12680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12681 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12682 if ${ac_cv_lib_pam_pam_start+:} false; then :
12683 $as_echo_n "(cached) " >&6
12684 else
12685 ac_check_lib_save_LIBS=$LIBS
12686 LIBS="-lpam $LIBS"
12687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12688 /* end confdefs.h. */
12690 /* Override any GCC internal prototype to avoid an error.
12691 Use char because int might match the return type of a GCC
12692 builtin and then its argument prototype would still apply. */
12693 #ifdef __cplusplus
12694 extern "C"
12695 #endif
12696 char pam_start ();
12698 main ()
12700 return pam_start ();
12702 return 0;
12704 _ACEOF
12705 if ac_fn_c_try_link "$LINENO"; then :
12706 ac_cv_lib_pam_pam_start=yes
12707 else
12708 ac_cv_lib_pam_pam_start=no
12710 rm -f core conftest.err conftest.$ac_objext \
12711 conftest$ac_exeext conftest.$ac_ext
12712 LIBS=$ac_check_lib_save_LIBS
12714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12715 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12716 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12717 cat >>confdefs.h <<_ACEOF
12718 #define HAVE_LIBPAM 1
12719 _ACEOF
12721 LIBS="-lpam $LIBS"
12723 else
12724 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12729 if test "$with_libxml" = yes ; then
12730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12731 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12732 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12733 $as_echo_n "(cached) " >&6
12734 else
12735 ac_check_lib_save_LIBS=$LIBS
12736 LIBS="-lxml2 $LIBS"
12737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12738 /* end confdefs.h. */
12740 /* Override any GCC internal prototype to avoid an error.
12741 Use char because int might match the return type of a GCC
12742 builtin and then its argument prototype would still apply. */
12743 #ifdef __cplusplus
12744 extern "C"
12745 #endif
12746 char xmlSaveToBuffer ();
12748 main ()
12750 return xmlSaveToBuffer ();
12752 return 0;
12754 _ACEOF
12755 if ac_fn_c_try_link "$LINENO"; then :
12756 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12757 else
12758 ac_cv_lib_xml2_xmlSaveToBuffer=no
12760 rm -f core conftest.err conftest.$ac_objext \
12761 conftest$ac_exeext conftest.$ac_ext
12762 LIBS=$ac_check_lib_save_LIBS
12764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12765 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12766 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12767 cat >>confdefs.h <<_ACEOF
12768 #define HAVE_LIBXML2 1
12769 _ACEOF
12771 LIBS="-lxml2 $LIBS"
12773 else
12774 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12779 if test "$with_libxslt" = yes ; then
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12781 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12782 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12783 $as_echo_n "(cached) " >&6
12784 else
12785 ac_check_lib_save_LIBS=$LIBS
12786 LIBS="-lxslt $LIBS"
12787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12788 /* end confdefs.h. */
12790 /* Override any GCC internal prototype to avoid an error.
12791 Use char because int might match the return type of a GCC
12792 builtin and then its argument prototype would still apply. */
12793 #ifdef __cplusplus
12794 extern "C"
12795 #endif
12796 char xsltCleanupGlobals ();
12798 main ()
12800 return xsltCleanupGlobals ();
12802 return 0;
12804 _ACEOF
12805 if ac_fn_c_try_link "$LINENO"; then :
12806 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12807 else
12808 ac_cv_lib_xslt_xsltCleanupGlobals=no
12810 rm -f core conftest.err conftest.$ac_objext \
12811 conftest$ac_exeext conftest.$ac_ext
12812 LIBS=$ac_check_lib_save_LIBS
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12815 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12816 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12817 cat >>confdefs.h <<_ACEOF
12818 #define HAVE_LIBXSLT 1
12819 _ACEOF
12821 LIBS="-lxslt $LIBS"
12823 else
12824 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12829 if test "$with_lz4" = yes ; then
12830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
12831 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
12832 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
12833 $as_echo_n "(cached) " >&6
12834 else
12835 ac_check_lib_save_LIBS=$LIBS
12836 LIBS="-llz4 $LIBS"
12837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12838 /* end confdefs.h. */
12840 /* Override any GCC internal prototype to avoid an error.
12841 Use char because int might match the return type of a GCC
12842 builtin and then its argument prototype would still apply. */
12843 #ifdef __cplusplus
12844 extern "C"
12845 #endif
12846 char LZ4_compress_default ();
12848 main ()
12850 return LZ4_compress_default ();
12852 return 0;
12854 _ACEOF
12855 if ac_fn_c_try_link "$LINENO"; then :
12856 ac_cv_lib_lz4_LZ4_compress_default=yes
12857 else
12858 ac_cv_lib_lz4_LZ4_compress_default=no
12860 rm -f core conftest.err conftest.$ac_objext \
12861 conftest$ac_exeext conftest.$ac_ext
12862 LIBS=$ac_check_lib_save_LIBS
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
12865 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
12866 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
12867 cat >>confdefs.h <<_ACEOF
12868 #define HAVE_LIBLZ4 1
12869 _ACEOF
12871 LIBS="-llz4 $LIBS"
12873 else
12874 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
12879 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12880 if test "$with_ldap" = yes ; then
12881 _LIBS="$LIBS"
12882 if test "$PORTNAME" != "win32"; then
12883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12884 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12885 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12886 $as_echo_n "(cached) " >&6
12887 else
12888 ac_check_lib_save_LIBS=$LIBS
12889 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12891 /* end confdefs.h. */
12893 /* Override any GCC internal prototype to avoid an error.
12894 Use char because int might match the return type of a GCC
12895 builtin and then its argument prototype would still apply. */
12896 #ifdef __cplusplus
12897 extern "C"
12898 #endif
12899 char ldap_bind ();
12901 main ()
12903 return ldap_bind ();
12905 return 0;
12907 _ACEOF
12908 if ac_fn_c_try_link "$LINENO"; then :
12909 ac_cv_lib_ldap_ldap_bind=yes
12910 else
12911 ac_cv_lib_ldap_ldap_bind=no
12913 rm -f core conftest.err conftest.$ac_objext \
12914 conftest$ac_exeext conftest.$ac_ext
12915 LIBS=$ac_check_lib_save_LIBS
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12918 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12919 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12920 cat >>confdefs.h <<_ACEOF
12921 #define HAVE_LIBLDAP 1
12922 _ACEOF
12924 LIBS="-lldap $LIBS"
12926 else
12927 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12930 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12931 if test "$enable_thread_safety" = yes; then
12932 # on some platforms ldap_r fails to link without PTHREAD_LIBS
12933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12934 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12935 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12936 $as_echo_n "(cached) " >&6
12937 else
12938 ac_check_lib_save_LIBS=$LIBS
12939 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12941 /* end confdefs.h. */
12943 /* Override any GCC internal prototype to avoid an error.
12944 Use char because int might match the return type of a GCC
12945 builtin and then its argument prototype would still apply. */
12946 #ifdef __cplusplus
12947 extern "C"
12948 #endif
12949 char ldap_simple_bind ();
12951 main ()
12953 return ldap_simple_bind ();
12955 return 0;
12957 _ACEOF
12958 if ac_fn_c_try_link "$LINENO"; then :
12959 ac_cv_lib_ldap_r_ldap_simple_bind=yes
12960 else
12961 ac_cv_lib_ldap_r_ldap_simple_bind=no
12963 rm -f core conftest.err conftest.$ac_objext \
12964 conftest$ac_exeext conftest.$ac_ext
12965 LIBS=$ac_check_lib_save_LIBS
12967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12968 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12969 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12970 cat >>confdefs.h <<_ACEOF
12971 #define HAVE_LIBLDAP_R 1
12972 _ACEOF
12974 LIBS="-lldap_r $LIBS"
12976 else
12977 as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12980 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12981 else
12982 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12984 for ac_func in ldap_initialize
12985 do :
12986 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12987 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12988 cat >>confdefs.h <<_ACEOF
12989 #define HAVE_LDAP_INITIALIZE 1
12990 _ACEOF
12993 done
12995 else
12996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12997 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12998 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12999 $as_echo_n "(cached) " >&6
13000 else
13001 ac_check_lib_save_LIBS=$LIBS
13002 LIBS="-lwldap32 $LIBS"
13003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13004 /* end confdefs.h. */
13006 /* Override any GCC internal prototype to avoid an error.
13007 Use char because int might match the return type of a GCC
13008 builtin and then its argument prototype would still apply. */
13009 #ifdef __cplusplus
13010 extern "C"
13011 #endif
13012 char ldap_bind ();
13014 main ()
13016 return ldap_bind ();
13018 return 0;
13020 _ACEOF
13021 if ac_fn_c_try_link "$LINENO"; then :
13022 ac_cv_lib_wldap32_ldap_bind=yes
13023 else
13024 ac_cv_lib_wldap32_ldap_bind=no
13026 rm -f core conftest.err conftest.$ac_objext \
13027 conftest$ac_exeext conftest.$ac_ext
13028 LIBS=$ac_check_lib_save_LIBS
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13031 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13032 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13033 cat >>confdefs.h <<_ACEOF
13034 #define HAVE_LIBWLDAP32 1
13035 _ACEOF
13037 LIBS="-lwldap32 $LIBS"
13039 else
13040 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13043 LDAP_LIBS_FE="-lwldap32"
13044 LDAP_LIBS_BE="-lwldap32"
13046 LIBS="$_LIBS"
13051 # for contrib/sepgsql
13052 if test "$with_selinux" = yes; then
13053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13054 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13055 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13056 $as_echo_n "(cached) " >&6
13057 else
13058 ac_check_lib_save_LIBS=$LIBS
13059 LIBS="-lselinux $LIBS"
13060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13061 /* end confdefs.h. */
13063 /* Override any GCC internal prototype to avoid an error.
13064 Use char because int might match the return type of a GCC
13065 builtin and then its argument prototype would still apply. */
13066 #ifdef __cplusplus
13067 extern "C"
13068 #endif
13069 char security_compute_create_name ();
13071 main ()
13073 return security_compute_create_name ();
13075 return 0;
13077 _ACEOF
13078 if ac_fn_c_try_link "$LINENO"; then :
13079 ac_cv_lib_selinux_security_compute_create_name=yes
13080 else
13081 ac_cv_lib_selinux_security_compute_create_name=no
13083 rm -f core conftest.err conftest.$ac_objext \
13084 conftest$ac_exeext conftest.$ac_ext
13085 LIBS=$ac_check_lib_save_LIBS
13087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13088 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13089 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13090 cat >>confdefs.h <<_ACEOF
13091 #define HAVE_LIBSELINUX 1
13092 _ACEOF
13094 LIBS="-lselinux $LIBS"
13096 else
13097 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13102 # for contrib/uuid-ossp
13103 if test "$with_uuid" = bsd ; then
13104 # On BSD, the UUID functions are in libc
13105 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13106 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13107 UUID_LIBS=""
13108 else
13109 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13112 elif test "$with_uuid" = e2fs ; then
13113 # On macOS, the UUID functions are in libc
13114 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13115 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13116 UUID_LIBS=""
13117 else
13118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13119 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13120 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13121 $as_echo_n "(cached) " >&6
13122 else
13123 ac_check_lib_save_LIBS=$LIBS
13124 LIBS="-luuid $LIBS"
13125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13126 /* end confdefs.h. */
13128 /* Override any GCC internal prototype to avoid an error.
13129 Use char because int might match the return type of a GCC
13130 builtin and then its argument prototype would still apply. */
13131 #ifdef __cplusplus
13132 extern "C"
13133 #endif
13134 char uuid_generate ();
13136 main ()
13138 return uuid_generate ();
13140 return 0;
13142 _ACEOF
13143 if ac_fn_c_try_link "$LINENO"; then :
13144 ac_cv_lib_uuid_uuid_generate=yes
13145 else
13146 ac_cv_lib_uuid_uuid_generate=no
13148 rm -f core conftest.err conftest.$ac_objext \
13149 conftest$ac_exeext conftest.$ac_ext
13150 LIBS=$ac_check_lib_save_LIBS
13152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13153 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13154 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13155 UUID_LIBS="-luuid"
13156 else
13157 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13162 elif test "$with_uuid" = ossp ; then
13163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13164 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13165 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13166 $as_echo_n "(cached) " >&6
13167 else
13168 ac_check_lib_save_LIBS=$LIBS
13169 LIBS="-lossp-uuid $LIBS"
13170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13171 /* end confdefs.h. */
13173 /* Override any GCC internal prototype to avoid an error.
13174 Use char because int might match the return type of a GCC
13175 builtin and then its argument prototype would still apply. */
13176 #ifdef __cplusplus
13177 extern "C"
13178 #endif
13179 char uuid_export ();
13181 main ()
13183 return uuid_export ();
13185 return 0;
13187 _ACEOF
13188 if ac_fn_c_try_link "$LINENO"; then :
13189 ac_cv_lib_ossp_uuid_uuid_export=yes
13190 else
13191 ac_cv_lib_ossp_uuid_uuid_export=no
13193 rm -f core conftest.err conftest.$ac_objext \
13194 conftest$ac_exeext conftest.$ac_ext
13195 LIBS=$ac_check_lib_save_LIBS
13197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13198 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13199 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13200 UUID_LIBS="-lossp-uuid"
13201 else
13202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13203 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13204 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13205 $as_echo_n "(cached) " >&6
13206 else
13207 ac_check_lib_save_LIBS=$LIBS
13208 LIBS="-luuid $LIBS"
13209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13210 /* end confdefs.h. */
13212 /* Override any GCC internal prototype to avoid an error.
13213 Use char because int might match the return type of a GCC
13214 builtin and then its argument prototype would still apply. */
13215 #ifdef __cplusplus
13216 extern "C"
13217 #endif
13218 char uuid_export ();
13220 main ()
13222 return uuid_export ();
13224 return 0;
13226 _ACEOF
13227 if ac_fn_c_try_link "$LINENO"; then :
13228 ac_cv_lib_uuid_uuid_export=yes
13229 else
13230 ac_cv_lib_uuid_uuid_export=no
13232 rm -f core conftest.err conftest.$ac_objext \
13233 conftest$ac_exeext conftest.$ac_ext
13234 LIBS=$ac_check_lib_save_LIBS
13236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13237 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13238 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13239 UUID_LIBS="-luuid"
13240 else
13241 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13251 ## Header files
13254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13255 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13256 if ${ac_cv_header_stdbool_h+:} false; then :
13257 $as_echo_n "(cached) " >&6
13258 else
13259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13260 /* end confdefs.h. */
13262 #include <stdbool.h>
13263 #ifndef bool
13264 "error: bool is not defined"
13265 #endif
13266 #ifndef false
13267 "error: false is not defined"
13268 #endif
13269 #if false
13270 "error: false is not 0"
13271 #endif
13272 #ifndef true
13273 "error: true is not defined"
13274 #endif
13275 #if true != 1
13276 "error: true is not 1"
13277 #endif
13278 #ifndef __bool_true_false_are_defined
13279 "error: __bool_true_false_are_defined is not defined"
13280 #endif
13282 struct s { _Bool s: 1; _Bool t; } s;
13284 char a[true == 1 ? 1 : -1];
13285 char b[false == 0 ? 1 : -1];
13286 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13287 char d[(bool) 0.5 == true ? 1 : -1];
13288 /* See body of main program for 'e'. */
13289 char f[(_Bool) 0.0 == false ? 1 : -1];
13290 char g[true];
13291 char h[sizeof (_Bool)];
13292 char i[sizeof s.t];
13293 enum { j = false, k = true, l = false * true, m = true * 256 };
13294 /* The following fails for
13295 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13296 _Bool n[m];
13297 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13298 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13299 /* Catch a bug in an HP-UX C compiler. See
13300 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13301 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13303 _Bool q = true;
13304 _Bool *pq = &q;
13307 main ()
13310 bool e = &s;
13311 *pq |= q;
13312 *pq |= ! q;
13313 /* Refer to every declared value, to avoid compiler optimizations. */
13314 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13315 + !m + !n + !o + !p + !q + !pq);
13318 return 0;
13320 _ACEOF
13321 if ac_fn_c_try_compile "$LINENO"; then :
13322 ac_cv_header_stdbool_h=yes
13323 else
13324 ac_cv_header_stdbool_h=no
13326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13329 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13330 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13331 if test "x$ac_cv_type__Bool" = xyes; then :
13333 cat >>confdefs.h <<_ACEOF
13334 #define HAVE__BOOL 1
13335 _ACEOF
13341 if test $ac_cv_header_stdbool_h = yes; then
13343 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13348 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
13349 do :
13350 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13351 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13352 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13353 cat >>confdefs.h <<_ACEOF
13354 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13355 _ACEOF
13359 done
13362 # On BSD, test for net/if.h will fail unless sys/socket.h
13363 # is included first.
13364 for ac_header in net/if.h
13365 do :
13366 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
13367 #include <sys/socket.h>
13370 if test "x$ac_cv_header_net_if_h" = xyes; then :
13371 cat >>confdefs.h <<_ACEOF
13372 #define HAVE_NET_IF_H 1
13373 _ACEOF
13377 done
13380 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
13381 # is included first.
13382 for ac_header in sys/ucred.h
13383 do :
13384 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13385 #include <sys/param.h>
13388 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13389 cat >>confdefs.h <<_ACEOF
13390 #define HAVE_SYS_UCRED_H 1
13391 _ACEOF
13395 done
13398 # At least on IRIX, test for netinet/tcp.h will fail unless
13399 # netinet/in.h is included first.
13400 for ac_header in netinet/tcp.h
13401 do :
13402 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13403 #include <netinet/in.h>
13406 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13407 cat >>confdefs.h <<_ACEOF
13408 #define HAVE_NETINET_TCP_H 1
13409 _ACEOF
13413 done
13416 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13417 for ac_header in readline/readline.h
13418 do :
13419 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13420 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13421 cat >>confdefs.h <<_ACEOF
13422 #define HAVE_READLINE_READLINE_H 1
13423 _ACEOF
13425 else
13426 for ac_header in readline.h
13427 do :
13428 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13429 if test "x$ac_cv_header_readline_h" = xyes; then :
13430 cat >>confdefs.h <<_ACEOF
13431 #define HAVE_READLINE_H 1
13432 _ACEOF
13434 else
13435 as_fn_error $? "readline header not found
13436 If you have readline already installed, see config.log for details on the
13437 failure. It is possible the compiler isn't looking in the proper directory.
13438 Use --without-readline to disable readline support." "$LINENO" 5
13441 done
13445 done
13447 for ac_header in readline/history.h
13448 do :
13449 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13450 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13451 cat >>confdefs.h <<_ACEOF
13452 #define HAVE_READLINE_HISTORY_H 1
13453 _ACEOF
13455 else
13456 for ac_header in history.h
13457 do :
13458 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13459 if test "x$ac_cv_header_history_h" = xyes; then :
13460 cat >>confdefs.h <<_ACEOF
13461 #define HAVE_HISTORY_H 1
13462 _ACEOF
13464 else
13465 as_fn_error $? "history header not found
13466 If you have readline already installed, see config.log for details on the
13467 failure. It is possible the compiler isn't looking in the proper directory.
13468 Use --without-readline to disable readline support." "$LINENO" 5
13471 done
13475 done
13479 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13480 # Some installations of libedit usurp /usr/include/readline/, which seems
13481 # bad practice, since in combined installations readline will have its headers
13482 # there. We might have to resort to AC_EGREP checks to make sure we found
13483 # the proper header...
13484 for ac_header in editline/readline.h
13485 do :
13486 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13487 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13488 cat >>confdefs.h <<_ACEOF
13489 #define HAVE_EDITLINE_READLINE_H 1
13490 _ACEOF
13492 else
13493 for ac_header in readline.h
13494 do :
13495 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13496 if test "x$ac_cv_header_readline_h" = xyes; then :
13497 cat >>confdefs.h <<_ACEOF
13498 #define HAVE_READLINE_H 1
13499 _ACEOF
13501 else
13502 for ac_header in readline/readline.h
13503 do :
13504 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13505 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13506 cat >>confdefs.h <<_ACEOF
13507 #define HAVE_READLINE_READLINE_H 1
13508 _ACEOF
13510 else
13511 as_fn_error $? "readline header not found
13512 If you have libedit already installed, see config.log for details on the
13513 failure. It is possible the compiler isn't looking in the proper directory.
13514 Use --without-readline to disable libedit support." "$LINENO" 5
13517 done
13521 done
13525 done
13527 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13528 # not be there at all. Hence, don't complain if not found. We must check
13529 # though, since in yet other versions it is an independent header.
13530 for ac_header in editline/history.h
13531 do :
13532 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13533 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13534 cat >>confdefs.h <<_ACEOF
13535 #define HAVE_EDITLINE_HISTORY_H 1
13536 _ACEOF
13538 else
13539 for ac_header in history.h
13540 do :
13541 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13542 if test "x$ac_cv_header_history_h" = xyes; then :
13543 cat >>confdefs.h <<_ACEOF
13544 #define HAVE_HISTORY_H 1
13545 _ACEOF
13547 else
13548 for ac_header in readline/history.h
13549 do :
13550 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13551 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13552 cat >>confdefs.h <<_ACEOF
13553 #define HAVE_READLINE_HISTORY_H 1
13554 _ACEOF
13558 done
13562 done
13566 done
13570 if test "$with_zlib" = yes; then
13571 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13572 if test "x$ac_cv_header_zlib_h" = xyes; then :
13574 else
13575 as_fn_error $? "zlib header not found
13576 If you have zlib already installed, see config.log for details on the
13577 failure. It is possible the compiler isn't looking in the proper directory.
13578 Use --without-zlib to disable zlib support." "$LINENO" 5
13584 if test "$with_lz4" = yes; then
13585 for ac_header in lz4.h
13586 do :
13587 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13588 if test "x$ac_cv_header_lz4_h" = xyes; then :
13589 cat >>confdefs.h <<_ACEOF
13590 #define HAVE_LZ4_H 1
13591 _ACEOF
13593 else
13594 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13597 done
13601 if test "$with_gssapi" = yes ; then
13602 for ac_header in gssapi/gssapi.h
13603 do :
13604 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13605 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13606 cat >>confdefs.h <<_ACEOF
13607 #define HAVE_GSSAPI_GSSAPI_H 1
13608 _ACEOF
13610 else
13611 for ac_header in gssapi.h
13612 do :
13613 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13614 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13615 cat >>confdefs.h <<_ACEOF
13616 #define HAVE_GSSAPI_H 1
13617 _ACEOF
13619 else
13620 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13623 done
13627 done
13631 if test "$with_ssl" = openssl ; then
13632 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13633 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13635 else
13636 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13640 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13641 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13643 else
13644 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13650 if test "$with_pam" = yes ; then
13651 for ac_header in security/pam_appl.h
13652 do :
13653 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13654 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13655 cat >>confdefs.h <<_ACEOF
13656 #define HAVE_SECURITY_PAM_APPL_H 1
13657 _ACEOF
13659 else
13660 for ac_header in pam/pam_appl.h
13661 do :
13662 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13663 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13664 cat >>confdefs.h <<_ACEOF
13665 #define HAVE_PAM_PAM_APPL_H 1
13666 _ACEOF
13668 else
13669 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13672 done
13676 done
13680 if test "$with_bsd_auth" = yes ; then
13681 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13682 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13684 else
13685 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13691 if test "$with_systemd" = yes ; then
13692 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13693 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13695 else
13696 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13702 if test "$with_libxml" = yes ; then
13703 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13704 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13706 else
13707 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13713 if test "$with_libxslt" = yes ; then
13714 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13715 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13717 else
13718 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13724 if test "$with_ldap" = yes ; then
13725 if test "$PORTNAME" != "win32"; then
13726 for ac_header in ldap.h
13727 do :
13728 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13729 if test "x$ac_cv_header_ldap_h" = xyes; then :
13730 cat >>confdefs.h <<_ACEOF
13731 #define HAVE_LDAP_H 1
13732 _ACEOF
13734 else
13735 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13738 done
13740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13741 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13742 if ${pgac_cv_ldap_safe+:} false; then :
13743 $as_echo_n "(cached) " >&6
13744 else
13745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13746 /* end confdefs.h. */
13747 #include <ldap.h>
13748 #if !defined(LDAP_VENDOR_VERSION) || \
13749 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13750 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13751 choke me
13752 #endif
13754 main ()
13758 return 0;
13760 _ACEOF
13761 if ac_fn_c_try_compile "$LINENO"; then :
13762 pgac_cv_ldap_safe=yes
13763 else
13764 pgac_cv_ldap_safe=no
13766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13769 $as_echo "$pgac_cv_ldap_safe" >&6; }
13771 if test "$pgac_cv_ldap_safe" != yes; then
13772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13773 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13774 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13775 *** also uses LDAP will crash on exit." >&5
13776 $as_echo "$as_me: WARNING:
13777 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13778 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13779 *** also uses LDAP will crash on exit." >&2;}
13781 else
13782 for ac_header in winldap.h
13783 do :
13784 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13785 #include <windows.h>
13788 if test "x$ac_cv_header_winldap_h" = xyes; then :
13789 cat >>confdefs.h <<_ACEOF
13790 #define HAVE_WINLDAP_H 1
13791 _ACEOF
13793 else
13794 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13797 done
13802 if test "$with_bonjour" = yes ; then
13803 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13804 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13806 else
13807 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13813 # for contrib/uuid-ossp
13814 if test "$with_uuid" = bsd ; then
13815 for ac_header in uuid.h
13816 do :
13817 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13818 if test "x$ac_cv_header_uuid_h" = xyes; then :
13819 cat >>confdefs.h <<_ACEOF
13820 #define HAVE_UUID_H 1
13821 _ACEOF
13822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13823 /* end confdefs.h. */
13824 #include <uuid.h>
13826 _ACEOF
13827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13828 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13830 else
13831 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13833 rm -f conftest*
13835 else
13836 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13839 done
13841 elif test "$with_uuid" = e2fs ; then
13842 for ac_header in uuid/uuid.h
13843 do :
13844 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13845 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13846 cat >>confdefs.h <<_ACEOF
13847 #define HAVE_UUID_UUID_H 1
13848 _ACEOF
13849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13850 /* end confdefs.h. */
13851 #include <uuid/uuid.h>
13853 _ACEOF
13854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13855 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13857 else
13858 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13860 rm -f conftest*
13862 else
13863 for ac_header in uuid.h
13864 do :
13865 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13866 if test "x$ac_cv_header_uuid_h" = xyes; then :
13867 cat >>confdefs.h <<_ACEOF
13868 #define HAVE_UUID_H 1
13869 _ACEOF
13870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13871 /* end confdefs.h. */
13872 #include <uuid.h>
13874 _ACEOF
13875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13876 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13878 else
13879 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13881 rm -f conftest*
13883 else
13884 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13887 done
13891 done
13893 elif test "$with_uuid" = ossp ; then
13894 for ac_header in ossp/uuid.h
13895 do :
13896 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13897 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13898 cat >>confdefs.h <<_ACEOF
13899 #define HAVE_OSSP_UUID_H 1
13900 _ACEOF
13901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13902 /* end confdefs.h. */
13903 #include <ossp/uuid.h>
13905 _ACEOF
13906 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13907 $EGREP "uuid_export" >/dev/null 2>&1; then :
13909 else
13910 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13912 rm -f conftest*
13914 else
13915 for ac_header in uuid.h
13916 do :
13917 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13918 if test "x$ac_cv_header_uuid_h" = xyes; then :
13919 cat >>confdefs.h <<_ACEOF
13920 #define HAVE_UUID_H 1
13921 _ACEOF
13922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13923 /* end confdefs.h. */
13924 #include <uuid.h>
13926 _ACEOF
13927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13928 $EGREP "uuid_export" >/dev/null 2>&1; then :
13930 else
13931 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13933 rm -f conftest*
13935 else
13936 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13939 done
13943 done
13947 if test "$PORTNAME" = "win32" ; then
13948 for ac_header in crtdefs.h
13949 do :
13950 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13951 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13952 cat >>confdefs.h <<_ACEOF
13953 #define HAVE_CRTDEFS_H 1
13954 _ACEOF
13958 done
13963 ## Types, structures, compiler characteristics
13966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13967 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13968 if ${ac_cv_c_bigendian+:} false; then :
13969 $as_echo_n "(cached) " >&6
13970 else
13971 ac_cv_c_bigendian=unknown
13972 # See if we're dealing with a universal compiler.
13973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13974 /* end confdefs.h. */
13975 #ifndef __APPLE_CC__
13976 not a universal capable compiler
13977 #endif
13978 typedef int dummy;
13980 _ACEOF
13981 if ac_fn_c_try_compile "$LINENO"; then :
13983 # Check for potential -arch flags. It is not universal unless
13984 # there are at least two -arch flags with different values.
13985 ac_arch=
13986 ac_prev=
13987 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13988 if test -n "$ac_prev"; then
13989 case $ac_word in
13990 i?86 | x86_64 | ppc | ppc64)
13991 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13992 ac_arch=$ac_word
13993 else
13994 ac_cv_c_bigendian=universal
13995 break
13998 esac
13999 ac_prev=
14000 elif test "x$ac_word" = "x-arch"; then
14001 ac_prev=arch
14003 done
14005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14006 if test $ac_cv_c_bigendian = unknown; then
14007 # See if sys/param.h defines the BYTE_ORDER macro.
14008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14009 /* end confdefs.h. */
14010 #include <sys/types.h>
14011 #include <sys/param.h>
14014 main ()
14016 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14017 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14018 && LITTLE_ENDIAN)
14019 bogus endian macros
14020 #endif
14023 return 0;
14025 _ACEOF
14026 if ac_fn_c_try_compile "$LINENO"; then :
14027 # It does; now see whether it defined to BIG_ENDIAN or not.
14028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14029 /* end confdefs.h. */
14030 #include <sys/types.h>
14031 #include <sys/param.h>
14034 main ()
14036 #if BYTE_ORDER != BIG_ENDIAN
14037 not big endian
14038 #endif
14041 return 0;
14043 _ACEOF
14044 if ac_fn_c_try_compile "$LINENO"; then :
14045 ac_cv_c_bigendian=yes
14046 else
14047 ac_cv_c_bigendian=no
14049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14053 if test $ac_cv_c_bigendian = unknown; then
14054 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14056 /* end confdefs.h. */
14057 #include <limits.h>
14060 main ()
14062 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14063 bogus endian macros
14064 #endif
14067 return 0;
14069 _ACEOF
14070 if ac_fn_c_try_compile "$LINENO"; then :
14071 # It does; now see whether it defined to _BIG_ENDIAN or not.
14072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14073 /* end confdefs.h. */
14074 #include <limits.h>
14077 main ()
14079 #ifndef _BIG_ENDIAN
14080 not big endian
14081 #endif
14084 return 0;
14086 _ACEOF
14087 if ac_fn_c_try_compile "$LINENO"; then :
14088 ac_cv_c_bigendian=yes
14089 else
14090 ac_cv_c_bigendian=no
14092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14096 if test $ac_cv_c_bigendian = unknown; then
14097 # Compile a test program.
14098 if test "$cross_compiling" = yes; then :
14099 # Try to guess by grepping values from an object file.
14100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14101 /* end confdefs.h. */
14102 short int ascii_mm[] =
14103 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14104 short int ascii_ii[] =
14105 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14106 int use_ascii (int i) {
14107 return ascii_mm[i] + ascii_ii[i];
14109 short int ebcdic_ii[] =
14110 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14111 short int ebcdic_mm[] =
14112 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14113 int use_ebcdic (int i) {
14114 return ebcdic_mm[i] + ebcdic_ii[i];
14116 extern int foo;
14119 main ()
14121 return use_ascii (foo) == use_ebcdic (foo);
14123 return 0;
14125 _ACEOF
14126 if ac_fn_c_try_compile "$LINENO"; then :
14127 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14128 ac_cv_c_bigendian=yes
14130 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14131 if test "$ac_cv_c_bigendian" = unknown; then
14132 ac_cv_c_bigendian=no
14133 else
14134 # finding both strings is unlikely to happen, but who knows?
14135 ac_cv_c_bigendian=unknown
14139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14140 else
14141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14142 /* end confdefs.h. */
14143 $ac_includes_default
14145 main ()
14148 /* Are we little or big endian? From Harbison&Steele. */
14149 union
14151 long int l;
14152 char c[sizeof (long int)];
14153 } u;
14154 u.l = 1;
14155 return u.c[sizeof (long int) - 1] == 1;
14158 return 0;
14160 _ACEOF
14161 if ac_fn_c_try_run "$LINENO"; then :
14162 ac_cv_c_bigendian=no
14163 else
14164 ac_cv_c_bigendian=yes
14166 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14167 conftest.$ac_objext conftest.beam conftest.$ac_ext
14172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14173 $as_echo "$ac_cv_c_bigendian" >&6; }
14174 case $ac_cv_c_bigendian in #(
14175 yes)
14176 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14177 ;; #(
14179 ;; #(
14180 universal)
14182 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14184 ;; #(
14186 as_fn_error $? "unknown endianness
14187 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14188 esac
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14191 $as_echo_n "checking for inline... " >&6; }
14192 if ${ac_cv_c_inline+:} false; then :
14193 $as_echo_n "(cached) " >&6
14194 else
14195 ac_cv_c_inline=no
14196 for ac_kw in inline __inline__ __inline; do
14197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14198 /* end confdefs.h. */
14199 #ifndef __cplusplus
14200 typedef int foo_t;
14201 static $ac_kw foo_t static_foo () {return 0; }
14202 $ac_kw foo_t foo () {return 0; }
14203 #endif
14205 _ACEOF
14206 if ac_fn_c_try_compile "$LINENO"; then :
14207 ac_cv_c_inline=$ac_kw
14209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14210 test "$ac_cv_c_inline" != no && break
14211 done
14214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14215 $as_echo "$ac_cv_c_inline" >&6; }
14217 case $ac_cv_c_inline in
14218 inline | yes) ;;
14220 case $ac_cv_c_inline in
14221 no) ac_val=;;
14222 *) ac_val=$ac_cv_c_inline;;
14223 esac
14224 cat >>confdefs.h <<_ACEOF
14225 #ifndef __cplusplus
14226 #define inline $ac_val
14227 #endif
14228 _ACEOF
14230 esac
14232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14233 $as_echo_n "checking for printf format archetype... " >&6; }
14234 if ${pgac_cv_printf_archetype+:} false; then :
14235 $as_echo_n "(cached) " >&6
14236 else
14237 pgac_cv_printf_archetype=gnu_printf
14238 ac_save_c_werror_flag=$ac_c_werror_flag
14239 ac_c_werror_flag=yes
14240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14241 /* end confdefs.h. */
14242 extern void pgac_write(int ignore, const char *fmt,...)
14243 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14245 main ()
14247 pgac_write(0, "error %s: %m", "foo");
14249 return 0;
14251 _ACEOF
14252 if ac_fn_c_try_compile "$LINENO"; then :
14253 ac_archetype_ok=yes
14254 else
14255 ac_archetype_ok=no
14257 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14258 ac_c_werror_flag=$ac_save_c_werror_flag
14260 if [ "$ac_archetype_ok" = no ]; then
14261 pgac_cv_printf_archetype=__syslog__
14262 ac_save_c_werror_flag=$ac_c_werror_flag
14263 ac_c_werror_flag=yes
14264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14265 /* end confdefs.h. */
14266 extern void pgac_write(int ignore, const char *fmt,...)
14267 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14269 main ()
14271 pgac_write(0, "error %s: %m", "foo");
14273 return 0;
14275 _ACEOF
14276 if ac_fn_c_try_compile "$LINENO"; then :
14277 ac_archetype_ok=yes
14278 else
14279 ac_archetype_ok=no
14281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14282 ac_c_werror_flag=$ac_save_c_werror_flag
14284 if [ "$ac_archetype_ok" = no ]; then
14285 pgac_cv_printf_archetype=printf
14289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14290 $as_echo "$pgac_cv_printf_archetype" >&6; }
14292 cat >>confdefs.h <<_ACEOF
14293 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14294 _ACEOF
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
14298 $as_echo_n "checking for __func__... " >&6; }
14299 if ${pgac_cv_funcname_func_support+:} false; then :
14300 $as_echo_n "(cached) " >&6
14301 else
14302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14303 /* end confdefs.h. */
14304 #include <stdio.h>
14306 main ()
14308 printf("%s\n", __func__);
14310 return 0;
14312 _ACEOF
14313 if ac_fn_c_try_compile "$LINENO"; then :
14314 pgac_cv_funcname_func_support=yes
14315 else
14316 pgac_cv_funcname_func_support=no
14318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
14321 $as_echo "$pgac_cv_funcname_func_support" >&6; }
14322 if test x"$pgac_cv_funcname_func_support" = xyes ; then
14324 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
14326 else
14327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
14328 $as_echo_n "checking for __FUNCTION__... " >&6; }
14329 if ${pgac_cv_funcname_function_support+:} false; then :
14330 $as_echo_n "(cached) " >&6
14331 else
14332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14333 /* end confdefs.h. */
14334 #include <stdio.h>
14336 main ()
14338 printf("%s\n", __FUNCTION__);
14340 return 0;
14342 _ACEOF
14343 if ac_fn_c_try_compile "$LINENO"; then :
14344 pgac_cv_funcname_function_support=yes
14345 else
14346 pgac_cv_funcname_function_support=no
14348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
14351 $as_echo "$pgac_cv_funcname_function_support" >&6; }
14352 if test x"$pgac_cv_funcname_function_support" = xyes ; then
14354 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
14358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14359 $as_echo_n "checking for _Static_assert... " >&6; }
14360 if ${pgac_cv__static_assert+:} false; then :
14361 $as_echo_n "(cached) " >&6
14362 else
14363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14364 /* end confdefs.h. */
14367 main ()
14369 ({ _Static_assert(1, "foo"); })
14371 return 0;
14373 _ACEOF
14374 if ac_fn_c_try_link "$LINENO"; then :
14375 pgac_cv__static_assert=yes
14376 else
14377 pgac_cv__static_assert=no
14379 rm -f core conftest.err conftest.$ac_objext \
14380 conftest$ac_exeext conftest.$ac_ext
14382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14383 $as_echo "$pgac_cv__static_assert" >&6; }
14384 if test x"$pgac_cv__static_assert" = xyes ; then
14386 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14390 $as_echo_n "checking for typeof... " >&6; }
14391 if ${pgac_cv_c_typeof+:} false; then :
14392 $as_echo_n "(cached) " >&6
14393 else
14394 pgac_cv_c_typeof=no
14395 for pgac_kw in typeof __typeof__ decltype; do
14396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14397 /* end confdefs.h. */
14400 main ()
14402 int x = 0;
14403 $pgac_kw(x) y;
14404 y = x;
14405 return y;
14407 return 0;
14409 _ACEOF
14410 if ac_fn_c_try_compile "$LINENO"; then :
14411 pgac_cv_c_typeof=$pgac_kw
14413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14414 test "$pgac_cv_c_typeof" != no && break
14415 done
14417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14418 $as_echo "$pgac_cv_c_typeof" >&6; }
14419 if test "$pgac_cv_c_typeof" != no; then
14421 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14423 if test "$pgac_cv_c_typeof" != typeof; then
14425 cat >>confdefs.h <<_ACEOF
14426 #define typeof $pgac_cv_c_typeof
14427 _ACEOF
14431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14432 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14433 if ${pgac_cv__types_compatible+:} false; then :
14434 $as_echo_n "(cached) " >&6
14435 else
14436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14437 /* end confdefs.h. */
14440 main ()
14442 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14444 return 0;
14446 _ACEOF
14447 if ac_fn_c_try_compile "$LINENO"; then :
14448 pgac_cv__types_compatible=yes
14449 else
14450 pgac_cv__types_compatible=no
14452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14455 $as_echo "$pgac_cv__types_compatible" >&6; }
14456 if test x"$pgac_cv__types_compatible" = xyes ; then
14458 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14462 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14463 if ${pgac_cv__builtin_constant_p+:} false; then :
14464 $as_echo_n "(cached) " >&6
14465 else
14466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14467 /* end confdefs.h. */
14468 static int x;
14469 static int y[__builtin_constant_p(x) ? x : 1];
14470 static int z[__builtin_constant_p("string literal") ? 1 : x];
14473 _ACEOF
14474 if ac_fn_c_try_compile "$LINENO"; then :
14475 pgac_cv__builtin_constant_p=yes
14476 else
14477 pgac_cv__builtin_constant_p=no
14479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14482 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14483 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14485 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14489 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14490 if ${pgac_cv__builtin_unreachable+:} 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 __builtin_unreachable();
14501 return 0;
14503 _ACEOF
14504 if ac_fn_c_try_link "$LINENO"; then :
14505 pgac_cv__builtin_unreachable=yes
14506 else
14507 pgac_cv__builtin_unreachable=no
14509 rm -f core conftest.err conftest.$ac_objext \
14510 conftest$ac_exeext conftest.$ac_ext
14512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14513 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14514 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14516 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14520 $as_echo_n "checking for computed goto support... " >&6; }
14521 if ${pgac_cv_computed_goto+:} false; then :
14522 $as_echo_n "(cached) " >&6
14523 else
14524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14525 /* end confdefs.h. */
14528 main ()
14530 void *labeladdrs[] = {&&my_label};
14531 goto *labeladdrs[0];
14532 my_label:
14533 return 1;
14536 return 0;
14538 _ACEOF
14539 if ac_fn_c_try_compile "$LINENO"; then :
14540 pgac_cv_computed_goto=yes
14541 else
14542 pgac_cv_computed_goto=no
14544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14547 $as_echo "$pgac_cv_computed_goto" >&6; }
14548 if test x"$pgac_cv_computed_goto" = xyes ; then
14550 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14553 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14554 #include <time.h>
14557 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14559 cat >>confdefs.h <<_ACEOF
14560 #define HAVE_STRUCT_TM_TM_ZONE 1
14561 _ACEOF
14567 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14568 #ifdef HAVE_SYS_IPC_H
14569 #include <sys/ipc.h>
14570 #endif
14571 #ifdef HAVE_SYS_SEM_H
14572 #include <sys/sem.h>
14573 #endif
14575 if test "x$ac_cv_type_union_semun" = xyes; then :
14577 cat >>confdefs.h <<_ACEOF
14578 #define HAVE_UNION_SEMUN 1
14579 _ACEOF
14584 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14585 #ifdef HAVE_SYS_UN_H
14586 #include <sys/un.h>
14587 #endif
14590 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14592 cat >>confdefs.h <<_ACEOF
14593 #define HAVE_STRUCT_SOCKADDR_UN 1
14594 _ACEOF
14599 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14600 #include <sys/socket.h>
14603 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14605 cat >>confdefs.h <<_ACEOF
14606 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14607 _ACEOF
14612 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14613 #include <sys/socket.h>
14616 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14618 cat >>confdefs.h <<_ACEOF
14619 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14620 _ACEOF
14624 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14625 #include <sys/socket.h>
14628 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14630 cat >>confdefs.h <<_ACEOF
14631 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14632 _ACEOF
14636 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14637 #include <sys/socket.h>
14640 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14642 cat >>confdefs.h <<_ACEOF
14643 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14644 _ACEOF
14648 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14649 #include <sys/socket.h>
14652 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14654 cat >>confdefs.h <<_ACEOF
14655 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14656 _ACEOF
14660 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14661 #include <sys/socket.h>
14664 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14666 cat >>confdefs.h <<_ACEOF
14667 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14668 _ACEOF
14673 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14674 #include <sys/socket.h>
14675 #include <netdb.h>
14678 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14680 cat >>confdefs.h <<_ACEOF
14681 #define HAVE_STRUCT_ADDRINFO 1
14682 _ACEOF
14688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14689 $as_echo_n "checking for locale_t... " >&6; }
14690 if ${pgac_cv_type_locale_t+:} false; then :
14691 $as_echo_n "(cached) " >&6
14692 else
14693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14694 /* end confdefs.h. */
14695 #include <locale.h>
14696 locale_t x;
14698 main ()
14702 return 0;
14704 _ACEOF
14705 if ac_fn_c_try_compile "$LINENO"; then :
14706 pgac_cv_type_locale_t=yes
14707 else
14708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14709 /* end confdefs.h. */
14710 #include <xlocale.h>
14711 locale_t x;
14713 main ()
14717 return 0;
14719 _ACEOF
14720 if ac_fn_c_try_compile "$LINENO"; then :
14721 pgac_cv_type_locale_t='yes (in xlocale.h)'
14722 else
14723 pgac_cv_type_locale_t=no
14725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14730 $as_echo "$pgac_cv_type_locale_t" >&6; }
14731 if test "$pgac_cv_type_locale_t" != no; then
14733 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14736 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14738 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14742 # MSVC doesn't cope well with defining restrict to __restrict, the
14743 # spelling it understands, because it conflicts with
14744 # __declspec(restrict). Therefore we define pg_restrict to the
14745 # appropriate definition, which presumably won't conflict.
14747 # Allow platforms with buggy compilers to force restrict to not be
14748 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14749 # template.
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14751 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14752 if ${ac_cv_c_restrict+:} false; then :
14753 $as_echo_n "(cached) " >&6
14754 else
14755 ac_cv_c_restrict=no
14756 # The order here caters to the fact that C++ does not require restrict.
14757 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14759 /* end confdefs.h. */
14760 typedef int * int_ptr;
14761 int foo (int_ptr $ac_kw ip) {
14762 return ip[0];
14765 main ()
14767 int s[1];
14768 int * $ac_kw t = s;
14769 t[0] = 0;
14770 return foo(t)
14772 return 0;
14774 _ACEOF
14775 if ac_fn_c_try_compile "$LINENO"; then :
14776 ac_cv_c_restrict=$ac_kw
14778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14779 test "$ac_cv_c_restrict" != no && break
14780 done
14783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14784 $as_echo "$ac_cv_c_restrict" >&6; }
14786 case $ac_cv_c_restrict in
14787 restrict) ;;
14788 no) $as_echo "#define restrict /**/" >>confdefs.h
14790 *) cat >>confdefs.h <<_ACEOF
14791 #define restrict $ac_cv_c_restrict
14792 _ACEOF
14794 esac
14796 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14797 pg_restrict=""
14798 else
14799 pg_restrict="$ac_cv_c_restrict"
14802 cat >>confdefs.h <<_ACEOF
14803 #define pg_restrict $pg_restrict
14804 _ACEOF
14807 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14808 #include <sys/param.h>
14809 #ifdef HAVE_SYS_UCRED_H
14810 #include <sys/ucred.h>
14811 #endif
14813 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14815 cat >>confdefs.h <<_ACEOF
14816 #define HAVE_STRUCT_CMSGCRED 1
14817 _ACEOF
14823 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14824 #include <getopt.h>
14825 #endif
14827 if test "x$ac_cv_type_struct_option" = xyes; then :
14829 cat >>confdefs.h <<_ACEOF
14830 #define HAVE_STRUCT_OPTION 1
14831 _ACEOF
14837 if test "$with_zlib" = yes; then
14838 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14839 # did not). While we could work around the lack of z_streamp, it
14840 # seems unwise to encourage people to use such old zlib versions...
14841 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14843 if test "x$ac_cv_type_z_streamp" = xyes; then :
14845 else
14846 as_fn_error $? "zlib version is too old
14847 Use --without-zlib to disable zlib support." "$LINENO" 5
14852 case $host_cpu in
14853 x86_64)
14854 # On x86_64, check if we can compile a popcntq instruction
14855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14856 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14857 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14858 $as_echo_n "(cached) " >&6
14859 else
14860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14861 /* end confdefs.h. */
14864 main ()
14866 long long x = 1; long long r;
14867 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14869 return 0;
14871 _ACEOF
14872 if ac_fn_c_try_compile "$LINENO"; then :
14873 pgac_cv_have_x86_64_popcntq=yes
14874 else
14875 pgac_cv_have_x86_64_popcntq=no
14877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14880 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14881 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14883 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14887 ppc*|powerpc*)
14888 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14890 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14891 if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
14892 $as_echo_n "(cached) " >&6
14893 else
14894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h. */
14898 main ()
14900 int a = 0; int *p = &a; int r;
14901 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14903 return 0;
14905 _ACEOF
14906 if ac_fn_c_try_compile "$LINENO"; then :
14907 pgac_cv_have_ppc_mutex_hint=yes
14908 else
14909 pgac_cv_have_ppc_mutex_hint=no
14911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14914 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14915 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14917 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14920 # Check if compiler accepts "i"(x) when __builtin_constant_p(x).
14921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14922 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14923 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14924 $as_echo_n "(cached) " >&6
14925 else
14926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14927 /* end confdefs.h. */
14928 static inline int
14929 addi(int ra, int si)
14931 int res = 0;
14932 if (__builtin_constant_p(si))
14933 __asm__ __volatile__(
14934 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14935 return res;
14937 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14939 main ()
14943 return 0;
14945 _ACEOF
14946 if ac_fn_c_try_compile "$LINENO"; then :
14947 pgac_cv_have_i_constraint__builtin_constant_p=yes
14948 else
14949 pgac_cv_have_i_constraint__builtin_constant_p=no
14951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14954 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14955 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14957 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14961 esac
14963 # Check largefile support. You might think this is a system service not a
14964 # compiler characteristic, but you'd be wrong. We must check this before
14965 # probing existence of related functions such as fseeko, since the largefile
14966 # defines can affect what is generated for that.
14967 if test "$PORTNAME" != "win32"; then
14968 # Check whether --enable-largefile was given.
14969 if test "${enable_largefile+set}" = set; then :
14970 enableval=$enable_largefile;
14973 if test "$enable_largefile" != no; then
14975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14976 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14977 if ${ac_cv_sys_largefile_CC+:} false; then :
14978 $as_echo_n "(cached) " >&6
14979 else
14980 ac_cv_sys_largefile_CC=no
14981 if test "$GCC" != yes; then
14982 ac_save_CC=$CC
14983 while :; do
14984 # IRIX 6.2 and later do not support large files by default,
14985 # so use the C compiler's -n32 option if that helps.
14986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14987 /* end confdefs.h. */
14988 #include <sys/types.h>
14989 /* Check that off_t can represent 2**63 - 1 correctly.
14990 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14991 since some C++ compilers masquerading as C compilers
14992 incorrectly reject 9223372036854775807. */
14993 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14994 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14995 && LARGE_OFF_T % 2147483647 == 1)
14996 ? 1 : -1];
14998 main ()
15002 return 0;
15004 _ACEOF
15005 if ac_fn_c_try_compile "$LINENO"; then :
15006 break
15008 rm -f core conftest.err conftest.$ac_objext
15009 CC="$CC -n32"
15010 if ac_fn_c_try_compile "$LINENO"; then :
15011 ac_cv_sys_largefile_CC=' -n32'; break
15013 rm -f core conftest.err conftest.$ac_objext
15014 break
15015 done
15016 CC=$ac_save_CC
15017 rm -f conftest.$ac_ext
15020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15021 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15022 if test "$ac_cv_sys_largefile_CC" != no; then
15023 CC=$CC$ac_cv_sys_largefile_CC
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15027 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15028 if ${ac_cv_sys_file_offset_bits+:} false; then :
15029 $as_echo_n "(cached) " >&6
15030 else
15031 while :; do
15032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15033 /* end confdefs.h. */
15034 #include <sys/types.h>
15035 /* Check that off_t can represent 2**63 - 1 correctly.
15036 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15037 since some C++ compilers masquerading as C compilers
15038 incorrectly reject 9223372036854775807. */
15039 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15040 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15041 && LARGE_OFF_T % 2147483647 == 1)
15042 ? 1 : -1];
15044 main ()
15048 return 0;
15050 _ACEOF
15051 if ac_fn_c_try_compile "$LINENO"; then :
15052 ac_cv_sys_file_offset_bits=no; break
15054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056 /* end confdefs.h. */
15057 #define _FILE_OFFSET_BITS 64
15058 #include <sys/types.h>
15059 /* Check that off_t can represent 2**63 - 1 correctly.
15060 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15061 since some C++ compilers masquerading as C compilers
15062 incorrectly reject 9223372036854775807. */
15063 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15064 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15065 && LARGE_OFF_T % 2147483647 == 1)
15066 ? 1 : -1];
15068 main ()
15072 return 0;
15074 _ACEOF
15075 if ac_fn_c_try_compile "$LINENO"; then :
15076 ac_cv_sys_file_offset_bits=64; break
15078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15079 ac_cv_sys_file_offset_bits=unknown
15080 break
15081 done
15083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15084 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15085 case $ac_cv_sys_file_offset_bits in #(
15086 no | unknown) ;;
15088 cat >>confdefs.h <<_ACEOF
15089 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15090 _ACEOF
15092 esac
15093 rm -rf conftest*
15094 if test $ac_cv_sys_file_offset_bits = unknown; then
15095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15096 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15097 if ${ac_cv_sys_large_files+:} false; then :
15098 $as_echo_n "(cached) " >&6
15099 else
15100 while :; do
15101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15102 /* end confdefs.h. */
15103 #include <sys/types.h>
15104 /* Check that off_t can represent 2**63 - 1 correctly.
15105 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15106 since some C++ compilers masquerading as C compilers
15107 incorrectly reject 9223372036854775807. */
15108 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15109 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15110 && LARGE_OFF_T % 2147483647 == 1)
15111 ? 1 : -1];
15113 main ()
15117 return 0;
15119 _ACEOF
15120 if ac_fn_c_try_compile "$LINENO"; then :
15121 ac_cv_sys_large_files=no; break
15123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15125 /* end confdefs.h. */
15126 #define _LARGE_FILES 1
15127 #include <sys/types.h>
15128 /* Check that off_t can represent 2**63 - 1 correctly.
15129 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15130 since some C++ compilers masquerading as C compilers
15131 incorrectly reject 9223372036854775807. */
15132 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15133 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15134 && LARGE_OFF_T % 2147483647 == 1)
15135 ? 1 : -1];
15137 main ()
15141 return 0;
15143 _ACEOF
15144 if ac_fn_c_try_compile "$LINENO"; then :
15145 ac_cv_sys_large_files=1; break
15147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15148 ac_cv_sys_large_files=unknown
15149 break
15150 done
15152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15153 $as_echo "$ac_cv_sys_large_files" >&6; }
15154 case $ac_cv_sys_large_files in #(
15155 no | unknown) ;;
15157 cat >>confdefs.h <<_ACEOF
15158 #define _LARGE_FILES $ac_cv_sys_large_files
15159 _ACEOF
15161 esac
15162 rm -rf conftest*
15171 # The cast to long int works around a bug in the HP C Compiler
15172 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15173 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15174 # This bug is HP SR number 8606223364.
15175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15176 $as_echo_n "checking size of off_t... " >&6; }
15177 if ${ac_cv_sizeof_off_t+:} false; then :
15178 $as_echo_n "(cached) " >&6
15179 else
15180 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15182 else
15183 if test "$ac_cv_type_off_t" = yes; then
15184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15185 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15186 as_fn_error 77 "cannot compute sizeof (off_t)
15187 See \`config.log' for more details" "$LINENO" 5; }
15188 else
15189 ac_cv_sizeof_off_t=0
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15195 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15199 cat >>confdefs.h <<_ACEOF
15200 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15201 _ACEOF
15205 # If we don't have largefile support, can't handle segsize >= 2GB.
15206 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15207 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15210 # The cast to long int works around a bug in the HP C Compiler
15211 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15212 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15213 # This bug is HP SR number 8606223364.
15214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15215 $as_echo_n "checking size of bool... " >&6; }
15216 if ${ac_cv_sizeof_bool+:} false; then :
15217 $as_echo_n "(cached) " >&6
15218 else
15219 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15220 #include <stdbool.h>
15221 #endif
15222 "; then :
15224 else
15225 if test "$ac_cv_type_bool" = yes; then
15226 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15227 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15228 as_fn_error 77 "cannot compute sizeof (bool)
15229 See \`config.log' for more details" "$LINENO" 5; }
15230 else
15231 ac_cv_sizeof_bool=0
15236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15237 $as_echo "$ac_cv_sizeof_bool" >&6; }
15241 cat >>confdefs.h <<_ACEOF
15242 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15243 _ACEOF
15247 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15249 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15255 ## Functions, global variables
15258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15259 $as_echo_n "checking for int timezone... " >&6; }
15260 if ${pgac_cv_var_int_timezone+:} false; then :
15261 $as_echo_n "(cached) " >&6
15262 else
15263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15264 /* end confdefs.h. */
15265 #include <time.h>
15266 int res;
15268 main ()
15270 #ifndef __CYGWIN__
15271 res = timezone / 60;
15272 #else
15273 res = _timezone / 60;
15274 #endif
15276 return 0;
15278 _ACEOF
15279 if ac_fn_c_try_link "$LINENO"; then :
15280 pgac_cv_var_int_timezone=yes
15281 else
15282 pgac_cv_var_int_timezone=no
15284 rm -f core conftest.err conftest.$ac_objext \
15285 conftest$ac_exeext conftest.$ac_ext
15287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15288 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15289 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15291 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15295 $as_echo_n "checking types of arguments for accept()... " >&6; }
15296 if ${ac_cv_func_accept_return+:} false; then :
15297 $as_echo_n "(cached) " >&6
15298 else
15299 if ${ac_cv_func_accept_arg1+:} false; then :
15300 $as_echo_n "(cached) " >&6
15301 else
15302 if ${ac_cv_func_accept_arg2+:} false; then :
15303 $as_echo_n "(cached) " >&6
15304 else
15305 if ${ac_cv_func_accept_arg3+:} false; then :
15306 $as_echo_n "(cached) " >&6
15307 else
15308 for ac_cv_func_accept_return in 'int' 'SOCKET WSAAPI' 'unsigned int PASCAL'; do
15309 for ac_cv_func_accept_arg1 in 'int' 'SOCKET' 'unsigned int'; do
15310 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15311 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15313 /* end confdefs.h. */
15314 #include <sys/types.h>
15315 #include <sys/socket.h>
15316 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15317 _ACEOF
15318 if ac_fn_c_try_compile "$LINENO"; then :
15319 ac_not_found=no; break 4
15320 else
15321 ac_not_found=yes
15323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15324 done
15325 done
15326 done
15327 done
15328 if test "$ac_not_found" = yes; then
15329 as_fn_error $? "could not determine argument types" "$LINENO" 5
15331 if test "$ac_cv_func_accept_arg3" = "void"; then
15332 ac_cv_func_accept_arg3=int
15342 { $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
15343 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15345 cat >>confdefs.h <<_ACEOF
15346 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15347 _ACEOF
15350 cat >>confdefs.h <<_ACEOF
15351 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15352 _ACEOF
15355 cat >>confdefs.h <<_ACEOF
15356 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15357 _ACEOF
15360 cat >>confdefs.h <<_ACEOF
15361 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15362 _ACEOF
15365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15366 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15367 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15368 $as_echo_n "(cached) " >&6
15369 else
15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371 /* end confdefs.h. */
15372 #include <sys/time.h>
15374 main ()
15376 struct timeval *tp;
15377 struct timezone *tzp;
15378 gettimeofday(tp,tzp);
15380 return 0;
15382 _ACEOF
15383 if ac_fn_c_try_compile "$LINENO"; then :
15384 pgac_cv_func_gettimeofday_1arg=no
15385 else
15386 pgac_cv_func_gettimeofday_1arg=yes
15388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15391 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15392 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15394 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15399 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15400 if ${pgac_cv_func_wcstombs_l+:} false; then :
15401 $as_echo_n "(cached) " >&6
15402 else
15403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15404 /* end confdefs.h. */
15405 #include <stdlib.h>
15406 #include <locale.h>
15408 main ()
15410 #ifndef wcstombs_l
15411 (void) wcstombs_l;
15412 #endif
15414 return 0;
15416 _ACEOF
15417 if ac_fn_c_try_compile "$LINENO"; then :
15418 pgac_cv_func_wcstombs_l='yes'
15419 else
15420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15421 /* end confdefs.h. */
15422 #include <stdlib.h>
15423 #include <locale.h>
15424 #include <xlocale.h>
15426 main ()
15428 #ifndef wcstombs_l
15429 (void) wcstombs_l;
15430 #endif
15432 return 0;
15434 _ACEOF
15435 if ac_fn_c_try_compile "$LINENO"; then :
15436 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15437 else
15438 pgac_cv_func_wcstombs_l='no'
15440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15445 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15446 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15448 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15452 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15453 # symbols that that library has no business exposing to the world. Pending
15454 # acquisition of a clue by those developers, ignore libedit (including its
15455 # possible alias of libreadline) while checking for everything else.
15456 LIBS_including_readline="$LIBS"
15457 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15459 for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink readv setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink syncfs sync_file_range uselocale wcstombs_l writev
15460 do :
15461 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15462 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15463 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15464 cat >>confdefs.h <<_ACEOF
15465 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15466 _ACEOF
15469 done
15472 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15474 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15475 if ${pgac_cv__builtin_bswap16+:} false; then :
15476 $as_echo_n "(cached) " >&6
15477 else
15478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15479 /* end confdefs.h. */
15482 call__builtin_bswap16(int x)
15484 return __builtin_bswap16(x);
15487 main ()
15491 return 0;
15493 _ACEOF
15494 if ac_fn_c_try_link "$LINENO"; then :
15495 pgac_cv__builtin_bswap16=yes
15496 else
15497 pgac_cv__builtin_bswap16=no
15499 rm -f core conftest.err conftest.$ac_objext \
15500 conftest$ac_exeext conftest.$ac_ext
15502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15503 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15504 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15506 cat >>confdefs.h <<_ACEOF
15507 #define HAVE__BUILTIN_BSWAP16 1
15508 _ACEOF
15511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15512 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15513 if ${pgac_cv__builtin_bswap32+:} false; then :
15514 $as_echo_n "(cached) " >&6
15515 else
15516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15517 /* end confdefs.h. */
15520 call__builtin_bswap32(int x)
15522 return __builtin_bswap32(x);
15525 main ()
15529 return 0;
15531 _ACEOF
15532 if ac_fn_c_try_link "$LINENO"; then :
15533 pgac_cv__builtin_bswap32=yes
15534 else
15535 pgac_cv__builtin_bswap32=no
15537 rm -f core conftest.err conftest.$ac_objext \
15538 conftest$ac_exeext conftest.$ac_ext
15540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15541 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15542 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15544 cat >>confdefs.h <<_ACEOF
15545 #define HAVE__BUILTIN_BSWAP32 1
15546 _ACEOF
15549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15550 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15551 if ${pgac_cv__builtin_bswap64+:} false; then :
15552 $as_echo_n "(cached) " >&6
15553 else
15554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15555 /* end confdefs.h. */
15558 call__builtin_bswap64(long int x)
15560 return __builtin_bswap64(x);
15563 main ()
15567 return 0;
15569 _ACEOF
15570 if ac_fn_c_try_link "$LINENO"; then :
15571 pgac_cv__builtin_bswap64=yes
15572 else
15573 pgac_cv__builtin_bswap64=no
15575 rm -f core conftest.err conftest.$ac_objext \
15576 conftest$ac_exeext conftest.$ac_ext
15578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15579 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15580 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15582 cat >>confdefs.h <<_ACEOF
15583 #define HAVE__BUILTIN_BSWAP64 1
15584 _ACEOF
15587 # We assume that we needn't test all widths of these explicitly:
15588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15589 $as_echo_n "checking for __builtin_clz... " >&6; }
15590 if ${pgac_cv__builtin_clz+:} false; then :
15591 $as_echo_n "(cached) " >&6
15592 else
15593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15594 /* end confdefs.h. */
15597 call__builtin_clz(unsigned int x)
15599 return __builtin_clz(x);
15602 main ()
15606 return 0;
15608 _ACEOF
15609 if ac_fn_c_try_link "$LINENO"; then :
15610 pgac_cv__builtin_clz=yes
15611 else
15612 pgac_cv__builtin_clz=no
15614 rm -f core conftest.err conftest.$ac_objext \
15615 conftest$ac_exeext conftest.$ac_ext
15617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15618 $as_echo "$pgac_cv__builtin_clz" >&6; }
15619 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15621 cat >>confdefs.h <<_ACEOF
15622 #define HAVE__BUILTIN_CLZ 1
15623 _ACEOF
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15627 $as_echo_n "checking for __builtin_ctz... " >&6; }
15628 if ${pgac_cv__builtin_ctz+:} false; then :
15629 $as_echo_n "(cached) " >&6
15630 else
15631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15632 /* end confdefs.h. */
15635 call__builtin_ctz(unsigned int x)
15637 return __builtin_ctz(x);
15640 main ()
15644 return 0;
15646 _ACEOF
15647 if ac_fn_c_try_link "$LINENO"; then :
15648 pgac_cv__builtin_ctz=yes
15649 else
15650 pgac_cv__builtin_ctz=no
15652 rm -f core conftest.err conftest.$ac_objext \
15653 conftest$ac_exeext conftest.$ac_ext
15655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15656 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15657 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15659 cat >>confdefs.h <<_ACEOF
15660 #define HAVE__BUILTIN_CTZ 1
15661 _ACEOF
15664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15665 $as_echo_n "checking for __builtin_popcount... " >&6; }
15666 if ${pgac_cv__builtin_popcount+:} false; then :
15667 $as_echo_n "(cached) " >&6
15668 else
15669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15670 /* end confdefs.h. */
15673 call__builtin_popcount(unsigned int x)
15675 return __builtin_popcount(x);
15678 main ()
15682 return 0;
15684 _ACEOF
15685 if ac_fn_c_try_link "$LINENO"; then :
15686 pgac_cv__builtin_popcount=yes
15687 else
15688 pgac_cv__builtin_popcount=no
15690 rm -f core conftest.err conftest.$ac_objext \
15691 conftest$ac_exeext conftest.$ac_ext
15693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15694 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15695 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15697 cat >>confdefs.h <<_ACEOF
15698 #define HAVE__BUILTIN_POPCOUNT 1
15699 _ACEOF
15703 # We require 64-bit fseeko() to be available, but run this check anyway
15704 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15706 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15707 if ${ac_cv_sys_largefile_source+:} false; then :
15708 $as_echo_n "(cached) " >&6
15709 else
15710 while :; do
15711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15712 /* end confdefs.h. */
15713 #include <sys/types.h> /* for off_t */
15714 #include <stdio.h>
15716 main ()
15718 int (*fp) (FILE *, off_t, int) = fseeko;
15719 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15721 return 0;
15723 _ACEOF
15724 if ac_fn_c_try_link "$LINENO"; then :
15725 ac_cv_sys_largefile_source=no; break
15727 rm -f core conftest.err conftest.$ac_objext \
15728 conftest$ac_exeext conftest.$ac_ext
15729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15730 /* end confdefs.h. */
15731 #define _LARGEFILE_SOURCE 1
15732 #include <sys/types.h> /* for off_t */
15733 #include <stdio.h>
15735 main ()
15737 int (*fp) (FILE *, off_t, int) = fseeko;
15738 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15740 return 0;
15742 _ACEOF
15743 if ac_fn_c_try_link "$LINENO"; then :
15744 ac_cv_sys_largefile_source=1; break
15746 rm -f core conftest.err conftest.$ac_objext \
15747 conftest$ac_exeext conftest.$ac_ext
15748 ac_cv_sys_largefile_source=unknown
15749 break
15750 done
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15753 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15754 case $ac_cv_sys_largefile_source in #(
15755 no | unknown) ;;
15757 cat >>confdefs.h <<_ACEOF
15758 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15759 _ACEOF
15761 esac
15762 rm -rf conftest*
15764 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15765 # in glibc 2.1.3, but that breaks too many other things.
15766 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15767 if test $ac_cv_sys_largefile_source != unknown; then
15769 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15774 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15775 # by calling it, 2009-04-02
15776 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15777 # The Clang compiler raises a warning for an undeclared identifier that matches
15778 # a compiler builtin function. All extant Clang versions are affected, as of
15779 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15780 # C and Objective C languages, but Clang does report an error under C++ and
15781 # Objective C++.
15783 # Passing -fno-builtin to the compiler would suppress this problem. That
15784 # strategy would have the advantage of being insensitive to stray warnings, but
15785 # it would make tests less realistic.
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15787 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15788 if ${ac_cv_c_decl_report+:} false; then :
15789 $as_echo_n "(cached) " >&6
15790 else
15791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15792 /* end confdefs.h. */
15795 main ()
15797 (void) strchr;
15799 return 0;
15801 _ACEOF
15802 if ac_fn_c_try_compile "$LINENO"; then :
15803 if test -s conftest.err; then :
15804 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15805 # valid AC_CHECK_DECL input. No library function is consistently available
15806 # on freestanding implementations, so test against a dummy declaration.
15807 # Include always-available headers on the off chance that they somehow
15808 # elicit warnings.
15809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15810 /* end confdefs.h. */
15811 #include <float.h>
15812 #include <limits.h>
15813 #include <stdarg.h>
15814 #include <stddef.h>
15815 extern void ac_decl (int, char *);
15817 main ()
15819 #ifdef __cplusplus
15820 (void) ac_decl ((int) 0, (char *) 0);
15821 (void) ac_decl;
15822 #else
15823 (void) ac_decl;
15824 #endif
15827 return 0;
15829 _ACEOF
15830 if ac_fn_c_try_compile "$LINENO"; then :
15831 if test -s conftest.err; then :
15832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15833 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15834 as_fn_error $? "cannot detect from compiler exit status or warnings
15835 See \`config.log' for more details" "$LINENO" 5; }
15836 else
15837 ac_cv_c_decl_report=warning
15839 else
15840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15841 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15842 as_fn_error $? "cannot compile a simple declaration test
15843 See \`config.log' for more details" "$LINENO" 5; }
15845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15846 else
15847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15848 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15849 as_fn_error $? "compiler does not report undeclared identifiers
15850 See \`config.log' for more details" "$LINENO" 5; }
15852 else
15853 ac_cv_c_decl_report=error
15855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15858 $as_echo "$ac_cv_c_decl_report" >&6; }
15860 case $ac_cv_c_decl_report in
15861 warning) ac_c_decl_warn_flag=yes ;;
15862 *) ac_c_decl_warn_flag= ;;
15863 esac
15865 if test "$PORTNAME" != "solaris"; then :
15867 for ac_func in posix_fadvise
15868 do :
15869 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15870 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15871 cat >>confdefs.h <<_ACEOF
15872 #define HAVE_POSIX_FADVISE 1
15873 _ACEOF
15876 done
15878 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15880 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15881 ac_have_decl=1
15882 else
15883 ac_have_decl=0
15886 cat >>confdefs.h <<_ACEOF
15887 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15888 _ACEOF
15891 fi # fi
15893 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15895 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15896 ac_have_decl=1
15897 else
15898 ac_have_decl=0
15901 cat >>confdefs.h <<_ACEOF
15902 #define HAVE_DECL_FDATASYNC $ac_have_decl
15903 _ACEOF
15905 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15906 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15907 ac_have_decl=1
15908 else
15909 ac_have_decl=0
15912 cat >>confdefs.h <<_ACEOF
15913 #define HAVE_DECL_STRLCAT $ac_have_decl
15914 _ACEOF
15915 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15916 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15917 ac_have_decl=1
15918 else
15919 ac_have_decl=0
15922 cat >>confdefs.h <<_ACEOF
15923 #define HAVE_DECL_STRLCPY $ac_have_decl
15924 _ACEOF
15925 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15926 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15927 ac_have_decl=1
15928 else
15929 ac_have_decl=0
15932 cat >>confdefs.h <<_ACEOF
15933 #define HAVE_DECL_STRNLEN $ac_have_decl
15934 _ACEOF
15936 # This is probably only present on macOS, but may as well check always
15937 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15939 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15940 ac_have_decl=1
15941 else
15942 ac_have_decl=0
15945 cat >>confdefs.h <<_ACEOF
15946 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15947 _ACEOF
15950 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15952 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15953 ac_have_decl=1
15954 else
15955 ac_have_decl=0
15958 cat >>confdefs.h <<_ACEOF
15959 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15960 _ACEOF
15961 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15963 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15964 ac_have_decl=1
15965 else
15966 ac_have_decl=0
15969 cat >>confdefs.h <<_ACEOF
15970 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15971 _ACEOF
15974 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15975 #include <netinet/in.h>
15977 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15979 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15985 $as_echo_n "checking for PS_STRINGS... " >&6; }
15986 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15987 $as_echo_n "(cached) " >&6
15988 else
15989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15990 /* end confdefs.h. */
15991 #include <machine/vmparam.h>
15992 #include <sys/exec.h>
15995 main ()
15997 PS_STRINGS->ps_nargvstr = 1;
15998 PS_STRINGS->ps_argvstr = "foo";
16000 return 0;
16002 _ACEOF
16003 if ac_fn_c_try_link "$LINENO"; then :
16004 pgac_cv_var_PS_STRINGS=yes
16005 else
16006 pgac_cv_var_PS_STRINGS=no
16008 rm -f core conftest.err conftest.$ac_objext \
16009 conftest$ac_exeext conftest.$ac_ext
16011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16012 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16013 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16015 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16019 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16020 if test "x$ac_cv_func_dlopen" = xyes; then :
16021 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
16023 else
16024 case " $LIBOBJS " in
16025 *" dlopen.$ac_objext "* ) ;;
16026 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
16028 esac
16032 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16033 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16034 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16036 else
16037 case " $LIBOBJS " in
16038 *" explicit_bzero.$ac_objext "* ) ;;
16039 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16041 esac
16045 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
16046 if test "x$ac_cv_func_fls" = xyes; then :
16047 $as_echo "#define HAVE_FLS 1" >>confdefs.h
16049 else
16050 case " $LIBOBJS " in
16051 *" fls.$ac_objext "* ) ;;
16052 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
16054 esac
16058 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16059 if test "x$ac_cv_func_getopt" = xyes; then :
16060 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16062 else
16063 case " $LIBOBJS " in
16064 *" getopt.$ac_objext "* ) ;;
16065 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16067 esac
16071 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16072 if test "x$ac_cv_func_getpeereid" = xyes; then :
16073 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16075 else
16076 case " $LIBOBJS " in
16077 *" getpeereid.$ac_objext "* ) ;;
16078 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16080 esac
16084 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
16085 if test "x$ac_cv_func_getrusage" = xyes; then :
16086 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
16088 else
16089 case " $LIBOBJS " in
16090 *" getrusage.$ac_objext "* ) ;;
16091 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16093 esac
16097 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16098 if test "x$ac_cv_func_inet_aton" = xyes; then :
16099 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16101 else
16102 case " $LIBOBJS " in
16103 *" inet_aton.$ac_objext "* ) ;;
16104 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16106 esac
16110 ac_fn_c_check_func "$LINENO" "link" "ac_cv_func_link"
16111 if test "x$ac_cv_func_link" = xyes; then :
16112 $as_echo "#define HAVE_LINK 1" >>confdefs.h
16114 else
16115 case " $LIBOBJS " in
16116 *" link.$ac_objext "* ) ;;
16117 *) LIBOBJS="$LIBOBJS link.$ac_objext"
16119 esac
16123 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16124 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16125 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16127 else
16128 case " $LIBOBJS " in
16129 *" mkdtemp.$ac_objext "* ) ;;
16130 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16132 esac
16136 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
16137 if test "x$ac_cv_func_pread" = xyes; then :
16138 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
16140 else
16141 case " $LIBOBJS " in
16142 *" pread.$ac_objext "* ) ;;
16143 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
16145 esac
16149 ac_fn_c_check_func "$LINENO" "preadv" "ac_cv_func_preadv"
16150 if test "x$ac_cv_func_preadv" = xyes; then :
16151 $as_echo "#define HAVE_PREADV 1" >>confdefs.h
16153 else
16154 case " $LIBOBJS " in
16155 *" preadv.$ac_objext "* ) ;;
16156 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16158 esac
16162 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
16163 if test "x$ac_cv_func_pwrite" = xyes; then :
16164 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
16166 else
16167 case " $LIBOBJS " in
16168 *" pwrite.$ac_objext "* ) ;;
16169 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
16171 esac
16175 ac_fn_c_check_func "$LINENO" "pwritev" "ac_cv_func_pwritev"
16176 if test "x$ac_cv_func_pwritev" = xyes; then :
16177 $as_echo "#define HAVE_PWRITEV 1" >>confdefs.h
16179 else
16180 case " $LIBOBJS " in
16181 *" pwritev.$ac_objext "* ) ;;
16182 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16184 esac
16188 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
16189 if test "x$ac_cv_func_random" = xyes; then :
16190 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
16192 else
16193 case " $LIBOBJS " in
16194 *" random.$ac_objext "* ) ;;
16195 *) LIBOBJS="$LIBOBJS random.$ac_objext"
16197 esac
16201 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
16202 if test "x$ac_cv_func_srandom" = xyes; then :
16203 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
16205 else
16206 case " $LIBOBJS " in
16207 *" srandom.$ac_objext "* ) ;;
16208 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
16210 esac
16214 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16215 if test "x$ac_cv_func_strlcat" = xyes; then :
16216 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16218 else
16219 case " $LIBOBJS " in
16220 *" strlcat.$ac_objext "* ) ;;
16221 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16223 esac
16227 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16228 if test "x$ac_cv_func_strlcpy" = xyes; then :
16229 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16231 else
16232 case " $LIBOBJS " in
16233 *" strlcpy.$ac_objext "* ) ;;
16234 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16236 esac
16240 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16241 if test "x$ac_cv_func_strnlen" = xyes; then :
16242 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16244 else
16245 case " $LIBOBJS " in
16246 *" strnlen.$ac_objext "* ) ;;
16247 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16249 esac
16253 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
16254 if test "x$ac_cv_func_strtof" = xyes; then :
16255 $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
16257 else
16258 case " $LIBOBJS " in
16259 *" strtof.$ac_objext "* ) ;;
16260 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16262 esac
16268 if test "$enable_thread_safety" = yes; then
16269 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16270 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16271 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16273 else
16274 case " $LIBOBJS " in
16275 *" pthread_barrier_wait.$ac_objext "* ) ;;
16276 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16278 esac
16285 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16286 # Cygwin and (apparently, based on test results) Mingw both
16287 # have a broken strtof(), so substitute the same replacement
16288 # code we use with VS2013. That's not a perfect fix, since
16289 # (unlike with VS2013) it doesn't avoid double-rounding, but
16290 # we have no better options. To get that, though, we have to
16291 # force the file to be compiled despite HAVE_STRTOF.
16292 case " $LIBOBJS " in
16293 *" strtof.$ac_objext "* ) ;;
16294 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16296 esac
16298 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16299 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16302 case $host_os in
16303 # Windows uses a specialised env handler
16304 mingw*)
16306 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16309 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16311 ac_cv_func_setenv=yes
16312 ac_cv_func_unsetenv=yes
16315 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
16316 if test "x$ac_cv_func_setenv" = xyes; then :
16317 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16319 else
16320 case " $LIBOBJS " in
16321 *" setenv.$ac_objext "* ) ;;
16322 *) LIBOBJS="$LIBOBJS setenv.$ac_objext"
16324 esac
16328 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16329 if test "x$ac_cv_func_unsetenv" = xyes; then :
16330 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16332 else
16333 case " $LIBOBJS " in
16334 *" unsetenv.$ac_objext "* ) ;;
16335 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16337 esac
16343 esac
16345 # System's version of getaddrinfo(), if any, may be used only if we found
16346 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16347 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16348 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16349 test "$PORTNAME" != "win32"; then
16350 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16351 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16352 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16354 else
16355 case " $LIBOBJS " in
16356 *" getaddrinfo.$ac_objext "* ) ;;
16357 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16359 esac
16364 else
16365 case " $LIBOBJS " in
16366 *" getaddrinfo.$ac_objext "* ) ;;
16367 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16369 esac
16373 # Similarly, use system's getopt_long() only if system provides struct option.
16374 if test x"$ac_cv_type_struct_option" = xyes ; then
16375 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16376 if test "x$ac_cv_func_getopt_long" = xyes; then :
16377 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16379 else
16380 case " $LIBOBJS " in
16381 *" getopt_long.$ac_objext "* ) ;;
16382 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16384 esac
16389 else
16390 case " $LIBOBJS " in
16391 *" getopt_long.$ac_objext "* ) ;;
16392 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16394 esac
16398 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16399 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16400 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16401 case " $LIBOBJS " in
16402 *" getopt.$ac_objext "* ) ;;
16403 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16405 esac
16409 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16410 # so always use our version on Windows.
16411 if test "$PORTNAME" = "win32"; then
16412 case " $LIBOBJS " in
16413 *" getopt.$ac_objext "* ) ;;
16414 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16416 esac
16418 case " $LIBOBJS " in
16419 *" getopt_long.$ac_objext "* ) ;;
16420 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16422 esac
16426 # Win32 (really MinGW) support
16427 if test "$PORTNAME" = "win32"; then
16428 for ac_func in _configthreadlocale
16429 do :
16430 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16431 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16432 cat >>confdefs.h <<_ACEOF
16433 #define HAVE__CONFIGTHREADLOCALE 1
16434 _ACEOF
16437 done
16439 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16440 if test "x$ac_cv_func_gettimeofday" = xyes; then :
16441 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16443 else
16444 case " $LIBOBJS " in
16445 *" gettimeofday.$ac_objext "* ) ;;
16446 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16448 esac
16453 case " $LIBOBJS " in
16454 *" dirmod.$ac_objext "* ) ;;
16455 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16457 esac
16459 case " $LIBOBJS " in
16460 *" kill.$ac_objext "* ) ;;
16461 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16463 esac
16465 case " $LIBOBJS " in
16466 *" open.$ac_objext "* ) ;;
16467 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16469 esac
16471 case " $LIBOBJS " in
16472 *" system.$ac_objext "* ) ;;
16473 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16475 esac
16477 case " $LIBOBJS " in
16478 *" win32env.$ac_objext "* ) ;;
16479 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16481 esac
16483 case " $LIBOBJS " in
16484 *" win32error.$ac_objext "* ) ;;
16485 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16487 esac
16489 case " $LIBOBJS " in
16490 *" win32security.$ac_objext "* ) ;;
16491 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16493 esac
16495 case " $LIBOBJS " in
16496 *" win32setlocale.$ac_objext "* ) ;;
16497 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16499 esac
16501 case " $LIBOBJS " in
16502 *" win32stat.$ac_objext "* ) ;;
16503 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16505 esac
16508 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16510 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16511 #define WIN32_LEAN_AND_MEAN
16512 #include <windows.h>
16513 #include <string.h>
16514 #include <dbghelp.h>
16516 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16518 cat >>confdefs.h <<_ACEOF
16519 #define HAVE_MINIDUMP_TYPE 1
16520 _ACEOF
16522 pgac_minidump_type=yes
16523 else
16524 pgac_minidump_type=no
16528 if test x"$pgac_minidump_type" = x"yes" ; then
16529 have_win32_dbghelp=yes
16531 else
16532 have_win32_dbghelp=no
16536 # Cygwin needs only a bit of that
16537 if test "$PORTNAME" = "cygwin"; then
16538 case " $LIBOBJS " in
16539 *" dirmod.$ac_objext "* ) ;;
16540 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16542 esac
16546 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16547 if test "x$ac_cv_func_syslog" = xyes; then :
16548 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16549 if test "x$ac_cv_header_syslog_h" = xyes; then :
16551 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16560 $as_echo_n "checking for opterr... " >&6; }
16561 if ${pgac_cv_var_int_opterr+:} false; then :
16562 $as_echo_n "(cached) " >&6
16563 else
16564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16565 /* end confdefs.h. */
16566 #include <unistd.h>
16568 main ()
16570 extern int opterr; opterr = 1;
16572 return 0;
16574 _ACEOF
16575 if ac_fn_c_try_link "$LINENO"; then :
16576 pgac_cv_var_int_opterr=yes
16577 else
16578 pgac_cv_var_int_opterr=no
16580 rm -f core conftest.err conftest.$ac_objext \
16581 conftest$ac_exeext conftest.$ac_ext
16583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16584 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16585 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16587 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16592 $as_echo_n "checking for optreset... " >&6; }
16593 if ${pgac_cv_var_int_optreset+:} false; then :
16594 $as_echo_n "(cached) " >&6
16595 else
16596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16597 /* end confdefs.h. */
16598 #include <unistd.h>
16600 main ()
16602 extern int optreset; optreset = 1;
16604 return 0;
16606 _ACEOF
16607 if ac_fn_c_try_link "$LINENO"; then :
16608 pgac_cv_var_int_optreset=yes
16609 else
16610 pgac_cv_var_int_optreset=no
16612 rm -f core conftest.err conftest.$ac_objext \
16613 conftest$ac_exeext conftest.$ac_ext
16615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16616 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16617 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16619 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16623 for ac_func in strtoll __strtoll strtoq
16624 do :
16625 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16626 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16627 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16628 cat >>confdefs.h <<_ACEOF
16629 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16630 _ACEOF
16631 break
16633 done
16635 for ac_func in strtoull __strtoull strtouq
16636 do :
16637 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16638 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16639 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16640 cat >>confdefs.h <<_ACEOF
16641 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16642 _ACEOF
16643 break
16645 done
16647 # strto[u]ll may exist but not be declared
16648 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16649 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16650 ac_have_decl=1
16651 else
16652 ac_have_decl=0
16655 cat >>confdefs.h <<_ACEOF
16656 #define HAVE_DECL_STRTOLL $ac_have_decl
16657 _ACEOF
16658 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16659 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16660 ac_have_decl=1
16661 else
16662 ac_have_decl=0
16665 cat >>confdefs.h <<_ACEOF
16666 #define HAVE_DECL_STRTOULL $ac_have_decl
16667 _ACEOF
16670 if test "$with_icu" = yes; then
16671 ac_save_CPPFLAGS=$CPPFLAGS
16672 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16674 # Verify we have ICU's header files
16675 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16676 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16678 else
16679 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16684 CPPFLAGS=$ac_save_CPPFLAGS
16687 if test "$with_llvm" = yes; then
16689 # Check which functionality is present
16690 SAVE_CPPFLAGS="$CPPFLAGS"
16691 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16692 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16694 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16695 ac_have_decl=1
16696 else
16697 ac_have_decl=0
16700 cat >>confdefs.h <<_ACEOF
16701 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16702 _ACEOF
16704 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16706 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16707 ac_have_decl=1
16708 else
16709 ac_have_decl=0
16712 cat >>confdefs.h <<_ACEOF
16713 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16714 _ACEOF
16715 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16717 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16718 ac_have_decl=1
16719 else
16720 ac_have_decl=0
16723 cat >>confdefs.h <<_ACEOF
16724 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16725 _ACEOF
16727 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16729 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16730 ac_have_decl=1
16731 else
16732 ac_have_decl=0
16735 cat >>confdefs.h <<_ACEOF
16736 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16737 _ACEOF
16738 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16740 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16741 ac_have_decl=1
16742 else
16743 ac_have_decl=0
16746 cat >>confdefs.h <<_ACEOF
16747 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16748 _ACEOF
16750 CPPFLAGS="$SAVE_CPPFLAGS"
16754 # Lastly, restore full LIBS list and check for readline/libedit symbols
16755 LIBS="$LIBS_including_readline"
16757 if test "$with_readline" = yes; then
16758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16759 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16760 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16761 $as_echo_n "(cached) " >&6
16762 else
16763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16764 /* end confdefs.h. */
16765 #include <stdio.h>
16766 #if defined(HAVE_READLINE_READLINE_H)
16767 #include <readline/readline.h>
16768 #elif defined(HAVE_EDITLINE_READLINE_H)
16769 #include <editline/readline.h>
16770 #elif defined(HAVE_READLINE_H)
16771 #include <readline.h>
16772 #endif
16775 main ()
16777 rl_completion_append_character = 'x';
16779 return 0;
16781 _ACEOF
16782 if ac_fn_c_try_link "$LINENO"; then :
16783 pgac_cv_var_rl_completion_append_character=yes
16784 else
16785 pgac_cv_var_rl_completion_append_character=no
16787 rm -f core conftest.err conftest.$ac_objext \
16788 conftest$ac_exeext conftest.$ac_ext
16790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16791 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16792 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16794 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16798 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16799 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16800 $as_echo_n "(cached) " >&6
16801 else
16802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16803 /* end confdefs.h. */
16804 #include <stdio.h>
16805 #if defined(HAVE_READLINE_READLINE_H)
16806 #include <readline/readline.h>
16807 #elif defined(HAVE_EDITLINE_READLINE_H)
16808 #include <editline/readline.h>
16809 #elif defined(HAVE_READLINE_H)
16810 #include <readline.h>
16811 #endif
16814 main ()
16816 rl_completion_suppress_quote = 1;
16818 return 0;
16820 _ACEOF
16821 if ac_fn_c_try_link "$LINENO"; then :
16822 pgac_cv_var_rl_completion_suppress_quote=yes
16823 else
16824 pgac_cv_var_rl_completion_suppress_quote=no
16826 rm -f core conftest.err conftest.$ac_objext \
16827 conftest$ac_exeext conftest.$ac_ext
16829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16830 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16831 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16833 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16837 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16838 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16839 $as_echo_n "(cached) " >&6
16840 else
16841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16842 /* end confdefs.h. */
16843 #include <stdio.h>
16844 #if defined(HAVE_READLINE_READLINE_H)
16845 #include <readline/readline.h>
16846 #elif defined(HAVE_EDITLINE_READLINE_H)
16847 #include <editline/readline.h>
16848 #elif defined(HAVE_READLINE_H)
16849 #include <readline.h>
16850 #endif
16853 main ()
16855 rl_filename_quote_characters = "x";
16857 return 0;
16859 _ACEOF
16860 if ac_fn_c_try_link "$LINENO"; then :
16861 pgac_cv_var_rl_filename_quote_characters=yes
16862 else
16863 pgac_cv_var_rl_filename_quote_characters=no
16865 rm -f core conftest.err conftest.$ac_objext \
16866 conftest$ac_exeext conftest.$ac_ext
16868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16869 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16870 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16872 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16876 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16877 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16878 $as_echo_n "(cached) " >&6
16879 else
16880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16881 /* end confdefs.h. */
16882 #include <stdio.h>
16883 #if defined(HAVE_READLINE_READLINE_H)
16884 #include <readline/readline.h>
16885 #elif defined(HAVE_EDITLINE_READLINE_H)
16886 #include <editline/readline.h>
16887 #elif defined(HAVE_READLINE_H)
16888 #include <readline.h>
16889 #endif
16892 main ()
16894 rl_filename_quoting_function = 0;
16896 return 0;
16898 _ACEOF
16899 if ac_fn_c_try_link "$LINENO"; then :
16900 pgac_cv_var_rl_filename_quoting_function=yes
16901 else
16902 pgac_cv_var_rl_filename_quoting_function=no
16904 rm -f core conftest.err conftest.$ac_objext \
16905 conftest$ac_exeext conftest.$ac_ext
16907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16908 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16909 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16911 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16915 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16916 do :
16917 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16918 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16919 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16920 cat >>confdefs.h <<_ACEOF
16921 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16922 _ACEOF
16925 done
16927 for ac_func in append_history history_truncate_file
16928 do :
16929 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16930 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16931 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16932 cat >>confdefs.h <<_ACEOF
16933 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16934 _ACEOF
16937 done
16942 # This test makes sure that run tests work at all. Sometimes a shared
16943 # library is found by the linker, but the runtime linker can't find it.
16944 # This check should come after all modifications of compiler or linker
16945 # variables, and before any other run tests.
16946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16947 $as_echo_n "checking test program... " >&6; }
16948 if test "$cross_compiling" = yes; then :
16949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16950 $as_echo "cross-compiling" >&6; }
16951 else
16952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16953 /* end confdefs.h. */
16954 int main() { return 0; }
16955 _ACEOF
16956 if ac_fn_c_try_run "$LINENO"; then :
16957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16958 $as_echo "ok" >&6; }
16959 else
16960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16961 $as_echo "failed" >&6; }
16962 as_fn_error $? "
16963 Could not execute a simple test program. This may be a problem
16964 related to locating shared libraries. Check the file 'config.log'
16965 for the exact reason." "$LINENO" 5
16967 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16968 conftest.$ac_objext conftest.beam conftest.$ac_ext
16972 # --------------------
16973 # Run tests below here
16974 # --------------------
16977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16978 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16979 if ${pgac_cv_type_long_int_64+:} false; then :
16980 $as_echo_n "(cached) " >&6
16981 else
16982 if test "$cross_compiling" = yes; then :
16983 # If cross-compiling, check the size reported by the compiler and
16984 # trust that the arithmetic works.
16985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16986 /* end confdefs.h. */
16989 main ()
16991 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16992 test_array [0] = 0;
16993 return test_array [0];
16996 return 0;
16998 _ACEOF
16999 if ac_fn_c_try_compile "$LINENO"; then :
17000 pgac_cv_type_long_int_64=yes
17001 else
17002 pgac_cv_type_long_int_64=no
17004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17005 else
17006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17007 /* end confdefs.h. */
17008 typedef long int ac_int64;
17011 * These are globals to discourage the compiler from folding all the
17012 * arithmetic tests down to compile-time constants.
17014 ac_int64 a = 20000001;
17015 ac_int64 b = 40000005;
17017 int does_int64_work()
17019 ac_int64 c,d;
17021 if (sizeof(ac_int64) != 8)
17022 return 0; /* definitely not the right size */
17024 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17025 c = a * b;
17026 d = (c + b) / b;
17027 if (d != a+1)
17028 return 0;
17029 return 1;
17033 main() {
17034 return (! does_int64_work());
17036 _ACEOF
17037 if ac_fn_c_try_run "$LINENO"; then :
17038 pgac_cv_type_long_int_64=yes
17039 else
17040 pgac_cv_type_long_int_64=no
17042 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17043 conftest.$ac_objext conftest.beam conftest.$ac_ext
17047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
17048 $as_echo "$pgac_cv_type_long_int_64" >&6; }
17050 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17051 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17053 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
17058 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
17059 pg_int64_type="long int"
17060 else
17061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
17062 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
17063 if ${pgac_cv_type_long_long_int_64+:} false; then :
17064 $as_echo_n "(cached) " >&6
17065 else
17066 if test "$cross_compiling" = yes; then :
17067 # If cross-compiling, check the size reported by the compiler and
17068 # trust that the arithmetic works.
17069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17070 /* end confdefs.h. */
17073 main ()
17075 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17076 test_array [0] = 0;
17077 return test_array [0];
17080 return 0;
17082 _ACEOF
17083 if ac_fn_c_try_compile "$LINENO"; then :
17084 pgac_cv_type_long_long_int_64=yes
17085 else
17086 pgac_cv_type_long_long_int_64=no
17088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17089 else
17090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17091 /* end confdefs.h. */
17092 typedef long long int ac_int64;
17095 * These are globals to discourage the compiler from folding all the
17096 * arithmetic tests down to compile-time constants.
17098 ac_int64 a = 20000001;
17099 ac_int64 b = 40000005;
17101 int does_int64_work()
17103 ac_int64 c,d;
17105 if (sizeof(ac_int64) != 8)
17106 return 0; /* definitely not the right size */
17108 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17109 c = a * b;
17110 d = (c + b) / b;
17111 if (d != a+1)
17112 return 0;
17113 return 1;
17117 main() {
17118 return (! does_int64_work());
17120 _ACEOF
17121 if ac_fn_c_try_run "$LINENO"; then :
17122 pgac_cv_type_long_long_int_64=yes
17123 else
17124 pgac_cv_type_long_long_int_64=no
17126 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17127 conftest.$ac_objext conftest.beam conftest.$ac_ext
17131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17132 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17134 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17135 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17137 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17141 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17142 pg_int64_type="long long int"
17143 else
17144 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17149 cat >>confdefs.h <<_ACEOF
17150 #define PG_INT64_TYPE $pg_int64_type
17151 _ACEOF
17154 # Select the printf length modifier that goes with that, too.
17155 if test x"$pg_int64_type" = x"long long int" ; then
17156 INT64_MODIFIER='"ll"'
17157 else
17158 INT64_MODIFIER='"l"'
17162 cat >>confdefs.h <<_ACEOF
17163 #define INT64_MODIFIER $INT64_MODIFIER
17164 _ACEOF
17167 # has to be down here, rather than with the other builtins, because
17168 # the test uses PG_INT64_TYPE.
17169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17170 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17171 if ${pgac_cv__builtin_op_overflow+:} false; then :
17172 $as_echo_n "(cached) " >&6
17173 else
17174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17175 /* end confdefs.h. */
17177 PG_INT64_TYPE a = 1;
17178 PG_INT64_TYPE b = 1;
17179 PG_INT64_TYPE result;
17180 int oflo;
17183 main ()
17185 oflo = __builtin_mul_overflow(a, b, &result);
17187 return 0;
17189 _ACEOF
17190 if ac_fn_c_try_link "$LINENO"; then :
17191 pgac_cv__builtin_op_overflow=yes
17192 else
17193 pgac_cv__builtin_op_overflow=no
17195 rm -f core conftest.err conftest.$ac_objext \
17196 conftest$ac_exeext conftest.$ac_ext
17198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17199 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17200 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17202 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17206 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17207 # The cast to long int works around a bug in the HP C Compiler
17208 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17209 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17210 # This bug is HP SR number 8606223364.
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17212 $as_echo_n "checking size of void *... " >&6; }
17213 if ${ac_cv_sizeof_void_p+:} false; then :
17214 $as_echo_n "(cached) " >&6
17215 else
17216 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17218 else
17219 if test "$ac_cv_type_void_p" = yes; then
17220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17222 as_fn_error 77 "cannot compute sizeof (void *)
17223 See \`config.log' for more details" "$LINENO" 5; }
17224 else
17225 ac_cv_sizeof_void_p=0
17230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17231 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17235 cat >>confdefs.h <<_ACEOF
17236 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17237 _ACEOF
17240 # The cast to long int works around a bug in the HP C Compiler
17241 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17242 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17243 # This bug is HP SR number 8606223364.
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17245 $as_echo_n "checking size of size_t... " >&6; }
17246 if ${ac_cv_sizeof_size_t+:} false; then :
17247 $as_echo_n "(cached) " >&6
17248 else
17249 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17251 else
17252 if test "$ac_cv_type_size_t" = yes; then
17253 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17254 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17255 as_fn_error 77 "cannot compute sizeof (size_t)
17256 See \`config.log' for more details" "$LINENO" 5; }
17257 else
17258 ac_cv_sizeof_size_t=0
17263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17264 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17268 cat >>confdefs.h <<_ACEOF
17269 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17270 _ACEOF
17273 # The cast to long int works around a bug in the HP C Compiler
17274 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17275 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17276 # This bug is HP SR number 8606223364.
17277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17278 $as_echo_n "checking size of long... " >&6; }
17279 if ${ac_cv_sizeof_long+:} false; then :
17280 $as_echo_n "(cached) " >&6
17281 else
17282 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17284 else
17285 if test "$ac_cv_type_long" = yes; then
17286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17287 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17288 as_fn_error 77 "cannot compute sizeof (long)
17289 See \`config.log' for more details" "$LINENO" 5; }
17290 else
17291 ac_cv_sizeof_long=0
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17297 $as_echo "$ac_cv_sizeof_long" >&6; }
17301 cat >>confdefs.h <<_ACEOF
17302 #define SIZEOF_LONG $ac_cv_sizeof_long
17303 _ACEOF
17307 # Determine memory alignment requirements for the basic C data types.
17309 # The cast to long int works around a bug in the HP C Compiler,
17310 # see AC_CHECK_SIZEOF for more information.
17311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17312 $as_echo_n "checking alignment of short... " >&6; }
17313 if ${ac_cv_alignof_short+:} false; then :
17314 $as_echo_n "(cached) " >&6
17315 else
17316 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17317 #ifndef offsetof
17318 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17319 #endif
17320 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17322 else
17323 if test "$ac_cv_type_short" = yes; then
17324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17325 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17326 as_fn_error 77 "cannot compute alignment of short
17327 See \`config.log' for more details" "$LINENO" 5; }
17328 else
17329 ac_cv_alignof_short=0
17334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17335 $as_echo "$ac_cv_alignof_short" >&6; }
17339 cat >>confdefs.h <<_ACEOF
17340 #define ALIGNOF_SHORT $ac_cv_alignof_short
17341 _ACEOF
17344 # The cast to long int works around a bug in the HP C Compiler,
17345 # see AC_CHECK_SIZEOF for more information.
17346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17347 $as_echo_n "checking alignment of int... " >&6; }
17348 if ${ac_cv_alignof_int+:} false; then :
17349 $as_echo_n "(cached) " >&6
17350 else
17351 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17352 #ifndef offsetof
17353 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17354 #endif
17355 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17357 else
17358 if test "$ac_cv_type_int" = yes; then
17359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17360 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17361 as_fn_error 77 "cannot compute alignment of int
17362 See \`config.log' for more details" "$LINENO" 5; }
17363 else
17364 ac_cv_alignof_int=0
17369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17370 $as_echo "$ac_cv_alignof_int" >&6; }
17374 cat >>confdefs.h <<_ACEOF
17375 #define ALIGNOF_INT $ac_cv_alignof_int
17376 _ACEOF
17379 # The cast to long int works around a bug in the HP C Compiler,
17380 # see AC_CHECK_SIZEOF for more information.
17381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17382 $as_echo_n "checking alignment of long... " >&6; }
17383 if ${ac_cv_alignof_long+:} false; then :
17384 $as_echo_n "(cached) " >&6
17385 else
17386 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17387 #ifndef offsetof
17388 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17389 #endif
17390 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17392 else
17393 if test "$ac_cv_type_long" = yes; then
17394 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17395 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17396 as_fn_error 77 "cannot compute alignment of long
17397 See \`config.log' for more details" "$LINENO" 5; }
17398 else
17399 ac_cv_alignof_long=0
17404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17405 $as_echo "$ac_cv_alignof_long" >&6; }
17409 cat >>confdefs.h <<_ACEOF
17410 #define ALIGNOF_LONG $ac_cv_alignof_long
17411 _ACEOF
17414 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17415 # The cast to long int works around a bug in the HP C Compiler,
17416 # see AC_CHECK_SIZEOF for more information.
17417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17418 $as_echo_n "checking alignment of long long int... " >&6; }
17419 if ${ac_cv_alignof_long_long_int+:} false; then :
17420 $as_echo_n "(cached) " >&6
17421 else
17422 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17423 #ifndef offsetof
17424 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17425 #endif
17426 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17428 else
17429 if test "$ac_cv_type_long_long_int" = yes; then
17430 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17431 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17432 as_fn_error 77 "cannot compute alignment of long long int
17433 See \`config.log' for more details" "$LINENO" 5; }
17434 else
17435 ac_cv_alignof_long_long_int=0
17440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17441 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17445 cat >>confdefs.h <<_ACEOF
17446 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17447 _ACEOF
17451 # The cast to long int works around a bug in the HP C Compiler,
17452 # see AC_CHECK_SIZEOF for more information.
17453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17454 $as_echo_n "checking alignment of double... " >&6; }
17455 if ${ac_cv_alignof_double+:} false; then :
17456 $as_echo_n "(cached) " >&6
17457 else
17458 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17459 #ifndef offsetof
17460 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17461 #endif
17462 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17464 else
17465 if test "$ac_cv_type_double" = yes; then
17466 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17467 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17468 as_fn_error 77 "cannot compute alignment of double
17469 See \`config.log' for more details" "$LINENO" 5; }
17470 else
17471 ac_cv_alignof_double=0
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17477 $as_echo "$ac_cv_alignof_double" >&6; }
17481 cat >>confdefs.h <<_ACEOF
17482 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17483 _ACEOF
17487 # Compute maximum alignment of any basic type.
17488 # We assume long's alignment is at least as strong as char, short, or int;
17489 # but we must check long long (if it is being used for int64) and double.
17490 # Note that we intentionally do not consider any types wider than 64 bits,
17491 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17492 # for disk and memory space.
17494 MAX_ALIGNOF=$ac_cv_alignof_long
17495 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17496 MAX_ALIGNOF=$ac_cv_alignof_double
17498 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17499 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17502 cat >>confdefs.h <<_ACEOF
17503 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17504 _ACEOF
17508 # Some platforms predefine the types int8, int16, etc. Only check
17509 # a (hopefully) representative subset.
17510 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17512 if test "x$ac_cv_type_int8" = xyes; then :
17514 cat >>confdefs.h <<_ACEOF
17515 #define HAVE_INT8 1
17516 _ACEOF
17520 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17522 if test "x$ac_cv_type_uint8" = xyes; then :
17524 cat >>confdefs.h <<_ACEOF
17525 #define HAVE_UINT8 1
17526 _ACEOF
17530 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17532 if test "x$ac_cv_type_int64" = xyes; then :
17534 cat >>confdefs.h <<_ACEOF
17535 #define HAVE_INT64 1
17536 _ACEOF
17540 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17542 if test "x$ac_cv_type_uint64" = xyes; then :
17544 cat >>confdefs.h <<_ACEOF
17545 #define HAVE_UINT64 1
17546 _ACEOF
17552 # Some compilers offer a 128-bit integer scalar type.
17553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17554 $as_echo_n "checking for __int128... " >&6; }
17555 if ${pgac_cv__128bit_int+:} false; then :
17556 $as_echo_n "(cached) " >&6
17557 else
17558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17559 /* end confdefs.h. */
17562 * We don't actually run this test, just link it to verify that any support
17563 * functions needed for __int128 are present.
17565 * These are globals to discourage the compiler from folding all the
17566 * arithmetic tests down to compile-time constants. We do not have
17567 * convenient support for 128bit literals at this point...
17569 __int128 a = 48828125;
17570 __int128 b = 97656250;
17573 main ()
17576 __int128 c,d;
17577 a = (a << 12) + 1; /* 200000000001 */
17578 b = (b << 12) + 5; /* 400000000005 */
17579 /* try the most relevant arithmetic ops */
17580 c = a * b;
17581 d = (c + b) / b;
17582 /* must use the results, else compiler may optimize arithmetic away */
17583 if (d != a+1)
17584 return 1;
17587 return 0;
17589 _ACEOF
17590 if ac_fn_c_try_link "$LINENO"; then :
17591 pgac_cv__128bit_int=yes
17592 else
17593 pgac_cv__128bit_int=no
17595 rm -f core conftest.err conftest.$ac_objext \
17596 conftest$ac_exeext conftest.$ac_ext
17598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17599 $as_echo "$pgac_cv__128bit_int" >&6; }
17600 if test x"$pgac_cv__128bit_int" = xyes ; then
17601 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17602 # If not cross-compiling, we can test for bugs and disable use of __int128
17603 # with buggy compilers. If cross-compiling, hope for the best.
17604 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17606 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17607 if ${pgac_cv__128bit_int_bug+:} false; then :
17608 $as_echo_n "(cached) " >&6
17609 else
17610 if test "$cross_compiling" = yes; then :
17611 pgac_cv__128bit_int_bug="assuming ok"
17612 else
17613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17614 /* end confdefs.h. */
17616 /* This must match the corresponding code in c.h: */
17617 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17618 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17619 #endif
17620 typedef __int128 int128a
17621 #if defined(pg_attribute_aligned)
17622 pg_attribute_aligned(8)
17623 #endif
17625 int128a holder;
17626 void pass_by_val(void *buffer, int128a par) { holder = par; }
17629 main ()
17632 long int i64 = 97656225L << 12;
17633 int128a q;
17634 pass_by_val(main, (int128a) i64);
17635 q = (int128a) i64;
17636 if (q != holder)
17637 return 1;
17640 return 0;
17642 _ACEOF
17643 if ac_fn_c_try_run "$LINENO"; then :
17644 pgac_cv__128bit_int_bug=ok
17645 else
17646 pgac_cv__128bit_int_bug=broken
17648 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17649 conftest.$ac_objext conftest.beam conftest.$ac_ext
17653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17654 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17655 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17657 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17659 # The cast to long int works around a bug in the HP C Compiler,
17660 # see AC_CHECK_SIZEOF for more information.
17661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17662 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17663 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17664 $as_echo_n "(cached) " >&6
17665 else
17666 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17667 #ifndef offsetof
17668 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17669 #endif
17670 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17672 else
17673 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17674 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17675 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17676 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17677 See \`config.log' for more details" "$LINENO" 5; }
17678 else
17679 ac_cv_alignof_PG_INT128_TYPE=0
17684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17685 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17689 cat >>confdefs.h <<_ACEOF
17690 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17691 _ACEOF
17697 # Check for various atomic operations now that we have checked how to declare
17698 # 64bit integers.
17699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17700 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17701 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17702 $as_echo_n "(cached) " >&6
17703 else
17704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17705 /* end confdefs.h. */
17708 main ()
17710 char lock = 0;
17711 __sync_lock_test_and_set(&lock, 1);
17712 __sync_lock_release(&lock);
17714 return 0;
17716 _ACEOF
17717 if ac_fn_c_try_link "$LINENO"; then :
17718 pgac_cv_gcc_sync_char_tas="yes"
17719 else
17720 pgac_cv_gcc_sync_char_tas="no"
17722 rm -f core conftest.err conftest.$ac_objext \
17723 conftest$ac_exeext conftest.$ac_ext
17725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17726 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17727 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17729 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17733 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17734 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17735 $as_echo_n "(cached) " >&6
17736 else
17737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17738 /* end confdefs.h. */
17741 main ()
17743 int lock = 0;
17744 __sync_lock_test_and_set(&lock, 1);
17745 __sync_lock_release(&lock);
17747 return 0;
17749 _ACEOF
17750 if ac_fn_c_try_link "$LINENO"; then :
17751 pgac_cv_gcc_sync_int32_tas="yes"
17752 else
17753 pgac_cv_gcc_sync_int32_tas="no"
17755 rm -f core conftest.err conftest.$ac_objext \
17756 conftest$ac_exeext conftest.$ac_ext
17758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17759 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17760 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17762 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17766 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17767 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17768 $as_echo_n "(cached) " >&6
17769 else
17770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17771 /* end confdefs.h. */
17774 main ()
17776 int val = 0;
17777 __sync_val_compare_and_swap(&val, 0, 37);
17779 return 0;
17781 _ACEOF
17782 if ac_fn_c_try_link "$LINENO"; then :
17783 pgac_cv_gcc_sync_int32_cas="yes"
17784 else
17785 pgac_cv_gcc_sync_int32_cas="no"
17787 rm -f core conftest.err conftest.$ac_objext \
17788 conftest$ac_exeext conftest.$ac_ext
17790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17791 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17792 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17794 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17798 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17799 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17800 $as_echo_n "(cached) " >&6
17801 else
17802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17803 /* end confdefs.h. */
17806 main ()
17808 PG_INT64_TYPE lock = 0;
17809 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17811 return 0;
17813 _ACEOF
17814 if ac_fn_c_try_link "$LINENO"; then :
17815 pgac_cv_gcc_sync_int64_cas="yes"
17816 else
17817 pgac_cv_gcc_sync_int64_cas="no"
17819 rm -f core conftest.err conftest.$ac_objext \
17820 conftest$ac_exeext conftest.$ac_ext
17822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17823 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17824 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17826 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17830 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17831 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17832 $as_echo_n "(cached) " >&6
17833 else
17834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17835 /* end confdefs.h. */
17838 main ()
17840 int val = 0;
17841 int expect = 0;
17842 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17844 return 0;
17846 _ACEOF
17847 if ac_fn_c_try_link "$LINENO"; then :
17848 pgac_cv_gcc_atomic_int32_cas="yes"
17849 else
17850 pgac_cv_gcc_atomic_int32_cas="no"
17852 rm -f core conftest.err conftest.$ac_objext \
17853 conftest$ac_exeext conftest.$ac_ext
17855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17856 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17857 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17859 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17863 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17864 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17865 $as_echo_n "(cached) " >&6
17866 else
17867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17868 /* end confdefs.h. */
17871 main ()
17873 PG_INT64_TYPE val = 0;
17874 PG_INT64_TYPE expect = 0;
17875 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17877 return 0;
17879 _ACEOF
17880 if ac_fn_c_try_link "$LINENO"; then :
17881 pgac_cv_gcc_atomic_int64_cas="yes"
17882 else
17883 pgac_cv_gcc_atomic_int64_cas="no"
17885 rm -f core conftest.err conftest.$ac_objext \
17886 conftest$ac_exeext conftest.$ac_ext
17888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17889 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17890 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17892 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17897 # Check for x86 cpuid instruction
17898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17899 $as_echo_n "checking for __get_cpuid... " >&6; }
17900 if ${pgac_cv__get_cpuid+:} false; then :
17901 $as_echo_n "(cached) " >&6
17902 else
17903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17904 /* end confdefs.h. */
17905 #include <cpuid.h>
17907 main ()
17909 unsigned int exx[4] = {0, 0, 0, 0};
17910 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17913 return 0;
17915 _ACEOF
17916 if ac_fn_c_try_link "$LINENO"; then :
17917 pgac_cv__get_cpuid="yes"
17918 else
17919 pgac_cv__get_cpuid="no"
17921 rm -f core conftest.err conftest.$ac_objext \
17922 conftest$ac_exeext conftest.$ac_ext
17924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17925 $as_echo "$pgac_cv__get_cpuid" >&6; }
17926 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17928 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17933 $as_echo_n "checking for __cpuid... " >&6; }
17934 if ${pgac_cv__cpuid+:} false; then :
17935 $as_echo_n "(cached) " >&6
17936 else
17937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17938 /* end confdefs.h. */
17939 #include <intrin.h>
17941 main ()
17943 unsigned int exx[4] = {0, 0, 0, 0};
17944 __get_cpuid(exx[0], 1);
17947 return 0;
17949 _ACEOF
17950 if ac_fn_c_try_link "$LINENO"; then :
17951 pgac_cv__cpuid="yes"
17952 else
17953 pgac_cv__cpuid="no"
17955 rm -f core conftest.err conftest.$ac_objext \
17956 conftest$ac_exeext conftest.$ac_ext
17958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17959 $as_echo "$pgac_cv__cpuid" >&6; }
17960 if test x"$pgac_cv__cpuid" = x"yes"; then
17962 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17966 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17968 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17969 # with the default compiler flags. If not, check if adding the -msse4.2
17970 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17972 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17973 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17974 $as_echo_n "(cached) " >&6
17975 else
17976 pgac_save_CFLAGS=$CFLAGS
17977 CFLAGS="$pgac_save_CFLAGS "
17978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17979 /* end confdefs.h. */
17980 #include <nmmintrin.h>
17982 main ()
17984 unsigned int crc = 0;
17985 crc = _mm_crc32_u8(crc, 0);
17986 crc = _mm_crc32_u32(crc, 0);
17987 /* return computed value, to prevent the above being optimized away */
17988 return crc == 0;
17990 return 0;
17992 _ACEOF
17993 if ac_fn_c_try_link "$LINENO"; then :
17994 pgac_cv_sse42_crc32_intrinsics_=yes
17995 else
17996 pgac_cv_sse42_crc32_intrinsics_=no
17998 rm -f core conftest.err conftest.$ac_objext \
17999 conftest$ac_exeext conftest.$ac_ext
18000 CFLAGS="$pgac_save_CFLAGS"
18002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
18003 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
18004 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
18005 CFLAGS_SSE42=""
18006 pgac_sse42_crc32_intrinsics=yes
18009 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
18010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
18011 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
18012 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
18013 $as_echo_n "(cached) " >&6
18014 else
18015 pgac_save_CFLAGS=$CFLAGS
18016 CFLAGS="$pgac_save_CFLAGS -msse4.2"
18017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18018 /* end confdefs.h. */
18019 #include <nmmintrin.h>
18021 main ()
18023 unsigned int crc = 0;
18024 crc = _mm_crc32_u8(crc, 0);
18025 crc = _mm_crc32_u32(crc, 0);
18026 /* return computed value, to prevent the above being optimized away */
18027 return crc == 0;
18029 return 0;
18031 _ACEOF
18032 if ac_fn_c_try_link "$LINENO"; then :
18033 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
18034 else
18035 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
18037 rm -f core conftest.err conftest.$ac_objext \
18038 conftest$ac_exeext conftest.$ac_ext
18039 CFLAGS="$pgac_save_CFLAGS"
18041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
18042 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
18043 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
18044 CFLAGS_SSE42="-msse4.2"
18045 pgac_sse42_crc32_intrinsics=yes
18051 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18052 # define __SSE4_2__ in that case.
18053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18054 /* end confdefs.h. */
18057 main ()
18060 #ifndef __SSE4_2__
18061 #error __SSE4_2__ not defined
18062 #endif
18065 return 0;
18067 _ACEOF
18068 if ac_fn_c_try_compile "$LINENO"; then :
18069 SSE4_2_TARGETED=1
18071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18073 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18075 # First check if __crc32c* intrinsics can be used with the default compiler
18076 # flags. If not, check if adding -march=armv8-a+crc flag helps.
18077 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
18078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18079 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18080 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18081 $as_echo_n "(cached) " >&6
18082 else
18083 pgac_save_CFLAGS=$CFLAGS
18084 CFLAGS="$pgac_save_CFLAGS "
18085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18086 /* end confdefs.h. */
18087 #include <arm_acle.h>
18089 main ()
18091 unsigned int crc = 0;
18092 crc = __crc32cb(crc, 0);
18093 crc = __crc32ch(crc, 0);
18094 crc = __crc32cw(crc, 0);
18095 crc = __crc32cd(crc, 0);
18096 /* return computed value, to prevent the above being optimized away */
18097 return crc == 0;
18099 return 0;
18101 _ACEOF
18102 if ac_fn_c_try_link "$LINENO"; then :
18103 pgac_cv_armv8_crc32c_intrinsics_=yes
18104 else
18105 pgac_cv_armv8_crc32c_intrinsics_=no
18107 rm -f core conftest.err conftest.$ac_objext \
18108 conftest$ac_exeext conftest.$ac_ext
18109 CFLAGS="$pgac_save_CFLAGS"
18111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18112 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18113 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18114 CFLAGS_ARMV8_CRC32C=""
18115 pgac_armv8_crc32c_intrinsics=yes
18118 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18120 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18121 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18122 $as_echo_n "(cached) " >&6
18123 else
18124 pgac_save_CFLAGS=$CFLAGS
18125 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18127 /* end confdefs.h. */
18128 #include <arm_acle.h>
18130 main ()
18132 unsigned int crc = 0;
18133 crc = __crc32cb(crc, 0);
18134 crc = __crc32ch(crc, 0);
18135 crc = __crc32cw(crc, 0);
18136 crc = __crc32cd(crc, 0);
18137 /* return computed value, to prevent the above being optimized away */
18138 return crc == 0;
18140 return 0;
18142 _ACEOF
18143 if ac_fn_c_try_link "$LINENO"; then :
18144 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18145 else
18146 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18148 rm -f core conftest.err conftest.$ac_objext \
18149 conftest$ac_exeext conftest.$ac_ext
18150 CFLAGS="$pgac_save_CFLAGS"
18152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18153 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18154 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18155 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18156 pgac_armv8_crc32c_intrinsics=yes
18162 # Select CRC-32C implementation.
18164 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18165 # use the special CRC instructions for calculating CRC-32C. If we're not
18166 # targeting such a processor, but we can nevertheless produce code that uses
18167 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18168 # implementations and select which one to use at runtime, depending on whether
18169 # SSE 4.2 is supported by the processor we're running on.
18171 # Similarly, if we are targeting an ARM processor that has the CRC
18172 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18173 # we're not targeting such a processor, but can nevertheless produce code that
18174 # uses the CRC instructions, compile both, and select at runtime.
18176 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18177 # in the template or configure command line.
18178 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
18179 # Use Intel SSE 4.2 if available.
18180 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18181 USE_SSE42_CRC32C=1
18182 else
18183 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18184 # the runtime check.
18185 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
18186 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18187 else
18188 # Use ARM CRC Extension if available.
18189 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18190 USE_ARMV8_CRC32C=1
18191 else
18192 # ARM CRC Extension, with runtime check?
18193 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18194 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18195 else
18196 # fall back to slicing-by-8 algorithm, which doesn't require any
18197 # special CPU support.
18198 USE_SLICING_BY_8_CRC32C=1
18205 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18207 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18208 if test x"$USE_SSE42_CRC32C" = x"1"; then
18210 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18212 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18214 $as_echo "SSE 4.2" >&6; }
18215 else
18216 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18218 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18220 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18222 $as_echo "SSE 4.2 with runtime check" >&6; }
18223 else
18224 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18226 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18228 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18230 $as_echo "ARMv8 CRC instructions" >&6; }
18231 else
18232 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18234 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18236 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18238 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18239 else
18241 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18243 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18245 $as_echo "slicing-by-8" >&6; }
18253 # Select semaphore implementation type.
18254 if test "$PORTNAME" != "win32"; then
18255 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18256 # Need sem_open for this
18257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18258 $as_echo_n "checking for library containing sem_open... " >&6; }
18259 if ${ac_cv_search_sem_open+:} false; then :
18260 $as_echo_n "(cached) " >&6
18261 else
18262 ac_func_search_save_LIBS=$LIBS
18263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18264 /* end confdefs.h. */
18266 /* Override any GCC internal prototype to avoid an error.
18267 Use char because int might match the return type of a GCC
18268 builtin and then its argument prototype would still apply. */
18269 #ifdef __cplusplus
18270 extern "C"
18271 #endif
18272 char sem_open ();
18274 main ()
18276 return sem_open ();
18278 return 0;
18280 _ACEOF
18281 for ac_lib in '' rt pthread; do
18282 if test -z "$ac_lib"; then
18283 ac_res="none required"
18284 else
18285 ac_res=-l$ac_lib
18286 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18288 if ac_fn_c_try_link "$LINENO"; then :
18289 ac_cv_search_sem_open=$ac_res
18291 rm -f core conftest.err conftest.$ac_objext \
18292 conftest$ac_exeext
18293 if ${ac_cv_search_sem_open+:} false; then :
18294 break
18296 done
18297 if ${ac_cv_search_sem_open+:} false; then :
18299 else
18300 ac_cv_search_sem_open=no
18302 rm conftest.$ac_ext
18303 LIBS=$ac_func_search_save_LIBS
18305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18306 $as_echo "$ac_cv_search_sem_open" >&6; }
18307 ac_res=$ac_cv_search_sem_open
18308 if test "$ac_res" != no; then :
18309 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18310 USE_NAMED_POSIX_SEMAPHORES=1
18314 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18315 # Need sem_init for this
18316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18317 $as_echo_n "checking for library containing sem_init... " >&6; }
18318 if ${ac_cv_search_sem_init+:} false; then :
18319 $as_echo_n "(cached) " >&6
18320 else
18321 ac_func_search_save_LIBS=$LIBS
18322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18323 /* end confdefs.h. */
18325 /* Override any GCC internal prototype to avoid an error.
18326 Use char because int might match the return type of a GCC
18327 builtin and then its argument prototype would still apply. */
18328 #ifdef __cplusplus
18329 extern "C"
18330 #endif
18331 char sem_init ();
18333 main ()
18335 return sem_init ();
18337 return 0;
18339 _ACEOF
18340 for ac_lib in '' rt pthread; do
18341 if test -z "$ac_lib"; then
18342 ac_res="none required"
18343 else
18344 ac_res=-l$ac_lib
18345 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18347 if ac_fn_c_try_link "$LINENO"; then :
18348 ac_cv_search_sem_init=$ac_res
18350 rm -f core conftest.err conftest.$ac_objext \
18351 conftest$ac_exeext
18352 if ${ac_cv_search_sem_init+:} false; then :
18353 break
18355 done
18356 if ${ac_cv_search_sem_init+:} false; then :
18358 else
18359 ac_cv_search_sem_init=no
18361 rm conftest.$ac_ext
18362 LIBS=$ac_func_search_save_LIBS
18364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18365 $as_echo "$ac_cv_search_sem_init" >&6; }
18366 ac_res=$ac_cv_search_sem_init
18367 if test "$ac_res" != no; then :
18368 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18369 USE_UNNAMED_POSIX_SEMAPHORES=1
18373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18374 $as_echo_n "checking which semaphore API to use... " >&6; }
18375 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18377 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18379 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18380 sematype="named POSIX"
18381 else
18382 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18384 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18386 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18387 sematype="unnamed POSIX"
18388 else
18390 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18392 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18393 sematype="System V"
18396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18397 $as_echo "$sematype" >&6; }
18398 else
18400 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18402 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18406 # Select shared-memory implementation type.
18407 if test "$PORTNAME" != "win32"; then
18409 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18411 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18412 else
18414 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18416 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18419 # Select random number source. If a TLS library is used then it will be the
18420 # first choice, else the native platform sources (Windows API or /dev/urandom)
18421 # will be used.
18422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18423 $as_echo_n "checking which random number source to use... " >&6; }
18424 if test x"$with_ssl" = x"openssl" ; then
18425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18426 $as_echo "OpenSSL" >&6; }
18427 elif test x"$PORTNAME" = x"win32" ; then
18428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18429 $as_echo "Windows native" >&6; }
18430 else
18431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18432 $as_echo "/dev/urandom" >&6; }
18433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18434 $as_echo_n "checking for /dev/urandom... " >&6; }
18435 if ${ac_cv_file__dev_urandom+:} false; then :
18436 $as_echo_n "(cached) " >&6
18437 else
18438 test "$cross_compiling" = yes &&
18439 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18440 if test -r "/dev/urandom"; then
18441 ac_cv_file__dev_urandom=yes
18442 else
18443 ac_cv_file__dev_urandom=no
18446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18447 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18448 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18453 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18454 as_fn_error $? "
18455 no source of strong random numbers was found
18456 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18460 # If not set in template file, set bytes to use libc memset()
18461 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18462 MEMSET_LOOP_LIMIT=1024
18465 cat >>confdefs.h <<_ACEOF
18466 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18467 _ACEOF
18471 if test "$enable_nls" = yes ; then
18473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18474 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18475 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18476 $as_echo_n "(cached) " >&6
18477 else
18478 ac_func_search_save_LIBS=$LIBS
18479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18480 /* end confdefs.h. */
18482 /* Override any GCC internal prototype to avoid an error.
18483 Use char because int might match the return type of a GCC
18484 builtin and then its argument prototype would still apply. */
18485 #ifdef __cplusplus
18486 extern "C"
18487 #endif
18488 char bind_textdomain_codeset ();
18490 main ()
18492 return bind_textdomain_codeset ();
18494 return 0;
18496 _ACEOF
18497 for ac_lib in '' intl; do
18498 if test -z "$ac_lib"; then
18499 ac_res="none required"
18500 else
18501 ac_res=-l$ac_lib
18502 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18504 if ac_fn_c_try_link "$LINENO"; then :
18505 ac_cv_search_bind_textdomain_codeset=$ac_res
18507 rm -f core conftest.err conftest.$ac_objext \
18508 conftest$ac_exeext
18509 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18510 break
18512 done
18513 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18515 else
18516 ac_cv_search_bind_textdomain_codeset=no
18518 rm conftest.$ac_ext
18519 LIBS=$ac_func_search_save_LIBS
18521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18522 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18523 ac_res=$ac_cv_search_bind_textdomain_codeset
18524 if test "$ac_res" != no; then :
18525 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18527 else
18528 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18531 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18532 if test "x$ac_cv_header_libintl_h" = xyes; then :
18534 else
18535 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18539 if test -z "$MSGFMT"; then
18540 for ac_prog in msgfmt
18542 # Extract the first word of "$ac_prog", so it can be a program name with args.
18543 set dummy $ac_prog; ac_word=$2
18544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18545 $as_echo_n "checking for $ac_word... " >&6; }
18546 if ${ac_cv_path_MSGFMT+:} false; then :
18547 $as_echo_n "(cached) " >&6
18548 else
18549 case $MSGFMT in
18550 [\\/]* | ?:[\\/]*)
18551 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18554 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18555 for as_dir in $PATH
18557 IFS=$as_save_IFS
18558 test -z "$as_dir" && as_dir=.
18559 for ac_exec_ext in '' $ac_executable_extensions; do
18560 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18561 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18563 break 2
18565 done
18566 done
18567 IFS=$as_save_IFS
18570 esac
18572 MSGFMT=$ac_cv_path_MSGFMT
18573 if test -n "$MSGFMT"; then
18574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18575 $as_echo "$MSGFMT" >&6; }
18576 else
18577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18578 $as_echo "no" >&6; }
18582 test -n "$MSGFMT" && break
18583 done
18585 else
18586 # Report the value of MSGFMT in configure's output in all cases.
18587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18588 $as_echo_n "checking for MSGFMT... " >&6; }
18589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18590 $as_echo "$MSGFMT" >&6; }
18593 if test -z "$MSGFMT"; then
18594 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18597 $as_echo_n "checking for msgfmt flags... " >&6; }
18598 if ${pgac_cv_msgfmt_flags+:} false; then :
18599 $as_echo_n "(cached) " >&6
18600 else
18601 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18602 pgac_cv_msgfmt_flags=-c
18605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18606 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18607 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18609 if test -z "$MSGMERGE"; then
18610 for ac_prog in msgmerge
18612 # Extract the first word of "$ac_prog", so it can be a program name with args.
18613 set dummy $ac_prog; ac_word=$2
18614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18615 $as_echo_n "checking for $ac_word... " >&6; }
18616 if ${ac_cv_path_MSGMERGE+:} false; then :
18617 $as_echo_n "(cached) " >&6
18618 else
18619 case $MSGMERGE in
18620 [\\/]* | ?:[\\/]*)
18621 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18625 for as_dir in $PATH
18627 IFS=$as_save_IFS
18628 test -z "$as_dir" && as_dir=.
18629 for ac_exec_ext in '' $ac_executable_extensions; do
18630 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18631 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18632 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18633 break 2
18635 done
18636 done
18637 IFS=$as_save_IFS
18640 esac
18642 MSGMERGE=$ac_cv_path_MSGMERGE
18643 if test -n "$MSGMERGE"; then
18644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18645 $as_echo "$MSGMERGE" >&6; }
18646 else
18647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18648 $as_echo "no" >&6; }
18652 test -n "$MSGMERGE" && break
18653 done
18655 else
18656 # Report the value of MSGMERGE in configure's output in all cases.
18657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18658 $as_echo_n "checking for MSGMERGE... " >&6; }
18659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18660 $as_echo "$MSGMERGE" >&6; }
18663 if test -z "$XGETTEXT"; then
18664 for ac_prog in xgettext
18666 # Extract the first word of "$ac_prog", so it can be a program name with args.
18667 set dummy $ac_prog; ac_word=$2
18668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18669 $as_echo_n "checking for $ac_word... " >&6; }
18670 if ${ac_cv_path_XGETTEXT+:} false; then :
18671 $as_echo_n "(cached) " >&6
18672 else
18673 case $XGETTEXT in
18674 [\\/]* | ?:[\\/]*)
18675 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18679 for as_dir in $PATH
18681 IFS=$as_save_IFS
18682 test -z "$as_dir" && as_dir=.
18683 for ac_exec_ext in '' $ac_executable_extensions; do
18684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18685 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18687 break 2
18689 done
18690 done
18691 IFS=$as_save_IFS
18694 esac
18696 XGETTEXT=$ac_cv_path_XGETTEXT
18697 if test -n "$XGETTEXT"; then
18698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18699 $as_echo "$XGETTEXT" >&6; }
18700 else
18701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18702 $as_echo "no" >&6; }
18706 test -n "$XGETTEXT" && break
18707 done
18709 else
18710 # Report the value of XGETTEXT in configure's output in all cases.
18711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18712 $as_echo_n "checking for XGETTEXT... " >&6; }
18713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18714 $as_echo "$XGETTEXT" >&6; }
18720 # Check for Tcl configuration script tclConfig.sh
18721 if test "$with_tcl" = yes; then
18722 if test -z "$TCLSH"; then
18723 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18725 # Extract the first word of "$ac_prog", so it can be a program name with args.
18726 set dummy $ac_prog; ac_word=$2
18727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18728 $as_echo_n "checking for $ac_word... " >&6; }
18729 if ${ac_cv_path_TCLSH+:} false; then :
18730 $as_echo_n "(cached) " >&6
18731 else
18732 case $TCLSH in
18733 [\\/]* | ?:[\\/]*)
18734 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18738 for as_dir in $PATH
18740 IFS=$as_save_IFS
18741 test -z "$as_dir" && as_dir=.
18742 for ac_exec_ext in '' $ac_executable_extensions; do
18743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18744 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18746 break 2
18748 done
18749 done
18750 IFS=$as_save_IFS
18753 esac
18755 TCLSH=$ac_cv_path_TCLSH
18756 if test -n "$TCLSH"; then
18757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18758 $as_echo "$TCLSH" >&6; }
18759 else
18760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18761 $as_echo "no" >&6; }
18765 test -n "$TCLSH" && break
18766 done
18768 else
18769 # Report the value of TCLSH in configure's output in all cases.
18770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18771 $as_echo_n "checking for TCLSH... " >&6; }
18772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18773 $as_echo "$TCLSH" >&6; }
18776 if test x"$TCLSH" = x""; then
18777 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18781 $as_echo_n "checking for tclConfig.sh... " >&6; }
18782 # Let user override test
18783 if test -z "$TCL_CONFIG_SH"; then
18784 pgac_test_dirs="$with_tclconfig"
18786 set X $pgac_test_dirs; shift
18787 if test $# -eq 0; then
18788 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18789 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18790 # On newer macOS, $auto_path frequently doesn't include the place
18791 # where tclConfig.sh actually lives. Append that to the end, so as not
18792 # to break cases where a non-default Tcl installation is being used.
18793 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18794 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18796 set X $pgac_test_dirs; shift
18799 for pgac_dir do
18800 if test -r "$pgac_dir/tclConfig.sh"; then
18801 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18802 break
18804 done
18807 if test -z "$TCL_CONFIG_SH"; then
18808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18809 $as_echo "no" >&6; }
18810 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18811 else
18812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18813 $as_echo "$TCL_CONFIG_SH" >&6; }
18818 . "$TCL_CONFIG_SH"
18819 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18820 eval TCL_LIBS=\"$TCL_LIBS\"
18821 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18822 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18824 if test "$TCL_SHARED_BUILD" != 1; then
18825 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18826 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18828 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18829 ac_save_CPPFLAGS=$CPPFLAGS
18830 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18831 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18832 if test "x$ac_cv_header_tcl_h" = xyes; then :
18834 else
18835 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18839 CPPFLAGS=$ac_save_CPPFLAGS
18842 # check for <perl.h>
18843 if test "$with_perl" = yes; then
18844 ac_save_CPPFLAGS=$CPPFLAGS
18845 CPPFLAGS="$CPPFLAGS $perl_includespec"
18846 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18848 if test "x$ac_cv_header_perl_h" = xyes; then :
18850 else
18851 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18855 # While we're at it, check that we can link to libperl.
18856 # On most platforms, if perl.h is there then libperl.so will be too, but at
18857 # this writing Debian packages them separately. There is no known reason to
18858 # waste cycles on separate probes for the Tcl or Python libraries, though.
18859 # On some Red Hat platforms, the link attempt can fail if we don't use
18860 # CFLAGS_SL while building the test program.
18861 ac_save_CFLAGS=$CFLAGS
18862 CFLAGS="$CFLAGS $CFLAGS_SL"
18863 pgac_save_LIBS=$LIBS
18864 LIBS="$perl_embed_ldflags"
18865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18866 $as_echo_n "checking for libperl... " >&6; }
18867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18868 /* end confdefs.h. */
18870 #include <EXTERN.h>
18871 #include <perl.h>
18874 main ()
18876 perl_alloc();
18878 return 0;
18880 _ACEOF
18881 if ac_fn_c_try_link "$LINENO"; then :
18882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18883 $as_echo "yes" >&6; }
18884 else
18885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18886 $as_echo "no" >&6; }
18887 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18889 rm -f core conftest.err conftest.$ac_objext \
18890 conftest$ac_exeext conftest.$ac_ext
18891 LIBS=$pgac_save_LIBS
18892 CFLAGS=$ac_save_CFLAGS
18893 CPPFLAGS=$ac_save_CPPFLAGS
18896 # check for <Python.h>
18897 if test "$with_python" = yes; then
18898 ac_save_CPPFLAGS=$CPPFLAGS
18899 CPPFLAGS="$python_includespec $CPPFLAGS"
18900 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18901 if test "x$ac_cv_header_Python_h" = xyes; then :
18903 else
18904 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18908 CPPFLAGS=$ac_save_CPPFLAGS
18912 # Check for documentation-building tools
18914 if test -z "$XMLLINT"; then
18915 for ac_prog in xmllint
18917 # Extract the first word of "$ac_prog", so it can be a program name with args.
18918 set dummy $ac_prog; ac_word=$2
18919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18920 $as_echo_n "checking for $ac_word... " >&6; }
18921 if ${ac_cv_path_XMLLINT+:} false; then :
18922 $as_echo_n "(cached) " >&6
18923 else
18924 case $XMLLINT in
18925 [\\/]* | ?:[\\/]*)
18926 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18930 for as_dir in $PATH
18932 IFS=$as_save_IFS
18933 test -z "$as_dir" && as_dir=.
18934 for ac_exec_ext in '' $ac_executable_extensions; do
18935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18936 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18938 break 2
18940 done
18941 done
18942 IFS=$as_save_IFS
18945 esac
18947 XMLLINT=$ac_cv_path_XMLLINT
18948 if test -n "$XMLLINT"; then
18949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18950 $as_echo "$XMLLINT" >&6; }
18951 else
18952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18953 $as_echo "no" >&6; }
18957 test -n "$XMLLINT" && break
18958 done
18960 else
18961 # Report the value of XMLLINT in configure's output in all cases.
18962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18963 $as_echo_n "checking for XMLLINT... " >&6; }
18964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18965 $as_echo "$XMLLINT" >&6; }
18968 if test -z "$XSLTPROC"; then
18969 for ac_prog in xsltproc
18971 # Extract the first word of "$ac_prog", so it can be a program name with args.
18972 set dummy $ac_prog; ac_word=$2
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18974 $as_echo_n "checking for $ac_word... " >&6; }
18975 if ${ac_cv_path_XSLTPROC+:} false; then :
18976 $as_echo_n "(cached) " >&6
18977 else
18978 case $XSLTPROC in
18979 [\\/]* | ?:[\\/]*)
18980 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18984 for as_dir in $PATH
18986 IFS=$as_save_IFS
18987 test -z "$as_dir" && as_dir=.
18988 for ac_exec_ext in '' $ac_executable_extensions; do
18989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18990 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18992 break 2
18994 done
18995 done
18996 IFS=$as_save_IFS
18999 esac
19001 XSLTPROC=$ac_cv_path_XSLTPROC
19002 if test -n "$XSLTPROC"; then
19003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19004 $as_echo "$XSLTPROC" >&6; }
19005 else
19006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19007 $as_echo "no" >&6; }
19011 test -n "$XSLTPROC" && break
19012 done
19014 else
19015 # Report the value of XSLTPROC in configure's output in all cases.
19016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
19017 $as_echo_n "checking for XSLTPROC... " >&6; }
19018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19019 $as_echo "$XSLTPROC" >&6; }
19022 if test -z "$FOP"; then
19023 for ac_prog in fop
19025 # Extract the first word of "$ac_prog", so it can be a program name with args.
19026 set dummy $ac_prog; ac_word=$2
19027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19028 $as_echo_n "checking for $ac_word... " >&6; }
19029 if ${ac_cv_path_FOP+:} false; then :
19030 $as_echo_n "(cached) " >&6
19031 else
19032 case $FOP in
19033 [\\/]* | ?:[\\/]*)
19034 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19038 for as_dir in $PATH
19040 IFS=$as_save_IFS
19041 test -z "$as_dir" && as_dir=.
19042 for ac_exec_ext in '' $ac_executable_extensions; do
19043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19044 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19046 break 2
19048 done
19049 done
19050 IFS=$as_save_IFS
19053 esac
19055 FOP=$ac_cv_path_FOP
19056 if test -n "$FOP"; then
19057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19058 $as_echo "$FOP" >&6; }
19059 else
19060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19061 $as_echo "no" >&6; }
19065 test -n "$FOP" && break
19066 done
19068 else
19069 # Report the value of FOP in configure's output in all cases.
19070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19071 $as_echo_n "checking for FOP... " >&6; }
19072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19073 $as_echo "$FOP" >&6; }
19076 if test -z "$DBTOEPUB"; then
19077 for ac_prog in dbtoepub
19079 # Extract the first word of "$ac_prog", so it can be a program name with args.
19080 set dummy $ac_prog; ac_word=$2
19081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19082 $as_echo_n "checking for $ac_word... " >&6; }
19083 if ${ac_cv_path_DBTOEPUB+:} false; then :
19084 $as_echo_n "(cached) " >&6
19085 else
19086 case $DBTOEPUB in
19087 [\\/]* | ?:[\\/]*)
19088 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19092 for as_dir in $PATH
19094 IFS=$as_save_IFS
19095 test -z "$as_dir" && as_dir=.
19096 for ac_exec_ext in '' $ac_executable_extensions; do
19097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19098 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19100 break 2
19102 done
19103 done
19104 IFS=$as_save_IFS
19107 esac
19109 DBTOEPUB=$ac_cv_path_DBTOEPUB
19110 if test -n "$DBTOEPUB"; then
19111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19112 $as_echo "$DBTOEPUB" >&6; }
19113 else
19114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19115 $as_echo "no" >&6; }
19119 test -n "$DBTOEPUB" && break
19120 done
19122 else
19123 # Report the value of DBTOEPUB in configure's output in all cases.
19124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19125 $as_echo_n "checking for DBTOEPUB... " >&6; }
19126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19127 $as_echo "$DBTOEPUB" >&6; }
19132 # Check for test tools
19134 if test "$enable_tap_tests" = yes; then
19135 # Check for necessary modules, unless user has specified the "prove" to use;
19136 # in that case it's her responsibility to have a working configuration.
19137 # (prove might be part of a different Perl installation than perl, eg on
19138 # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
19139 if test -z "$PROVE"; then
19140 # Test::More and Time::HiRes are supposed to be part of core Perl,
19141 # but some distros omit them in a minimal installation.
19152 # Make sure we have perl
19153 if test -z "$PERL"; then
19154 # Extract the first word of "perl", so it can be a program name with args.
19155 set dummy perl; ac_word=$2
19156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19157 $as_echo_n "checking for $ac_word... " >&6; }
19158 if ${ac_cv_prog_PERL+:} false; then :
19159 $as_echo_n "(cached) " >&6
19160 else
19161 if test -n "$PERL"; then
19162 ac_cv_prog_PERL="$PERL" # Let the user override the test.
19163 else
19164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19165 for as_dir in $PATH
19167 IFS=$as_save_IFS
19168 test -z "$as_dir" && as_dir=.
19169 for ac_exec_ext in '' $ac_executable_extensions; do
19170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19171 ac_cv_prog_PERL="perl"
19172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19173 break 2
19175 done
19176 done
19177 IFS=$as_save_IFS
19181 PERL=$ac_cv_prog_PERL
19182 if test -n "$PERL"; then
19183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
19184 $as_echo "$PERL" >&6; }
19185 else
19186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19187 $as_echo "no" >&6; }
19193 if test "x$PERL" != x; then
19194 ax_perl_modules_failed=0
19195 for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
19196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
19197 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
19199 # Would be nice to log result here, but can't rely on autoconf internals
19200 $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
19201 if test $? -ne 0; then
19202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19203 $as_echo "no" >&6; };
19204 ax_perl_modules_failed=1
19205 else
19206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
19207 $as_echo "ok" >&6; };
19209 done
19211 # Run optional shell commands
19212 if test "$ax_perl_modules_failed" = 0; then
19215 else
19217 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19219 else
19220 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
19221 $as_echo "$as_me: WARNING: could not find perl" >&2;}
19224 # Now make sure we know where prove is
19225 if test -z "$PROVE"; then
19226 for ac_prog in prove
19228 # Extract the first word of "$ac_prog", so it can be a program name with args.
19229 set dummy $ac_prog; ac_word=$2
19230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19231 $as_echo_n "checking for $ac_word... " >&6; }
19232 if ${ac_cv_path_PROVE+:} false; then :
19233 $as_echo_n "(cached) " >&6
19234 else
19235 case $PROVE in
19236 [\\/]* | ?:[\\/]*)
19237 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19241 for as_dir in $PATH
19243 IFS=$as_save_IFS
19244 test -z "$as_dir" && as_dir=.
19245 for ac_exec_ext in '' $ac_executable_extensions; do
19246 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19247 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19248 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19249 break 2
19251 done
19252 done
19253 IFS=$as_save_IFS
19256 esac
19258 PROVE=$ac_cv_path_PROVE
19259 if test -n "$PROVE"; then
19260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19261 $as_echo "$PROVE" >&6; }
19262 else
19263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19264 $as_echo "no" >&6; }
19268 test -n "$PROVE" && break
19269 done
19271 else
19272 # Report the value of PROVE in configure's output in all cases.
19273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19274 $as_echo_n "checking for PROVE... " >&6; }
19275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19276 $as_echo "$PROVE" >&6; }
19279 if test -z "$PROVE"; then
19280 as_fn_error $? "prove not found" "$LINENO" 5
19284 # Thread testing
19286 # We have to run the thread test near the end so we have all our symbols
19287 # defined. Cross compiling throws a warning.
19289 if test "$enable_thread_safety" = yes; then
19290 if test "$PORTNAME" != "win32"
19291 then
19292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
19293 $as_echo_n "checking thread safety of required library functions... " >&6; }
19295 _CFLAGS="$CFLAGS"
19296 _LIBS="$LIBS"
19297 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19298 LIBS="$LIBS $PTHREAD_LIBS"
19299 if test "$cross_compiling" = yes; then :
19300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
19301 $as_echo "maybe" >&6; }
19302 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19303 *** Skipping thread test program because of cross-compile build.
19304 " >&5
19305 $as_echo "$as_me: WARNING:
19306 *** Skipping thread test program because of cross-compile build.
19307 " >&2;}
19308 else
19309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19310 /* end confdefs.h. */
19311 #include "$srcdir/config/thread_test.c"
19312 _ACEOF
19313 if ac_fn_c_try_run "$LINENO"; then :
19314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19315 $as_echo "yes" >&6; }
19316 else
19317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19318 $as_echo "no" >&6; }
19319 as_fn_error $? "thread test program failed
19320 This platform is not thread-safe. Check the file 'config.log' for the
19321 exact reason, or use --disable-thread-safety to disable thread safety." "$LINENO" 5
19323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19324 conftest.$ac_objext conftest.beam conftest.$ac_ext
19327 CFLAGS="$_CFLAGS"
19328 LIBS="$_LIBS"
19329 else
19330 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
19331 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
19335 # If compiler will take -Wl,--as-needed (or various platform-specific
19336 # spellings thereof) then add that to LDFLAGS. This is much easier than
19337 # trying to filter LIBS to the minimum for each executable.
19338 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19339 # libreadline; therefore we postpone testing it until we know what library
19340 # dependencies readline has. The test code will try to link with $LIBS.
19341 if test "$with_readline" = yes; then
19342 link_test_func=readline
19343 else
19344 link_test_func=exit
19347 if test "$PORTNAME" = "darwin"; then
19348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19349 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19350 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19351 $as_echo_n "(cached) " >&6
19352 else
19353 pgac_save_LDFLAGS=$LDFLAGS
19354 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19355 if test "$cross_compiling" = yes; then :
19356 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19357 else
19358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19359 /* end confdefs.h. */
19360 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19362 main ()
19366 return 0;
19368 _ACEOF
19369 if ac_fn_c_try_run "$LINENO"; then :
19370 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19371 else
19372 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19374 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19375 conftest.$ac_objext conftest.beam conftest.$ac_ext
19378 LDFLAGS="$pgac_save_LDFLAGS"
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19381 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19382 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19383 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19386 elif test "$PORTNAME" = "openbsd"; then
19387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19388 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19389 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19390 $as_echo_n "(cached) " >&6
19391 else
19392 pgac_save_LDFLAGS=$LDFLAGS
19393 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19394 if test "$cross_compiling" = yes; then :
19395 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19396 else
19397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19398 /* end confdefs.h. */
19399 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19401 main ()
19405 return 0;
19407 _ACEOF
19408 if ac_fn_c_try_run "$LINENO"; then :
19409 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19410 else
19411 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19413 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19414 conftest.$ac_objext conftest.beam conftest.$ac_ext
19417 LDFLAGS="$pgac_save_LDFLAGS"
19419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19420 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19421 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19422 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19425 else
19426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19427 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19428 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19429 $as_echo_n "(cached) " >&6
19430 else
19431 pgac_save_LDFLAGS=$LDFLAGS
19432 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19433 if test "$cross_compiling" = yes; then :
19434 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19435 else
19436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19437 /* end confdefs.h. */
19438 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19440 main ()
19444 return 0;
19446 _ACEOF
19447 if ac_fn_c_try_run "$LINENO"; then :
19448 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19449 else
19450 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19452 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19453 conftest.$ac_objext conftest.beam conftest.$ac_ext
19456 LDFLAGS="$pgac_save_LDFLAGS"
19458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19459 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19460 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19461 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19466 # Create compiler version string
19467 if test x"$GCC" = x"yes" ; then
19468 cc_string=`${CC} --version | sed q`
19469 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19470 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19471 cc_string=`${CC} -V 2>&1 | sed q`
19472 else
19473 cc_string=$CC
19477 cat >>confdefs.h <<_ACEOF
19478 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19479 _ACEOF
19482 # Supply a numeric version string for use by 3rd party add-ons
19483 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19484 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19485 $AWK '{printf "%d%04d", $1, $2}'`"
19487 cat >>confdefs.h <<_ACEOF
19488 #define PG_VERSION_NUM $PG_VERSION_NUM
19489 _ACEOF
19493 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19494 # literally, so that it's possible to override it at build time using
19495 # a command like "make ... PG_SYSROOT=path". This has to be done after
19496 # we've finished all configure checks that depend on CPPFLAGS.
19497 # The same for LDFLAGS, too.
19498 if test x"$PG_SYSROOT" != x; then
19499 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19500 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19505 # Begin output steps
19507 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19508 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19509 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19510 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19511 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19512 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19513 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19514 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19515 # Currently only used when LLVM is used
19516 if test "$with_llvm" = yes ; then
19517 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19518 $as_echo "$as_me: using CXX=$CXX" >&6;}
19519 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19520 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19521 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19522 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19523 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19524 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19525 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19526 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19529 # prepare build tree if outside source tree
19530 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19531 # Note 2: /bin/pwd might be better than shell's built-in at getting
19532 # a symlink-free name.
19533 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19534 vpath_build=no
19535 else
19536 vpath_build=yes
19537 if test "$no_create" != yes; then
19538 $as_echo_n "preparing build tree... " >&6
19539 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19540 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19541 || as_fn_error $? "failed" "$LINENO" 5
19542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19543 $as_echo "done" >&6; }
19549 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19552 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}"
19555 if test "$PORTNAME" = "win32"; then
19556 ac_config_commands="$ac_config_commands check_win32_symlinks"
19560 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19563 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19566 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19569 cat >confcache <<\_ACEOF
19570 # This file is a shell script that caches the results of configure
19571 # tests run on this system so they can be shared between configure
19572 # scripts and configure runs, see configure's option --config-cache.
19573 # It is not useful on other systems. If it contains results you don't
19574 # want to keep, you may remove or edit it.
19576 # config.status only pays attention to the cache file if you give it
19577 # the --recheck option to rerun configure.
19579 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19580 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19581 # following values.
19583 _ACEOF
19585 # The following way of writing the cache mishandles newlines in values,
19586 # but we know of no workaround that is simple, portable, and efficient.
19587 # So, we kill variables containing newlines.
19588 # Ultrix sh set writes to stderr and can't be redirected directly,
19589 # and sets the high bit in the cache file unless we assign to the vars.
19591 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19592 eval ac_val=\$$ac_var
19593 case $ac_val in #(
19594 *${as_nl}*)
19595 case $ac_var in #(
19596 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19597 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19598 esac
19599 case $ac_var in #(
19600 _ | IFS | as_nl) ;; #(
19601 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19602 *) { eval $ac_var=; unset $ac_var;} ;;
19603 esac ;;
19604 esac
19605 done
19607 (set) 2>&1 |
19608 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19609 *${as_nl}ac_space=\ *)
19610 # `set' does not quote correctly, so add quotes: double-quote
19611 # substitution turns \\\\ into \\, and sed turns \\ into \.
19612 sed -n \
19613 "s/'/'\\\\''/g;
19614 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19615 ;; #(
19617 # `set' quotes correctly as required by POSIX, so do not add quotes.
19618 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19620 esac |
19621 sort
19623 sed '
19624 /^ac_cv_env_/b end
19625 t clear
19626 :clear
19627 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19628 t end
19629 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19630 :end' >>confcache
19631 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19632 if test -w "$cache_file"; then
19633 if test "x$cache_file" != "x/dev/null"; then
19634 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19635 $as_echo "$as_me: updating cache $cache_file" >&6;}
19636 if test ! -f "$cache_file" || test -h "$cache_file"; then
19637 cat confcache >"$cache_file"
19638 else
19639 case $cache_file in #(
19640 */* | ?:*)
19641 mv -f confcache "$cache_file"$$ &&
19642 mv -f "$cache_file"$$ "$cache_file" ;; #(
19644 mv -f confcache "$cache_file" ;;
19645 esac
19648 else
19649 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19650 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19653 rm -f confcache
19655 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19656 # Let make expand exec_prefix.
19657 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19659 DEFS=-DHAVE_CONFIG_H
19661 ac_libobjs=
19662 ac_ltlibobjs=
19664 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19665 # 1. Remove the extension, and $U if already installed.
19666 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19667 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19668 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19669 # will be set to the directory where LIBOBJS objects are built.
19670 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19671 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19672 done
19673 LIBOBJS=$ac_libobjs
19675 LTLIBOBJS=$ac_ltlibobjs
19680 : "${CONFIG_STATUS=./config.status}"
19681 ac_write_fail=0
19682 ac_clean_files_save=$ac_clean_files
19683 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19684 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19685 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19686 as_write_fail=0
19687 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19688 #! $SHELL
19689 # Generated by $as_me.
19690 # Run this file to recreate the current configuration.
19691 # Compiler output produced by configure, useful for debugging
19692 # configure, is in config.log if it exists.
19694 debug=false
19695 ac_cs_recheck=false
19696 ac_cs_silent=false
19698 SHELL=\${CONFIG_SHELL-$SHELL}
19699 export SHELL
19700 _ASEOF
19701 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19702 ## -------------------- ##
19703 ## M4sh Initialization. ##
19704 ## -------------------- ##
19706 # Be more Bourne compatible
19707 DUALCASE=1; export DUALCASE # for MKS sh
19708 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19709 emulate sh
19710 NULLCMD=:
19711 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19712 # is contrary to our usage. Disable this feature.
19713 alias -g '${1+"$@"}'='"$@"'
19714 setopt NO_GLOB_SUBST
19715 else
19716 case `(set -o) 2>/dev/null` in #(
19717 *posix*) :
19718 set -o posix ;; #(
19719 *) :
19721 esac
19725 as_nl='
19727 export as_nl
19728 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19729 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19730 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19731 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19732 # Prefer a ksh shell builtin over an external printf program on Solaris,
19733 # but without wasting forks for bash or zsh.
19734 if test -z "$BASH_VERSION$ZSH_VERSION" \
19735 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19736 as_echo='print -r --'
19737 as_echo_n='print -rn --'
19738 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19739 as_echo='printf %s\n'
19740 as_echo_n='printf %s'
19741 else
19742 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19743 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19744 as_echo_n='/usr/ucb/echo -n'
19745 else
19746 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19747 as_echo_n_body='eval
19748 arg=$1;
19749 case $arg in #(
19750 *"$as_nl"*)
19751 expr "X$arg" : "X\\(.*\\)$as_nl";
19752 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19753 esac;
19754 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19756 export as_echo_n_body
19757 as_echo_n='sh -c $as_echo_n_body as_echo'
19759 export as_echo_body
19760 as_echo='sh -c $as_echo_body as_echo'
19763 # The user is always right.
19764 if test "${PATH_SEPARATOR+set}" != set; then
19765 PATH_SEPARATOR=:
19766 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19767 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19768 PATH_SEPARATOR=';'
19773 # IFS
19774 # We need space, tab and new line, in precisely that order. Quoting is
19775 # there to prevent editors from complaining about space-tab.
19776 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19777 # splitting by setting IFS to empty value.)
19778 IFS=" "" $as_nl"
19780 # Find who we are. Look in the path if we contain no directory separator.
19781 as_myself=
19782 case $0 in #((
19783 *[\\/]* ) as_myself=$0 ;;
19784 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19785 for as_dir in $PATH
19787 IFS=$as_save_IFS
19788 test -z "$as_dir" && as_dir=.
19789 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19790 done
19791 IFS=$as_save_IFS
19794 esac
19795 # We did not find ourselves, most probably we were run as `sh COMMAND'
19796 # in which case we are not to be found in the path.
19797 if test "x$as_myself" = x; then
19798 as_myself=$0
19800 if test ! -f "$as_myself"; then
19801 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19802 exit 1
19805 # Unset variables that we do not need and which cause bugs (e.g. in
19806 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19807 # suppresses any "Segmentation fault" message there. '((' could
19808 # trigger a bug in pdksh 5.2.14.
19809 for as_var in BASH_ENV ENV MAIL MAILPATH
19810 do eval test x\${$as_var+set} = xset \
19811 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19812 done
19813 PS1='$ '
19814 PS2='> '
19815 PS4='+ '
19817 # NLS nuisances.
19818 LC_ALL=C
19819 export LC_ALL
19820 LANGUAGE=C
19821 export LANGUAGE
19823 # CDPATH.
19824 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19827 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19828 # ----------------------------------------
19829 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19830 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19831 # script with STATUS, using 1 if that was 0.
19832 as_fn_error ()
19834 as_status=$1; test $as_status -eq 0 && as_status=1
19835 if test "$4"; then
19836 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19837 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19839 $as_echo "$as_me: error: $2" >&2
19840 as_fn_exit $as_status
19841 } # as_fn_error
19844 # as_fn_set_status STATUS
19845 # -----------------------
19846 # Set $? to STATUS, without forking.
19847 as_fn_set_status ()
19849 return $1
19850 } # as_fn_set_status
19852 # as_fn_exit STATUS
19853 # -----------------
19854 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19855 as_fn_exit ()
19857 set +e
19858 as_fn_set_status $1
19859 exit $1
19860 } # as_fn_exit
19862 # as_fn_unset VAR
19863 # ---------------
19864 # Portably unset VAR.
19865 as_fn_unset ()
19867 { eval $1=; unset $1;}
19869 as_unset=as_fn_unset
19870 # as_fn_append VAR VALUE
19871 # ----------------------
19872 # Append the text in VALUE to the end of the definition contained in VAR. Take
19873 # advantage of any shell optimizations that allow amortized linear growth over
19874 # repeated appends, instead of the typical quadratic growth present in naive
19875 # implementations.
19876 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19877 eval 'as_fn_append ()
19879 eval $1+=\$2
19881 else
19882 as_fn_append ()
19884 eval $1=\$$1\$2
19886 fi # as_fn_append
19888 # as_fn_arith ARG...
19889 # ------------------
19890 # Perform arithmetic evaluation on the ARGs, and store the result in the
19891 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19892 # must be portable across $(()) and expr.
19893 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19894 eval 'as_fn_arith ()
19896 as_val=$(( $* ))
19898 else
19899 as_fn_arith ()
19901 as_val=`expr "$@" || test $? -eq 1`
19903 fi # as_fn_arith
19906 if expr a : '\(a\)' >/dev/null 2>&1 &&
19907 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19908 as_expr=expr
19909 else
19910 as_expr=false
19913 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19914 as_basename=basename
19915 else
19916 as_basename=false
19919 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19920 as_dirname=dirname
19921 else
19922 as_dirname=false
19925 as_me=`$as_basename -- "$0" ||
19926 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19927 X"$0" : 'X\(//\)$' \| \
19928 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19929 $as_echo X/"$0" |
19930 sed '/^.*\/\([^/][^/]*\)\/*$/{
19931 s//\1/
19934 /^X\/\(\/\/\)$/{
19935 s//\1/
19938 /^X\/\(\/\).*/{
19939 s//\1/
19942 s/.*/./; q'`
19944 # Avoid depending upon Character Ranges.
19945 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19946 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19947 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19948 as_cr_digits='0123456789'
19949 as_cr_alnum=$as_cr_Letters$as_cr_digits
19951 ECHO_C= ECHO_N= ECHO_T=
19952 case `echo -n x` in #(((((
19953 -n*)
19954 case `echo 'xy\c'` in
19955 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19956 xy) ECHO_C='\c';;
19957 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19958 ECHO_T=' ';;
19959 esac;;
19961 ECHO_N='-n';;
19962 esac
19964 rm -f conf$$ conf$$.exe conf$$.file
19965 if test -d conf$$.dir; then
19966 rm -f conf$$.dir/conf$$.file
19967 else
19968 rm -f conf$$.dir
19969 mkdir conf$$.dir 2>/dev/null
19971 if (echo >conf$$.file) 2>/dev/null; then
19972 if ln -s conf$$.file conf$$ 2>/dev/null; then
19973 as_ln_s='ln -s'
19974 # ... but there are two gotchas:
19975 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19976 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19977 # In both cases, we have to default to `cp -pR'.
19978 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19979 as_ln_s='cp -pR'
19980 elif ln conf$$.file conf$$ 2>/dev/null; then
19981 as_ln_s=ln
19982 else
19983 as_ln_s='cp -pR'
19985 else
19986 as_ln_s='cp -pR'
19988 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19989 rmdir conf$$.dir 2>/dev/null
19992 # as_fn_mkdir_p
19993 # -------------
19994 # Create "$as_dir" as a directory, including parents if necessary.
19995 as_fn_mkdir_p ()
19998 case $as_dir in #(
19999 -*) as_dir=./$as_dir;;
20000 esac
20001 test -d "$as_dir" || eval $as_mkdir_p || {
20002 as_dirs=
20003 while :; do
20004 case $as_dir in #(
20005 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20006 *) as_qdir=$as_dir;;
20007 esac
20008 as_dirs="'$as_qdir' $as_dirs"
20009 as_dir=`$as_dirname -- "$as_dir" ||
20010 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20011 X"$as_dir" : 'X\(//\)[^/]' \| \
20012 X"$as_dir" : 'X\(//\)$' \| \
20013 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20014 $as_echo X"$as_dir" |
20015 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20016 s//\1/
20019 /^X\(\/\/\)[^/].*/{
20020 s//\1/
20023 /^X\(\/\/\)$/{
20024 s//\1/
20027 /^X\(\/\).*/{
20028 s//\1/
20031 s/.*/./; q'`
20032 test -d "$as_dir" && break
20033 done
20034 test -z "$as_dirs" || eval "mkdir $as_dirs"
20035 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20038 } # as_fn_mkdir_p
20039 if mkdir -p . 2>/dev/null; then
20040 as_mkdir_p='mkdir -p "$as_dir"'
20041 else
20042 test -d ./-p && rmdir ./-p
20043 as_mkdir_p=false
20047 # as_fn_executable_p FILE
20048 # -----------------------
20049 # Test if FILE is an executable regular file.
20050 as_fn_executable_p ()
20052 test -f "$1" && test -x "$1"
20053 } # as_fn_executable_p
20054 as_test_x='test -x'
20055 as_executable_p=as_fn_executable_p
20057 # Sed expression to map a string onto a valid CPP name.
20058 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20060 # Sed expression to map a string onto a valid variable name.
20061 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20064 exec 6>&1
20065 ## ----------------------------------- ##
20066 ## Main body of $CONFIG_STATUS script. ##
20067 ## ----------------------------------- ##
20068 _ASEOF
20069 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20071 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20072 # Save the log message, to keep $0 and so on meaningful, and to
20073 # report actual input values of CONFIG_FILES etc. instead of their
20074 # values after options handling.
20075 ac_log="
20076 This file was extended by PostgreSQL $as_me 14beta1, which was
20077 generated by GNU Autoconf 2.69. Invocation command line was
20079 CONFIG_FILES = $CONFIG_FILES
20080 CONFIG_HEADERS = $CONFIG_HEADERS
20081 CONFIG_LINKS = $CONFIG_LINKS
20082 CONFIG_COMMANDS = $CONFIG_COMMANDS
20083 $ $0 $@
20085 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20088 _ACEOF
20090 case $ac_config_files in *"
20091 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20092 esac
20094 case $ac_config_headers in *"
20095 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20096 esac
20099 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20100 # Files that config.status was made for.
20101 config_files="$ac_config_files"
20102 config_headers="$ac_config_headers"
20103 config_links="$ac_config_links"
20104 config_commands="$ac_config_commands"
20106 _ACEOF
20108 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20109 ac_cs_usage="\
20110 \`$as_me' instantiates files and other configuration actions
20111 from templates according to the current configuration. Unless the files
20112 and actions are specified as TAGs, all are instantiated by default.
20114 Usage: $0 [OPTION]... [TAG]...
20116 -h, --help print this help, then exit
20117 -V, --version print version number and configuration settings, then exit
20118 --config print configuration, then exit
20119 -q, --quiet, --silent
20120 do not print progress messages
20121 -d, --debug don't remove temporary files
20122 --recheck update $as_me by reconfiguring in the same conditions
20123 --file=FILE[:TEMPLATE]
20124 instantiate the configuration file FILE
20125 --header=FILE[:TEMPLATE]
20126 instantiate the configuration header FILE
20128 Configuration files:
20129 $config_files
20131 Configuration headers:
20132 $config_headers
20134 Configuration links:
20135 $config_links
20137 Configuration commands:
20138 $config_commands
20140 Report bugs to <pgsql-bugs@lists.postgresql.org>.
20141 PostgreSQL home page: <https://www.postgresql.org/>."
20143 _ACEOF
20144 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20145 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20146 ac_cs_version="\\
20147 PostgreSQL config.status 14beta1
20148 configured by $0, generated by GNU Autoconf 2.69,
20149 with options \\"\$ac_cs_config\\"
20151 Copyright (C) 2012 Free Software Foundation, Inc.
20152 This config.status script is free software; the Free Software Foundation
20153 gives unlimited permission to copy, distribute and modify it."
20155 ac_pwd='$ac_pwd'
20156 srcdir='$srcdir'
20157 INSTALL='$INSTALL'
20158 MKDIR_P='$MKDIR_P'
20159 AWK='$AWK'
20160 test -n "\$AWK" || AWK=awk
20161 _ACEOF
20163 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20164 # The default lists apply if the user does not specify any file.
20165 ac_need_defaults=:
20166 while test $# != 0
20168 case $1 in
20169 --*=?*)
20170 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20171 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20172 ac_shift=:
20174 --*=)
20175 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20176 ac_optarg=
20177 ac_shift=:
20180 ac_option=$1
20181 ac_optarg=$2
20182 ac_shift=shift
20184 esac
20186 case $ac_option in
20187 # Handling of the options.
20188 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20189 ac_cs_recheck=: ;;
20190 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20191 $as_echo "$ac_cs_version"; exit ;;
20192 --config | --confi | --conf | --con | --co | --c )
20193 $as_echo "$ac_cs_config"; exit ;;
20194 --debug | --debu | --deb | --de | --d | -d )
20195 debug=: ;;
20196 --file | --fil | --fi | --f )
20197 $ac_shift
20198 case $ac_optarg in
20199 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20200 '') as_fn_error $? "missing file argument" ;;
20201 esac
20202 as_fn_append CONFIG_FILES " '$ac_optarg'"
20203 ac_need_defaults=false;;
20204 --header | --heade | --head | --hea )
20205 $ac_shift
20206 case $ac_optarg in
20207 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20208 esac
20209 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20210 ac_need_defaults=false;;
20211 --he | --h)
20212 # Conflict between --help and --header
20213 as_fn_error $? "ambiguous option: \`$1'
20214 Try \`$0 --help' for more information.";;
20215 --help | --hel | -h )
20216 $as_echo "$ac_cs_usage"; exit ;;
20217 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20218 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20219 ac_cs_silent=: ;;
20221 # This is an error.
20222 -*) as_fn_error $? "unrecognized option: \`$1'
20223 Try \`$0 --help' for more information." ;;
20225 *) as_fn_append ac_config_targets " $1"
20226 ac_need_defaults=false ;;
20228 esac
20229 shift
20230 done
20232 ac_configure_extra_args=
20234 if $ac_cs_silent; then
20235 exec 6>/dev/null
20236 ac_configure_extra_args="$ac_configure_extra_args --silent"
20239 _ACEOF
20240 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20241 if \$ac_cs_recheck; then
20242 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20243 shift
20244 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20245 CONFIG_SHELL='$SHELL'
20246 export CONFIG_SHELL
20247 exec "\$@"
20250 _ACEOF
20251 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20252 exec 5>>config.log
20254 echo
20255 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20256 ## Running $as_me. ##
20257 _ASBOX
20258 $as_echo "$ac_log"
20259 } >&5
20261 _ACEOF
20262 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20263 _ACEOF
20265 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20267 # Handling of arguments.
20268 for ac_config_target in $ac_config_targets
20270 case $ac_config_target in
20271 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20272 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20273 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20274 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20275 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20276 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20277 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20278 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20279 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20280 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20281 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20283 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20284 esac
20285 done
20288 # If the user did not use the arguments to specify the items to instantiate,
20289 # then the envvar interface is used. Set only those that are not.
20290 # We use the long form for the default assignment because of an extremely
20291 # bizarre bug on SunOS 4.1.3.
20292 if $ac_need_defaults; then
20293 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20294 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20295 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20296 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20299 # Have a temporary directory for convenience. Make it in the build tree
20300 # simply because there is no reason against having it here, and in addition,
20301 # creating and moving files from /tmp can sometimes cause problems.
20302 # Hook for its removal unless debugging.
20303 # Note that there is a small window in which the directory will not be cleaned:
20304 # after its creation but before its name has been assigned to `$tmp'.
20305 $debug ||
20307 tmp= ac_tmp=
20308 trap 'exit_status=$?
20309 : "${ac_tmp:=$tmp}"
20310 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20312 trap 'as_fn_exit 1' 1 2 13 15
20314 # Create a (secure) tmp directory for tmp files.
20317 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20318 test -d "$tmp"
20319 } ||
20321 tmp=./conf$$-$RANDOM
20322 (umask 077 && mkdir "$tmp")
20323 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20324 ac_tmp=$tmp
20326 # Set up the scripts for CONFIG_FILES section.
20327 # No need to generate them if there are no CONFIG_FILES.
20328 # This happens for instance with `./config.status config.h'.
20329 if test -n "$CONFIG_FILES"; then
20332 ac_cr=`echo X | tr X '\015'`
20333 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20334 # But we know of no other shell where ac_cr would be empty at this
20335 # point, so we can use a bashism as a fallback.
20336 if test "x$ac_cr" = x; then
20337 eval ac_cr=\$\'\\r\'
20339 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20340 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20341 ac_cs_awk_cr='\\r'
20342 else
20343 ac_cs_awk_cr=$ac_cr
20346 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20347 _ACEOF
20351 echo "cat >conf$$subs.awk <<_ACEOF" &&
20352 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20353 echo "_ACEOF"
20354 } >conf$$subs.sh ||
20355 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20356 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20357 ac_delim='%!_!# '
20358 for ac_last_try in false false false false false :; do
20359 . ./conf$$subs.sh ||
20360 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20362 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20363 if test $ac_delim_n = $ac_delim_num; then
20364 break
20365 elif $ac_last_try; then
20366 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20367 else
20368 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20370 done
20371 rm -f conf$$subs.sh
20373 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20374 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20375 _ACEOF
20376 sed -n '
20378 s/^/S["/; s/!.*/"]=/
20381 s/^[^!]*!//
20382 :repl
20383 t repl
20384 s/'"$ac_delim"'$//
20385 t delim
20388 s/\(.\{148\}\)..*/\1/
20389 t more1
20390 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20393 b repl
20394 :more1
20395 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20398 s/.\{148\}//
20399 t nl
20400 :delim
20402 s/\(.\{148\}\)..*/\1/
20403 t more2
20404 s/["\\]/\\&/g; s/^/"/; s/$/"/
20407 :more2
20408 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20411 s/.\{148\}//
20412 t delim
20413 ' <conf$$subs.awk | sed '
20414 /^[^""]/{
20416 s/\n//
20418 ' >>$CONFIG_STATUS || ac_write_fail=1
20419 rm -f conf$$subs.awk
20420 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20421 _ACAWK
20422 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20423 for (key in S) S_is_set[key] = 1
20424 FS = "\a"
20428 line = $ 0
20429 nfields = split(line, field, "@")
20430 substed = 0
20431 len = length(field[1])
20432 for (i = 2; i < nfields; i++) {
20433 key = field[i]
20434 keylen = length(key)
20435 if (S_is_set[key]) {
20436 value = S[key]
20437 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20438 len += length(value) + length(field[++i])
20439 substed = 1
20440 } else
20441 len += 1 + keylen
20444 print line
20447 _ACAWK
20448 _ACEOF
20449 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20450 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20451 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20452 else
20454 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20455 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20456 _ACEOF
20458 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20459 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20460 # trailing colons and then remove the whole line if VPATH becomes empty
20461 # (actually we leave an empty line to preserve line numbers).
20462 if test "x$srcdir" = x.; then
20463 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20465 s///
20466 s/^/:/
20467 s/[ ]*$/:/
20468 s/:\$(srcdir):/:/g
20469 s/:\${srcdir}:/:/g
20470 s/:@srcdir@:/:/g
20471 s/^:*//
20472 s/:*$//
20474 s/\(=[ ]*\).*/\1/
20476 s/\n//
20477 s/^[^=]*=[ ]*$//
20481 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20482 fi # test -n "$CONFIG_FILES"
20484 # Set up the scripts for CONFIG_HEADERS section.
20485 # No need to generate them if there are no CONFIG_HEADERS.
20486 # This happens for instance with `./config.status Makefile'.
20487 if test -n "$CONFIG_HEADERS"; then
20488 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20489 BEGIN {
20490 _ACEOF
20492 # Transform confdefs.h into an awk script `defines.awk', embedded as
20493 # here-document in config.status, that substitutes the proper values into
20494 # config.h.in to produce config.h.
20496 # Create a delimiter string that does not exist in confdefs.h, to ease
20497 # handling of long lines.
20498 ac_delim='%!_!# '
20499 for ac_last_try in false false :; do
20500 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20501 if test -z "$ac_tt"; then
20502 break
20503 elif $ac_last_try; then
20504 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20505 else
20506 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20508 done
20510 # For the awk script, D is an array of macro values keyed by name,
20511 # likewise P contains macro parameters if any. Preserve backslash
20512 # newline sequences.
20514 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20515 sed -n '
20516 s/.\{148\}/&'"$ac_delim"'/g
20517 t rset
20518 :rset
20519 s/^[ ]*#[ ]*define[ ][ ]*/ /
20520 t def
20522 :def
20523 s/\\$//
20524 t bsnl
20525 s/["\\]/\\&/g
20526 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20527 D["\1"]=" \3"/p
20528 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20530 :bsnl
20531 s/["\\]/\\&/g
20532 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20533 D["\1"]=" \3\\\\\\n"\\/p
20534 t cont
20535 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20536 t cont
20538 :cont
20540 s/.\{148\}/&'"$ac_delim"'/g
20541 t clear
20542 :clear
20543 s/\\$//
20544 t bsnlc
20545 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20547 :bsnlc
20548 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20549 b cont
20550 ' <confdefs.h | sed '
20551 s/'"$ac_delim"'/"\\\
20552 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20554 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20555 for (key in D) D_is_set[key] = 1
20556 FS = "\a"
20558 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20559 line = \$ 0
20560 split(line, arg, " ")
20561 if (arg[1] == "#") {
20562 defundef = arg[2]
20563 mac1 = arg[3]
20564 } else {
20565 defundef = substr(arg[1], 2)
20566 mac1 = arg[2]
20568 split(mac1, mac2, "(") #)
20569 macro = mac2[1]
20570 prefix = substr(line, 1, index(line, defundef) - 1)
20571 if (D_is_set[macro]) {
20572 # Preserve the white space surrounding the "#".
20573 print prefix "define", macro P[macro] D[macro]
20574 next
20575 } else {
20576 # Replace #undef with comments. This is necessary, for example,
20577 # in the case of _POSIX_SOURCE, which is predefined and required
20578 # on some systems where configure will not decide to define it.
20579 if (defundef == "undef") {
20580 print "/*", prefix defundef, macro, "*/"
20581 next
20585 { print }
20586 _ACAWK
20587 _ACEOF
20588 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20589 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20590 fi # test -n "$CONFIG_HEADERS"
20593 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20594 shift
20595 for ac_tag
20597 case $ac_tag in
20598 :[FHLC]) ac_mode=$ac_tag; continue;;
20599 esac
20600 case $ac_mode$ac_tag in
20601 :[FHL]*:*);;
20602 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20603 :[FH]-) ac_tag=-:-;;
20604 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20605 esac
20606 ac_save_IFS=$IFS
20607 IFS=:
20608 set x $ac_tag
20609 IFS=$ac_save_IFS
20610 shift
20611 ac_file=$1
20612 shift
20614 case $ac_mode in
20615 :L) ac_source=$1;;
20616 :[FH])
20617 ac_file_inputs=
20618 for ac_f
20620 case $ac_f in
20621 -) ac_f="$ac_tmp/stdin";;
20622 *) # Look for the file first in the build tree, then in the source tree
20623 # (if the path is not absolute). The absolute path cannot be DOS-style,
20624 # because $ac_f cannot contain `:'.
20625 test -f "$ac_f" ||
20626 case $ac_f in
20627 [\\/$]*) false;;
20628 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20629 esac ||
20630 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20631 esac
20632 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20633 as_fn_append ac_file_inputs " '$ac_f'"
20634 done
20636 # Let's still pretend it is `configure' which instantiates (i.e., don't
20637 # use $as_me), people would be surprised to read:
20638 # /* config.h. Generated by config.status. */
20639 configure_input='Generated from '`
20640 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20641 `' by configure.'
20642 if test x"$ac_file" != x-; then
20643 configure_input="$ac_file. $configure_input"
20644 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20645 $as_echo "$as_me: creating $ac_file" >&6;}
20647 # Neutralize special characters interpreted by sed in replacement strings.
20648 case $configure_input in #(
20649 *\&* | *\|* | *\\* )
20650 ac_sed_conf_input=`$as_echo "$configure_input" |
20651 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20652 *) ac_sed_conf_input=$configure_input;;
20653 esac
20655 case $ac_tag in
20656 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20657 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20658 esac
20660 esac
20662 ac_dir=`$as_dirname -- "$ac_file" ||
20663 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20664 X"$ac_file" : 'X\(//\)[^/]' \| \
20665 X"$ac_file" : 'X\(//\)$' \| \
20666 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20667 $as_echo X"$ac_file" |
20668 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20669 s//\1/
20672 /^X\(\/\/\)[^/].*/{
20673 s//\1/
20676 /^X\(\/\/\)$/{
20677 s//\1/
20680 /^X\(\/\).*/{
20681 s//\1/
20684 s/.*/./; q'`
20685 as_dir="$ac_dir"; as_fn_mkdir_p
20686 ac_builddir=.
20688 case "$ac_dir" in
20689 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20691 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20692 # A ".." for each directory in $ac_dir_suffix.
20693 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20694 case $ac_top_builddir_sub in
20695 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20696 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20697 esac ;;
20698 esac
20699 ac_abs_top_builddir=$ac_pwd
20700 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20701 # for backward compatibility:
20702 ac_top_builddir=$ac_top_build_prefix
20704 case $srcdir in
20705 .) # We are building in place.
20706 ac_srcdir=.
20707 ac_top_srcdir=$ac_top_builddir_sub
20708 ac_abs_top_srcdir=$ac_pwd ;;
20709 [\\/]* | ?:[\\/]* ) # Absolute name.
20710 ac_srcdir=$srcdir$ac_dir_suffix;
20711 ac_top_srcdir=$srcdir
20712 ac_abs_top_srcdir=$srcdir ;;
20713 *) # Relative name.
20714 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20715 ac_top_srcdir=$ac_top_build_prefix$srcdir
20716 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20717 esac
20718 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20721 case $ac_mode in
20724 # CONFIG_FILE
20727 case $INSTALL in
20728 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20729 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20730 esac
20731 ac_MKDIR_P=$MKDIR_P
20732 case $MKDIR_P in
20733 [\\/$]* | ?:[\\/]* ) ;;
20734 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20735 esac
20736 _ACEOF
20738 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20739 # If the template does not know about datarootdir, expand it.
20740 # FIXME: This hack should be removed a few years after 2.60.
20741 ac_datarootdir_hack=; ac_datarootdir_seen=
20742 ac_sed_dataroot='
20743 /datarootdir/ {
20747 /@datadir@/p
20748 /@docdir@/p
20749 /@infodir@/p
20750 /@localedir@/p
20751 /@mandir@/p'
20752 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20753 *datarootdir*) ac_datarootdir_seen=yes;;
20754 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20756 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20757 _ACEOF
20758 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20759 ac_datarootdir_hack='
20760 s&@datadir@&$datadir&g
20761 s&@docdir@&$docdir&g
20762 s&@infodir@&$infodir&g
20763 s&@localedir@&$localedir&g
20764 s&@mandir@&$mandir&g
20765 s&\\\${datarootdir}&$datarootdir&g' ;;
20766 esac
20767 _ACEOF
20769 # Neutralize VPATH when `$srcdir' = `.'.
20770 # Shell code in configure.ac might set extrasub.
20771 # FIXME: do we really want to maintain this feature?
20772 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20773 ac_sed_extra="$ac_vpsub
20774 $extrasub
20775 _ACEOF
20776 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20778 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20779 s|@configure_input@|$ac_sed_conf_input|;t t
20780 s&@top_builddir@&$ac_top_builddir_sub&;t t
20781 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20782 s&@srcdir@&$ac_srcdir&;t t
20783 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20784 s&@top_srcdir@&$ac_top_srcdir&;t t
20785 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20786 s&@builddir@&$ac_builddir&;t t
20787 s&@abs_builddir@&$ac_abs_builddir&;t t
20788 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20789 s&@INSTALL@&$ac_INSTALL&;t t
20790 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20791 $ac_datarootdir_hack
20793 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20794 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20796 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20797 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20798 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20799 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20801 which seems to be undefined. Please make sure it is defined" >&5
20802 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20803 which seems to be undefined. Please make sure it is defined" >&2;}
20805 rm -f "$ac_tmp/stdin"
20806 case $ac_file in
20807 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20808 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20809 esac \
20810 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20814 # CONFIG_HEADER
20816 if test x"$ac_file" != x-; then
20818 $as_echo "/* $configure_input */" \
20819 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20820 } >"$ac_tmp/config.h" \
20821 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20822 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20823 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20824 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20825 else
20826 rm -f "$ac_file"
20827 mv "$ac_tmp/config.h" "$ac_file" \
20828 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20830 else
20831 $as_echo "/* $configure_input */" \
20832 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20833 || as_fn_error $? "could not create -" "$LINENO" 5
20838 # CONFIG_LINK
20841 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20843 else
20844 # Prefer the file from the source tree if names are identical.
20845 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20846 ac_source=$srcdir/$ac_source
20849 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20850 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20852 if test ! -r "$ac_source"; then
20853 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20855 rm -f "$ac_file"
20857 # Try a relative symlink, then a hard link, then a copy.
20858 case $ac_source in
20859 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20860 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20861 esac
20862 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20863 ln "$ac_source" "$ac_file" 2>/dev/null ||
20864 cp -p "$ac_source" "$ac_file" ||
20865 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20868 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20869 $as_echo "$as_me: executing $ac_file commands" >&6;}
20871 esac
20874 case $ac_file$ac_mode in
20875 "check_win32_symlinks":C)
20876 # Links sometimes fail undetected on Mingw -
20877 # so here we detect it and warn the user
20878 for FILE in $CONFIG_LINKS
20880 # test -e works for symlinks in the MinGW console
20881 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20882 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20883 done
20885 "src/include/pg_config.h":H)
20886 # Update timestamp for pg_config.h (see Makefile.global)
20887 echo >src/include/stamp-h
20889 "src/include/pg_config_ext.h":H)
20890 # Update timestamp for pg_config_ext.h (see Makefile.global)
20891 echo >src/include/stamp-ext-h
20893 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20895 esac
20896 done # for ac_tag
20899 as_fn_exit 0
20900 _ACEOF
20901 ac_clean_files=$ac_clean_files_save
20903 test $ac_write_fail = 0 ||
20904 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20907 # configure is writing to config.log, and then calls config.status.
20908 # config.status does its own redirection, appending to config.log.
20909 # Unfortunately, on DOS this fails, as config.log is still kept open
20910 # by configure, so config.status won't be able to write to it; its
20911 # output is simply discarded. So we exec the FD to /dev/null,
20912 # effectively closing config.log, so it can be properly (re)opened and
20913 # appended to by config.status. When coming back to configure, we
20914 # need to make the FD available again.
20915 if test "$no_create" != yes; then
20916 ac_cs_success=:
20917 ac_config_status_args=
20918 test "$silent" = yes &&
20919 ac_config_status_args="$ac_config_status_args --quiet"
20920 exec 5>/dev/null
20921 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20922 exec 5>>config.log
20923 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20924 # would make configure fail if this is the last instruction.
20925 $ac_cs_success || as_fn_exit 1
20927 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20929 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}