nbtree page deletion: Add leaftopparent assertion.
[pgsql.git] / configure
blobce9ea3699938a4d8ed526ee74c811b8d695c38bf
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 14devel.
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='14devel'
586 PACKAGE_STRING='PostgreSQL 14devel'
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 with_zlib
703 with_system_tzdata
704 with_libxslt
705 XML2_LIBS
706 XML2_CFLAGS
707 XML2_CONFIG
708 with_libxml
709 with_uuid
710 with_readline
711 with_systemd
712 with_selinux
713 with_ldap
714 with_krb_srvnam
715 krb_srvtab
716 with_gssapi
717 with_python
718 with_perl
719 with_tcl
720 ICU_LIBS
721 ICU_CFLAGS
722 with_icu
723 enable_thread_safety
724 INCLUDES
725 autodepend
726 PKG_CONFIG_LIBDIR
727 PKG_CONFIG_PATH
728 PKG_CONFIG
732 CFLAGS_SL
733 BITCODE_CXXFLAGS
734 BITCODE_CFLAGS
735 CFLAGS_VECTORIZE
736 CFLAGS_UNROLL_LOOPS
737 PERMIT_DECLARATION_AFTER_STATEMENT
738 LLVM_BINPATH
739 LLVM_CXXFLAGS
740 LLVM_CFLAGS
741 LLVM_CPPFLAGS
742 LLVM_LIBS
743 CLANG
744 LLVM_CONFIG
746 with_llvm
747 SUN_STUDIO_CC
748 ac_ct_CXX
749 CXXFLAGS
751 OBJEXT
752 EXEEXT
753 ac_ct_CC
754 CPPFLAGS
755 LDFLAGS
756 CFLAGS
758 enable_tap_tests
759 enable_dtrace
760 DTRACEFLAGS
761 DTRACE
762 enable_coverage
763 GENHTML
764 LCOV
765 GCOV
766 enable_debug
767 enable_rpath
768 default_port
769 WANTED_LANGUAGES
770 enable_nls
771 PORTNAME
772 host_os
773 host_vendor
774 host_cpu
775 host
776 build_os
777 build_vendor
778 build_cpu
779 build
780 PG_MAJORVERSION
781 target_alias
782 host_alias
783 build_alias
784 LIBS
785 ECHO_T
786 ECHO_N
787 ECHO_C
788 DEFS
789 mandir
790 localedir
791 libdir
792 psdir
793 pdfdir
794 dvidir
795 htmldir
796 infodir
797 docdir
798 oldincludedir
799 includedir
800 localstatedir
801 sharedstatedir
802 sysconfdir
803 datadir
804 datarootdir
805 libexecdir
806 sbindir
807 bindir
808 program_transform_name
809 prefix
810 exec_prefix
811 PACKAGE_URL
812 PACKAGE_BUGREPORT
813 PACKAGE_STRING
814 PACKAGE_VERSION
815 PACKAGE_TARNAME
816 PACKAGE_NAME
817 PATH_SEPARATOR
818 SHELL'
819 ac_subst_files=''
820 ac_user_opts='
821 enable_option_checking
822 with_extra_version
823 with_template
824 with_includes
825 with_libraries
826 with_libs
827 enable_integer_datetimes
828 enable_nls
829 with_pgport
830 enable_rpath
831 enable_spinlocks
832 enable_atomics
833 enable_debug
834 enable_profiling
835 enable_coverage
836 enable_dtrace
837 enable_tap_tests
838 with_blocksize
839 with_segsize
840 with_wal_blocksize
841 with_CC
842 with_llvm
843 enable_depend
844 enable_cassert
845 enable_thread_safety
846 with_icu
847 with_tcl
848 with_tclconfig
849 with_perl
850 with_python
851 with_gssapi
852 with_krb_srvnam
853 with_pam
854 with_bsd_auth
855 with_ldap
856 with_bonjour
857 with_selinux
858 with_systemd
859 with_readline
860 with_libedit_preferred
861 with_uuid
862 with_ossp_uuid
863 with_libxml
864 with_libxslt
865 with_system_tzdata
866 with_zlib
867 with_gnu_ld
868 with_ssl
869 with_openssl
870 enable_largefile
872 ac_precious_vars='build_alias
873 host_alias
874 target_alias
876 CFLAGS
877 LDFLAGS
878 LIBS
879 CPPFLAGS
881 CXXFLAGS
883 LLVM_CONFIG
884 CLANG
886 PKG_CONFIG
887 PKG_CONFIG_PATH
888 PKG_CONFIG_LIBDIR
889 ICU_CFLAGS
890 ICU_LIBS
891 XML2_CONFIG
892 XML2_CFLAGS
893 XML2_LIBS
894 LDFLAGS_EX
895 LDFLAGS_SL
896 PERL
897 PYTHON
898 MSGFMT
899 TCLSH'
902 # Initialize some variables set by options.
903 ac_init_help=
904 ac_init_version=false
905 ac_unrecognized_opts=
906 ac_unrecognized_sep=
907 # The variables have the same names as the options, with
908 # dashes changed to underlines.
909 cache_file=/dev/null
910 exec_prefix=NONE
911 no_create=
912 no_recursion=
913 prefix=NONE
914 program_prefix=NONE
915 program_suffix=NONE
916 program_transform_name=s,x,x,
917 silent=
918 site=
919 srcdir=
920 verbose=
921 x_includes=NONE
922 x_libraries=NONE
924 # Installation directory options.
925 # These are left unexpanded so users can "make install exec_prefix=/foo"
926 # and all the variables that are supposed to be based on exec_prefix
927 # by default will actually change.
928 # Use braces instead of parens because sh, perl, etc. also accept them.
929 # (The list follows the same order as the GNU Coding Standards.)
930 bindir='${exec_prefix}/bin'
931 sbindir='${exec_prefix}/sbin'
932 libexecdir='${exec_prefix}/libexec'
933 datarootdir='${prefix}/share'
934 datadir='${datarootdir}'
935 sysconfdir='${prefix}/etc'
936 sharedstatedir='${prefix}/com'
937 localstatedir='${prefix}/var'
938 includedir='${prefix}/include'
939 oldincludedir='/usr/include'
940 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
941 infodir='${datarootdir}/info'
942 htmldir='${docdir}'
943 dvidir='${docdir}'
944 pdfdir='${docdir}'
945 psdir='${docdir}'
946 libdir='${exec_prefix}/lib'
947 localedir='${datarootdir}/locale'
948 mandir='${datarootdir}/man'
950 ac_prev=
951 ac_dashdash=
952 for ac_option
954 # If the previous option needs an argument, assign it.
955 if test -n "$ac_prev"; then
956 eval $ac_prev=\$ac_option
957 ac_prev=
958 continue
961 case $ac_option in
962 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
963 *=) ac_optarg= ;;
964 *) ac_optarg=yes ;;
965 esac
967 # Accept the important Cygnus configure options, so we can diagnose typos.
969 case $ac_dashdash$ac_option in
971 ac_dashdash=yes ;;
973 -bindir | --bindir | --bindi | --bind | --bin | --bi)
974 ac_prev=bindir ;;
975 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
976 bindir=$ac_optarg ;;
978 -build | --build | --buil | --bui | --bu)
979 ac_prev=build_alias ;;
980 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
981 build_alias=$ac_optarg ;;
983 -cache-file | --cache-file | --cache-fil | --cache-fi \
984 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
985 ac_prev=cache_file ;;
986 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
987 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
988 cache_file=$ac_optarg ;;
990 --config-cache | -C)
991 cache_file=config.cache ;;
993 -datadir | --datadir | --datadi | --datad)
994 ac_prev=datadir ;;
995 -datadir=* | --datadir=* | --datadi=* | --datad=*)
996 datadir=$ac_optarg ;;
998 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
999 | --dataroo | --dataro | --datar)
1000 ac_prev=datarootdir ;;
1001 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1002 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1003 datarootdir=$ac_optarg ;;
1005 -disable-* | --disable-*)
1006 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1007 # Reject names that are not valid shell variable names.
1008 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1009 as_fn_error $? "invalid feature name: $ac_useropt"
1010 ac_useropt_orig=$ac_useropt
1011 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1012 case $ac_user_opts in
1014 "enable_$ac_useropt"
1015 "*) ;;
1016 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1017 ac_unrecognized_sep=', ';;
1018 esac
1019 eval enable_$ac_useropt=no ;;
1021 -docdir | --docdir | --docdi | --doc | --do)
1022 ac_prev=docdir ;;
1023 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1024 docdir=$ac_optarg ;;
1026 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1027 ac_prev=dvidir ;;
1028 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1029 dvidir=$ac_optarg ;;
1031 -enable-* | --enable-*)
1032 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1033 # Reject names that are not valid shell variable names.
1034 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1035 as_fn_error $? "invalid feature name: $ac_useropt"
1036 ac_useropt_orig=$ac_useropt
1037 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1038 case $ac_user_opts in
1040 "enable_$ac_useropt"
1041 "*) ;;
1042 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1043 ac_unrecognized_sep=', ';;
1044 esac
1045 eval enable_$ac_useropt=\$ac_optarg ;;
1047 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1048 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1049 | --exec | --exe | --ex)
1050 ac_prev=exec_prefix ;;
1051 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1052 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1053 | --exec=* | --exe=* | --ex=*)
1054 exec_prefix=$ac_optarg ;;
1056 -gas | --gas | --ga | --g)
1057 # Obsolete; use --with-gas.
1058 with_gas=yes ;;
1060 -help | --help | --hel | --he | -h)
1061 ac_init_help=long ;;
1062 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1063 ac_init_help=recursive ;;
1064 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1065 ac_init_help=short ;;
1067 -host | --host | --hos | --ho)
1068 ac_prev=host_alias ;;
1069 -host=* | --host=* | --hos=* | --ho=*)
1070 host_alias=$ac_optarg ;;
1072 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1073 ac_prev=htmldir ;;
1074 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1075 | --ht=*)
1076 htmldir=$ac_optarg ;;
1078 -includedir | --includedir | --includedi | --included | --include \
1079 | --includ | --inclu | --incl | --inc)
1080 ac_prev=includedir ;;
1081 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1082 | --includ=* | --inclu=* | --incl=* | --inc=*)
1083 includedir=$ac_optarg ;;
1085 -infodir | --infodir | --infodi | --infod | --info | --inf)
1086 ac_prev=infodir ;;
1087 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1088 infodir=$ac_optarg ;;
1090 -libdir | --libdir | --libdi | --libd)
1091 ac_prev=libdir ;;
1092 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1093 libdir=$ac_optarg ;;
1095 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1096 | --libexe | --libex | --libe)
1097 ac_prev=libexecdir ;;
1098 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1099 | --libexe=* | --libex=* | --libe=*)
1100 libexecdir=$ac_optarg ;;
1102 -localedir | --localedir | --localedi | --localed | --locale)
1103 ac_prev=localedir ;;
1104 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1105 localedir=$ac_optarg ;;
1107 -localstatedir | --localstatedir | --localstatedi | --localstated \
1108 | --localstate | --localstat | --localsta | --localst | --locals)
1109 ac_prev=localstatedir ;;
1110 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1111 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1112 localstatedir=$ac_optarg ;;
1114 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1115 ac_prev=mandir ;;
1116 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1117 mandir=$ac_optarg ;;
1119 -nfp | --nfp | --nf)
1120 # Obsolete; use --without-fp.
1121 with_fp=no ;;
1123 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1124 | --no-cr | --no-c | -n)
1125 no_create=yes ;;
1127 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1128 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1129 no_recursion=yes ;;
1131 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1132 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1133 | --oldin | --oldi | --old | --ol | --o)
1134 ac_prev=oldincludedir ;;
1135 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1136 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1137 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1138 oldincludedir=$ac_optarg ;;
1140 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1141 ac_prev=prefix ;;
1142 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1143 prefix=$ac_optarg ;;
1145 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1146 | --program-pre | --program-pr | --program-p)
1147 ac_prev=program_prefix ;;
1148 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1149 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1150 program_prefix=$ac_optarg ;;
1152 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1153 | --program-suf | --program-su | --program-s)
1154 ac_prev=program_suffix ;;
1155 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1156 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1157 program_suffix=$ac_optarg ;;
1159 -program-transform-name | --program-transform-name \
1160 | --program-transform-nam | --program-transform-na \
1161 | --program-transform-n | --program-transform- \
1162 | --program-transform | --program-transfor \
1163 | --program-transfo | --program-transf \
1164 | --program-trans | --program-tran \
1165 | --progr-tra | --program-tr | --program-t)
1166 ac_prev=program_transform_name ;;
1167 -program-transform-name=* | --program-transform-name=* \
1168 | --program-transform-nam=* | --program-transform-na=* \
1169 | --program-transform-n=* | --program-transform-=* \
1170 | --program-transform=* | --program-transfor=* \
1171 | --program-transfo=* | --program-transf=* \
1172 | --program-trans=* | --program-tran=* \
1173 | --progr-tra=* | --program-tr=* | --program-t=*)
1174 program_transform_name=$ac_optarg ;;
1176 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1177 ac_prev=pdfdir ;;
1178 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1179 pdfdir=$ac_optarg ;;
1181 -psdir | --psdir | --psdi | --psd | --ps)
1182 ac_prev=psdir ;;
1183 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1184 psdir=$ac_optarg ;;
1186 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1187 | -silent | --silent | --silen | --sile | --sil)
1188 silent=yes ;;
1190 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1191 ac_prev=sbindir ;;
1192 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1193 | --sbi=* | --sb=*)
1194 sbindir=$ac_optarg ;;
1196 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1197 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1198 | --sharedst | --shareds | --shared | --share | --shar \
1199 | --sha | --sh)
1200 ac_prev=sharedstatedir ;;
1201 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1202 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1203 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1204 | --sha=* | --sh=*)
1205 sharedstatedir=$ac_optarg ;;
1207 -site | --site | --sit)
1208 ac_prev=site ;;
1209 -site=* | --site=* | --sit=*)
1210 site=$ac_optarg ;;
1212 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1213 ac_prev=srcdir ;;
1214 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1215 srcdir=$ac_optarg ;;
1217 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1218 | --syscon | --sysco | --sysc | --sys | --sy)
1219 ac_prev=sysconfdir ;;
1220 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1221 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1222 sysconfdir=$ac_optarg ;;
1224 -target | --target | --targe | --targ | --tar | --ta | --t)
1225 ac_prev=target_alias ;;
1226 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1227 target_alias=$ac_optarg ;;
1229 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1230 verbose=yes ;;
1232 -version | --version | --versio | --versi | --vers | -V)
1233 ac_init_version=: ;;
1235 -with-* | --with-*)
1236 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1237 # Reject names that are not valid shell variable names.
1238 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1239 as_fn_error $? "invalid package name: $ac_useropt"
1240 ac_useropt_orig=$ac_useropt
1241 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1242 case $ac_user_opts in
1244 "with_$ac_useropt"
1245 "*) ;;
1246 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1247 ac_unrecognized_sep=', ';;
1248 esac
1249 eval with_$ac_useropt=\$ac_optarg ;;
1251 -without-* | --without-*)
1252 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1253 # Reject names that are not valid shell variable names.
1254 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1255 as_fn_error $? "invalid package name: $ac_useropt"
1256 ac_useropt_orig=$ac_useropt
1257 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1258 case $ac_user_opts in
1260 "with_$ac_useropt"
1261 "*) ;;
1262 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1263 ac_unrecognized_sep=', ';;
1264 esac
1265 eval with_$ac_useropt=no ;;
1267 --x)
1268 # Obsolete; use --with-x.
1269 with_x=yes ;;
1271 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1272 | --x-incl | --x-inc | --x-in | --x-i)
1273 ac_prev=x_includes ;;
1274 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1275 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1276 x_includes=$ac_optarg ;;
1278 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1279 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1280 ac_prev=x_libraries ;;
1281 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1282 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1283 x_libraries=$ac_optarg ;;
1285 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1286 Try \`$0 --help' for more information"
1289 *=*)
1290 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1291 # Reject names that are not valid shell variable names.
1292 case $ac_envvar in #(
1293 '' | [0-9]* | *[!_$as_cr_alnum]* )
1294 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1295 esac
1296 eval $ac_envvar=\$ac_optarg
1297 export $ac_envvar ;;
1300 # FIXME: should be removed in autoconf 3.0.
1301 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1302 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1303 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1304 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1307 esac
1308 done
1310 if test -n "$ac_prev"; then
1311 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1312 as_fn_error $? "missing argument to $ac_option"
1315 if test -n "$ac_unrecognized_opts"; then
1316 case $enable_option_checking in
1317 no) ;;
1318 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1319 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1320 esac
1323 # Check all directory arguments for consistency.
1324 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1325 datadir sysconfdir sharedstatedir localstatedir includedir \
1326 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1327 libdir localedir mandir
1329 eval ac_val=\$$ac_var
1330 # Remove trailing slashes.
1331 case $ac_val in
1332 */ )
1333 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1334 eval $ac_var=\$ac_val;;
1335 esac
1336 # Be sure to have absolute directory names.
1337 case $ac_val in
1338 [\\/$]* | ?:[\\/]* ) continue;;
1339 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1340 esac
1341 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1342 done
1344 # There might be people who depend on the old broken behavior: `$host'
1345 # used to hold the argument of --host etc.
1346 # FIXME: To remove some day.
1347 build=$build_alias
1348 host=$host_alias
1349 target=$target_alias
1351 # FIXME: To remove some day.
1352 if test "x$host_alias" != x; then
1353 if test "x$build_alias" = x; then
1354 cross_compiling=maybe
1355 elif test "x$build_alias" != "x$host_alias"; then
1356 cross_compiling=yes
1360 ac_tool_prefix=
1361 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1363 test "$silent" = yes && exec 6>/dev/null
1366 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1367 ac_ls_di=`ls -di .` &&
1368 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1369 as_fn_error $? "working directory cannot be determined"
1370 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1371 as_fn_error $? "pwd does not report name of working directory"
1374 # Find the source files, if location was not specified.
1375 if test -z "$srcdir"; then
1376 ac_srcdir_defaulted=yes
1377 # Try the directory containing this script, then the parent directory.
1378 ac_confdir=`$as_dirname -- "$as_myself" ||
1379 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1380 X"$as_myself" : 'X\(//\)[^/]' \| \
1381 X"$as_myself" : 'X\(//\)$' \| \
1382 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1383 $as_echo X"$as_myself" |
1384 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1385 s//\1/
1388 /^X\(\/\/\)[^/].*/{
1389 s//\1/
1392 /^X\(\/\/\)$/{
1393 s//\1/
1396 /^X\(\/\).*/{
1397 s//\1/
1400 s/.*/./; q'`
1401 srcdir=$ac_confdir
1402 if test ! -r "$srcdir/$ac_unique_file"; then
1403 srcdir=..
1405 else
1406 ac_srcdir_defaulted=no
1408 if test ! -r "$srcdir/$ac_unique_file"; then
1409 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1410 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1412 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1413 ac_abs_confdir=`(
1414 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1415 pwd)`
1416 # When building in place, set srcdir=.
1417 if test "$ac_abs_confdir" = "$ac_pwd"; then
1418 srcdir=.
1420 # Remove unnecessary trailing slashes from srcdir.
1421 # Double slashes in file names in object file debugging info
1422 # mess up M-x gdb in Emacs.
1423 case $srcdir in
1424 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1425 esac
1426 for ac_var in $ac_precious_vars; do
1427 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1428 eval ac_env_${ac_var}_value=\$${ac_var}
1429 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1430 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1431 done
1434 # Report the --help message.
1436 if test "$ac_init_help" = "long"; then
1437 # Omit some internal or obsolete options to make the list less imposing.
1438 # This message is too long to be a string in the A/UX 3.1 sh.
1439 cat <<_ACEOF
1440 \`configure' configures PostgreSQL 14devel to adapt to many kinds of systems.
1442 Usage: $0 [OPTION]... [VAR=VALUE]...
1444 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1445 VAR=VALUE. See below for descriptions of some of the useful variables.
1447 Defaults for the options are specified in brackets.
1449 Configuration:
1450 -h, --help display this help and exit
1451 --help=short display options specific to this package
1452 --help=recursive display the short help of all the included packages
1453 -V, --version display version information and exit
1454 -q, --quiet, --silent do not print \`checking ...' messages
1455 --cache-file=FILE cache test results in FILE [disabled]
1456 -C, --config-cache alias for \`--cache-file=config.cache'
1457 -n, --no-create do not create output files
1458 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1460 Installation directories:
1461 --prefix=PREFIX install architecture-independent files in PREFIX
1462 [$ac_default_prefix]
1463 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1464 [PREFIX]
1466 By default, \`make install' will install all the files in
1467 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1468 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1469 for instance \`--prefix=\$HOME'.
1471 For better control, use the options below.
1473 Fine tuning of the installation directories:
1474 --bindir=DIR user executables [EPREFIX/bin]
1475 --sbindir=DIR system admin executables [EPREFIX/sbin]
1476 --libexecdir=DIR program executables [EPREFIX/libexec]
1477 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1478 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1479 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1480 --libdir=DIR object code libraries [EPREFIX/lib]
1481 --includedir=DIR C header files [PREFIX/include]
1482 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1483 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1484 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1485 --infodir=DIR info documentation [DATAROOTDIR/info]
1486 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1487 --mandir=DIR man documentation [DATAROOTDIR/man]
1488 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1489 --htmldir=DIR html documentation [DOCDIR]
1490 --dvidir=DIR dvi documentation [DOCDIR]
1491 --pdfdir=DIR pdf documentation [DOCDIR]
1492 --psdir=DIR ps documentation [DOCDIR]
1493 _ACEOF
1495 cat <<\_ACEOF
1497 System types:
1498 --build=BUILD configure for building on BUILD [guessed]
1499 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1500 _ACEOF
1503 if test -n "$ac_init_help"; then
1504 case $ac_init_help in
1505 short | recursive ) echo "Configuration of PostgreSQL 14devel:";;
1506 esac
1507 cat <<\_ACEOF
1509 Optional Features:
1510 --disable-option-checking ignore unrecognized --enable/--with options
1511 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1512 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1513 --disable-integer-datetimes
1514 obsolete option, no longer supported
1515 --enable-nls[=LANGUAGES]
1516 enable Native Language Support
1517 --disable-rpath do not embed shared library search path in
1518 executables
1519 --disable-spinlocks do not use spinlocks
1520 --disable-atomics do not use atomic operations
1521 --enable-debug build with debugging symbols (-g)
1522 --enable-profiling build with profiling enabled
1523 --enable-coverage build with coverage testing instrumentation
1524 --enable-dtrace build with DTrace support
1525 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1526 --enable-depend turn on automatic dependency tracking
1527 --enable-cassert enable assertion checks (for debugging)
1528 --disable-thread-safety disable thread-safety in client libraries
1529 --disable-largefile omit support for large files
1531 Optional Packages:
1532 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1533 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1534 --with-extra-version=STRING
1535 append STRING to version
1536 --with-template=NAME override operating system template
1537 --with-includes=DIRS look for additional header files in DIRS
1538 --with-libraries=DIRS look for additional libraries in DIRS
1539 --with-libs=DIRS alternative spelling of --with-libraries
1540 --with-pgport=PORTNUM set default port number [5432]
1541 --with-blocksize=BLOCKSIZE
1542 set table block size in kB [8]
1543 --with-segsize=SEGSIZE set table segment size in GB [1]
1544 --with-wal-blocksize=BLOCKSIZE
1545 set WAL block size in kB [8]
1546 --with-CC=CMD set compiler (deprecated)
1547 --with-llvm build with LLVM based JIT support
1548 --with-icu build with ICU support
1549 --with-tcl build Tcl modules (PL/Tcl)
1550 --with-tclconfig=DIR tclConfig.sh is in DIR
1551 --with-perl build Perl modules (PL/Perl)
1552 --with-python build Python modules (PL/Python)
1553 --with-gssapi build with GSSAPI support
1554 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1555 [postgres]
1556 --with-pam build with PAM support
1557 --with-bsd-auth build with BSD Authentication support
1558 --with-ldap build with LDAP support
1559 --with-bonjour build with Bonjour support
1560 --with-selinux build with SELinux support
1561 --with-systemd build with systemd support
1562 --without-readline do not use GNU Readline nor BSD Libedit for editing
1563 --with-libedit-preferred
1564 prefer BSD Libedit over GNU Readline
1565 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1566 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1567 --with-libxml build with XML support
1568 --with-libxslt use XSLT support when building contrib/xml2
1569 --with-system-tzdata=DIR
1570 use system time zone data in DIR
1571 --without-zlib do not use Zlib
1572 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1573 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1574 --with-openssl obsolete spelling of --with-ssl=openssl
1576 Some influential environment variables:
1577 CC C compiler command
1578 CFLAGS C compiler flags
1579 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1580 nonstandard directory <lib dir>
1581 LIBS libraries to pass to the linker, e.g. -l<library>
1582 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1583 you have headers in a nonstandard directory <include dir>
1584 CXX C++ compiler command
1585 CXXFLAGS C++ compiler flags
1586 LLVM_CONFIG path to llvm-config command
1587 CLANG path to clang compiler to generate bitcode
1588 CPP C preprocessor
1589 PKG_CONFIG path to pkg-config utility
1590 PKG_CONFIG_PATH
1591 directories to add to pkg-config's search path
1592 PKG_CONFIG_LIBDIR
1593 path overriding pkg-config's built-in search path
1594 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1595 ICU_LIBS linker flags for ICU, overriding pkg-config
1596 XML2_CONFIG path to xml2-config utility
1597 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1598 XML2_LIBS linker flags for XML2, overriding pkg-config
1599 LDFLAGS_EX extra linker flags for linking executables only
1600 LDFLAGS_SL extra linker flags for linking shared libraries only
1601 PERL Perl program
1602 PYTHON Python program
1603 MSGFMT msgfmt program for NLS
1604 TCLSH Tcl interpreter program (tclsh)
1606 Use these variables to override the choices made by `configure' or to help
1607 it to find libraries and programs with nonstandard names/locations.
1609 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1610 PostgreSQL home page: <https://www.postgresql.org/>.
1611 _ACEOF
1612 ac_status=$?
1615 if test "$ac_init_help" = "recursive"; then
1616 # If there are subdirs, report their specific --help.
1617 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1618 test -d "$ac_dir" ||
1619 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1620 continue
1621 ac_builddir=.
1623 case "$ac_dir" in
1624 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1626 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1627 # A ".." for each directory in $ac_dir_suffix.
1628 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1629 case $ac_top_builddir_sub in
1630 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1631 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1632 esac ;;
1633 esac
1634 ac_abs_top_builddir=$ac_pwd
1635 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1636 # for backward compatibility:
1637 ac_top_builddir=$ac_top_build_prefix
1639 case $srcdir in
1640 .) # We are building in place.
1641 ac_srcdir=.
1642 ac_top_srcdir=$ac_top_builddir_sub
1643 ac_abs_top_srcdir=$ac_pwd ;;
1644 [\\/]* | ?:[\\/]* ) # Absolute name.
1645 ac_srcdir=$srcdir$ac_dir_suffix;
1646 ac_top_srcdir=$srcdir
1647 ac_abs_top_srcdir=$srcdir ;;
1648 *) # Relative name.
1649 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1650 ac_top_srcdir=$ac_top_build_prefix$srcdir
1651 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1652 esac
1653 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1655 cd "$ac_dir" || { ac_status=$?; continue; }
1656 # Check for guested configure.
1657 if test -f "$ac_srcdir/configure.gnu"; then
1658 echo &&
1659 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1660 elif test -f "$ac_srcdir/configure"; then
1661 echo &&
1662 $SHELL "$ac_srcdir/configure" --help=recursive
1663 else
1664 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1665 fi || ac_status=$?
1666 cd "$ac_pwd" || { ac_status=$?; break; }
1667 done
1670 test -n "$ac_init_help" && exit $ac_status
1671 if $ac_init_version; then
1672 cat <<\_ACEOF
1673 PostgreSQL configure 14devel
1674 generated by GNU Autoconf 2.69
1676 Copyright (C) 2012 Free Software Foundation, Inc.
1677 This configure script is free software; the Free Software Foundation
1678 gives unlimited permission to copy, distribute and modify it.
1680 Copyright (c) 1996-2021, PostgreSQL Global Development Group
1681 _ACEOF
1682 exit
1685 ## ------------------------ ##
1686 ## Autoconf initialization. ##
1687 ## ------------------------ ##
1689 # ac_fn_c_try_compile LINENO
1690 # --------------------------
1691 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1692 ac_fn_c_try_compile ()
1694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1695 rm -f conftest.$ac_objext
1696 if { { ac_try="$ac_compile"
1697 case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700 esac
1701 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702 $as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_compile") 2>conftest.err
1704 ac_status=$?
1705 if test -s conftest.err; then
1706 grep -v '^ *+' conftest.err >conftest.er1
1707 cat conftest.er1 >&5
1708 mv -f conftest.er1 conftest.err
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; } && {
1712 test -z "$ac_c_werror_flag" ||
1713 test ! -s conftest.err
1714 } && test -s conftest.$ac_objext; then :
1715 ac_retval=0
1716 else
1717 $as_echo "$as_me: failed program was:" >&5
1718 sed 's/^/| /' conftest.$ac_ext >&5
1720 ac_retval=1
1722 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1723 as_fn_set_status $ac_retval
1725 } # ac_fn_c_try_compile
1727 # ac_fn_cxx_try_compile LINENO
1728 # ----------------------------
1729 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1730 ac_fn_cxx_try_compile ()
1732 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1733 rm -f conftest.$ac_objext
1734 if { { ac_try="$ac_compile"
1735 case "(($ac_try" in
1736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1737 *) ac_try_echo=$ac_try;;
1738 esac
1739 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1740 $as_echo "$ac_try_echo"; } >&5
1741 (eval "$ac_compile") 2>conftest.err
1742 ac_status=$?
1743 if test -s conftest.err; then
1744 grep -v '^ *+' conftest.err >conftest.er1
1745 cat conftest.er1 >&5
1746 mv -f conftest.er1 conftest.err
1748 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1749 test $ac_status = 0; } && {
1750 test -z "$ac_cxx_werror_flag" ||
1751 test ! -s conftest.err
1752 } && test -s conftest.$ac_objext; then :
1753 ac_retval=0
1754 else
1755 $as_echo "$as_me: failed program was:" >&5
1756 sed 's/^/| /' conftest.$ac_ext >&5
1758 ac_retval=1
1760 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1761 as_fn_set_status $ac_retval
1763 } # ac_fn_cxx_try_compile
1765 # ac_fn_c_try_link LINENO
1766 # -----------------------
1767 # Try to link conftest.$ac_ext, and return whether this succeeded.
1768 ac_fn_c_try_link ()
1770 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1771 rm -f conftest.$ac_objext conftest$ac_exeext
1772 if { { ac_try="$ac_link"
1773 case "(($ac_try" in
1774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1775 *) ac_try_echo=$ac_try;;
1776 esac
1777 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1778 $as_echo "$ac_try_echo"; } >&5
1779 (eval "$ac_link") 2>conftest.err
1780 ac_status=$?
1781 if test -s conftest.err; then
1782 grep -v '^ *+' conftest.err >conftest.er1
1783 cat conftest.er1 >&5
1784 mv -f conftest.er1 conftest.err
1786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1787 test $ac_status = 0; } && {
1788 test -z "$ac_c_werror_flag" ||
1789 test ! -s conftest.err
1790 } && test -s conftest$ac_exeext && {
1791 test "$cross_compiling" = yes ||
1792 test -x conftest$ac_exeext
1793 }; then :
1794 ac_retval=0
1795 else
1796 $as_echo "$as_me: failed program was:" >&5
1797 sed 's/^/| /' conftest.$ac_ext >&5
1799 ac_retval=1
1801 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1802 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1803 # interfere with the next link command; also delete a directory that is
1804 # left behind by Apple's compiler. We do this before executing the actions.
1805 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1806 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1807 as_fn_set_status $ac_retval
1809 } # ac_fn_c_try_link
1811 # ac_fn_c_try_cpp LINENO
1812 # ----------------------
1813 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1814 ac_fn_c_try_cpp ()
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 if { { ac_try="$ac_cpp conftest.$ac_ext"
1818 case "(($ac_try" in
1819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1820 *) ac_try_echo=$ac_try;;
1821 esac
1822 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1823 $as_echo "$ac_try_echo"; } >&5
1824 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1825 ac_status=$?
1826 if test -s conftest.err; then
1827 grep -v '^ *+' conftest.err >conftest.er1
1828 cat conftest.er1 >&5
1829 mv -f conftest.er1 conftest.err
1831 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1832 test $ac_status = 0; } > conftest.i && {
1833 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1834 test ! -s conftest.err
1835 }; then :
1836 ac_retval=0
1837 else
1838 $as_echo "$as_me: failed program was:" >&5
1839 sed 's/^/| /' conftest.$ac_ext >&5
1841 ac_retval=1
1843 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1844 as_fn_set_status $ac_retval
1846 } # ac_fn_c_try_cpp
1848 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1849 # -------------------------------------------------------
1850 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1851 # the include files in INCLUDES and setting the cache variable VAR
1852 # accordingly.
1853 ac_fn_c_check_header_mongrel ()
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856 if eval \${$3+:} false; then :
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858 $as_echo_n "checking for $2... " >&6; }
1859 if eval \${$3+:} false; then :
1860 $as_echo_n "(cached) " >&6
1862 eval ac_res=\$$3
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1864 $as_echo "$ac_res" >&6; }
1865 else
1866 # Is the header compilable?
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1868 $as_echo_n "checking $2 usability... " >&6; }
1869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1870 /* end confdefs.h. */
1872 #include <$2>
1873 _ACEOF
1874 if ac_fn_c_try_compile "$LINENO"; then :
1875 ac_header_compiler=yes
1876 else
1877 ac_header_compiler=no
1879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1881 $as_echo "$ac_header_compiler" >&6; }
1883 # Is the header present?
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1885 $as_echo_n "checking $2 presence... " >&6; }
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887 /* end confdefs.h. */
1888 #include <$2>
1889 _ACEOF
1890 if ac_fn_c_try_cpp "$LINENO"; then :
1891 ac_header_preproc=yes
1892 else
1893 ac_header_preproc=no
1895 rm -f conftest.err conftest.i conftest.$ac_ext
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1897 $as_echo "$ac_header_preproc" >&6; }
1899 # So? What about this header?
1900 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1901 yes:no: )
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1903 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1905 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1907 no:yes:* )
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1909 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1911 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1913 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1915 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1917 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1918 ( $as_echo "## ---------------------------------------------- ##
1919 ## Report this to pgsql-bugs@lists.postgresql.org ##
1920 ## ---------------------------------------------- ##"
1921 ) | sed "s/^/$as_me: WARNING: /" >&2
1923 esac
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1925 $as_echo_n "checking for $2... " >&6; }
1926 if eval \${$3+:} false; then :
1927 $as_echo_n "(cached) " >&6
1928 else
1929 eval "$3=\$ac_header_compiler"
1931 eval ac_res=\$$3
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1933 $as_echo "$ac_res" >&6; }
1935 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1937 } # ac_fn_c_check_header_mongrel
1939 # ac_fn_c_try_run LINENO
1940 # ----------------------
1941 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1942 # that executables *can* be run.
1943 ac_fn_c_try_run ()
1945 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946 if { { ac_try="$ac_link"
1947 case "(($ac_try" in
1948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1949 *) ac_try_echo=$ac_try;;
1950 esac
1951 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1952 $as_echo "$ac_try_echo"; } >&5
1953 (eval "$ac_link") 2>&5
1954 ac_status=$?
1955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1956 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1957 { { case "(($ac_try" in
1958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1959 *) ac_try_echo=$ac_try;;
1960 esac
1961 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1962 $as_echo "$ac_try_echo"; } >&5
1963 (eval "$ac_try") 2>&5
1964 ac_status=$?
1965 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1966 test $ac_status = 0; }; }; then :
1967 ac_retval=0
1968 else
1969 $as_echo "$as_me: program exited with status $ac_status" >&5
1970 $as_echo "$as_me: failed program was:" >&5
1971 sed 's/^/| /' conftest.$ac_ext >&5
1973 ac_retval=$ac_status
1975 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1976 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1977 as_fn_set_status $ac_retval
1979 } # ac_fn_c_try_run
1981 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1982 # -------------------------------------------------------
1983 # Tests whether HEADER exists and can be compiled using the include files in
1984 # INCLUDES, setting the cache variable VAR accordingly.
1985 ac_fn_c_check_header_compile ()
1987 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1989 $as_echo_n "checking for $2... " >&6; }
1990 if eval \${$3+:} false; then :
1991 $as_echo_n "(cached) " >&6
1992 else
1993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1994 /* end confdefs.h. */
1996 #include <$2>
1997 _ACEOF
1998 if ac_fn_c_try_compile "$LINENO"; then :
1999 eval "$3=yes"
2000 else
2001 eval "$3=no"
2003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2005 eval ac_res=\$$3
2006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2007 $as_echo "$ac_res" >&6; }
2008 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2010 } # ac_fn_c_check_header_compile
2012 # ac_fn_c_check_func LINENO FUNC VAR
2013 # ----------------------------------
2014 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2015 ac_fn_c_check_func ()
2017 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2019 $as_echo_n "checking for $2... " >&6; }
2020 if eval \${$3+:} false; then :
2021 $as_echo_n "(cached) " >&6
2022 else
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024 /* end confdefs.h. */
2025 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2026 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2027 #define $2 innocuous_$2
2029 /* System header to define __stub macros and hopefully few prototypes,
2030 which can conflict with char $2 (); below.
2031 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2032 <limits.h> exists even on freestanding compilers. */
2034 #ifdef __STDC__
2035 # include <limits.h>
2036 #else
2037 # include <assert.h>
2038 #endif
2040 #undef $2
2042 /* Override any GCC internal prototype to avoid an error.
2043 Use char because int might match the return type of a GCC
2044 builtin and then its argument prototype would still apply. */
2045 #ifdef __cplusplus
2046 extern "C"
2047 #endif
2048 char $2 ();
2049 /* The GNU C library defines this for functions which it implements
2050 to always fail with ENOSYS. Some functions are actually named
2051 something starting with __ and the normal name is an alias. */
2052 #if defined __stub_$2 || defined __stub___$2
2053 choke me
2054 #endif
2057 main ()
2059 return $2 ();
2061 return 0;
2063 _ACEOF
2064 if ac_fn_c_try_link "$LINENO"; then :
2065 eval "$3=yes"
2066 else
2067 eval "$3=no"
2069 rm -f core conftest.err conftest.$ac_objext \
2070 conftest$ac_exeext conftest.$ac_ext
2072 eval ac_res=\$$3
2073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2074 $as_echo "$ac_res" >&6; }
2075 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2077 } # ac_fn_c_check_func
2079 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2080 # -------------------------------------------
2081 # Tests whether TYPE exists after having included INCLUDES, setting cache
2082 # variable VAR accordingly.
2083 ac_fn_c_check_type ()
2085 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2087 $as_echo_n "checking for $2... " >&6; }
2088 if eval \${$3+:} false; then :
2089 $as_echo_n "(cached) " >&6
2090 else
2091 eval "$3=no"
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093 /* end confdefs.h. */
2096 main ()
2098 if (sizeof ($2))
2099 return 0;
2101 return 0;
2103 _ACEOF
2104 if ac_fn_c_try_compile "$LINENO"; then :
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106 /* end confdefs.h. */
2109 main ()
2111 if (sizeof (($2)))
2112 return 0;
2114 return 0;
2116 _ACEOF
2117 if ac_fn_c_try_compile "$LINENO"; then :
2119 else
2120 eval "$3=yes"
2122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2126 eval ac_res=\$$3
2127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2128 $as_echo "$ac_res" >&6; }
2129 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2131 } # ac_fn_c_check_type
2133 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2134 # ----------------------------------------------------
2135 # Tries to find if the field MEMBER exists in type AGGR, after including
2136 # INCLUDES, setting cache variable VAR accordingly.
2137 ac_fn_c_check_member ()
2139 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2141 $as_echo_n "checking for $2.$3... " >&6; }
2142 if eval \${$4+:} false; then :
2143 $as_echo_n "(cached) " >&6
2144 else
2145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146 /* end confdefs.h. */
2149 main ()
2151 static $2 ac_aggr;
2152 if (ac_aggr.$3)
2153 return 0;
2155 return 0;
2157 _ACEOF
2158 if ac_fn_c_try_compile "$LINENO"; then :
2159 eval "$4=yes"
2160 else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162 /* end confdefs.h. */
2165 main ()
2167 static $2 ac_aggr;
2168 if (sizeof ac_aggr.$3)
2169 return 0;
2171 return 0;
2173 _ACEOF
2174 if ac_fn_c_try_compile "$LINENO"; then :
2175 eval "$4=yes"
2176 else
2177 eval "$4=no"
2179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2183 eval ac_res=\$$4
2184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2185 $as_echo "$ac_res" >&6; }
2186 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2188 } # ac_fn_c_check_member
2190 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2191 # --------------------------------------------
2192 # Tries to find the compile-time value of EXPR in a program that includes
2193 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2194 # computed
2195 ac_fn_c_compute_int ()
2197 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198 if test "$cross_compiling" = yes; then
2199 # Depending upon the size, compute the lo and hi bounds.
2200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2201 /* end confdefs.h. */
2204 main ()
2206 static int test_array [1 - 2 * !(($2) >= 0)];
2207 test_array [0] = 0;
2208 return test_array [0];
2211 return 0;
2213 _ACEOF
2214 if ac_fn_c_try_compile "$LINENO"; then :
2215 ac_lo=0 ac_mid=0
2216 while :; do
2217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218 /* end confdefs.h. */
2221 main ()
2223 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2224 test_array [0] = 0;
2225 return test_array [0];
2228 return 0;
2230 _ACEOF
2231 if ac_fn_c_try_compile "$LINENO"; then :
2232 ac_hi=$ac_mid; break
2233 else
2234 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2235 if test $ac_lo -le $ac_mid; then
2236 ac_lo= ac_hi=
2237 break
2239 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2242 done
2243 else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h. */
2248 main ()
2250 static int test_array [1 - 2 * !(($2) < 0)];
2251 test_array [0] = 0;
2252 return test_array [0];
2255 return 0;
2257 _ACEOF
2258 if ac_fn_c_try_compile "$LINENO"; then :
2259 ac_hi=-1 ac_mid=-1
2260 while :; do
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262 /* end confdefs.h. */
2265 main ()
2267 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2268 test_array [0] = 0;
2269 return test_array [0];
2272 return 0;
2274 _ACEOF
2275 if ac_fn_c_try_compile "$LINENO"; then :
2276 ac_lo=$ac_mid; break
2277 else
2278 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2279 if test $ac_mid -le $ac_hi; then
2280 ac_lo= ac_hi=
2281 break
2283 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286 done
2287 else
2288 ac_lo= ac_hi=
2290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293 # Binary search between lo and hi bounds.
2294 while test "x$ac_lo" != "x$ac_hi"; do
2295 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297 /* end confdefs.h. */
2300 main ()
2302 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2303 test_array [0] = 0;
2304 return test_array [0];
2307 return 0;
2309 _ACEOF
2310 if ac_fn_c_try_compile "$LINENO"; then :
2311 ac_hi=$ac_mid
2312 else
2313 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2316 done
2317 case $ac_lo in #((
2318 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2319 '') ac_retval=1 ;;
2320 esac
2321 else
2322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323 /* end confdefs.h. */
2325 static long int longval () { return $2; }
2326 static unsigned long int ulongval () { return $2; }
2327 #include <stdio.h>
2328 #include <stdlib.h>
2330 main ()
2333 FILE *f = fopen ("conftest.val", "w");
2334 if (! f)
2335 return 1;
2336 if (($2) < 0)
2338 long int i = longval ();
2339 if (i != ($2))
2340 return 1;
2341 fprintf (f, "%ld", i);
2343 else
2345 unsigned long int i = ulongval ();
2346 if (i != ($2))
2347 return 1;
2348 fprintf (f, "%lu", i);
2350 /* Do not output a trailing newline, as this causes \r\n confusion
2351 on some platforms. */
2352 return ferror (f) || fclose (f) != 0;
2355 return 0;
2357 _ACEOF
2358 if ac_fn_c_try_run "$LINENO"; then :
2359 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2360 else
2361 ac_retval=1
2363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2364 conftest.$ac_objext conftest.beam conftest.$ac_ext
2365 rm -f conftest.val
2368 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2369 as_fn_set_status $ac_retval
2371 } # ac_fn_c_compute_int
2373 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2374 # ---------------------------------------------
2375 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2376 # accordingly.
2377 ac_fn_c_check_decl ()
2379 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2380 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2381 as_decl_name=`echo $2|sed 's/ *(.*//'`
2382 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2384 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2385 if eval \${$3+:} false; then :
2386 $as_echo_n "(cached) " >&6
2387 else
2388 ac_save_werror_flag=$ac_c_werror_flag
2389 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391 /* end confdefs.h. */
2394 main ()
2396 #ifndef $as_decl_name
2397 #ifdef __cplusplus
2398 (void) $as_decl_use;
2399 #else
2400 (void) $as_decl_name;
2401 #endif
2402 #endif
2405 return 0;
2407 _ACEOF
2408 if ac_fn_c_try_compile "$LINENO"; then :
2409 eval "$3=yes"
2410 else
2411 eval "$3=no"
2413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414 ac_c_werror_flag=$ac_save_werror_flag
2416 eval ac_res=\$$3
2417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2418 $as_echo "$ac_res" >&6; }
2419 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2421 } # ac_fn_c_check_decl
2422 cat >config.log <<_ACEOF
2423 This file contains any messages produced by compilers while
2424 running configure, to aid debugging if configure makes a mistake.
2426 It was created by PostgreSQL $as_me 14devel, which was
2427 generated by GNU Autoconf 2.69. Invocation command line was
2429 $ $0 $@
2431 _ACEOF
2432 exec 5>>config.log
2434 cat <<_ASUNAME
2435 ## --------- ##
2436 ## Platform. ##
2437 ## --------- ##
2439 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2440 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2441 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2442 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2443 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2445 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2446 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2448 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2449 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2450 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2451 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2452 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2453 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2454 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2456 _ASUNAME
2458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2459 for as_dir in $PATH
2461 IFS=$as_save_IFS
2462 test -z "$as_dir" && as_dir=.
2463 $as_echo "PATH: $as_dir"
2464 done
2465 IFS=$as_save_IFS
2467 } >&5
2469 cat >&5 <<_ACEOF
2472 ## ----------- ##
2473 ## Core tests. ##
2474 ## ----------- ##
2476 _ACEOF
2479 # Keep a trace of the command line.
2480 # Strip out --no-create and --no-recursion so they do not pile up.
2481 # Strip out --silent because we don't want to record it for future runs.
2482 # Also quote any args containing shell meta-characters.
2483 # Make two passes to allow for proper duplicate-argument suppression.
2484 ac_configure_args=
2485 ac_configure_args0=
2486 ac_configure_args1=
2487 ac_must_keep_next=false
2488 for ac_pass in 1 2
2490 for ac_arg
2492 case $ac_arg in
2493 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2494 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2495 | -silent | --silent | --silen | --sile | --sil)
2496 continue ;;
2497 *\'*)
2498 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2499 esac
2500 case $ac_pass in
2501 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2503 as_fn_append ac_configure_args1 " '$ac_arg'"
2504 if test $ac_must_keep_next = true; then
2505 ac_must_keep_next=false # Got value, back to normal.
2506 else
2507 case $ac_arg in
2508 *=* | --config-cache | -C | -disable-* | --disable-* \
2509 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2510 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2511 | -with-* | --with-* | -without-* | --without-* | --x)
2512 case "$ac_configure_args0 " in
2513 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2514 esac
2516 -* ) ac_must_keep_next=true ;;
2517 esac
2519 as_fn_append ac_configure_args " '$ac_arg'"
2521 esac
2522 done
2523 done
2524 { ac_configure_args0=; unset ac_configure_args0;}
2525 { ac_configure_args1=; unset ac_configure_args1;}
2527 # When interrupted or exit'd, cleanup temporary files, and complete
2528 # config.log. We remove comments because anyway the quotes in there
2529 # would cause problems or look ugly.
2530 # WARNING: Use '\'' to represent an apostrophe within the trap.
2531 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2532 trap 'exit_status=$?
2533 # Save into config.log some information that might help in debugging.
2535 echo
2537 $as_echo "## ---------------- ##
2538 ## Cache variables. ##
2539 ## ---------------- ##"
2540 echo
2541 # The following way of writing the cache mishandles newlines in values,
2543 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2544 eval ac_val=\$$ac_var
2545 case $ac_val in #(
2546 *${as_nl}*)
2547 case $ac_var in #(
2548 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2549 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2550 esac
2551 case $ac_var in #(
2552 _ | IFS | as_nl) ;; #(
2553 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2554 *) { eval $ac_var=; unset $ac_var;} ;;
2555 esac ;;
2556 esac
2557 done
2558 (set) 2>&1 |
2559 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2560 *${as_nl}ac_space=\ *)
2561 sed -n \
2562 "s/'\''/'\''\\\\'\'''\''/g;
2563 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2564 ;; #(
2566 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2568 esac |
2569 sort
2571 echo
2573 $as_echo "## ----------------- ##
2574 ## Output variables. ##
2575 ## ----------------- ##"
2576 echo
2577 for ac_var in $ac_subst_vars
2579 eval ac_val=\$$ac_var
2580 case $ac_val in
2581 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2582 esac
2583 $as_echo "$ac_var='\''$ac_val'\''"
2584 done | sort
2585 echo
2587 if test -n "$ac_subst_files"; then
2588 $as_echo "## ------------------- ##
2589 ## File substitutions. ##
2590 ## ------------------- ##"
2591 echo
2592 for ac_var in $ac_subst_files
2594 eval ac_val=\$$ac_var
2595 case $ac_val in
2596 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2597 esac
2598 $as_echo "$ac_var='\''$ac_val'\''"
2599 done | sort
2600 echo
2603 if test -s confdefs.h; then
2604 $as_echo "## ----------- ##
2605 ## confdefs.h. ##
2606 ## ----------- ##"
2607 echo
2608 cat confdefs.h
2609 echo
2611 test "$ac_signal" != 0 &&
2612 $as_echo "$as_me: caught signal $ac_signal"
2613 $as_echo "$as_me: exit $exit_status"
2614 } >&5
2615 rm -f core *.core core.conftest.* &&
2616 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2617 exit $exit_status
2619 for ac_signal in 1 2 13 15; do
2620 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2621 done
2622 ac_signal=0
2624 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2625 rm -f -r conftest* confdefs.h
2627 $as_echo "/* confdefs.h */" > confdefs.h
2629 # Predefined preprocessor variables.
2631 cat >>confdefs.h <<_ACEOF
2632 #define PACKAGE_NAME "$PACKAGE_NAME"
2633 _ACEOF
2635 cat >>confdefs.h <<_ACEOF
2636 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2637 _ACEOF
2639 cat >>confdefs.h <<_ACEOF
2640 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2641 _ACEOF
2643 cat >>confdefs.h <<_ACEOF
2644 #define PACKAGE_STRING "$PACKAGE_STRING"
2645 _ACEOF
2647 cat >>confdefs.h <<_ACEOF
2648 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2649 _ACEOF
2651 cat >>confdefs.h <<_ACEOF
2652 #define PACKAGE_URL "$PACKAGE_URL"
2653 _ACEOF
2656 # Let the site file select an alternate cache file if it wants to.
2657 # Prefer an explicitly selected file to automatically selected ones.
2658 ac_site_file1=NONE
2659 ac_site_file2=NONE
2660 if test -n "$CONFIG_SITE"; then
2661 # We do not want a PATH search for config.site.
2662 case $CONFIG_SITE in #((
2663 -*) ac_site_file1=./$CONFIG_SITE;;
2664 */*) ac_site_file1=$CONFIG_SITE;;
2665 *) ac_site_file1=./$CONFIG_SITE;;
2666 esac
2667 elif test "x$prefix" != xNONE; then
2668 ac_site_file1=$prefix/share/config.site
2669 ac_site_file2=$prefix/etc/config.site
2670 else
2671 ac_site_file1=$ac_default_prefix/share/config.site
2672 ac_site_file2=$ac_default_prefix/etc/config.site
2674 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2676 test "x$ac_site_file" = xNONE && continue
2677 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2679 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2680 sed 's/^/| /' "$ac_site_file" >&5
2681 . "$ac_site_file" \
2682 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684 as_fn_error $? "failed to load site script $ac_site_file
2685 See \`config.log' for more details" "$LINENO" 5; }
2687 done
2689 if test -r "$cache_file"; then
2690 # Some versions of bash will fail to source /dev/null (special files
2691 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2692 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2694 $as_echo "$as_me: loading cache $cache_file" >&6;}
2695 case $cache_file in
2696 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2697 *) . "./$cache_file";;
2698 esac
2700 else
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2702 $as_echo "$as_me: creating cache $cache_file" >&6;}
2703 >$cache_file
2706 # Check that the precious variables saved in the cache have kept the same
2707 # value.
2708 ac_cache_corrupted=false
2709 for ac_var in $ac_precious_vars; do
2710 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2711 eval ac_new_set=\$ac_env_${ac_var}_set
2712 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2713 eval ac_new_val=\$ac_env_${ac_var}_value
2714 case $ac_old_set,$ac_new_set in
2715 set,)
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2717 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2718 ac_cache_corrupted=: ;;
2719 ,set)
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2721 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2722 ac_cache_corrupted=: ;;
2723 ,);;
2725 if test "x$ac_old_val" != "x$ac_new_val"; then
2726 # differences in whitespace do not lead to failure.
2727 ac_old_val_w=`echo x $ac_old_val`
2728 ac_new_val_w=`echo x $ac_new_val`
2729 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2731 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2732 ac_cache_corrupted=:
2733 else
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2735 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2736 eval $ac_var=\$ac_old_val
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2739 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2741 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2742 fi;;
2743 esac
2744 # Pass precious variables to config.status.
2745 if test "$ac_new_set" = set; then
2746 case $ac_new_val in
2747 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2748 *) ac_arg=$ac_var=$ac_new_val ;;
2749 esac
2750 case " $ac_configure_args " in
2751 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2752 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2753 esac
2755 done
2756 if $ac_cache_corrupted; then
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2758 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2760 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2761 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2763 ## -------------------- ##
2764 ## Main body of script. ##
2765 ## -------------------- ##
2767 ac_ext=c
2768 ac_cpp='$CPP $CPPFLAGS'
2769 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2770 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2771 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2778 ac_aux_dir=
2779 for ac_dir in config "$srcdir"/config; do
2780 if test -f "$ac_dir/install-sh"; then
2781 ac_aux_dir=$ac_dir
2782 ac_install_sh="$ac_aux_dir/install-sh -c"
2783 break
2784 elif test -f "$ac_dir/install.sh"; then
2785 ac_aux_dir=$ac_dir
2786 ac_install_sh="$ac_aux_dir/install.sh -c"
2787 break
2788 elif test -f "$ac_dir/shtool"; then
2789 ac_aux_dir=$ac_dir
2790 ac_install_sh="$ac_aux_dir/shtool install -c"
2791 break
2793 done
2794 if test -z "$ac_aux_dir"; then
2795 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2798 # These three variables are undocumented and unsupported,
2799 # and are intended to be withdrawn in a future Autoconf release.
2800 # They can cause serious problems if a builder's source tree is in a directory
2801 # whose full name contains unusual characters.
2802 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2803 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2804 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2809 cat >>confdefs.h <<_ACEOF
2810 #define CONFIGURE_ARGS "$ac_configure_args"
2811 _ACEOF
2814 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2815 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2816 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2819 cat >>confdefs.h <<_ACEOF
2820 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2821 _ACEOF
2824 cat >>confdefs.h <<_ACEOF
2825 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2826 _ACEOF
2829 cat >>confdefs.h <<_ACEOF
2830 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2831 _ACEOF
2837 # Check whether --with-extra-version was given.
2838 if test "${with_extra_version+set}" = set; then :
2839 withval=$with_extra_version;
2840 case $withval in
2841 yes)
2842 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2845 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2848 PG_VERSION="$PACKAGE_VERSION$withval"
2850 esac
2852 else
2853 PG_VERSION="$PACKAGE_VERSION"
2858 cat >>confdefs.h <<_ACEOF
2859 #define PG_VERSION "$PG_VERSION"
2860 _ACEOF
2863 # Make sure we can run config.sub.
2864 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2865 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2868 $as_echo_n "checking build system type... " >&6; }
2869 if ${ac_cv_build+:} false; then :
2870 $as_echo_n "(cached) " >&6
2871 else
2872 ac_build_alias=$build_alias
2873 test "x$ac_build_alias" = x &&
2874 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2875 test "x$ac_build_alias" = x &&
2876 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2877 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2878 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2882 $as_echo "$ac_cv_build" >&6; }
2883 case $ac_cv_build in
2884 *-*-*) ;;
2885 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2886 esac
2887 build=$ac_cv_build
2888 ac_save_IFS=$IFS; IFS='-'
2889 set x $ac_cv_build
2890 shift
2891 build_cpu=$1
2892 build_vendor=$2
2893 shift; shift
2894 # Remember, the first character of IFS is used to create $*,
2895 # except with old shells:
2896 build_os=$*
2897 IFS=$ac_save_IFS
2898 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2902 $as_echo_n "checking host system type... " >&6; }
2903 if ${ac_cv_host+:} false; then :
2904 $as_echo_n "(cached) " >&6
2905 else
2906 if test "x$host_alias" = x; then
2907 ac_cv_host=$ac_cv_build
2908 else
2909 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2910 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2915 $as_echo "$ac_cv_host" >&6; }
2916 case $ac_cv_host in
2917 *-*-*) ;;
2918 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2919 esac
2920 host=$ac_cv_host
2921 ac_save_IFS=$IFS; IFS='-'
2922 set x $ac_cv_host
2923 shift
2924 host_cpu=$1
2925 host_vendor=$2
2926 shift; shift
2927 # Remember, the first character of IFS is used to create $*,
2928 # except with old shells:
2929 host_os=$*
2930 IFS=$ac_save_IFS
2931 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2935 template=
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2937 $as_echo_n "checking which template to use... " >&6; }
2942 # Check whether --with-template was given.
2943 if test "${with_template+set}" = set; then :
2944 withval=$with_template;
2945 case $withval in
2946 yes)
2947 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2950 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2954 case $withval in
2955 list) echo; ls "$srcdir/src/template"; exit;;
2956 *) if test -f "$srcdir/src/template/$with_template" ; then
2957 template=$withval
2958 else
2959 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2960 fi;;
2961 esac
2964 esac
2966 else
2968 # --with-template not given
2970 case $host_os in
2971 aix*) template=aix ;;
2972 cygwin*|msys*) template=cygwin ;;
2973 darwin*) template=darwin ;;
2974 dragonfly*) template=netbsd ;;
2975 freebsd*) template=freebsd ;;
2976 hpux*) template=hpux ;;
2977 linux*|gnu*|k*bsd*-gnu)
2978 template=linux ;;
2979 mingw*) template=win32 ;;
2980 netbsd*) template=netbsd ;;
2981 openbsd*) template=openbsd ;;
2982 solaris*) template=solaris ;;
2983 esac
2985 if test x"$template" = x"" ; then
2986 as_fn_error $? "
2987 *******************************************************************
2988 PostgreSQL has apparently not been ported to your platform yet.
2989 To try a manual configuration, look into the src/template directory
2990 for a similar platform and use the '--with-template=' option.
2992 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
2993 rectifying this. Include the above 'checking host system type...'
2994 line.
2995 *******************************************************************
2996 " "$LINENO" 5
3004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3005 $as_echo "$template" >&6; }
3007 PORTNAME=$template
3010 # Initialize default assumption that we do not need separate assembly code
3011 # for TAS (test-and-set). This can be overridden by the template file
3012 # when it's executed.
3013 need_tas=no
3014 tas_file=dummy.s
3019 ## Command line options
3023 # Add non-standard directories to the include path
3028 # Check whether --with-includes was given.
3029 if test "${with_includes+set}" = set; then :
3030 withval=$with_includes;
3031 case $withval in
3032 yes)
3033 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3036 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3041 esac
3049 # Add non-standard directories to the library search path
3054 # Check whether --with-libraries was given.
3055 if test "${with_libraries+set}" = set; then :
3056 withval=$with_libraries;
3057 case $withval in
3058 yes)
3059 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3062 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3065 LIBRARY_DIRS=$withval
3067 esac
3076 # Check whether --with-libs was given.
3077 if test "${with_libs+set}" = set; then :
3078 withval=$with_libs;
3079 case $withval in
3080 yes)
3081 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3084 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3087 LIBRARY_DIRS=$withval
3089 esac
3097 # 64-bit integer date/time storage is now the only option, but to avoid
3098 # unnecessary breakage of build scripts, continue to accept an explicit
3099 # "--enable-integer-datetimes" switch.
3103 # Check whether --enable-integer-datetimes was given.
3104 if test "${enable_integer_datetimes+set}" = set; then :
3105 enableval=$enable_integer_datetimes;
3106 case $enableval in
3107 yes)
3111 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3114 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3116 esac
3118 else
3119 enable_integer_datetimes=yes
3127 # NLS
3129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3130 $as_echo_n "checking whether NLS is wanted... " >&6; }
3133 # Check whether --enable-nls was given.
3134 if test "${enable_nls+set}" = set; then :
3135 enableval=$enable_nls;
3136 case $enableval in
3137 yes)
3144 enable_nls=yes
3145 WANTED_LANGUAGES=$enableval
3147 esac
3149 else
3150 enable_nls=no
3155 if test "$enable_nls" = yes; then
3157 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3162 $as_echo "$enable_nls" >&6; }
3167 # Default port number (--with-pgport), default 5432
3169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3170 $as_echo_n "checking for default port number... " >&6; }
3174 # Check whether --with-pgport was given.
3175 if test "${with_pgport+set}" = set; then :
3176 withval=$with_pgport;
3177 case $withval in
3178 yes)
3179 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3182 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3185 default_port=$withval
3187 esac
3189 else
3190 default_port=5432
3194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3195 $as_echo "$default_port" >&6; }
3196 # Need both of these because some places want an integer and some a string
3198 cat >>confdefs.h <<_ACEOF
3199 #define DEF_PGPORT ${default_port}
3200 _ACEOF
3203 cat >>confdefs.h <<_ACEOF
3204 #define DEF_PGPORT_STR "${default_port}"
3205 _ACEOF
3209 # It's worth validating port; you can get very confusing errors otherwise
3210 if test x"$default_port" = x""; then
3211 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3212 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3213 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3214 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3215 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3216 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3217 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3221 # '-rpath'-like feature can be disabled
3225 # Check whether --enable-rpath was given.
3226 if test "${enable_rpath+set}" = set; then :
3227 enableval=$enable_rpath;
3228 case $enableval in
3229 yes)
3236 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3238 esac
3240 else
3241 enable_rpath=yes
3249 # Spinlocks
3253 # Check whether --enable-spinlocks was given.
3254 if test "${enable_spinlocks+set}" = set; then :
3255 enableval=$enable_spinlocks;
3256 case $enableval in
3257 yes)
3264 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3266 esac
3268 else
3269 enable_spinlocks=yes
3276 # Atomic operations
3280 # Check whether --enable-atomics was given.
3281 if test "${enable_atomics+set}" = set; then :
3282 enableval=$enable_atomics;
3283 case $enableval in
3284 yes)
3291 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3293 esac
3295 else
3296 enable_atomics=yes
3303 # --enable-debug adds -g to compiler flags
3307 # Check whether --enable-debug was given.
3308 if test "${enable_debug+set}" = set; then :
3309 enableval=$enable_debug;
3310 case $enableval in
3311 yes)
3318 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3320 esac
3322 else
3323 enable_debug=no
3331 # --enable-profiling enables gcc profiling
3335 # Check whether --enable-profiling was given.
3336 if test "${enable_profiling+set}" = set; then :
3337 enableval=$enable_profiling;
3338 case $enableval in
3339 yes)
3346 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3348 esac
3350 else
3351 enable_profiling=no
3358 # --enable-coverage enables generation of code coverage metrics with gcov
3362 # Check whether --enable-coverage was given.
3363 if test "${enable_coverage+set}" = set; then :
3364 enableval=$enable_coverage;
3365 case $enableval in
3366 yes)
3367 if test -z "$GCOV"; then
3368 for ac_prog in gcov
3370 # Extract the first word of "$ac_prog", so it can be a program name with args.
3371 set dummy $ac_prog; ac_word=$2
3372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3373 $as_echo_n "checking for $ac_word... " >&6; }
3374 if ${ac_cv_path_GCOV+:} false; then :
3375 $as_echo_n "(cached) " >&6
3376 else
3377 case $GCOV in
3378 [\\/]* | ?:[\\/]*)
3379 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3383 for as_dir in $PATH
3385 IFS=$as_save_IFS
3386 test -z "$as_dir" && as_dir=.
3387 for ac_exec_ext in '' $ac_executable_extensions; do
3388 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3389 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3390 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3391 break 2
3393 done
3394 done
3395 IFS=$as_save_IFS
3398 esac
3400 GCOV=$ac_cv_path_GCOV
3401 if test -n "$GCOV"; then
3402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3403 $as_echo "$GCOV" >&6; }
3404 else
3405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3406 $as_echo "no" >&6; }
3410 test -n "$GCOV" && break
3411 done
3413 else
3414 # Report the value of GCOV in configure's output in all cases.
3415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3416 $as_echo_n "checking for GCOV... " >&6; }
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3418 $as_echo "$GCOV" >&6; }
3421 if test -z "$GCOV"; then
3422 as_fn_error $? "gcov not found" "$LINENO" 5
3424 if test -z "$LCOV"; then
3425 for ac_prog in lcov
3427 # Extract the first word of "$ac_prog", so it can be a program name with args.
3428 set dummy $ac_prog; ac_word=$2
3429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3430 $as_echo_n "checking for $ac_word... " >&6; }
3431 if ${ac_cv_path_LCOV+:} false; then :
3432 $as_echo_n "(cached) " >&6
3433 else
3434 case $LCOV in
3435 [\\/]* | ?:[\\/]*)
3436 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3440 for as_dir in $PATH
3442 IFS=$as_save_IFS
3443 test -z "$as_dir" && as_dir=.
3444 for ac_exec_ext in '' $ac_executable_extensions; do
3445 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3446 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3447 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3448 break 2
3450 done
3451 done
3452 IFS=$as_save_IFS
3455 esac
3457 LCOV=$ac_cv_path_LCOV
3458 if test -n "$LCOV"; then
3459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3460 $as_echo "$LCOV" >&6; }
3461 else
3462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3463 $as_echo "no" >&6; }
3467 test -n "$LCOV" && break
3468 done
3470 else
3471 # Report the value of LCOV in configure's output in all cases.
3472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3473 $as_echo_n "checking for LCOV... " >&6; }
3474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3475 $as_echo "$LCOV" >&6; }
3478 if test -z "$LCOV"; then
3479 as_fn_error $? "lcov not found" "$LINENO" 5
3481 if test -z "$GENHTML"; then
3482 for ac_prog in genhtml
3484 # Extract the first word of "$ac_prog", so it can be a program name with args.
3485 set dummy $ac_prog; ac_word=$2
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3487 $as_echo_n "checking for $ac_word... " >&6; }
3488 if ${ac_cv_path_GENHTML+:} false; then :
3489 $as_echo_n "(cached) " >&6
3490 else
3491 case $GENHTML in
3492 [\\/]* | ?:[\\/]*)
3493 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3497 for as_dir in $PATH
3499 IFS=$as_save_IFS
3500 test -z "$as_dir" && as_dir=.
3501 for ac_exec_ext in '' $ac_executable_extensions; do
3502 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3503 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3504 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3505 break 2
3507 done
3508 done
3509 IFS=$as_save_IFS
3512 esac
3514 GENHTML=$ac_cv_path_GENHTML
3515 if test -n "$GENHTML"; then
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3517 $as_echo "$GENHTML" >&6; }
3518 else
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3520 $as_echo "no" >&6; }
3524 test -n "$GENHTML" && break
3525 done
3527 else
3528 # Report the value of GENHTML in configure's output in all cases.
3529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3530 $as_echo_n "checking for GENHTML... " >&6; }
3531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3532 $as_echo "$GENHTML" >&6; }
3535 if test -z "$GENHTML"; then
3536 as_fn_error $? "genhtml not found" "$LINENO" 5
3543 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3545 esac
3547 else
3548 enable_coverage=no
3556 # DTrace
3560 # Check whether --enable-dtrace was given.
3561 if test "${enable_dtrace+set}" = set; then :
3562 enableval=$enable_dtrace;
3563 case $enableval in
3564 yes)
3565 if test -z "$DTRACE"; then
3566 for ac_prog in dtrace
3568 # Extract the first word of "$ac_prog", so it can be a program name with args.
3569 set dummy $ac_prog; ac_word=$2
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3571 $as_echo_n "checking for $ac_word... " >&6; }
3572 if ${ac_cv_path_DTRACE+:} false; then :
3573 $as_echo_n "(cached) " >&6
3574 else
3575 case $DTRACE in
3576 [\\/]* | ?:[\\/]*)
3577 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3581 for as_dir in $PATH
3583 IFS=$as_save_IFS
3584 test -z "$as_dir" && as_dir=.
3585 for ac_exec_ext in '' $ac_executable_extensions; do
3586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3587 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3589 break 2
3591 done
3592 done
3593 IFS=$as_save_IFS
3596 esac
3598 DTRACE=$ac_cv_path_DTRACE
3599 if test -n "$DTRACE"; then
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3601 $as_echo "$DTRACE" >&6; }
3602 else
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3604 $as_echo "no" >&6; }
3608 test -n "$DTRACE" && break
3609 done
3611 else
3612 # Report the value of DTRACE in configure's output in all cases.
3613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3614 $as_echo_n "checking for DTRACE... " >&6; }
3615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3616 $as_echo "$DTRACE" >&6; }
3619 if test -z "$DTRACE"; then
3620 as_fn_error $? "dtrace not found" "$LINENO" 5
3628 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3630 esac
3632 else
3633 enable_dtrace=no
3641 # TAP tests
3645 # Check whether --enable-tap-tests was given.
3646 if test "${enable_tap_tests+set}" = set; then :
3647 enableval=$enable_tap_tests;
3648 case $enableval in
3649 yes)
3656 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3658 esac
3660 else
3661 enable_tap_tests=no
3669 # Block size
3671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3672 $as_echo_n "checking for block size... " >&6; }
3676 # Check whether --with-blocksize was given.
3677 if test "${with_blocksize+set}" = set; then :
3678 withval=$with_blocksize;
3679 case $withval in
3680 yes)
3681 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3684 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3687 blocksize=$withval
3689 esac
3691 else
3692 blocksize=8
3696 case ${blocksize} in
3697 1) BLCKSZ=1024;;
3698 2) BLCKSZ=2048;;
3699 4) BLCKSZ=4096;;
3700 8) BLCKSZ=8192;;
3701 16) BLCKSZ=16384;;
3702 32) BLCKSZ=32768;;
3703 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3704 esac
3705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3706 $as_echo "${blocksize}kB" >&6; }
3709 cat >>confdefs.h <<_ACEOF
3710 #define BLCKSZ ${BLCKSZ}
3711 _ACEOF
3715 # Relation segment size
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3718 $as_echo_n "checking for segment size... " >&6; }
3722 # Check whether --with-segsize was given.
3723 if test "${with_segsize+set}" = set; then :
3724 withval=$with_segsize;
3725 case $withval in
3726 yes)
3727 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3730 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3733 segsize=$withval
3735 esac
3737 else
3738 segsize=1
3742 # this expression is set up to avoid unnecessary integer overflow
3743 # blocksize is already guaranteed to be a factor of 1024
3744 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3745 test $? -eq 0 || exit 1
3746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3747 $as_echo "${segsize}GB" >&6; }
3750 cat >>confdefs.h <<_ACEOF
3751 #define RELSEG_SIZE ${RELSEG_SIZE}
3752 _ACEOF
3756 # WAL block size
3758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3759 $as_echo_n "checking for WAL block size... " >&6; }
3763 # Check whether --with-wal-blocksize was given.
3764 if test "${with_wal_blocksize+set}" = set; then :
3765 withval=$with_wal_blocksize;
3766 case $withval in
3767 yes)
3768 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3771 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3774 wal_blocksize=$withval
3776 esac
3778 else
3779 wal_blocksize=8
3783 case ${wal_blocksize} in
3784 1) XLOG_BLCKSZ=1024;;
3785 2) XLOG_BLCKSZ=2048;;
3786 4) XLOG_BLCKSZ=4096;;
3787 8) XLOG_BLCKSZ=8192;;
3788 16) XLOG_BLCKSZ=16384;;
3789 32) XLOG_BLCKSZ=32768;;
3790 64) XLOG_BLCKSZ=65536;;
3791 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3792 esac
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3794 $as_echo "${wal_blocksize}kB" >&6; }
3797 cat >>confdefs.h <<_ACEOF
3798 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3799 _ACEOF
3803 # C compiler
3806 # For historical reasons you can also use --with-CC to specify the C compiler
3807 # to use, although the standard way to do this is to set the CC environment
3808 # variable.
3812 # Check whether --with-CC was given.
3813 if test "${with_CC+set}" = set; then :
3814 withval=$with_CC;
3815 case $withval in
3816 yes)
3817 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3820 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3823 CC=$with_CC
3825 esac
3831 case $template in
3832 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3833 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3834 esac
3836 ac_ext=c
3837 ac_cpp='$CPP $CPPFLAGS'
3838 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3839 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3840 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3841 if test -n "$ac_tool_prefix"; then
3842 for ac_prog in $pgac_cc_list
3844 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3845 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3847 $as_echo_n "checking for $ac_word... " >&6; }
3848 if ${ac_cv_prog_CC+:} false; then :
3849 $as_echo_n "(cached) " >&6
3850 else
3851 if test -n "$CC"; then
3852 ac_cv_prog_CC="$CC" # Let the user override the test.
3853 else
3854 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3855 for as_dir in $PATH
3857 IFS=$as_save_IFS
3858 test -z "$as_dir" && as_dir=.
3859 for ac_exec_ext in '' $ac_executable_extensions; do
3860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3861 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3863 break 2
3865 done
3866 done
3867 IFS=$as_save_IFS
3871 CC=$ac_cv_prog_CC
3872 if test -n "$CC"; then
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3874 $as_echo "$CC" >&6; }
3875 else
3876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3877 $as_echo "no" >&6; }
3881 test -n "$CC" && break
3882 done
3884 if test -z "$CC"; then
3885 ac_ct_CC=$CC
3886 for ac_prog in $pgac_cc_list
3888 # Extract the first word of "$ac_prog", so it can be a program name with args.
3889 set dummy $ac_prog; ac_word=$2
3890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3891 $as_echo_n "checking for $ac_word... " >&6; }
3892 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3893 $as_echo_n "(cached) " >&6
3894 else
3895 if test -n "$ac_ct_CC"; then
3896 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3897 else
3898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3899 for as_dir in $PATH
3901 IFS=$as_save_IFS
3902 test -z "$as_dir" && as_dir=.
3903 for ac_exec_ext in '' $ac_executable_extensions; do
3904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3905 ac_cv_prog_ac_ct_CC="$ac_prog"
3906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3907 break 2
3909 done
3910 done
3911 IFS=$as_save_IFS
3915 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3916 if test -n "$ac_ct_CC"; then
3917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3918 $as_echo "$ac_ct_CC" >&6; }
3919 else
3920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3921 $as_echo "no" >&6; }
3925 test -n "$ac_ct_CC" && break
3926 done
3928 if test "x$ac_ct_CC" = x; then
3929 CC=""
3930 else
3931 case $cross_compiling:$ac_tool_warned in
3932 yes:)
3933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3934 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3935 ac_tool_warned=yes ;;
3936 esac
3937 CC=$ac_ct_CC
3942 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3943 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3944 as_fn_error $? "no acceptable C compiler found in \$PATH
3945 See \`config.log' for more details" "$LINENO" 5; }
3947 # Provide some information about the compiler.
3948 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3949 set X $ac_compile
3950 ac_compiler=$2
3951 for ac_option in --version -v -V -qversion; do
3952 { { ac_try="$ac_compiler $ac_option >&5"
3953 case "(($ac_try" in
3954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3955 *) ac_try_echo=$ac_try;;
3956 esac
3957 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3958 $as_echo "$ac_try_echo"; } >&5
3959 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3960 ac_status=$?
3961 if test -s conftest.err; then
3962 sed '10a\
3963 ... rest of stderr output deleted ...
3964 10q' conftest.err >conftest.er1
3965 cat conftest.er1 >&5
3967 rm -f conftest.er1 conftest.err
3968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3969 test $ac_status = 0; }
3970 done
3972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3973 /* end confdefs.h. */
3976 main ()
3980 return 0;
3982 _ACEOF
3983 ac_clean_files_save=$ac_clean_files
3984 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3985 # Try to create an executable without -o first, disregard a.out.
3986 # It will help us diagnose broken compilers, and finding out an intuition
3987 # of exeext.
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3989 $as_echo_n "checking whether the C compiler works... " >&6; }
3990 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3992 # The possible output files:
3993 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3995 ac_rmfiles=
3996 for ac_file in $ac_files
3998 case $ac_file in
3999 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4000 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4001 esac
4002 done
4003 rm -f $ac_rmfiles
4005 if { { ac_try="$ac_link_default"
4006 case "(($ac_try" in
4007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008 *) ac_try_echo=$ac_try;;
4009 esac
4010 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4011 $as_echo "$ac_try_echo"; } >&5
4012 (eval "$ac_link_default") 2>&5
4013 ac_status=$?
4014 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4015 test $ac_status = 0; }; then :
4016 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4017 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4018 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4019 # so that the user can short-circuit this test for compilers unknown to
4020 # Autoconf.
4021 for ac_file in $ac_files ''
4023 test -f "$ac_file" || continue
4024 case $ac_file in
4025 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4027 [ab].out )
4028 # We found the default executable, but exeext='' is most
4029 # certainly right.
4030 break;;
4031 *.* )
4032 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4033 then :; else
4034 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4036 # We set ac_cv_exeext here because the later test for it is not
4037 # safe: cross compilers may not add the suffix if given an `-o'
4038 # argument, so we may need to know it at that point already.
4039 # Even if this section looks crufty: it has the advantage of
4040 # actually working.
4041 break;;
4043 break;;
4044 esac
4045 done
4046 test "$ac_cv_exeext" = no && ac_cv_exeext=
4048 else
4049 ac_file=''
4051 if test -z "$ac_file"; then :
4052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4053 $as_echo "no" >&6; }
4054 $as_echo "$as_me: failed program was:" >&5
4055 sed 's/^/| /' conftest.$ac_ext >&5
4057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4058 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4059 as_fn_error 77 "C compiler cannot create executables
4060 See \`config.log' for more details" "$LINENO" 5; }
4061 else
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4063 $as_echo "yes" >&6; }
4065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4066 $as_echo_n "checking for C compiler default output file name... " >&6; }
4067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4068 $as_echo "$ac_file" >&6; }
4069 ac_exeext=$ac_cv_exeext
4071 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4072 ac_clean_files=$ac_clean_files_save
4073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4074 $as_echo_n "checking for suffix of executables... " >&6; }
4075 if { { ac_try="$ac_link"
4076 case "(($ac_try" in
4077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4078 *) ac_try_echo=$ac_try;;
4079 esac
4080 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4081 $as_echo "$ac_try_echo"; } >&5
4082 (eval "$ac_link") 2>&5
4083 ac_status=$?
4084 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4085 test $ac_status = 0; }; then :
4086 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4087 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4088 # work properly (i.e., refer to `conftest.exe'), while it won't with
4089 # `rm'.
4090 for ac_file in conftest.exe conftest conftest.*; do
4091 test -f "$ac_file" || continue
4092 case $ac_file in
4093 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4094 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4095 break;;
4096 * ) break;;
4097 esac
4098 done
4099 else
4100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4101 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4102 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4103 See \`config.log' for more details" "$LINENO" 5; }
4105 rm -f conftest conftest$ac_cv_exeext
4106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4107 $as_echo "$ac_cv_exeext" >&6; }
4109 rm -f conftest.$ac_ext
4110 EXEEXT=$ac_cv_exeext
4111 ac_exeext=$EXEEXT
4112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4113 /* end confdefs.h. */
4114 #include <stdio.h>
4116 main ()
4118 FILE *f = fopen ("conftest.out", "w");
4119 return ferror (f) || fclose (f) != 0;
4122 return 0;
4124 _ACEOF
4125 ac_clean_files="$ac_clean_files conftest.out"
4126 # Check that the compiler produces executables we can run. If not, either
4127 # the compiler is broken, or we cross compile.
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4129 $as_echo_n "checking whether we are cross compiling... " >&6; }
4130 if test "$cross_compiling" != yes; then
4131 { { ac_try="$ac_link"
4132 case "(($ac_try" in
4133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4134 *) ac_try_echo=$ac_try;;
4135 esac
4136 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4137 $as_echo "$ac_try_echo"; } >&5
4138 (eval "$ac_link") 2>&5
4139 ac_status=$?
4140 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4141 test $ac_status = 0; }
4142 if { ac_try='./conftest$ac_cv_exeext'
4143 { { case "(($ac_try" in
4144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4145 *) ac_try_echo=$ac_try;;
4146 esac
4147 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4148 $as_echo "$ac_try_echo"; } >&5
4149 (eval "$ac_try") 2>&5
4150 ac_status=$?
4151 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4152 test $ac_status = 0; }; }; then
4153 cross_compiling=no
4154 else
4155 if test "$cross_compiling" = maybe; then
4156 cross_compiling=yes
4157 else
4158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4159 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4160 as_fn_error $? "cannot run C compiled programs.
4161 If you meant to cross compile, use \`--host'.
4162 See \`config.log' for more details" "$LINENO" 5; }
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4167 $as_echo "$cross_compiling" >&6; }
4169 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4170 ac_clean_files=$ac_clean_files_save
4171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4172 $as_echo_n "checking for suffix of object files... " >&6; }
4173 if ${ac_cv_objext+:} false; then :
4174 $as_echo_n "(cached) " >&6
4175 else
4176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4177 /* end confdefs.h. */
4180 main ()
4184 return 0;
4186 _ACEOF
4187 rm -f conftest.o conftest.obj
4188 if { { ac_try="$ac_compile"
4189 case "(($ac_try" in
4190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4191 *) ac_try_echo=$ac_try;;
4192 esac
4193 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4194 $as_echo "$ac_try_echo"; } >&5
4195 (eval "$ac_compile") 2>&5
4196 ac_status=$?
4197 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4198 test $ac_status = 0; }; then :
4199 for ac_file in conftest.o conftest.obj conftest.*; do
4200 test -f "$ac_file" || continue;
4201 case $ac_file in
4202 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4203 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4204 break;;
4205 esac
4206 done
4207 else
4208 $as_echo "$as_me: failed program was:" >&5
4209 sed 's/^/| /' conftest.$ac_ext >&5
4211 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4212 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4213 as_fn_error $? "cannot compute suffix of object files: cannot compile
4214 See \`config.log' for more details" "$LINENO" 5; }
4216 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4219 $as_echo "$ac_cv_objext" >&6; }
4220 OBJEXT=$ac_cv_objext
4221 ac_objext=$OBJEXT
4222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4223 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4224 if ${ac_cv_c_compiler_gnu+:} false; then :
4225 $as_echo_n "(cached) " >&6
4226 else
4227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4228 /* end confdefs.h. */
4231 main ()
4233 #ifndef __GNUC__
4234 choke me
4235 #endif
4238 return 0;
4240 _ACEOF
4241 if ac_fn_c_try_compile "$LINENO"; then :
4242 ac_compiler_gnu=yes
4243 else
4244 ac_compiler_gnu=no
4246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4247 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4251 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4252 if test $ac_compiler_gnu = yes; then
4253 GCC=yes
4254 else
4255 GCC=
4257 ac_test_CFLAGS=${CFLAGS+set}
4258 ac_save_CFLAGS=$CFLAGS
4259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4260 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4261 if ${ac_cv_prog_cc_g+:} false; then :
4262 $as_echo_n "(cached) " >&6
4263 else
4264 ac_save_c_werror_flag=$ac_c_werror_flag
4265 ac_c_werror_flag=yes
4266 ac_cv_prog_cc_g=no
4267 CFLAGS="-g"
4268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4269 /* end confdefs.h. */
4272 main ()
4276 return 0;
4278 _ACEOF
4279 if ac_fn_c_try_compile "$LINENO"; then :
4280 ac_cv_prog_cc_g=yes
4281 else
4282 CFLAGS=""
4283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4284 /* end confdefs.h. */
4287 main ()
4291 return 0;
4293 _ACEOF
4294 if ac_fn_c_try_compile "$LINENO"; then :
4296 else
4297 ac_c_werror_flag=$ac_save_c_werror_flag
4298 CFLAGS="-g"
4299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4300 /* end confdefs.h. */
4303 main ()
4307 return 0;
4309 _ACEOF
4310 if ac_fn_c_try_compile "$LINENO"; then :
4311 ac_cv_prog_cc_g=yes
4313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4318 ac_c_werror_flag=$ac_save_c_werror_flag
4320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4321 $as_echo "$ac_cv_prog_cc_g" >&6; }
4322 if test "$ac_test_CFLAGS" = set; then
4323 CFLAGS=$ac_save_CFLAGS
4324 elif test $ac_cv_prog_cc_g = yes; then
4325 if test "$GCC" = yes; then
4326 CFLAGS="-g -O2"
4327 else
4328 CFLAGS="-g"
4330 else
4331 if test "$GCC" = yes; then
4332 CFLAGS="-O2"
4333 else
4334 CFLAGS=
4337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4338 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4339 if ${ac_cv_prog_cc_c89+:} false; then :
4340 $as_echo_n "(cached) " >&6
4341 else
4342 ac_cv_prog_cc_c89=no
4343 ac_save_CC=$CC
4344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4345 /* end confdefs.h. */
4346 #include <stdarg.h>
4347 #include <stdio.h>
4348 struct stat;
4349 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4350 struct buf { int x; };
4351 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4352 static char *e (p, i)
4353 char **p;
4354 int i;
4356 return p[i];
4358 static char *f (char * (*g) (char **, int), char **p, ...)
4360 char *s;
4361 va_list v;
4362 va_start (v,p);
4363 s = g (p, va_arg (v,int));
4364 va_end (v);
4365 return s;
4368 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4369 function prototypes and stuff, but not '\xHH' hex character constants.
4370 These don't provoke an error unfortunately, instead are silently treated
4371 as 'x'. The following induces an error, until -std is added to get
4372 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4373 array size at least. It's necessary to write '\x00'==0 to get something
4374 that's true only with -std. */
4375 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4377 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4378 inside strings and character constants. */
4379 #define FOO(x) 'x'
4380 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4382 int test (int i, double x);
4383 struct s1 {int (*f) (int a);};
4384 struct s2 {int (*f) (double a);};
4385 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4386 int argc;
4387 char **argv;
4389 main ()
4391 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4393 return 0;
4395 _ACEOF
4396 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4397 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4399 CC="$ac_save_CC $ac_arg"
4400 if ac_fn_c_try_compile "$LINENO"; then :
4401 ac_cv_prog_cc_c89=$ac_arg
4403 rm -f core conftest.err conftest.$ac_objext
4404 test "x$ac_cv_prog_cc_c89" != "xno" && break
4405 done
4406 rm -f conftest.$ac_ext
4407 CC=$ac_save_CC
4410 # AC_CACHE_VAL
4411 case "x$ac_cv_prog_cc_c89" in
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4414 $as_echo "none needed" >&6; } ;;
4415 xno)
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4417 $as_echo "unsupported" >&6; } ;;
4419 CC="$CC $ac_cv_prog_cc_c89"
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4421 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4422 esac
4423 if test "x$ac_cv_prog_cc_c89" != xno; then :
4427 ac_ext=c
4428 ac_cpp='$CPP $CPPFLAGS'
4429 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4430 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4431 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4434 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4435 if ${ac_cv_prog_cc_c99+:} false; then :
4436 $as_echo_n "(cached) " >&6
4437 else
4438 ac_cv_prog_cc_c99=no
4439 ac_save_CC=$CC
4440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441 /* end confdefs.h. */
4442 #include <stdarg.h>
4443 #include <stdbool.h>
4444 #include <stdlib.h>
4445 #include <wchar.h>
4446 #include <stdio.h>
4448 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4449 #define debug(...) fprintf (stderr, __VA_ARGS__)
4450 #define showlist(...) puts (#__VA_ARGS__)
4451 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4452 static void
4453 test_varargs_macros (void)
4455 int x = 1234;
4456 int y = 5678;
4457 debug ("Flag");
4458 debug ("X = %d\n", x);
4459 showlist (The first, second, and third items.);
4460 report (x>y, "x is %d but y is %d", x, y);
4463 // Check long long types.
4464 #define BIG64 18446744073709551615ull
4465 #define BIG32 4294967295ul
4466 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4467 #if !BIG_OK
4468 your preprocessor is broken;
4469 #endif
4470 #if BIG_OK
4471 #else
4472 your preprocessor is broken;
4473 #endif
4474 static long long int bignum = -9223372036854775807LL;
4475 static unsigned long long int ubignum = BIG64;
4477 struct incomplete_array
4479 int datasize;
4480 double data[];
4483 struct named_init {
4484 int number;
4485 const wchar_t *name;
4486 double average;
4489 typedef const char *ccp;
4491 static inline int
4492 test_restrict (ccp restrict text)
4494 // See if C++-style comments work.
4495 // Iterate through items via the restricted pointer.
4496 // Also check for declarations in for loops.
4497 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4498 continue;
4499 return 0;
4502 // Check varargs and va_copy.
4503 static void
4504 test_varargs (const char *format, ...)
4506 va_list args;
4507 va_start (args, format);
4508 va_list args_copy;
4509 va_copy (args_copy, args);
4511 const char *str;
4512 int number;
4513 float fnumber;
4515 while (*format)
4517 switch (*format++)
4519 case 's': // string
4520 str = va_arg (args_copy, const char *);
4521 break;
4522 case 'd': // int
4523 number = va_arg (args_copy, int);
4524 break;
4525 case 'f': // float
4526 fnumber = va_arg (args_copy, double);
4527 break;
4528 default:
4529 break;
4532 va_end (args_copy);
4533 va_end (args);
4537 main ()
4540 // Check bool.
4541 _Bool success = false;
4543 // Check restrict.
4544 if (test_restrict ("String literal") == 0)
4545 success = true;
4546 char *restrict newvar = "Another string";
4548 // Check varargs.
4549 test_varargs ("s, d' f .", "string", 65, 34.234);
4550 test_varargs_macros ();
4552 // Check flexible array members.
4553 struct incomplete_array *ia =
4554 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4555 ia->datasize = 10;
4556 for (int i = 0; i < ia->datasize; ++i)
4557 ia->data[i] = i * 1.234;
4559 // Check named initializers.
4560 struct named_init ni = {
4561 .number = 34,
4562 .name = L"Test wide string",
4563 .average = 543.34343,
4566 ni.number = 58;
4568 int dynamic_array[ni.number];
4569 dynamic_array[ni.number - 1] = 543;
4571 // work around unused variable warnings
4572 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4573 || dynamic_array[ni.number - 1] != 543);
4576 return 0;
4578 _ACEOF
4579 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4581 CC="$ac_save_CC $ac_arg"
4582 if ac_fn_c_try_compile "$LINENO"; then :
4583 ac_cv_prog_cc_c99=$ac_arg
4585 rm -f core conftest.err conftest.$ac_objext
4586 test "x$ac_cv_prog_cc_c99" != "xno" && break
4587 done
4588 rm -f conftest.$ac_ext
4589 CC=$ac_save_CC
4592 # AC_CACHE_VAL
4593 case "x$ac_cv_prog_cc_c99" in
4595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4596 $as_echo "none needed" >&6; } ;;
4597 xno)
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4599 $as_echo "unsupported" >&6; } ;;
4601 CC="$CC $ac_cv_prog_cc_c99"
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4603 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4604 esac
4605 if test "x$ac_cv_prog_cc_c99" != xno; then :
4611 # Error out if the compiler does not support C99, as the codebase
4612 # relies on that.
4613 if test "$ac_cv_prog_cc_c99" = no; then
4614 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4617 ac_ext=cpp
4618 ac_cpp='$CXXCPP $CPPFLAGS'
4619 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4620 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4621 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4622 if test -z "$CXX"; then
4623 if test -n "$CCC"; then
4624 CXX=$CCC
4625 else
4626 if test -n "$ac_tool_prefix"; then
4627 for ac_prog in $pgac_cxx_list
4629 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4630 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4632 $as_echo_n "checking for $ac_word... " >&6; }
4633 if ${ac_cv_prog_CXX+:} false; then :
4634 $as_echo_n "(cached) " >&6
4635 else
4636 if test -n "$CXX"; then
4637 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4638 else
4639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4640 for as_dir in $PATH
4642 IFS=$as_save_IFS
4643 test -z "$as_dir" && as_dir=.
4644 for ac_exec_ext in '' $ac_executable_extensions; do
4645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4646 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4648 break 2
4650 done
4651 done
4652 IFS=$as_save_IFS
4656 CXX=$ac_cv_prog_CXX
4657 if test -n "$CXX"; then
4658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4659 $as_echo "$CXX" >&6; }
4660 else
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662 $as_echo "no" >&6; }
4666 test -n "$CXX" && break
4667 done
4669 if test -z "$CXX"; then
4670 ac_ct_CXX=$CXX
4671 for ac_prog in $pgac_cxx_list
4673 # Extract the first word of "$ac_prog", so it can be a program name with args.
4674 set dummy $ac_prog; ac_word=$2
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4676 $as_echo_n "checking for $ac_word... " >&6; }
4677 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4678 $as_echo_n "(cached) " >&6
4679 else
4680 if test -n "$ac_ct_CXX"; then
4681 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4682 else
4683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4684 for as_dir in $PATH
4686 IFS=$as_save_IFS
4687 test -z "$as_dir" && as_dir=.
4688 for ac_exec_ext in '' $ac_executable_extensions; do
4689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4690 ac_cv_prog_ac_ct_CXX="$ac_prog"
4691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4692 break 2
4694 done
4695 done
4696 IFS=$as_save_IFS
4700 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4701 if test -n "$ac_ct_CXX"; then
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4703 $as_echo "$ac_ct_CXX" >&6; }
4704 else
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4706 $as_echo "no" >&6; }
4710 test -n "$ac_ct_CXX" && break
4711 done
4713 if test "x$ac_ct_CXX" = x; then
4714 CXX="g++"
4715 else
4716 case $cross_compiling:$ac_tool_warned in
4717 yes:)
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4719 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4720 ac_tool_warned=yes ;;
4721 esac
4722 CXX=$ac_ct_CXX
4728 # Provide some information about the compiler.
4729 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4730 set X $ac_compile
4731 ac_compiler=$2
4732 for ac_option in --version -v -V -qversion; do
4733 { { ac_try="$ac_compiler $ac_option >&5"
4734 case "(($ac_try" in
4735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4736 *) ac_try_echo=$ac_try;;
4737 esac
4738 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4739 $as_echo "$ac_try_echo"; } >&5
4740 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4741 ac_status=$?
4742 if test -s conftest.err; then
4743 sed '10a\
4744 ... rest of stderr output deleted ...
4745 10q' conftest.err >conftest.er1
4746 cat conftest.er1 >&5
4748 rm -f conftest.er1 conftest.err
4749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4750 test $ac_status = 0; }
4751 done
4753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4754 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4755 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4756 $as_echo_n "(cached) " >&6
4757 else
4758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4759 /* end confdefs.h. */
4762 main ()
4764 #ifndef __GNUC__
4765 choke me
4766 #endif
4769 return 0;
4771 _ACEOF
4772 if ac_fn_cxx_try_compile "$LINENO"; then :
4773 ac_compiler_gnu=yes
4774 else
4775 ac_compiler_gnu=no
4777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4778 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4782 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4783 if test $ac_compiler_gnu = yes; then
4784 GXX=yes
4785 else
4786 GXX=
4788 ac_test_CXXFLAGS=${CXXFLAGS+set}
4789 ac_save_CXXFLAGS=$CXXFLAGS
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4791 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4792 if ${ac_cv_prog_cxx_g+:} false; then :
4793 $as_echo_n "(cached) " >&6
4794 else
4795 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4796 ac_cxx_werror_flag=yes
4797 ac_cv_prog_cxx_g=no
4798 CXXFLAGS="-g"
4799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4800 /* end confdefs.h. */
4803 main ()
4807 return 0;
4809 _ACEOF
4810 if ac_fn_cxx_try_compile "$LINENO"; then :
4811 ac_cv_prog_cxx_g=yes
4812 else
4813 CXXFLAGS=""
4814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4815 /* end confdefs.h. */
4818 main ()
4822 return 0;
4824 _ACEOF
4825 if ac_fn_cxx_try_compile "$LINENO"; then :
4827 else
4828 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4829 CXXFLAGS="-g"
4830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4831 /* end confdefs.h. */
4834 main ()
4838 return 0;
4840 _ACEOF
4841 if ac_fn_cxx_try_compile "$LINENO"; then :
4842 ac_cv_prog_cxx_g=yes
4844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4849 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4852 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4853 if test "$ac_test_CXXFLAGS" = set; then
4854 CXXFLAGS=$ac_save_CXXFLAGS
4855 elif test $ac_cv_prog_cxx_g = yes; then
4856 if test "$GXX" = yes; then
4857 CXXFLAGS="-g -O2"
4858 else
4859 CXXFLAGS="-g"
4861 else
4862 if test "$GXX" = yes; then
4863 CXXFLAGS="-O2"
4864 else
4865 CXXFLAGS=
4868 ac_ext=c
4869 ac_cpp='$CPP $CPPFLAGS'
4870 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4871 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4872 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4875 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4876 # but has idiosyncrasies of its own. We assume icc will define
4877 # __INTEL_COMPILER regardless of CFLAGS.
4879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4880 /* end confdefs.h. */
4883 main ()
4885 #ifndef __INTEL_COMPILER
4886 choke me
4887 #endif
4889 return 0;
4891 _ACEOF
4892 if ac_fn_c_try_compile "$LINENO"; then :
4893 ICC=yes
4894 else
4895 ICC=no
4897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4899 # Check if it's Sun Studio compiler. We assume that
4900 # __SUNPRO_C will be defined for Sun Studio compilers
4901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4902 /* end confdefs.h. */
4905 main ()
4907 #ifndef __SUNPRO_C
4908 choke me
4909 #endif
4911 return 0;
4913 _ACEOF
4914 if ac_fn_c_try_compile "$LINENO"; then :
4915 SUN_STUDIO_CC=yes
4916 else
4917 SUN_STUDIO_CC=no
4919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4925 # LLVM
4927 # Checked early because subsequent tests depend on it.
4931 # Check whether --with-llvm was given.
4932 if test "${with_llvm+set}" = set; then :
4933 withval=$with_llvm;
4934 case $withval in
4935 yes)
4937 $as_echo "#define USE_LLVM 1" >>confdefs.h
4944 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4946 esac
4948 else
4949 with_llvm=no
4955 for ac_prog in gawk mawk nawk awk
4957 # Extract the first word of "$ac_prog", so it can be a program name with args.
4958 set dummy $ac_prog; ac_word=$2
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4960 $as_echo_n "checking for $ac_word... " >&6; }
4961 if ${ac_cv_prog_AWK+:} false; then :
4962 $as_echo_n "(cached) " >&6
4963 else
4964 if test -n "$AWK"; then
4965 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4966 else
4967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968 for as_dir in $PATH
4970 IFS=$as_save_IFS
4971 test -z "$as_dir" && as_dir=.
4972 for ac_exec_ext in '' $ac_executable_extensions; do
4973 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4974 ac_cv_prog_AWK="$ac_prog"
4975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4976 break 2
4978 done
4979 done
4980 IFS=$as_save_IFS
4984 AWK=$ac_cv_prog_AWK
4985 if test -n "$AWK"; then
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4987 $as_echo "$AWK" >&6; }
4988 else
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990 $as_echo "no" >&6; }
4994 test -n "$AWK" && break
4995 done
4997 if test "$with_llvm" = yes; then :
5003 if test -z "$LLVM_CONFIG"; then
5004 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
5006 # Extract the first word of "$ac_prog", so it can be a program name with args.
5007 set dummy $ac_prog; ac_word=$2
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009 $as_echo_n "checking for $ac_word... " >&6; }
5010 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5011 $as_echo_n "(cached) " >&6
5012 else
5013 case $LLVM_CONFIG in
5014 [\\/]* | ?:[\\/]*)
5015 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019 for as_dir in $PATH
5021 IFS=$as_save_IFS
5022 test -z "$as_dir" && as_dir=.
5023 for ac_exec_ext in '' $ac_executable_extensions; do
5024 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5025 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027 break 2
5029 done
5030 done
5031 IFS=$as_save_IFS
5034 esac
5036 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5037 if test -n "$LLVM_CONFIG"; then
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5039 $as_echo "$LLVM_CONFIG" >&6; }
5040 else
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042 $as_echo "no" >&6; }
5046 test -n "$LLVM_CONFIG" && break
5047 done
5049 else
5050 # Report the value of LLVM_CONFIG in configure's output in all cases.
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5052 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5054 $as_echo "$LLVM_CONFIG" >&6; }
5058 # no point continuing if llvm wasn't found
5059 if test -z "$LLVM_CONFIG"; then
5060 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5062 # check if detected $LLVM_CONFIG is executable
5063 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5064 if test "x$pgac_llvm_version" = "xno"; then
5065 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5067 # and whether the version is supported
5068 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5069 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5072 # need clang to create some bitcode files
5074 if test -z "$CLANG"; then
5075 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5077 # Extract the first word of "$ac_prog", so it can be a program name with args.
5078 set dummy $ac_prog; ac_word=$2
5079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5080 $as_echo_n "checking for $ac_word... " >&6; }
5081 if ${ac_cv_path_CLANG+:} false; then :
5082 $as_echo_n "(cached) " >&6
5083 else
5084 case $CLANG in
5085 [\\/]* | ?:[\\/]*)
5086 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5090 for as_dir in $PATH
5092 IFS=$as_save_IFS
5093 test -z "$as_dir" && as_dir=.
5094 for ac_exec_ext in '' $ac_executable_extensions; do
5095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5096 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5098 break 2
5100 done
5101 done
5102 IFS=$as_save_IFS
5105 esac
5107 CLANG=$ac_cv_path_CLANG
5108 if test -n "$CLANG"; then
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5110 $as_echo "$CLANG" >&6; }
5111 else
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5113 $as_echo "no" >&6; }
5117 test -n "$CLANG" && break
5118 done
5120 else
5121 # Report the value of CLANG in configure's output in all cases.
5122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5123 $as_echo_n "checking for CLANG... " >&6; }
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5125 $as_echo "$CLANG" >&6; }
5128 if test -z "$CLANG"; then
5129 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5131 # make sure clang is executable
5132 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5133 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5135 # Could check clang version, but it doesn't seem that
5136 # important. Systems with a new enough LLVM version are usually
5137 # going to have a decent clang version too. It's also not entirely
5138 # clear what the minimum version is.
5140 # Collect compiler flags necessary to build the LLVM dependent
5141 # shared library.
5142 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5143 case $pgac_option in
5144 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5145 esac
5146 done
5148 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5149 case $pgac_option in
5150 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5151 esac
5152 done
5154 # ABI influencing options, standard influencing options
5155 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5156 case $pgac_option in
5157 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5158 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5159 esac
5160 done
5162 # Look for components we're interested in, collect necessary
5163 # libs. As some components are optional, we can't just list all of
5164 # them as it'd raise an error.
5165 pgac_components='';
5166 for pgac_component in `$LLVM_CONFIG --components`; do
5167 case $pgac_component in
5168 engine) pgac_components="$pgac_components $pgac_component";;
5169 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5170 orcjit) pgac_components="$pgac_components $pgac_component";;
5171 passes) pgac_components="$pgac_components $pgac_component";;
5172 native) pgac_components="$pgac_components $pgac_component";;
5173 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5174 esac
5175 done;
5177 # And then get the libraries that need to be linked in for the
5178 # selected components. They're large libraries, we only want to
5179 # link them into the LLVM using shared library.
5180 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5181 case $pgac_option in
5182 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5183 esac
5184 done
5186 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5196 fi # fi
5199 unset CFLAGS
5200 unset CXXFLAGS
5203 # Read the template
5205 . "$srcdir/src/template/$template" || exit
5207 # C[XX]FLAGS are selected so:
5208 # If the user specifies something in the environment, that is used.
5209 # else: If the template file set something, that is used.
5210 # else: If coverage was enabled, don't set anything.
5211 # else: If the compiler is GCC, then we use -O2.
5212 # else: If the compiler is something else, then we use -O, unless debugging.
5214 if test "$ac_env_CFLAGS_set" = set; then
5215 CFLAGS=$ac_env_CFLAGS_value
5216 elif test "${CFLAGS+set}" = set; then
5217 : # (keep what template set)
5218 elif test "$enable_coverage" = yes; then
5219 : # no optimization by default
5220 elif test "$GCC" = yes; then
5221 CFLAGS="-O2"
5222 else
5223 # if the user selected debug mode, don't use -O
5224 if test "$enable_debug" != yes; then
5225 CFLAGS="-O"
5229 if test "$ac_env_CXXFLAGS_set" = set; then
5230 CXXFLAGS=$ac_env_CXXFLAGS_value
5231 elif test "${CXXFLAGS+set}" = set; then
5232 : # (keep what template set)
5233 elif test "$enable_coverage" = yes; then
5234 : # no optimization by default
5235 elif test "$GCC" = yes; then
5236 CXXFLAGS="-O2"
5237 else
5238 # if the user selected debug mode, don't use -O
5239 if test "$enable_debug" != yes; then
5240 CXXFLAGS="-O"
5244 # When generating bitcode (for inlining) we always want to use -O2
5245 # even when --enable-debug is specified. The bitcode it's not going to
5246 # be used for line-by-line debugging, and JIT inlining doesn't work
5247 # without at least -O1 (otherwise clang will emit 'noinline'
5248 # attributes everywhere), which is bad for testing. Still allow the
5249 # environment to override if done explicitly.
5250 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5251 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5252 else
5253 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5255 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5256 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5257 else
5258 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5261 # C[XX]FLAGS we determined above will be added back at the end
5262 user_CFLAGS=$CFLAGS
5263 CFLAGS=""
5264 user_CXXFLAGS=$CXXFLAGS
5265 CXXFLAGS=""
5266 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5267 BITCODE_CFLAGS=""
5268 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5269 BITCODE_CXXFLAGS=""
5271 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5272 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5273 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5275 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5276 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5279 # Some versions of GCC support some additional useful warning flags.
5280 # Check whether they are supported, and add them to CFLAGS if so.
5281 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5282 # but has its own. Also check other compiler-specific flags here.
5284 if test "$GCC" = yes -a "$ICC" = no; then
5285 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5286 CXXFLAGS="-Wall -Wpointer-arith"
5287 # These work in some but not all gcc versions
5288 save_CFLAGS=$CFLAGS
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5291 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5292 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5293 $as_echo_n "(cached) " >&6
5294 else
5295 pgac_save_CFLAGS=$CFLAGS
5296 pgac_save_CC=$CC
5297 CC=${CC}
5298 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5299 ac_save_c_werror_flag=$ac_c_werror_flag
5300 ac_c_werror_flag=yes
5301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5302 /* end confdefs.h. */
5305 main ()
5309 return 0;
5311 _ACEOF
5312 if ac_fn_c_try_compile "$LINENO"; then :
5313 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5314 else
5315 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5318 ac_c_werror_flag=$ac_save_c_werror_flag
5319 CFLAGS="$pgac_save_CFLAGS"
5320 CC="$pgac_save_CC"
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5323 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5324 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5325 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5329 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5330 # disable it, so AC_SUBST the negative form.
5331 PERMIT_DECLARATION_AFTER_STATEMENT=
5332 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5333 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5336 # Really don't want VLAs to be used in our dialect of C
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5339 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5340 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5341 $as_echo_n "(cached) " >&6
5342 else
5343 pgac_save_CFLAGS=$CFLAGS
5344 pgac_save_CC=$CC
5345 CC=${CC}
5346 CFLAGS="${CFLAGS} -Werror=vla"
5347 ac_save_c_werror_flag=$ac_c_werror_flag
5348 ac_c_werror_flag=yes
5349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5350 /* end confdefs.h. */
5353 main ()
5357 return 0;
5359 _ACEOF
5360 if ac_fn_c_try_compile "$LINENO"; then :
5361 pgac_cv_prog_CC_cflags__Werror_vla=yes
5362 else
5363 pgac_cv_prog_CC_cflags__Werror_vla=no
5365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5366 ac_c_werror_flag=$ac_save_c_werror_flag
5367 CFLAGS="$pgac_save_CFLAGS"
5368 CC="$pgac_save_CC"
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5371 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5372 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5373 CFLAGS="${CFLAGS} -Werror=vla"
5377 # -Wvla is not applicable for C++
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5380 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5381 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5382 $as_echo_n "(cached) " >&6
5383 else
5384 pgac_save_CFLAGS=$CFLAGS
5385 pgac_save_CC=$CC
5386 CC=${CC}
5387 CFLAGS="${CFLAGS} -Wendif-labels"
5388 ac_save_c_werror_flag=$ac_c_werror_flag
5389 ac_c_werror_flag=yes
5390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5391 /* end confdefs.h. */
5394 main ()
5398 return 0;
5400 _ACEOF
5401 if ac_fn_c_try_compile "$LINENO"; then :
5402 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5403 else
5404 pgac_cv_prog_CC_cflags__Wendif_labels=no
5406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5407 ac_c_werror_flag=$ac_save_c_werror_flag
5408 CFLAGS="$pgac_save_CFLAGS"
5409 CC="$pgac_save_CC"
5411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5412 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5413 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5414 CFLAGS="${CFLAGS} -Wendif-labels"
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5419 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5420 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5421 $as_echo_n "(cached) " >&6
5422 else
5423 pgac_save_CXXFLAGS=$CXXFLAGS
5424 pgac_save_CXX=$CXX
5425 CXX=${CXX}
5426 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5427 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5428 ac_cxx_werror_flag=yes
5429 ac_ext=cpp
5430 ac_cpp='$CXXCPP $CPPFLAGS'
5431 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5432 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5433 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5436 /* end confdefs.h. */
5439 main ()
5443 return 0;
5445 _ACEOF
5446 if ac_fn_cxx_try_compile "$LINENO"; then :
5447 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5448 else
5449 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5452 ac_ext=c
5453 ac_cpp='$CPP $CPPFLAGS'
5454 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5455 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5456 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5458 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5459 CXXFLAGS="$pgac_save_CXXFLAGS"
5460 CXX="$pgac_save_CXX"
5462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5463 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5464 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5465 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5471 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5472 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5473 $as_echo_n "(cached) " >&6
5474 else
5475 pgac_save_CFLAGS=$CFLAGS
5476 pgac_save_CC=$CC
5477 CC=${CC}
5478 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5479 ac_save_c_werror_flag=$ac_c_werror_flag
5480 ac_c_werror_flag=yes
5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5482 /* end confdefs.h. */
5485 main ()
5489 return 0;
5491 _ACEOF
5492 if ac_fn_c_try_compile "$LINENO"; then :
5493 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5494 else
5495 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5498 ac_c_werror_flag=$ac_save_c_werror_flag
5499 CFLAGS="$pgac_save_CFLAGS"
5500 CC="$pgac_save_CC"
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5503 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5504 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5505 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5510 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5511 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5512 $as_echo_n "(cached) " >&6
5513 else
5514 pgac_save_CXXFLAGS=$CXXFLAGS
5515 pgac_save_CXX=$CXX
5516 CXX=${CXX}
5517 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5518 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5519 ac_cxx_werror_flag=yes
5520 ac_ext=cpp
5521 ac_cpp='$CXXCPP $CPPFLAGS'
5522 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5523 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5524 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5527 /* end confdefs.h. */
5530 main ()
5534 return 0;
5536 _ACEOF
5537 if ac_fn_cxx_try_compile "$LINENO"; then :
5538 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5539 else
5540 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5543 ac_ext=c
5544 ac_cpp='$CPP $CPPFLAGS'
5545 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5546 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5547 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5549 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5550 CXXFLAGS="$pgac_save_CXXFLAGS"
5551 CXX="$pgac_save_CXX"
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5554 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5555 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5556 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5562 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5563 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5564 $as_echo_n "(cached) " >&6
5565 else
5566 pgac_save_CFLAGS=$CFLAGS
5567 pgac_save_CC=$CC
5568 CC=${CC}
5569 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5570 ac_save_c_werror_flag=$ac_c_werror_flag
5571 ac_c_werror_flag=yes
5572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5573 /* end confdefs.h. */
5576 main ()
5580 return 0;
5582 _ACEOF
5583 if ac_fn_c_try_compile "$LINENO"; then :
5584 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5585 else
5586 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5589 ac_c_werror_flag=$ac_save_c_werror_flag
5590 CFLAGS="$pgac_save_CFLAGS"
5591 CC="$pgac_save_CC"
5593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5594 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5595 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5596 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5601 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5602 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5603 $as_echo_n "(cached) " >&6
5604 else
5605 pgac_save_CXXFLAGS=$CXXFLAGS
5606 pgac_save_CXX=$CXX
5607 CXX=${CXX}
5608 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5609 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5610 ac_cxx_werror_flag=yes
5611 ac_ext=cpp
5612 ac_cpp='$CXXCPP $CPPFLAGS'
5613 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5614 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5615 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5618 /* end confdefs.h. */
5621 main ()
5625 return 0;
5627 _ACEOF
5628 if ac_fn_cxx_try_compile "$LINENO"; then :
5629 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5630 else
5631 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5634 ac_ext=c
5635 ac_cpp='$CPP $CPPFLAGS'
5636 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5637 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5638 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5640 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5641 CXXFLAGS="$pgac_save_CXXFLAGS"
5642 CXX="$pgac_save_CXX"
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5645 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5646 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5647 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5653 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5654 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5655 $as_echo_n "(cached) " >&6
5656 else
5657 pgac_save_CFLAGS=$CFLAGS
5658 pgac_save_CC=$CC
5659 CC=${CC}
5660 CFLAGS="${CFLAGS} -Wcast-function-type"
5661 ac_save_c_werror_flag=$ac_c_werror_flag
5662 ac_c_werror_flag=yes
5663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5664 /* end confdefs.h. */
5667 main ()
5671 return 0;
5673 _ACEOF
5674 if ac_fn_c_try_compile "$LINENO"; then :
5675 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5676 else
5677 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5680 ac_c_werror_flag=$ac_save_c_werror_flag
5681 CFLAGS="$pgac_save_CFLAGS"
5682 CC="$pgac_save_CC"
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5685 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5686 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5687 CFLAGS="${CFLAGS} -Wcast-function-type"
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5692 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5693 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5694 $as_echo_n "(cached) " >&6
5695 else
5696 pgac_save_CXXFLAGS=$CXXFLAGS
5697 pgac_save_CXX=$CXX
5698 CXX=${CXX}
5699 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5700 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5701 ac_cxx_werror_flag=yes
5702 ac_ext=cpp
5703 ac_cpp='$CXXCPP $CPPFLAGS'
5704 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5705 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5706 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5709 /* end confdefs.h. */
5712 main ()
5716 return 0;
5718 _ACEOF
5719 if ac_fn_cxx_try_compile "$LINENO"; then :
5720 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5721 else
5722 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5725 ac_ext=c
5726 ac_cpp='$CPP $CPPFLAGS'
5727 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5728 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5729 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5731 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5732 CXXFLAGS="$pgac_save_CXXFLAGS"
5733 CXX="$pgac_save_CXX"
5735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5736 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5737 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5738 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5742 # This was included in -Wall/-Wformat in older GCC versions
5744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5745 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5746 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5747 $as_echo_n "(cached) " >&6
5748 else
5749 pgac_save_CFLAGS=$CFLAGS
5750 pgac_save_CC=$CC
5751 CC=${CC}
5752 CFLAGS="${CFLAGS} -Wformat-security"
5753 ac_save_c_werror_flag=$ac_c_werror_flag
5754 ac_c_werror_flag=yes
5755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5756 /* end confdefs.h. */
5759 main ()
5763 return 0;
5765 _ACEOF
5766 if ac_fn_c_try_compile "$LINENO"; then :
5767 pgac_cv_prog_CC_cflags__Wformat_security=yes
5768 else
5769 pgac_cv_prog_CC_cflags__Wformat_security=no
5771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5772 ac_c_werror_flag=$ac_save_c_werror_flag
5773 CFLAGS="$pgac_save_CFLAGS"
5774 CC="$pgac_save_CC"
5776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5777 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5778 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5779 CFLAGS="${CFLAGS} -Wformat-security"
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5784 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5785 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5786 $as_echo_n "(cached) " >&6
5787 else
5788 pgac_save_CXXFLAGS=$CXXFLAGS
5789 pgac_save_CXX=$CXX
5790 CXX=${CXX}
5791 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5792 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5793 ac_cxx_werror_flag=yes
5794 ac_ext=cpp
5795 ac_cpp='$CXXCPP $CPPFLAGS'
5796 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5797 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5798 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5801 /* end confdefs.h. */
5804 main ()
5808 return 0;
5810 _ACEOF
5811 if ac_fn_cxx_try_compile "$LINENO"; then :
5812 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5813 else
5814 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5817 ac_ext=c
5818 ac_cpp='$CPP $CPPFLAGS'
5819 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5820 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5821 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5823 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5824 CXXFLAGS="$pgac_save_CXXFLAGS"
5825 CXX="$pgac_save_CXX"
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5828 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5829 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5830 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5834 # Disable strict-aliasing rules; needed for gcc 3.3+
5836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5837 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5838 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5839 $as_echo_n "(cached) " >&6
5840 else
5841 pgac_save_CFLAGS=$CFLAGS
5842 pgac_save_CC=$CC
5843 CC=${CC}
5844 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5845 ac_save_c_werror_flag=$ac_c_werror_flag
5846 ac_c_werror_flag=yes
5847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5848 /* end confdefs.h. */
5851 main ()
5855 return 0;
5857 _ACEOF
5858 if ac_fn_c_try_compile "$LINENO"; then :
5859 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5860 else
5861 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5864 ac_c_werror_flag=$ac_save_c_werror_flag
5865 CFLAGS="$pgac_save_CFLAGS"
5866 CC="$pgac_save_CC"
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5869 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5870 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5871 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5876 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5877 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5878 $as_echo_n "(cached) " >&6
5879 else
5880 pgac_save_CXXFLAGS=$CXXFLAGS
5881 pgac_save_CXX=$CXX
5882 CXX=${CXX}
5883 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5884 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5885 ac_cxx_werror_flag=yes
5886 ac_ext=cpp
5887 ac_cpp='$CXXCPP $CPPFLAGS'
5888 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5889 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5890 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5893 /* end confdefs.h. */
5896 main ()
5900 return 0;
5902 _ACEOF
5903 if ac_fn_cxx_try_compile "$LINENO"; then :
5904 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5905 else
5906 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5909 ac_ext=c
5910 ac_cpp='$CPP $CPPFLAGS'
5911 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5912 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5913 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5915 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5916 CXXFLAGS="$pgac_save_CXXFLAGS"
5917 CXX="$pgac_save_CXX"
5919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5920 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5921 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5922 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5926 # Disable optimizations that assume no overflow; needed for gcc 4.3+
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5929 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5930 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5931 $as_echo_n "(cached) " >&6
5932 else
5933 pgac_save_CFLAGS=$CFLAGS
5934 pgac_save_CC=$CC
5935 CC=${CC}
5936 CFLAGS="${CFLAGS} -fwrapv"
5937 ac_save_c_werror_flag=$ac_c_werror_flag
5938 ac_c_werror_flag=yes
5939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5940 /* end confdefs.h. */
5943 main ()
5947 return 0;
5949 _ACEOF
5950 if ac_fn_c_try_compile "$LINENO"; then :
5951 pgac_cv_prog_CC_cflags__fwrapv=yes
5952 else
5953 pgac_cv_prog_CC_cflags__fwrapv=no
5955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5956 ac_c_werror_flag=$ac_save_c_werror_flag
5957 CFLAGS="$pgac_save_CFLAGS"
5958 CC="$pgac_save_CC"
5960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5961 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5962 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5963 CFLAGS="${CFLAGS} -fwrapv"
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5968 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5969 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5970 $as_echo_n "(cached) " >&6
5971 else
5972 pgac_save_CXXFLAGS=$CXXFLAGS
5973 pgac_save_CXX=$CXX
5974 CXX=${CXX}
5975 CXXFLAGS="${CXXFLAGS} -fwrapv"
5976 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5977 ac_cxx_werror_flag=yes
5978 ac_ext=cpp
5979 ac_cpp='$CXXCPP $CPPFLAGS'
5980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5985 /* end confdefs.h. */
5988 main ()
5992 return 0;
5994 _ACEOF
5995 if ac_fn_cxx_try_compile "$LINENO"; then :
5996 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5997 else
5998 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6001 ac_ext=c
6002 ac_cpp='$CPP $CPPFLAGS'
6003 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6004 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6005 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6007 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6008 CXXFLAGS="$pgac_save_CXXFLAGS"
6009 CXX="$pgac_save_CXX"
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6012 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6013 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6014 CXXFLAGS="${CXXFLAGS} -fwrapv"
6018 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6021 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6022 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6023 $as_echo_n "(cached) " >&6
6024 else
6025 pgac_save_CFLAGS=$CFLAGS
6026 pgac_save_CC=$CC
6027 CC=${CC}
6028 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6029 ac_save_c_werror_flag=$ac_c_werror_flag
6030 ac_c_werror_flag=yes
6031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6032 /* end confdefs.h. */
6035 main ()
6039 return 0;
6041 _ACEOF
6042 if ac_fn_c_try_compile "$LINENO"; then :
6043 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6044 else
6045 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6048 ac_c_werror_flag=$ac_save_c_werror_flag
6049 CFLAGS="$pgac_save_CFLAGS"
6050 CC="$pgac_save_CC"
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6053 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6054 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6055 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6060 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6061 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6062 $as_echo_n "(cached) " >&6
6063 else
6064 pgac_save_CXXFLAGS=$CXXFLAGS
6065 pgac_save_CXX=$CXX
6066 CXX=${CXX}
6067 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6068 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6069 ac_cxx_werror_flag=yes
6070 ac_ext=cpp
6071 ac_cpp='$CXXCPP $CPPFLAGS'
6072 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6073 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6074 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6077 /* end confdefs.h. */
6080 main ()
6084 return 0;
6086 _ACEOF
6087 if ac_fn_cxx_try_compile "$LINENO"; then :
6088 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6089 else
6090 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6093 ac_ext=c
6094 ac_cpp='$CPP $CPPFLAGS'
6095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6099 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6100 CXXFLAGS="$pgac_save_CXXFLAGS"
6101 CXX="$pgac_save_CXX"
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6104 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6105 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6106 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6110 # Optimization flags for specific files that benefit from loop unrolling
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6112 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6113 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6114 $as_echo_n "(cached) " >&6
6115 else
6116 pgac_save_CFLAGS=$CFLAGS
6117 pgac_save_CC=$CC
6118 CC=${CC}
6119 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6120 ac_save_c_werror_flag=$ac_c_werror_flag
6121 ac_c_werror_flag=yes
6122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6123 /* end confdefs.h. */
6126 main ()
6130 return 0;
6132 _ACEOF
6133 if ac_fn_c_try_compile "$LINENO"; then :
6134 pgac_cv_prog_CC_cflags__funroll_loops=yes
6135 else
6136 pgac_cv_prog_CC_cflags__funroll_loops=no
6138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6139 ac_c_werror_flag=$ac_save_c_werror_flag
6140 CFLAGS="$pgac_save_CFLAGS"
6141 CC="$pgac_save_CC"
6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6144 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6145 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6146 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6150 # Optimization flags for specific files that benefit from vectorization
6151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6152 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6153 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6154 $as_echo_n "(cached) " >&6
6155 else
6156 pgac_save_CFLAGS=$CFLAGS
6157 pgac_save_CC=$CC
6158 CC=${CC}
6159 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6160 ac_save_c_werror_flag=$ac_c_werror_flag
6161 ac_c_werror_flag=yes
6162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6163 /* end confdefs.h. */
6166 main ()
6170 return 0;
6172 _ACEOF
6173 if ac_fn_c_try_compile "$LINENO"; then :
6174 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6175 else
6176 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6179 ac_c_werror_flag=$ac_save_c_werror_flag
6180 CFLAGS="$pgac_save_CFLAGS"
6181 CC="$pgac_save_CC"
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6184 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6185 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6186 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6190 # We want to suppress clang's unhelpful unused-command-line-argument warnings
6191 # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
6192 # test for the positive form and if that works, add the negative form
6193 NOT_THE_CFLAGS=""
6194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6195 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6196 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6197 $as_echo_n "(cached) " >&6
6198 else
6199 pgac_save_CFLAGS=$CFLAGS
6200 pgac_save_CC=$CC
6201 CC=${CC}
6202 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6203 ac_save_c_werror_flag=$ac_c_werror_flag
6204 ac_c_werror_flag=yes
6205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6206 /* end confdefs.h. */
6209 main ()
6213 return 0;
6215 _ACEOF
6216 if ac_fn_c_try_compile "$LINENO"; then :
6217 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6218 else
6219 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6222 ac_c_werror_flag=$ac_save_c_werror_flag
6223 CFLAGS="$pgac_save_CFLAGS"
6224 CC="$pgac_save_CC"
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6227 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6228 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6229 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6233 if test -n "$NOT_THE_CFLAGS"; then
6234 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6236 # Similarly disable useless truncation warnings from gcc 8+
6237 NOT_THE_CFLAGS=""
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6239 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6240 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6241 $as_echo_n "(cached) " >&6
6242 else
6243 pgac_save_CFLAGS=$CFLAGS
6244 pgac_save_CC=$CC
6245 CC=${CC}
6246 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6247 ac_save_c_werror_flag=$ac_c_werror_flag
6248 ac_c_werror_flag=yes
6249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6250 /* end confdefs.h. */
6253 main ()
6257 return 0;
6259 _ACEOF
6260 if ac_fn_c_try_compile "$LINENO"; then :
6261 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6262 else
6263 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6266 ac_c_werror_flag=$ac_save_c_werror_flag
6267 CFLAGS="$pgac_save_CFLAGS"
6268 CC="$pgac_save_CC"
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6271 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6272 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6273 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6277 if test -n "$NOT_THE_CFLAGS"; then
6278 CFLAGS="$CFLAGS -Wno-format-truncation"
6280 NOT_THE_CFLAGS=""
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6282 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6283 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6284 $as_echo_n "(cached) " >&6
6285 else
6286 pgac_save_CFLAGS=$CFLAGS
6287 pgac_save_CC=$CC
6288 CC=${CC}
6289 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6290 ac_save_c_werror_flag=$ac_c_werror_flag
6291 ac_c_werror_flag=yes
6292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6293 /* end confdefs.h. */
6296 main ()
6300 return 0;
6302 _ACEOF
6303 if ac_fn_c_try_compile "$LINENO"; then :
6304 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6305 else
6306 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6309 ac_c_werror_flag=$ac_save_c_werror_flag
6310 CFLAGS="$pgac_save_CFLAGS"
6311 CC="$pgac_save_CC"
6313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6314 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6315 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6316 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6320 if test -n "$NOT_THE_CFLAGS"; then
6321 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6323 elif test "$ICC" = yes; then
6324 # Intel's compiler has a bug/misoptimization in checking for
6325 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6328 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6329 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6330 $as_echo_n "(cached) " >&6
6331 else
6332 pgac_save_CFLAGS=$CFLAGS
6333 pgac_save_CC=$CC
6334 CC=${CC}
6335 CFLAGS="${CFLAGS} -mp1"
6336 ac_save_c_werror_flag=$ac_c_werror_flag
6337 ac_c_werror_flag=yes
6338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6339 /* end confdefs.h. */
6342 main ()
6346 return 0;
6348 _ACEOF
6349 if ac_fn_c_try_compile "$LINENO"; then :
6350 pgac_cv_prog_CC_cflags__mp1=yes
6351 else
6352 pgac_cv_prog_CC_cflags__mp1=no
6354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6355 ac_c_werror_flag=$ac_save_c_werror_flag
6356 CFLAGS="$pgac_save_CFLAGS"
6357 CC="$pgac_save_CC"
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6360 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6361 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6362 CFLAGS="${CFLAGS} -mp1"
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6367 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6368 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6369 $as_echo_n "(cached) " >&6
6370 else
6371 pgac_save_CXXFLAGS=$CXXFLAGS
6372 pgac_save_CXX=$CXX
6373 CXX=${CXX}
6374 CXXFLAGS="${CXXFLAGS} -mp1"
6375 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6376 ac_cxx_werror_flag=yes
6377 ac_ext=cpp
6378 ac_cpp='$CXXCPP $CPPFLAGS'
6379 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6380 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6381 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6384 /* end confdefs.h. */
6387 main ()
6391 return 0;
6393 _ACEOF
6394 if ac_fn_cxx_try_compile "$LINENO"; then :
6395 pgac_cv_prog_CXX_cxxflags__mp1=yes
6396 else
6397 pgac_cv_prog_CXX_cxxflags__mp1=no
6399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6400 ac_ext=c
6401 ac_cpp='$CPP $CPPFLAGS'
6402 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6403 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6404 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6406 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6407 CXXFLAGS="$pgac_save_CXXFLAGS"
6408 CXX="$pgac_save_CXX"
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6411 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6412 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6413 CXXFLAGS="${CXXFLAGS} -mp1"
6417 # Make sure strict aliasing is off (though this is said to be the default)
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6420 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6421 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6422 $as_echo_n "(cached) " >&6
6423 else
6424 pgac_save_CFLAGS=$CFLAGS
6425 pgac_save_CC=$CC
6426 CC=${CC}
6427 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6428 ac_save_c_werror_flag=$ac_c_werror_flag
6429 ac_c_werror_flag=yes
6430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6431 /* end confdefs.h. */
6434 main ()
6438 return 0;
6440 _ACEOF
6441 if ac_fn_c_try_compile "$LINENO"; then :
6442 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6443 else
6444 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6447 ac_c_werror_flag=$ac_save_c_werror_flag
6448 CFLAGS="$pgac_save_CFLAGS"
6449 CC="$pgac_save_CC"
6451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6452 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6453 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6454 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6459 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6460 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6461 $as_echo_n "(cached) " >&6
6462 else
6463 pgac_save_CXXFLAGS=$CXXFLAGS
6464 pgac_save_CXX=$CXX
6465 CXX=${CXX}
6466 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6467 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6468 ac_cxx_werror_flag=yes
6469 ac_ext=cpp
6470 ac_cpp='$CXXCPP $CPPFLAGS'
6471 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6472 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6473 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6476 /* end confdefs.h. */
6479 main ()
6483 return 0;
6485 _ACEOF
6486 if ac_fn_cxx_try_compile "$LINENO"; then :
6487 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6488 else
6489 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6492 ac_ext=c
6493 ac_cpp='$CPP $CPPFLAGS'
6494 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6495 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6496 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6498 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6499 CXXFLAGS="$pgac_save_CXXFLAGS"
6500 CXX="$pgac_save_CXX"
6502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6503 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6504 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6505 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6509 elif test "$PORTNAME" = "aix"; then
6510 # AIX's xlc has to have strict aliasing turned off too
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6513 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6514 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6515 $as_echo_n "(cached) " >&6
6516 else
6517 pgac_save_CFLAGS=$CFLAGS
6518 pgac_save_CC=$CC
6519 CC=${CC}
6520 CFLAGS="${CFLAGS} -qnoansialias"
6521 ac_save_c_werror_flag=$ac_c_werror_flag
6522 ac_c_werror_flag=yes
6523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6524 /* end confdefs.h. */
6527 main ()
6531 return 0;
6533 _ACEOF
6534 if ac_fn_c_try_compile "$LINENO"; then :
6535 pgac_cv_prog_CC_cflags__qnoansialias=yes
6536 else
6537 pgac_cv_prog_CC_cflags__qnoansialias=no
6539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6540 ac_c_werror_flag=$ac_save_c_werror_flag
6541 CFLAGS="$pgac_save_CFLAGS"
6542 CC="$pgac_save_CC"
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6545 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6546 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6547 CFLAGS="${CFLAGS} -qnoansialias"
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6552 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6553 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6554 $as_echo_n "(cached) " >&6
6555 else
6556 pgac_save_CXXFLAGS=$CXXFLAGS
6557 pgac_save_CXX=$CXX
6558 CXX=${CXX}
6559 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6560 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6561 ac_cxx_werror_flag=yes
6562 ac_ext=cpp
6563 ac_cpp='$CXXCPP $CPPFLAGS'
6564 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6565 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6566 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6569 /* end confdefs.h. */
6572 main ()
6576 return 0;
6578 _ACEOF
6579 if ac_fn_cxx_try_compile "$LINENO"; then :
6580 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6581 else
6582 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6585 ac_ext=c
6586 ac_cpp='$CPP $CPPFLAGS'
6587 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6588 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6589 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6591 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6592 CXXFLAGS="$pgac_save_CXXFLAGS"
6593 CXX="$pgac_save_CXX"
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6596 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6597 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6598 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6604 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6605 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6606 $as_echo_n "(cached) " >&6
6607 else
6608 pgac_save_CFLAGS=$CFLAGS
6609 pgac_save_CC=$CC
6610 CC=${CC}
6611 CFLAGS="${CFLAGS} -qlonglong"
6612 ac_save_c_werror_flag=$ac_c_werror_flag
6613 ac_c_werror_flag=yes
6614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6615 /* end confdefs.h. */
6618 main ()
6622 return 0;
6624 _ACEOF
6625 if ac_fn_c_try_compile "$LINENO"; then :
6626 pgac_cv_prog_CC_cflags__qlonglong=yes
6627 else
6628 pgac_cv_prog_CC_cflags__qlonglong=no
6630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6631 ac_c_werror_flag=$ac_save_c_werror_flag
6632 CFLAGS="$pgac_save_CFLAGS"
6633 CC="$pgac_save_CC"
6635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6636 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6637 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6638 CFLAGS="${CFLAGS} -qlonglong"
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6643 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6644 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6645 $as_echo_n "(cached) " >&6
6646 else
6647 pgac_save_CXXFLAGS=$CXXFLAGS
6648 pgac_save_CXX=$CXX
6649 CXX=${CXX}
6650 CXXFLAGS="${CXXFLAGS} -qlonglong"
6651 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6652 ac_cxx_werror_flag=yes
6653 ac_ext=cpp
6654 ac_cpp='$CXXCPP $CPPFLAGS'
6655 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6656 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6657 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6660 /* end confdefs.h. */
6663 main ()
6667 return 0;
6669 _ACEOF
6670 if ac_fn_cxx_try_compile "$LINENO"; then :
6671 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6672 else
6673 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6676 ac_ext=c
6677 ac_cpp='$CPP $CPPFLAGS'
6678 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6679 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6680 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6682 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6683 CXXFLAGS="$pgac_save_CXXFLAGS"
6684 CXX="$pgac_save_CXX"
6686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6687 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6688 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6689 CXXFLAGS="${CXXFLAGS} -qlonglong"
6693 elif test "$PORTNAME" = "hpux"; then
6694 # On some versions of HP-UX, libm functions do not set errno by default.
6695 # Fix that by using +Olibmerrno if the compiler recognizes it.
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6698 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6699 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6700 $as_echo_n "(cached) " >&6
6701 else
6702 pgac_save_CFLAGS=$CFLAGS
6703 pgac_save_CC=$CC
6704 CC=${CC}
6705 CFLAGS="${CFLAGS} +Olibmerrno"
6706 ac_save_c_werror_flag=$ac_c_werror_flag
6707 ac_c_werror_flag=yes
6708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6709 /* end confdefs.h. */
6712 main ()
6716 return 0;
6718 _ACEOF
6719 if ac_fn_c_try_compile "$LINENO"; then :
6720 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6721 else
6722 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6725 ac_c_werror_flag=$ac_save_c_werror_flag
6726 CFLAGS="$pgac_save_CFLAGS"
6727 CC="$pgac_save_CC"
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6730 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6731 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6732 CFLAGS="${CFLAGS} +Olibmerrno"
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6737 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6738 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6739 $as_echo_n "(cached) " >&6
6740 else
6741 pgac_save_CXXFLAGS=$CXXFLAGS
6742 pgac_save_CXX=$CXX
6743 CXX=${CXX}
6744 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6745 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6746 ac_cxx_werror_flag=yes
6747 ac_ext=cpp
6748 ac_cpp='$CXXCPP $CPPFLAGS'
6749 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6750 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6751 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6754 /* end confdefs.h. */
6757 main ()
6761 return 0;
6763 _ACEOF
6764 if ac_fn_cxx_try_compile "$LINENO"; then :
6765 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6766 else
6767 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6770 ac_ext=c
6771 ac_cpp='$CPP $CPPFLAGS'
6772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6776 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6777 CXXFLAGS="$pgac_save_CXXFLAGS"
6778 CXX="$pgac_save_CXX"
6780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6781 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6782 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6783 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6792 # Determine flags used to emit bitcode for JIT inlining. Need to test
6793 # for behaviour changing compiler flags, to keep compatibility with
6794 # compiler used for normal postgres code.
6795 if test "$with_llvm" = yes ; then
6796 CLANGXX="$CLANG -xc++"
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6799 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6800 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6801 $as_echo_n "(cached) " >&6
6802 else
6803 pgac_save_CFLAGS=$CFLAGS
6804 pgac_save_CC=$CC
6805 CC=${CLANG}
6806 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6807 ac_save_c_werror_flag=$ac_c_werror_flag
6808 ac_c_werror_flag=yes
6809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6810 /* end confdefs.h. */
6813 main ()
6817 return 0;
6819 _ACEOF
6820 if ac_fn_c_try_compile "$LINENO"; then :
6821 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6822 else
6823 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6826 ac_c_werror_flag=$ac_save_c_werror_flag
6827 CFLAGS="$pgac_save_CFLAGS"
6828 CC="$pgac_save_CC"
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6831 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6832 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6833 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6837 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6838 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6839 $as_echo_n "(cached) " >&6
6840 else
6841 pgac_save_CXXFLAGS=$CXXFLAGS
6842 pgac_save_CXX=$CXX
6843 CXX=${CLANGXX}
6844 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6845 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6846 ac_cxx_werror_flag=yes
6847 ac_ext=cpp
6848 ac_cpp='$CXXCPP $CPPFLAGS'
6849 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6850 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6851 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6854 /* end confdefs.h. */
6857 main ()
6861 return 0;
6863 _ACEOF
6864 if ac_fn_cxx_try_compile "$LINENO"; then :
6865 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6866 else
6867 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6870 ac_ext=c
6871 ac_cpp='$CPP $CPPFLAGS'
6872 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6873 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6874 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6876 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6877 CXXFLAGS="$pgac_save_CXXFLAGS"
6878 CXX="$pgac_save_CXX"
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6881 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6882 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6883 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6887 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6888 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6889 $as_echo_n "(cached) " >&6
6890 else
6891 pgac_save_CFLAGS=$CFLAGS
6892 pgac_save_CC=$CC
6893 CC=${CLANG}
6894 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6895 ac_save_c_werror_flag=$ac_c_werror_flag
6896 ac_c_werror_flag=yes
6897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6898 /* end confdefs.h. */
6901 main ()
6905 return 0;
6907 _ACEOF
6908 if ac_fn_c_try_compile "$LINENO"; then :
6909 pgac_cv_prog_CLANG_cflags__fwrapv=yes
6910 else
6911 pgac_cv_prog_CLANG_cflags__fwrapv=no
6913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6914 ac_c_werror_flag=$ac_save_c_werror_flag
6915 CFLAGS="$pgac_save_CFLAGS"
6916 CC="$pgac_save_CC"
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6919 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6920 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6921 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6925 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6926 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6927 $as_echo_n "(cached) " >&6
6928 else
6929 pgac_save_CXXFLAGS=$CXXFLAGS
6930 pgac_save_CXX=$CXX
6931 CXX=${CLANGXX}
6932 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6933 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6934 ac_cxx_werror_flag=yes
6935 ac_ext=cpp
6936 ac_cpp='$CXXCPP $CPPFLAGS'
6937 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6938 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6939 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6942 /* end confdefs.h. */
6945 main ()
6949 return 0;
6951 _ACEOF
6952 if ac_fn_cxx_try_compile "$LINENO"; then :
6953 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6954 else
6955 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6958 ac_ext=c
6959 ac_cpp='$CPP $CPPFLAGS'
6960 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6961 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6962 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6964 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6965 CXXFLAGS="$pgac_save_CXXFLAGS"
6966 CXX="$pgac_save_CXX"
6968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6969 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6970 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6971 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6975 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6976 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6977 $as_echo_n "(cached) " >&6
6978 else
6979 pgac_save_CFLAGS=$CFLAGS
6980 pgac_save_CC=$CC
6981 CC=${CLANG}
6982 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6983 ac_save_c_werror_flag=$ac_c_werror_flag
6984 ac_c_werror_flag=yes
6985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6986 /* end confdefs.h. */
6989 main ()
6993 return 0;
6995 _ACEOF
6996 if ac_fn_c_try_compile "$LINENO"; then :
6997 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6998 else
6999 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7002 ac_c_werror_flag=$ac_save_c_werror_flag
7003 CFLAGS="$pgac_save_CFLAGS"
7004 CC="$pgac_save_CC"
7006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7007 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7008 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7009 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7013 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7014 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7015 $as_echo_n "(cached) " >&6
7016 else
7017 pgac_save_CXXFLAGS=$CXXFLAGS
7018 pgac_save_CXX=$CXX
7019 CXX=${CLANGXX}
7020 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7021 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7022 ac_cxx_werror_flag=yes
7023 ac_ext=cpp
7024 ac_cpp='$CXXCPP $CPPFLAGS'
7025 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7026 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7027 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7030 /* end confdefs.h. */
7033 main ()
7037 return 0;
7039 _ACEOF
7040 if ac_fn_cxx_try_compile "$LINENO"; then :
7041 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7042 else
7043 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7046 ac_ext=c
7047 ac_cpp='$CPP $CPPFLAGS'
7048 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7049 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7050 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7052 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7053 CXXFLAGS="$pgac_save_CXXFLAGS"
7054 CXX="$pgac_save_CXX"
7056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7057 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7058 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7059 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7064 # supply -g if --enable-debug
7065 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7066 CFLAGS="$CFLAGS -g"
7069 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7070 CXXFLAGS="$CXXFLAGS -g"
7073 # enable code coverage if --enable-coverage
7074 if test "$enable_coverage" = yes; then
7075 if test "$GCC" = yes; then
7076 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7077 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7078 else
7079 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7083 # enable profiling if --enable-profiling
7084 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7085 if test "$GCC" = yes; then
7087 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7089 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7090 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7091 else
7092 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7096 # We already have this in Makefile.win32, but configure needs it too
7097 if test "$PORTNAME" = "win32"; then
7098 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7101 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7102 # user-specified flags (if any) at the end. This lets users override
7103 # the automatic additions.
7104 CFLAGS="$CFLAGS $user_CFLAGS"
7105 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7106 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7107 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7112 # The template file must set up CFLAGS_SL; we don't support user override
7115 # Check if the compiler still works with the final flag settings
7116 # (note, we're not checking that for CXX, which is optional)
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7118 $as_echo_n "checking whether the C compiler still works... " >&6; }
7119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7120 /* end confdefs.h. */
7123 main ()
7125 return 0;
7127 return 0;
7129 _ACEOF
7130 if ac_fn_c_try_link "$LINENO"; then :
7131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7132 $as_echo "yes" >&6; }
7133 else
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7135 $as_echo "no" >&6; }
7136 as_fn_error $? "cannot proceed" "$LINENO" 5
7138 rm -f core conftest.err conftest.$ac_objext \
7139 conftest$ac_exeext conftest.$ac_ext
7141 # Defend against gcc -ffast-math
7142 if test "$GCC" = yes; then
7143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7144 /* end confdefs.h. */
7147 main ()
7149 #ifdef __FAST_MATH__
7150 choke me
7151 #endif
7153 return 0;
7155 _ACEOF
7156 if ac_fn_c_try_compile "$LINENO"; then :
7158 else
7159 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7164 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7165 # versions of clang do not understand -fexcess-precision=standard, the use of
7166 # x87 floating point operations leads to problems like isinf possibly returning
7167 # false for a value that is infinite when converted from the 80bit register to
7168 # the 8byte memory representation.
7170 # Only perform the test if the compiler doesn't understand
7171 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7172 # automatically.
7173 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175 /* end confdefs.h. */
7178 main ()
7181 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7182 choke me
7183 #endif
7186 return 0;
7188 _ACEOF
7189 if ac_fn_c_try_compile "$LINENO"; then :
7191 else
7192 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7197 ac_ext=c
7198 ac_cpp='$CPP $CPPFLAGS'
7199 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7200 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7201 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7203 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7204 # On Suns, sometimes $CPP names a directory.
7205 if test -n "$CPP" && test -d "$CPP"; then
7206 CPP=
7208 if test -z "$CPP"; then
7209 if ${ac_cv_prog_CPP+:} false; then :
7210 $as_echo_n "(cached) " >&6
7211 else
7212 # Double quotes because CPP needs to be expanded
7213 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7215 ac_preproc_ok=false
7216 for ac_c_preproc_warn_flag in '' yes
7218 # Use a header file that comes with gcc, so configuring glibc
7219 # with a fresh cross-compiler works.
7220 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7221 # <limits.h> exists even on freestanding compilers.
7222 # On the NeXT, cc -E runs the code through the compiler's parser,
7223 # not just through cpp. "Syntax error" is here to catch this case.
7224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7225 /* end confdefs.h. */
7226 #ifdef __STDC__
7227 # include <limits.h>
7228 #else
7229 # include <assert.h>
7230 #endif
7231 Syntax error
7232 _ACEOF
7233 if ac_fn_c_try_cpp "$LINENO"; then :
7235 else
7236 # Broken: fails on valid input.
7237 continue
7239 rm -f conftest.err conftest.i conftest.$ac_ext
7241 # OK, works on sane cases. Now check whether nonexistent headers
7242 # can be detected and how.
7243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7244 /* end confdefs.h. */
7245 #include <ac_nonexistent.h>
7246 _ACEOF
7247 if ac_fn_c_try_cpp "$LINENO"; then :
7248 # Broken: success on invalid input.
7249 continue
7250 else
7251 # Passes both tests.
7252 ac_preproc_ok=:
7253 break
7255 rm -f conftest.err conftest.i conftest.$ac_ext
7257 done
7258 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7259 rm -f conftest.i conftest.err conftest.$ac_ext
7260 if $ac_preproc_ok; then :
7261 break
7264 done
7265 ac_cv_prog_CPP=$CPP
7268 CPP=$ac_cv_prog_CPP
7269 else
7270 ac_cv_prog_CPP=$CPP
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7273 $as_echo "$CPP" >&6; }
7274 ac_preproc_ok=false
7275 for ac_c_preproc_warn_flag in '' yes
7277 # Use a header file that comes with gcc, so configuring glibc
7278 # with a fresh cross-compiler works.
7279 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7280 # <limits.h> exists even on freestanding compilers.
7281 # On the NeXT, cc -E runs the code through the compiler's parser,
7282 # not just through cpp. "Syntax error" is here to catch this case.
7283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7284 /* end confdefs.h. */
7285 #ifdef __STDC__
7286 # include <limits.h>
7287 #else
7288 # include <assert.h>
7289 #endif
7290 Syntax error
7291 _ACEOF
7292 if ac_fn_c_try_cpp "$LINENO"; then :
7294 else
7295 # Broken: fails on valid input.
7296 continue
7298 rm -f conftest.err conftest.i conftest.$ac_ext
7300 # OK, works on sane cases. Now check whether nonexistent headers
7301 # can be detected and how.
7302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7303 /* end confdefs.h. */
7304 #include <ac_nonexistent.h>
7305 _ACEOF
7306 if ac_fn_c_try_cpp "$LINENO"; then :
7307 # Broken: success on invalid input.
7308 continue
7309 else
7310 # Passes both tests.
7311 ac_preproc_ok=:
7312 break
7314 rm -f conftest.err conftest.i conftest.$ac_ext
7316 done
7317 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7318 rm -f conftest.i conftest.err conftest.$ac_ext
7319 if $ac_preproc_ok; then :
7321 else
7322 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7323 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7324 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7325 See \`config.log' for more details" "$LINENO" 5; }
7328 ac_ext=c
7329 ac_cpp='$CPP $CPPFLAGS'
7330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7338 # Set up TAS assembly code if needed; the template file has now had its
7339 # chance to request this.
7341 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7344 if test "$need_tas" = yes ; then
7345 TAS=tas.o
7346 else
7347 TAS=""
7352 # Set up pkg_config in case we need it below
7361 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7362 if test -n "$ac_tool_prefix"; then
7363 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7364 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7366 $as_echo_n "checking for $ac_word... " >&6; }
7367 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7368 $as_echo_n "(cached) " >&6
7369 else
7370 case $PKG_CONFIG in
7371 [\\/]* | ?:[\\/]*)
7372 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7376 for as_dir in $PATH
7378 IFS=$as_save_IFS
7379 test -z "$as_dir" && as_dir=.
7380 for ac_exec_ext in '' $ac_executable_extensions; do
7381 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7382 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7383 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7384 break 2
7386 done
7387 done
7388 IFS=$as_save_IFS
7391 esac
7393 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7394 if test -n "$PKG_CONFIG"; then
7395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7396 $as_echo "$PKG_CONFIG" >&6; }
7397 else
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7399 $as_echo "no" >&6; }
7404 if test -z "$ac_cv_path_PKG_CONFIG"; then
7405 ac_pt_PKG_CONFIG=$PKG_CONFIG
7406 # Extract the first word of "pkg-config", so it can be a program name with args.
7407 set dummy pkg-config; ac_word=$2
7408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7409 $as_echo_n "checking for $ac_word... " >&6; }
7410 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7411 $as_echo_n "(cached) " >&6
7412 else
7413 case $ac_pt_PKG_CONFIG in
7414 [\\/]* | ?:[\\/]*)
7415 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7419 for as_dir in $PATH
7421 IFS=$as_save_IFS
7422 test -z "$as_dir" && as_dir=.
7423 for ac_exec_ext in '' $ac_executable_extensions; do
7424 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7425 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7426 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7427 break 2
7429 done
7430 done
7431 IFS=$as_save_IFS
7434 esac
7436 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7437 if test -n "$ac_pt_PKG_CONFIG"; then
7438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7439 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7440 else
7441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7442 $as_echo "no" >&6; }
7445 if test "x$ac_pt_PKG_CONFIG" = x; then
7446 PKG_CONFIG=""
7447 else
7448 case $cross_compiling:$ac_tool_warned in
7449 yes:)
7450 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7451 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7452 ac_tool_warned=yes ;;
7453 esac
7454 PKG_CONFIG=$ac_pt_PKG_CONFIG
7456 else
7457 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7461 if test -n "$PKG_CONFIG"; then
7462 _pkg_min_version=0.9.0
7463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7464 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7465 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7467 $as_echo "yes" >&6; }
7468 else
7469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7470 $as_echo "no" >&6; }
7471 PKG_CONFIG=""
7476 # Automatic dependency tracking
7480 # Check whether --enable-depend was given.
7481 if test "${enable_depend+set}" = set; then :
7482 enableval=$enable_depend;
7483 case $enableval in
7484 yes)
7485 autodepend=yes
7491 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7493 esac
7495 else
7496 enable_depend=no
7505 # Enable assert checks
7509 # Check whether --enable-cassert was given.
7510 if test "${enable_cassert+set}" = set; then :
7511 enableval=$enable_cassert;
7512 case $enableval in
7513 yes)
7515 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7522 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7524 esac
7526 else
7527 enable_cassert=no
7535 # Include directories
7537 ac_save_IFS=$IFS
7538 IFS="${IFS}${PATH_SEPARATOR}"
7539 # SRCH_INC comes from the template file
7540 for dir in $with_includes $SRCH_INC; do
7541 if test -d "$dir"; then
7542 INCLUDES="$INCLUDES -I$dir"
7543 else
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7545 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7547 done
7548 IFS=$ac_save_IFS
7553 # Library directories
7555 ac_save_IFS=$IFS
7556 IFS="${IFS}${PATH_SEPARATOR}"
7557 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7558 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7559 if test -d "$dir"; then
7560 LIBDIRS="$LIBDIRS -L$dir"
7561 else
7562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7563 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7565 done
7566 IFS=$ac_save_IFS
7569 # Enable thread-safe client libraries
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7572 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7575 # Check whether --enable-thread-safety was given.
7576 if test "${enable_thread_safety+set}" = set; then :
7577 enableval=$enable_thread_safety;
7578 case $enableval in
7579 yes)
7586 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7588 esac
7590 else
7591 enable_thread_safety=yes
7596 if test "$enable_thread_safety" = yes; then
7598 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7602 $as_echo "$enable_thread_safety" >&6; }
7606 # ICU
7608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7609 $as_echo_n "checking whether to build with ICU support... " >&6; }
7613 # Check whether --with-icu was given.
7614 if test "${with_icu+set}" = set; then :
7615 withval=$with_icu;
7616 case $withval in
7617 yes)
7619 $as_echo "#define USE_ICU 1" >>confdefs.h
7626 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7628 esac
7630 else
7631 with_icu=no
7636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7637 $as_echo "$with_icu" >&6; }
7640 if test "$with_icu" = yes; then
7642 pkg_failed=no
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7644 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7646 if test -n "$ICU_CFLAGS"; then
7647 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7648 elif test -n "$PKG_CONFIG"; then
7649 if test -n "$PKG_CONFIG" && \
7650 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7651 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7652 ac_status=$?
7653 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7654 test $ac_status = 0; }; then
7655 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7656 test "x$?" != "x0" && pkg_failed=yes
7657 else
7658 pkg_failed=yes
7660 else
7661 pkg_failed=untried
7663 if test -n "$ICU_LIBS"; then
7664 pkg_cv_ICU_LIBS="$ICU_LIBS"
7665 elif test -n "$PKG_CONFIG"; then
7666 if test -n "$PKG_CONFIG" && \
7667 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7668 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7669 ac_status=$?
7670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7671 test $ac_status = 0; }; then
7672 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7673 test "x$?" != "x0" && pkg_failed=yes
7674 else
7675 pkg_failed=yes
7677 else
7678 pkg_failed=untried
7683 if test $pkg_failed = yes; then
7684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7685 $as_echo "no" >&6; }
7687 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7688 _pkg_short_errors_supported=yes
7689 else
7690 _pkg_short_errors_supported=no
7692 if test $_pkg_short_errors_supported = yes; then
7693 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7694 else
7695 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7697 # Put the nasty error message in config.log where it belongs
7698 echo "$ICU_PKG_ERRORS" >&5
7700 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7702 $ICU_PKG_ERRORS
7704 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7705 installed software in a non-standard prefix.
7707 Alternatively, you may set the environment variables ICU_CFLAGS
7708 and ICU_LIBS to avoid the need to call pkg-config.
7709 See the pkg-config man page for more details." "$LINENO" 5
7710 elif test $pkg_failed = untried; then
7711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7712 $as_echo "no" >&6; }
7713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7714 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7715 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7716 is in your PATH or set the PKG_CONFIG environment variable to the full
7717 path to pkg-config.
7719 Alternatively, you may set the environment variables ICU_CFLAGS
7720 and ICU_LIBS to avoid the need to call pkg-config.
7721 See the pkg-config man page for more details.
7723 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7724 See \`config.log' for more details" "$LINENO" 5; }
7725 else
7726 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7727 ICU_LIBS=$pkg_cv_ICU_LIBS
7728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7729 $as_echo "yes" >&6; }
7735 # Optionally build Tcl modules (PL/Tcl)
7737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7738 $as_echo_n "checking whether to build with Tcl... " >&6; }
7742 # Check whether --with-tcl was given.
7743 if test "${with_tcl+set}" = set; then :
7744 withval=$with_tcl;
7745 case $withval in
7746 yes)
7753 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7755 esac
7757 else
7758 with_tcl=no
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7764 $as_echo "$with_tcl" >&6; }
7767 # We see if the path to the Tcl/Tk configuration scripts is specified.
7768 # This will override the use of tclsh to find the paths to search.
7773 # Check whether --with-tclconfig was given.
7774 if test "${with_tclconfig+set}" = set; then :
7775 withval=$with_tclconfig;
7776 case $withval in
7777 yes)
7778 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7781 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7786 esac
7793 # Optionally build Perl modules (PL/Perl)
7795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7796 $as_echo_n "checking whether to build Perl modules... " >&6; }
7800 # Check whether --with-perl was given.
7801 if test "${with_perl+set}" = set; then :
7802 withval=$with_perl;
7803 case $withval in
7804 yes)
7811 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7813 esac
7815 else
7816 with_perl=no
7821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7822 $as_echo "$with_perl" >&6; }
7826 # Optionally build Python modules (PL/Python)
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7829 $as_echo_n "checking whether to build Python modules... " >&6; }
7833 # Check whether --with-python was given.
7834 if test "${with_python+set}" = set; then :
7835 withval=$with_python;
7836 case $withval in
7837 yes)
7844 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7846 esac
7848 else
7849 with_python=no
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7855 $as_echo "$with_python" >&6; }
7859 # GSSAPI
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7862 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7866 # Check whether --with-gssapi was given.
7867 if test "${with_gssapi+set}" = set; then :
7868 withval=$with_gssapi;
7869 case $withval in
7870 yes)
7873 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7875 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7882 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7884 esac
7886 else
7887 with_gssapi=no
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7893 $as_echo "$with_gssapi" >&6; }
7901 # Kerberos configuration parameters
7906 # Check whether --with-krb-srvnam was given.
7907 if test "${with_krb_srvnam+set}" = set; then :
7908 withval=$with_krb_srvnam;
7909 case $withval in
7910 yes)
7911 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7914 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7919 esac
7921 else
7922 with_krb_srvnam="postgres"
7928 cat >>confdefs.h <<_ACEOF
7929 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7930 _ACEOF
7935 # PAM
7937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7938 $as_echo_n "checking whether to build with PAM support... " >&6; }
7942 # Check whether --with-pam was given.
7943 if test "${with_pam+set}" = set; then :
7944 withval=$with_pam;
7945 case $withval in
7946 yes)
7948 $as_echo "#define USE_PAM 1" >>confdefs.h
7955 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7957 esac
7959 else
7960 with_pam=no
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7966 $as_echo "$with_pam" >&6; }
7970 # BSD AUTH
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7973 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7977 # Check whether --with-bsd-auth was given.
7978 if test "${with_bsd_auth+set}" = set; then :
7979 withval=$with_bsd_auth;
7980 case $withval in
7981 yes)
7983 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7990 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7992 esac
7994 else
7995 with_bsd_auth=no
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8001 $as_echo "$with_bsd_auth" >&6; }
8005 # LDAP
8007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8008 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8012 # Check whether --with-ldap was given.
8013 if test "${with_ldap+set}" = set; then :
8014 withval=$with_ldap;
8015 case $withval in
8016 yes)
8018 $as_echo "#define USE_LDAP 1" >>confdefs.h
8025 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8027 esac
8029 else
8030 with_ldap=no
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8036 $as_echo "$with_ldap" >&6; }
8041 # Bonjour
8043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8044 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8048 # Check whether --with-bonjour was given.
8049 if test "${with_bonjour+set}" = set; then :
8050 withval=$with_bonjour;
8051 case $withval in
8052 yes)
8054 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8061 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8063 esac
8065 else
8066 with_bonjour=no
8071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8072 $as_echo "$with_bonjour" >&6; }
8076 # SELinux
8078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8079 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8083 # Check whether --with-selinux was given.
8084 if test "${with_selinux+set}" = set; then :
8085 withval=$with_selinux;
8086 case $withval in
8087 yes)
8094 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8096 esac
8098 else
8099 with_selinux=no
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8106 $as_echo "$with_selinux" >&6; }
8109 # Systemd
8111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8112 $as_echo_n "checking whether to build with systemd support... " >&6; }
8116 # Check whether --with-systemd was given.
8117 if test "${with_systemd+set}" = set; then :
8118 withval=$with_systemd;
8119 case $withval in
8120 yes)
8122 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8129 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8131 esac
8133 else
8134 with_systemd=no
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8141 $as_echo "$with_systemd" >&6; }
8144 # Readline
8149 # Check whether --with-readline was given.
8150 if test "${with_readline+set}" = set; then :
8151 withval=$with_readline;
8152 case $withval in
8153 yes)
8160 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8162 esac
8164 else
8165 with_readline=yes
8170 # readline on MinGW has problems with backslashes in psql and other bugs.
8171 # This is particularly a problem with non-US code pages.
8172 # Therefore disable its use until we understand the cause. 2004-07-20
8173 if test "$PORTNAME" = "win32"; then
8174 if test "$with_readline" = yes; then
8175 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8176 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8177 with_readline=no
8184 # Prefer libedit
8189 # Check whether --with-libedit-preferred was given.
8190 if test "${with_libedit_preferred+set}" = set; then :
8191 withval=$with_libedit_preferred;
8192 case $withval in
8193 yes)
8200 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8202 esac
8204 else
8205 with_libedit_preferred=no
8213 # UUID library
8215 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8216 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8217 # UUID library. More than one of these might be present on a given platform,
8218 # so we make the user say which one she wants.
8223 # Check whether --with-uuid was given.
8224 if test "${with_uuid+set}" = set; then :
8225 withval=$with_uuid;
8226 case $withval in
8227 yes)
8228 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8231 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8236 esac
8241 if test x"$with_uuid" = x"" ; then
8242 with_uuid=no
8247 # Check whether --with-ossp-uuid was given.
8248 if test "${with_ossp_uuid+set}" = set; then :
8249 withval=$with_ossp_uuid;
8250 case $withval in
8251 yes)
8258 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8260 esac
8262 else
8263 with_ossp_uuid=no
8268 if test "$with_ossp_uuid" = yes ; then
8269 with_uuid=ossp
8272 if test "$with_uuid" != no ; then
8273 if test "$with_uuid" = bsd ; then
8275 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8277 elif test "$with_uuid" = e2fs ; then
8279 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8281 elif test "$with_uuid" = ossp ; then
8283 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8285 else
8286 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8293 # XML
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8296 $as_echo_n "checking whether to build with XML support... " >&6; }
8300 # Check whether --with-libxml was given.
8301 if test "${with_libxml+set}" = set; then :
8302 withval=$with_libxml;
8303 case $withval in
8304 yes)
8306 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8313 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8315 esac
8317 else
8318 with_libxml=no
8323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8324 $as_echo "$with_libxml" >&6; }
8327 if test "$with_libxml" = yes ; then
8328 # Check pkg-config, then xml2-config. But for backwards compatibility,
8329 # setting XML2_CONFIG overrides pkg-config.
8330 have_libxml2_pkg_config=no
8331 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8333 pkg_failed=no
8334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8335 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8337 if test -n "$XML2_CFLAGS"; then
8338 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8339 elif test -n "$PKG_CONFIG"; then
8340 if test -n "$PKG_CONFIG" && \
8341 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8342 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8343 ac_status=$?
8344 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8345 test $ac_status = 0; }; then
8346 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8347 test "x$?" != "x0" && pkg_failed=yes
8348 else
8349 pkg_failed=yes
8351 else
8352 pkg_failed=untried
8354 if test -n "$XML2_LIBS"; then
8355 pkg_cv_XML2_LIBS="$XML2_LIBS"
8356 elif test -n "$PKG_CONFIG"; then
8357 if test -n "$PKG_CONFIG" && \
8358 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8359 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8360 ac_status=$?
8361 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8362 test $ac_status = 0; }; then
8363 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8364 test "x$?" != "x0" && pkg_failed=yes
8365 else
8366 pkg_failed=yes
8368 else
8369 pkg_failed=untried
8374 if test $pkg_failed = yes; then
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8376 $as_echo "no" >&6; }
8378 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8379 _pkg_short_errors_supported=yes
8380 else
8381 _pkg_short_errors_supported=no
8383 if test $_pkg_short_errors_supported = yes; then
8384 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8385 else
8386 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8388 # Put the nasty error message in config.log where it belongs
8389 echo "$XML2_PKG_ERRORS" >&5
8391 # do nothing
8392 elif test $pkg_failed = untried; then
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8394 $as_echo "no" >&6; }
8395 # do nothing
8396 else
8397 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8398 XML2_LIBS=$pkg_cv_XML2_LIBS
8399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8400 $as_echo "yes" >&6; }
8401 have_libxml2_pkg_config=yes
8404 if test "$have_libxml2_pkg_config" = no ; then
8405 if test -z "$XML2_CONFIG"; then
8406 for ac_prog in xml2-config
8408 # Extract the first word of "$ac_prog", so it can be a program name with args.
8409 set dummy $ac_prog; ac_word=$2
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8411 $as_echo_n "checking for $ac_word... " >&6; }
8412 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8413 $as_echo_n "(cached) " >&6
8414 else
8415 case $XML2_CONFIG in
8416 [\\/]* | ?:[\\/]*)
8417 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8421 for as_dir in $PATH
8423 IFS=$as_save_IFS
8424 test -z "$as_dir" && as_dir=.
8425 for ac_exec_ext in '' $ac_executable_extensions; do
8426 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8427 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8429 break 2
8431 done
8432 done
8433 IFS=$as_save_IFS
8436 esac
8438 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8439 if test -n "$XML2_CONFIG"; then
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8441 $as_echo "$XML2_CONFIG" >&6; }
8442 else
8443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8444 $as_echo "no" >&6; }
8448 test -n "$XML2_CONFIG" && break
8449 done
8451 else
8452 # Report the value of XML2_CONFIG in configure's output in all cases.
8453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8454 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8456 $as_echo "$XML2_CONFIG" >&6; }
8459 if test -n "$XML2_CONFIG"; then
8460 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8461 XML2_LIBS=`$XML2_CONFIG --libs`
8464 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8465 for pgac_option in $XML2_CFLAGS; do
8466 case $pgac_option in
8467 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8468 esac
8469 done
8470 for pgac_option in $XML2_LIBS; do
8471 case $pgac_option in
8472 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8473 esac
8474 done
8479 # XSLT
8484 # Check whether --with-libxslt was given.
8485 if test "${with_libxslt+set}" = set; then :
8486 withval=$with_libxslt;
8487 case $withval in
8488 yes)
8490 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8497 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8499 esac
8501 else
8502 with_libxslt=no
8512 # tzdata
8517 # Check whether --with-system-tzdata was given.
8518 if test "${with_system_tzdata+set}" = set; then :
8519 withval=$with_system_tzdata;
8520 case $withval in
8521 yes)
8522 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8525 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8530 esac
8538 # Zlib
8543 # Check whether --with-zlib was given.
8544 if test "${with_zlib+set}" = set; then :
8545 withval=$with_zlib;
8546 case $withval in
8547 yes)
8554 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8556 esac
8558 else
8559 with_zlib=yes
8567 # Assignments
8570 CPPFLAGS="$CPPFLAGS $INCLUDES"
8571 LDFLAGS="$LDFLAGS $LIBDIRS"
8577 # Check whether --with-gnu-ld was given.
8578 if test "${with_gnu_ld+set}" = set; then :
8579 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8580 else
8581 with_gnu_ld=no
8584 ac_prog=ld
8585 if test "$GCC" = yes; then
8586 # Check if gcc -print-prog-name=ld gives a path.
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8588 $as_echo_n "checking for ld used by GCC... " >&6; }
8589 case $host in
8590 *-*-mingw*)
8591 # gcc leaves a trailing carriage return which upsets mingw
8592 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8594 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8595 esac
8596 case "$ac_prog" in
8597 # Accept absolute paths.
8598 [\\/]* | [A-Za-z]:[\\/]*)
8599 re_direlt='/[^/][^/]*/\.\./'
8600 # Canonicalize the path of ld
8601 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8602 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8603 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8604 done
8605 test -z "$LD" && LD="$ac_prog"
8608 # If it fails, then pretend we aren't using GCC.
8609 ac_prog=ld
8612 # If it is relative, then search for the first ld in PATH.
8613 with_gnu_ld=unknown
8615 esac
8616 elif test "$with_gnu_ld" = yes; then
8617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8618 $as_echo_n "checking for GNU ld... " >&6; }
8619 else
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8621 $as_echo_n "checking for non-GNU ld... " >&6; }
8623 if ${ac_cv_path_LD+:} false; then :
8624 $as_echo_n "(cached) " >&6
8625 else
8626 if test -z "$LD"; then
8627 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8628 for ac_dir in $PATH; do
8629 test -z "$ac_dir" && ac_dir=.
8630 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8631 ac_cv_path_LD="$ac_dir/$ac_prog"
8632 # Check to see if the program is GNU ld. I'd rather use --version,
8633 # but apparently some GNU ld's only accept -v.
8634 # Break only if it was the GNU/non-GNU ld that we prefer.
8635 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8636 test "$with_gnu_ld" != no && break
8637 else
8638 test "$with_gnu_ld" != yes && break
8641 done
8642 IFS="$ac_save_ifs"
8643 else
8644 ac_cv_path_LD="$LD" # Let the user override the test with a path.
8648 LD="$ac_cv_path_LD"
8649 if test -n "$LD"; then
8650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8651 $as_echo "$LD" >&6; }
8652 else
8653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8654 $as_echo "no" >&6; }
8656 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8658 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8659 if ${ac_cv_prog_gnu_ld+:} false; then :
8660 $as_echo_n "(cached) " >&6
8661 else
8662 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8663 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8664 ac_cv_prog_gnu_ld=yes
8665 else
8666 ac_cv_prog_gnu_ld=no
8669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8670 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8671 with_gnu_ld=$ac_cv_prog_gnu_ld
8676 if test -n "$ac_tool_prefix"; then
8677 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8678 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8680 $as_echo_n "checking for $ac_word... " >&6; }
8681 if ${ac_cv_prog_RANLIB+:} false; then :
8682 $as_echo_n "(cached) " >&6
8683 else
8684 if test -n "$RANLIB"; then
8685 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8686 else
8687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8688 for as_dir in $PATH
8690 IFS=$as_save_IFS
8691 test -z "$as_dir" && as_dir=.
8692 for ac_exec_ext in '' $ac_executable_extensions; do
8693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8694 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8695 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696 break 2
8698 done
8699 done
8700 IFS=$as_save_IFS
8704 RANLIB=$ac_cv_prog_RANLIB
8705 if test -n "$RANLIB"; then
8706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8707 $as_echo "$RANLIB" >&6; }
8708 else
8709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8710 $as_echo "no" >&6; }
8715 if test -z "$ac_cv_prog_RANLIB"; then
8716 ac_ct_RANLIB=$RANLIB
8717 # Extract the first word of "ranlib", so it can be a program name with args.
8718 set dummy ranlib; ac_word=$2
8719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8720 $as_echo_n "checking for $ac_word... " >&6; }
8721 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8722 $as_echo_n "(cached) " >&6
8723 else
8724 if test -n "$ac_ct_RANLIB"; then
8725 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8726 else
8727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8728 for as_dir in $PATH
8730 IFS=$as_save_IFS
8731 test -z "$as_dir" && as_dir=.
8732 for ac_exec_ext in '' $ac_executable_extensions; do
8733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8734 ac_cv_prog_ac_ct_RANLIB="ranlib"
8735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8736 break 2
8738 done
8739 done
8740 IFS=$as_save_IFS
8744 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8745 if test -n "$ac_ct_RANLIB"; then
8746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8747 $as_echo "$ac_ct_RANLIB" >&6; }
8748 else
8749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8750 $as_echo "no" >&6; }
8753 if test "x$ac_ct_RANLIB" = x; then
8754 RANLIB=":"
8755 else
8756 case $cross_compiling:$ac_tool_warned in
8757 yes:)
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8759 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8760 ac_tool_warned=yes ;;
8761 esac
8762 RANLIB=$ac_ct_RANLIB
8764 else
8765 RANLIB="$ac_cv_prog_RANLIB"
8769 if test -n "$ac_tool_prefix"; then
8770 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8771 set dummy ${ac_tool_prefix}strip; ac_word=$2
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8773 $as_echo_n "checking for $ac_word... " >&6; }
8774 if ${ac_cv_prog_STRIP+:} false; then :
8775 $as_echo_n "(cached) " >&6
8776 else
8777 if test -n "$STRIP"; then
8778 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8779 else
8780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8781 for as_dir in $PATH
8783 IFS=$as_save_IFS
8784 test -z "$as_dir" && as_dir=.
8785 for ac_exec_ext in '' $ac_executable_extensions; do
8786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8787 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8789 break 2
8791 done
8792 done
8793 IFS=$as_save_IFS
8797 STRIP=$ac_cv_prog_STRIP
8798 if test -n "$STRIP"; then
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8800 $as_echo "$STRIP" >&6; }
8801 else
8802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803 $as_echo "no" >&6; }
8808 if test -z "$ac_cv_prog_STRIP"; then
8809 ac_ct_STRIP=$STRIP
8810 # Extract the first word of "strip", so it can be a program name with args.
8811 set dummy strip; ac_word=$2
8812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8813 $as_echo_n "checking for $ac_word... " >&6; }
8814 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8815 $as_echo_n "(cached) " >&6
8816 else
8817 if test -n "$ac_ct_STRIP"; then
8818 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8819 else
8820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8821 for as_dir in $PATH
8823 IFS=$as_save_IFS
8824 test -z "$as_dir" && as_dir=.
8825 for ac_exec_ext in '' $ac_executable_extensions; do
8826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8827 ac_cv_prog_ac_ct_STRIP="strip"
8828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8829 break 2
8831 done
8832 done
8833 IFS=$as_save_IFS
8837 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8838 if test -n "$ac_ct_STRIP"; then
8839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8840 $as_echo "$ac_ct_STRIP" >&6; }
8841 else
8842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8843 $as_echo "no" >&6; }
8846 if test "x$ac_ct_STRIP" = x; then
8847 STRIP=":"
8848 else
8849 case $cross_compiling:$ac_tool_warned in
8850 yes:)
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8853 ac_tool_warned=yes ;;
8854 esac
8855 STRIP=$ac_ct_STRIP
8857 else
8858 STRIP="$ac_cv_prog_STRIP"
8862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8863 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8864 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8865 STRIP_STATIC_LIB="$STRIP -x"
8866 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8868 $as_echo "yes" >&6; }
8869 else
8870 case $host_os in
8871 darwin*)
8872 STRIP="$STRIP -x"
8873 STRIP_STATIC_LIB=$STRIP
8874 STRIP_SHARED_LIB=$STRIP
8875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8876 $as_echo "yes" >&6; }
8879 STRIP_STATIC_LIB=:
8880 STRIP_SHARED_LIB=:
8881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8882 $as_echo "no" >&6; }
8884 esac
8889 if test -n "$ac_tool_prefix"; then
8890 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8891 set dummy ${ac_tool_prefix}ar; ac_word=$2
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8893 $as_echo_n "checking for $ac_word... " >&6; }
8894 if ${ac_cv_prog_AR+:} false; then :
8895 $as_echo_n "(cached) " >&6
8896 else
8897 if test -n "$AR"; then
8898 ac_cv_prog_AR="$AR" # Let the user override the test.
8899 else
8900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8901 for as_dir in $PATH
8903 IFS=$as_save_IFS
8904 test -z "$as_dir" && as_dir=.
8905 for ac_exec_ext in '' $ac_executable_extensions; do
8906 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8907 ac_cv_prog_AR="${ac_tool_prefix}ar"
8908 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8909 break 2
8911 done
8912 done
8913 IFS=$as_save_IFS
8917 AR=$ac_cv_prog_AR
8918 if test -n "$AR"; then
8919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8920 $as_echo "$AR" >&6; }
8921 else
8922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923 $as_echo "no" >&6; }
8928 if test -z "$ac_cv_prog_AR"; then
8929 ac_ct_AR=$AR
8930 # Extract the first word of "ar", so it can be a program name with args.
8931 set dummy ar; ac_word=$2
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8933 $as_echo_n "checking for $ac_word... " >&6; }
8934 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8935 $as_echo_n "(cached) " >&6
8936 else
8937 if test -n "$ac_ct_AR"; then
8938 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8939 else
8940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8941 for as_dir in $PATH
8943 IFS=$as_save_IFS
8944 test -z "$as_dir" && as_dir=.
8945 for ac_exec_ext in '' $ac_executable_extensions; do
8946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8947 ac_cv_prog_ac_ct_AR="ar"
8948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8949 break 2
8951 done
8952 done
8953 IFS=$as_save_IFS
8957 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8958 if test -n "$ac_ct_AR"; then
8959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8960 $as_echo "$ac_ct_AR" >&6; }
8961 else
8962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8963 $as_echo "no" >&6; }
8966 if test "x$ac_ct_AR" = x; then
8967 AR="ar"
8968 else
8969 case $cross_compiling:$ac_tool_warned in
8970 yes:)
8971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8972 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8973 ac_tool_warned=yes ;;
8974 esac
8975 AR=$ac_ct_AR
8977 else
8978 AR="$ac_cv_prog_AR"
8981 if test "$PORTNAME" = "win32"; then
8982 if test -n "$ac_tool_prefix"; then
8983 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8984 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8986 $as_echo_n "checking for $ac_word... " >&6; }
8987 if ${ac_cv_prog_DLLTOOL+:} false; then :
8988 $as_echo_n "(cached) " >&6
8989 else
8990 if test -n "$DLLTOOL"; then
8991 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8992 else
8993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994 for as_dir in $PATH
8996 IFS=$as_save_IFS
8997 test -z "$as_dir" && as_dir=.
8998 for ac_exec_ext in '' $ac_executable_extensions; do
8999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002 break 2
9004 done
9005 done
9006 IFS=$as_save_IFS
9010 DLLTOOL=$ac_cv_prog_DLLTOOL
9011 if test -n "$DLLTOOL"; then
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9013 $as_echo "$DLLTOOL" >&6; }
9014 else
9015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9016 $as_echo "no" >&6; }
9021 if test -z "$ac_cv_prog_DLLTOOL"; then
9022 ac_ct_DLLTOOL=$DLLTOOL
9023 # Extract the first word of "dlltool", so it can be a program name with args.
9024 set dummy dlltool; ac_word=$2
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9026 $as_echo_n "checking for $ac_word... " >&6; }
9027 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9028 $as_echo_n "(cached) " >&6
9029 else
9030 if test -n "$ac_ct_DLLTOOL"; then
9031 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9032 else
9033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9034 for as_dir in $PATH
9036 IFS=$as_save_IFS
9037 test -z "$as_dir" && as_dir=.
9038 for ac_exec_ext in '' $ac_executable_extensions; do
9039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9040 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9042 break 2
9044 done
9045 done
9046 IFS=$as_save_IFS
9050 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9051 if test -n "$ac_ct_DLLTOOL"; then
9052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9053 $as_echo "$ac_ct_DLLTOOL" >&6; }
9054 else
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9056 $as_echo "no" >&6; }
9059 if test "x$ac_ct_DLLTOOL" = x; then
9060 DLLTOOL="dlltool"
9061 else
9062 case $cross_compiling:$ac_tool_warned in
9063 yes:)
9064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9065 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9066 ac_tool_warned=yes ;;
9067 esac
9068 DLLTOOL=$ac_ct_DLLTOOL
9070 else
9071 DLLTOOL="$ac_cv_prog_DLLTOOL"
9074 if test -n "$ac_tool_prefix"; then
9075 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9076 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9078 $as_echo_n "checking for $ac_word... " >&6; }
9079 if ${ac_cv_prog_DLLWRAP+:} false; then :
9080 $as_echo_n "(cached) " >&6
9081 else
9082 if test -n "$DLLWRAP"; then
9083 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9084 else
9085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9086 for as_dir in $PATH
9088 IFS=$as_save_IFS
9089 test -z "$as_dir" && as_dir=.
9090 for ac_exec_ext in '' $ac_executable_extensions; do
9091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9092 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9094 break 2
9096 done
9097 done
9098 IFS=$as_save_IFS
9102 DLLWRAP=$ac_cv_prog_DLLWRAP
9103 if test -n "$DLLWRAP"; then
9104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9105 $as_echo "$DLLWRAP" >&6; }
9106 else
9107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9108 $as_echo "no" >&6; }
9113 if test -z "$ac_cv_prog_DLLWRAP"; then
9114 ac_ct_DLLWRAP=$DLLWRAP
9115 # Extract the first word of "dllwrap", so it can be a program name with args.
9116 set dummy dllwrap; ac_word=$2
9117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9118 $as_echo_n "checking for $ac_word... " >&6; }
9119 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9120 $as_echo_n "(cached) " >&6
9121 else
9122 if test -n "$ac_ct_DLLWRAP"; then
9123 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9124 else
9125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9126 for as_dir in $PATH
9128 IFS=$as_save_IFS
9129 test -z "$as_dir" && as_dir=.
9130 for ac_exec_ext in '' $ac_executable_extensions; do
9131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9132 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9134 break 2
9136 done
9137 done
9138 IFS=$as_save_IFS
9142 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9143 if test -n "$ac_ct_DLLWRAP"; then
9144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9145 $as_echo "$ac_ct_DLLWRAP" >&6; }
9146 else
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9148 $as_echo "no" >&6; }
9151 if test "x$ac_ct_DLLWRAP" = x; then
9152 DLLWRAP="dllwrap"
9153 else
9154 case $cross_compiling:$ac_tool_warned in
9155 yes:)
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9157 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9158 ac_tool_warned=yes ;;
9159 esac
9160 DLLWRAP=$ac_ct_DLLWRAP
9162 else
9163 DLLWRAP="$ac_cv_prog_DLLWRAP"
9166 if test -n "$ac_tool_prefix"; then
9167 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9168 set dummy ${ac_tool_prefix}windres; ac_word=$2
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9170 $as_echo_n "checking for $ac_word... " >&6; }
9171 if ${ac_cv_prog_WINDRES+:} false; then :
9172 $as_echo_n "(cached) " >&6
9173 else
9174 if test -n "$WINDRES"; then
9175 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9176 else
9177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178 for as_dir in $PATH
9180 IFS=$as_save_IFS
9181 test -z "$as_dir" && as_dir=.
9182 for ac_exec_ext in '' $ac_executable_extensions; do
9183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9184 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186 break 2
9188 done
9189 done
9190 IFS=$as_save_IFS
9194 WINDRES=$ac_cv_prog_WINDRES
9195 if test -n "$WINDRES"; then
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9197 $as_echo "$WINDRES" >&6; }
9198 else
9199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9200 $as_echo "no" >&6; }
9205 if test -z "$ac_cv_prog_WINDRES"; then
9206 ac_ct_WINDRES=$WINDRES
9207 # Extract the first word of "windres", so it can be a program name with args.
9208 set dummy windres; ac_word=$2
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9210 $as_echo_n "checking for $ac_word... " >&6; }
9211 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9212 $as_echo_n "(cached) " >&6
9213 else
9214 if test -n "$ac_ct_WINDRES"; then
9215 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9216 else
9217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9218 for as_dir in $PATH
9220 IFS=$as_save_IFS
9221 test -z "$as_dir" && as_dir=.
9222 for ac_exec_ext in '' $ac_executable_extensions; do
9223 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9224 ac_cv_prog_ac_ct_WINDRES="windres"
9225 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9226 break 2
9228 done
9229 done
9230 IFS=$as_save_IFS
9234 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9235 if test -n "$ac_ct_WINDRES"; then
9236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9237 $as_echo "$ac_ct_WINDRES" >&6; }
9238 else
9239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9240 $as_echo "no" >&6; }
9243 if test "x$ac_ct_WINDRES" = x; then
9244 WINDRES="windres"
9245 else
9246 case $cross_compiling:$ac_tool_warned in
9247 yes:)
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9249 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9250 ac_tool_warned=yes ;;
9251 esac
9252 WINDRES=$ac_ct_WINDRES
9254 else
9255 WINDRES="$ac_cv_prog_WINDRES"
9260 # Find a good install program. We prefer a C program (faster),
9261 # so one script is as good as another. But avoid the broken or
9262 # incompatible versions:
9263 # SysV /etc/install, /usr/sbin/install
9264 # SunOS /usr/etc/install
9265 # IRIX /sbin/install
9266 # AIX /bin/install
9267 # AmigaOS /C/install, which installs bootblocks on floppy discs
9268 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9269 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9270 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9271 # OS/2's system install, which has a completely different semantic
9272 # ./install, which can be erroneously created by make from ./install.sh.
9273 # Reject install programs that cannot install multiple files.
9274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9275 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9276 if test -z "$INSTALL"; then
9277 if ${ac_cv_path_install+:} false; then :
9278 $as_echo_n "(cached) " >&6
9279 else
9280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9281 for as_dir in $PATH
9283 IFS=$as_save_IFS
9284 test -z "$as_dir" && as_dir=.
9285 # Account for people who put trailing slashes in PATH elements.
9286 case $as_dir/ in #((
9287 ./ | .// | /[cC]/* | \
9288 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9289 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9290 /usr/ucb/* ) ;;
9292 # OSF1 and SCO ODT 3.0 have their own names for install.
9293 # Don't use installbsd from OSF since it installs stuff as root
9294 # by default.
9295 for ac_prog in ginstall scoinst install; do
9296 for ac_exec_ext in '' $ac_executable_extensions; do
9297 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9298 if test $ac_prog = install &&
9299 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9300 # AIX install. It has an incompatible calling convention.
9302 elif test $ac_prog = install &&
9303 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9304 # program-specific install script used by HP pwplus--don't use.
9306 else
9307 rm -rf conftest.one conftest.two conftest.dir
9308 echo one > conftest.one
9309 echo two > conftest.two
9310 mkdir conftest.dir
9311 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9312 test -s conftest.one && test -s conftest.two &&
9313 test -s conftest.dir/conftest.one &&
9314 test -s conftest.dir/conftest.two
9315 then
9316 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9317 break 3
9321 done
9322 done
9324 esac
9326 done
9327 IFS=$as_save_IFS
9329 rm -rf conftest.one conftest.two conftest.dir
9332 if test "${ac_cv_path_install+set}" = set; then
9333 INSTALL=$ac_cv_path_install
9334 else
9335 # As a last resort, use the slow shell script. Don't cache a
9336 # value for INSTALL within a source directory, because that will
9337 # break other packages using the cache if that directory is
9338 # removed, or if the value is a relative name.
9339 INSTALL=$ac_install_sh
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9343 $as_echo "$INSTALL" >&6; }
9345 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9346 # It thinks the first close brace ends the variable substitution.
9347 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9349 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9351 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9353 # When Autoconf chooses install-sh as install program it tries to generate
9354 # a relative path to it in each makefile where it substitutes it. This clashes
9355 # with our Makefile.global concept. This workaround helps.
9356 case $INSTALL in
9357 *install-sh*) install_bin='';;
9358 *) install_bin=$INSTALL;;
9359 esac
9362 if test -z "$TAR"; then
9363 for ac_prog in tar
9365 # Extract the first word of "$ac_prog", so it can be a program name with args.
9366 set dummy $ac_prog; ac_word=$2
9367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9368 $as_echo_n "checking for $ac_word... " >&6; }
9369 if ${ac_cv_path_TAR+:} false; then :
9370 $as_echo_n "(cached) " >&6
9371 else
9372 case $TAR in
9373 [\\/]* | ?:[\\/]*)
9374 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9378 for as_dir in $PATH
9380 IFS=$as_save_IFS
9381 test -z "$as_dir" && as_dir=.
9382 for ac_exec_ext in '' $ac_executable_extensions; do
9383 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9384 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9386 break 2
9388 done
9389 done
9390 IFS=$as_save_IFS
9393 esac
9395 TAR=$ac_cv_path_TAR
9396 if test -n "$TAR"; then
9397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9398 $as_echo "$TAR" >&6; }
9399 else
9400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9401 $as_echo "no" >&6; }
9405 test -n "$TAR" && break
9406 done
9408 else
9409 # Report the value of TAR in configure's output in all cases.
9410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9411 $as_echo_n "checking for TAR... " >&6; }
9412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9413 $as_echo "$TAR" >&6; }
9416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9417 $as_echo_n "checking whether ln -s works... " >&6; }
9418 LN_S=$as_ln_s
9419 if test "$LN_S" = "ln -s"; then
9420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9421 $as_echo "yes" >&6; }
9422 else
9423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9424 $as_echo "no, using $LN_S" >&6; }
9427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9428 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9429 if test -z "$MKDIR_P"; then
9430 if ${ac_cv_path_mkdir+:} false; then :
9431 $as_echo_n "(cached) " >&6
9432 else
9433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9434 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9436 IFS=$as_save_IFS
9437 test -z "$as_dir" && as_dir=.
9438 for ac_prog in mkdir gmkdir; do
9439 for ac_exec_ext in '' $ac_executable_extensions; do
9440 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9441 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9442 'mkdir (GNU coreutils) '* | \
9443 'mkdir (coreutils) '* | \
9444 'mkdir (fileutils) '4.1*)
9445 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9446 break 3;;
9447 esac
9448 done
9449 done
9450 done
9451 IFS=$as_save_IFS
9455 test -d ./--version && rmdir ./--version
9456 if test "${ac_cv_path_mkdir+set}" = set; then
9457 MKDIR_P="$ac_cv_path_mkdir -p"
9458 else
9459 # As a last resort, use the slow shell script. Don't cache a
9460 # value for MKDIR_P within a source directory, because that will
9461 # break other packages using the cache if that directory is
9462 # removed, or if the value is a relative name.
9463 MKDIR_P="$ac_install_sh -d"
9466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9467 $as_echo "$MKDIR_P" >&6; }
9469 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9470 # a relative path to it in each makefile where it substitutes it. This clashes
9471 # with our Makefile.global concept. This workaround helps.
9472 case $MKDIR_P in
9473 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9474 esac
9476 if test -z "$BISON"; then
9477 for ac_prog in bison
9479 # Extract the first word of "$ac_prog", so it can be a program name with args.
9480 set dummy $ac_prog; ac_word=$2
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9482 $as_echo_n "checking for $ac_word... " >&6; }
9483 if ${ac_cv_path_BISON+:} false; then :
9484 $as_echo_n "(cached) " >&6
9485 else
9486 case $BISON in
9487 [\\/]* | ?:[\\/]*)
9488 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9492 for as_dir in $PATH
9494 IFS=$as_save_IFS
9495 test -z "$as_dir" && as_dir=.
9496 for ac_exec_ext in '' $ac_executable_extensions; do
9497 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9498 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9500 break 2
9502 done
9503 done
9504 IFS=$as_save_IFS
9507 esac
9509 BISON=$ac_cv_path_BISON
9510 if test -n "$BISON"; then
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9512 $as_echo "$BISON" >&6; }
9513 else
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9515 $as_echo "no" >&6; }
9519 test -n "$BISON" && break
9520 done
9522 else
9523 # Report the value of BISON in configure's output in all cases.
9524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9525 $as_echo_n "checking for BISON... " >&6; }
9526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9527 $as_echo "$BISON" >&6; }
9531 if test "$BISON"; then
9532 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9534 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9535 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9536 then
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9538 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9539 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9540 $as_echo "$as_me: WARNING:
9541 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9542 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9543 BISON=""
9545 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9546 # of the now preferred %name-prefix "base_yy", but the latter
9547 # doesn't work with Bison 2.3 or less. So for now we silence the
9548 # deprecation warnings.
9549 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9550 then
9551 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9555 if test -z "$BISON"; then
9556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9557 *** Without Bison you will not be able to build PostgreSQL from Git nor
9558 *** change any of the parser definition files. You can obtain Bison from
9559 *** a GNU mirror site. (If you are using the official distribution of
9560 *** PostgreSQL then you do not need to worry about this, because the Bison
9561 *** output is pre-generated.)" >&5
9562 $as_echo "$as_me: WARNING:
9563 *** Without Bison you will not be able to build PostgreSQL from Git nor
9564 *** change any of the parser definition files. You can obtain Bison from
9565 *** a GNU mirror site. (If you are using the official distribution of
9566 *** PostgreSQL then you do not need to worry about this, because the Bison
9567 *** output is pre-generated.)" >&2;}
9571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9572 $as_echo_n "checking for flex... " >&6; }
9573 if ${pgac_cv_path_flex+:} false; then :
9574 $as_echo_n "(cached) " >&6
9575 else
9576 # Let the user override the test
9577 if test -n "$FLEX"; then
9578 pgac_cv_path_flex=$FLEX
9579 else
9580 pgac_save_IFS=$IFS
9581 IFS=$PATH_SEPARATOR
9582 for pgac_dir in $PATH; do
9583 IFS=$pgac_save_IFS
9584 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9585 pgac_dir=`pwd`
9587 for pgac_prog in flex lex; do
9588 pgac_candidate="$pgac_dir/$pgac_prog"
9589 if test -f "$pgac_candidate" \
9590 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9591 then
9592 echo '%%' > conftest.l
9593 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9594 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9595 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;}'
9596 then
9597 pgac_cv_path_flex=$pgac_candidate
9598 break 2
9599 else
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9601 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9602 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9603 $as_echo "$as_me: WARNING:
9604 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9605 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9609 done
9610 done
9611 rm -f conftest.l lex.yy.c
9612 : ${pgac_cv_path_flex=no}
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9617 $as_echo "$pgac_cv_path_flex" >&6; }
9618 if test x"$pgac_cv_path_flex" = x"no"; then
9619 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9620 *** Without Flex you will not be able to build PostgreSQL from Git nor
9621 *** change any of the scanner definition files. You can obtain Flex from
9622 *** a GNU mirror site. (If you are using the official distribution of
9623 *** PostgreSQL then you do not need to worry about this because the Flex
9624 *** output is pre-generated.)" >&5
9625 $as_echo "$as_me: WARNING:
9626 *** Without Flex you will not be able to build PostgreSQL from Git nor
9627 *** change any of the scanner definition files. You can obtain Flex from
9628 *** a GNU mirror site. (If you are using the official distribution of
9629 *** PostgreSQL then you do not need to worry about this because the Flex
9630 *** output is pre-generated.)" >&2;}
9632 FLEX=
9633 else
9634 FLEX=$pgac_cv_path_flex
9635 pgac_flex_version=`$FLEX --version 2>/dev/null`
9636 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9637 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9644 if test -z "$PERL"; then
9645 for ac_prog in perl
9647 # Extract the first word of "$ac_prog", so it can be a program name with args.
9648 set dummy $ac_prog; ac_word=$2
9649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9650 $as_echo_n "checking for $ac_word... " >&6; }
9651 if ${ac_cv_path_PERL+:} false; then :
9652 $as_echo_n "(cached) " >&6
9653 else
9654 case $PERL in
9655 [\\/]* | ?:[\\/]*)
9656 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9660 for as_dir in $PATH
9662 IFS=$as_save_IFS
9663 test -z "$as_dir" && as_dir=.
9664 for ac_exec_ext in '' $ac_executable_extensions; do
9665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9666 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9668 break 2
9670 done
9671 done
9672 IFS=$as_save_IFS
9675 esac
9677 PERL=$ac_cv_path_PERL
9678 if test -n "$PERL"; then
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9680 $as_echo "$PERL" >&6; }
9681 else
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9683 $as_echo "no" >&6; }
9687 test -n "$PERL" && break
9688 done
9690 else
9691 # Report the value of PERL in configure's output in all cases.
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9693 $as_echo_n "checking for PERL... " >&6; }
9694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9695 $as_echo "$PERL" >&6; }
9699 if test "$PERL"; then
9700 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'`
9701 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9702 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9703 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9704 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9705 then
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9707 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9708 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9709 $as_echo "$as_me: WARNING:
9710 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9711 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9712 PERL=""
9716 if test -z "$PERL"; then
9717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9718 *** Without Perl you will not be able to build PostgreSQL from Git.
9719 *** You can obtain Perl from any CPAN mirror site.
9720 *** (If you are using the official distribution of PostgreSQL then you do not
9721 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9722 $as_echo "$as_me: WARNING:
9723 *** Without Perl you will not be able to build PostgreSQL from Git.
9724 *** You can obtain Perl from any CPAN mirror site.
9725 *** (If you are using the official distribution of PostgreSQL then you do not
9726 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9729 if test "$with_perl" = yes; then
9730 if test -z "$PERL"; then
9731 as_fn_error $? "Perl not found" "$LINENO" 5
9734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9735 $as_echo_n "checking for Perl archlibexp... " >&6; }
9736 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9737 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9739 $as_echo "$perl_archlibexp" >&6; }
9740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9741 $as_echo_n "checking for Perl privlibexp... " >&6; }
9742 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9743 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9745 $as_echo "$perl_privlibexp" >&6; }
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9747 $as_echo_n "checking for Perl useshrplib... " >&6; }
9748 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9749 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9751 $as_echo "$perl_useshrplib" >&6; }
9752 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9753 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9754 You might have to rebuild your Perl installation. Refer to the
9755 documentation for details. Use --without-perl to disable building
9756 PL/Perl." "$LINENO" 5
9758 # On most platforms, archlibexp is also where the Perl include files live ...
9759 perl_includespec="-I$perl_archlibexp/CORE"
9760 # ... but on newer macOS versions, we must use -iwithsysroot to look
9761 # under $PG_SYSROOT
9762 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9763 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9764 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9769 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9770 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9772 $as_echo "$perl_ccflags" >&6; }
9773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9774 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9775 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9777 $as_echo "$perl_embed_ccflags" >&6; }
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9781 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9782 if test "$PORTNAME" = "win32" ; then
9783 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9784 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9785 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9786 else
9787 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9788 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9789 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9792 else
9793 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9794 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9795 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9797 if test -z "$perl_embed_ldflags" ; then
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799 $as_echo "no" >&6; }
9800 as_fn_error $? "could not determine flags for linking embedded Perl.
9801 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9802 installed." "$LINENO" 5
9803 else
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9805 $as_echo "$perl_embed_ldflags" >&6; }
9810 if test "$with_python" = yes; then
9811 if test -z "$PYTHON"; then
9812 for ac_prog in python python3 python2
9814 # Extract the first word of "$ac_prog", so it can be a program name with args.
9815 set dummy $ac_prog; ac_word=$2
9816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9817 $as_echo_n "checking for $ac_word... " >&6; }
9818 if ${ac_cv_path_PYTHON+:} false; then :
9819 $as_echo_n "(cached) " >&6
9820 else
9821 case $PYTHON in
9822 [\\/]* | ?:[\\/]*)
9823 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9827 for as_dir in $PATH
9829 IFS=$as_save_IFS
9830 test -z "$as_dir" && as_dir=.
9831 for ac_exec_ext in '' $ac_executable_extensions; do
9832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9833 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9835 break 2
9837 done
9838 done
9839 IFS=$as_save_IFS
9842 esac
9844 PYTHON=$ac_cv_path_PYTHON
9845 if test -n "$PYTHON"; then
9846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9847 $as_echo "$PYTHON" >&6; }
9848 else
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9850 $as_echo "no" >&6; }
9854 test -n "$PYTHON" && break
9855 done
9857 else
9858 # Report the value of PYTHON in configure's output in all cases.
9859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9860 $as_echo_n "checking for PYTHON... " >&6; }
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9862 $as_echo "$PYTHON" >&6; }
9865 if test x"$PYTHON" = x""; then
9866 as_fn_error $? "Python not found" "$LINENO" 5
9870 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9872 $as_echo "$as_me: using python $python_fullversion" >&6;}
9873 # python_fullversion is typically n.n.n plus some trailing junk
9874 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9875 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9876 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9877 # Reject unsupported Python versions as soon as practical.
9878 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 6; then
9879 as_fn_error $? "Python version $python_version is too old (version 2.6 or later is required)" "$LINENO" 5
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9883 $as_echo_n "checking for Python distutils module... " >&6; }
9884 if "${PYTHON}" -c 'import distutils' 2>&5
9885 then
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9887 $as_echo "yes" >&6; }
9888 else
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9890 $as_echo "no" >&6; }
9891 as_fn_error $? "distutils module not found" "$LINENO" 5
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9895 $as_echo_n "checking Python configuration directory... " >&6; }
9896 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9898 $as_echo "$python_configdir" >&6; }
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9901 $as_echo_n "checking Python include directories... " >&6; }
9902 python_includespec=`${PYTHON} -c "
9903 import distutils.sysconfig
9904 a = '-I' + distutils.sysconfig.get_python_inc(False)
9905 b = '-I' + distutils.sysconfig.get_python_inc(True)
9906 if a == b:
9907 print(a)
9908 else:
9909 print(a + ' ' + b)"`
9910 if test "$PORTNAME" = win32 ; then
9911 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9914 $as_echo "$python_includespec" >&6; }
9918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9919 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9921 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9922 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9924 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9925 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9926 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9927 then
9928 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9929 found_shlib=1
9930 else
9931 # Otherwise, guess the base name of the shlib.
9932 # LDVERSION was added in Python 3.2, before that use VERSION,
9933 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9934 python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9935 if test x"${python_ldversion}" != x""; then
9936 ldlibrary="python${python_ldversion}"
9937 else
9938 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9939 if test x"${python_version_var}" != x""; then
9940 ldlibrary="python${python_version_var}"
9941 else
9942 ldlibrary="python${python_version}"
9945 # Search for a likely-looking file.
9946 found_shlib=0
9947 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9949 # We don't know the platform DLSUFFIX here, so check 'em all.
9950 for e in .so .dll .dylib .sl; do
9951 if test -e "$d/lib${ldlibrary}$e"; then
9952 python_libdir="$d"
9953 found_shlib=1
9954 break 2
9956 done
9957 done
9958 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9959 # (".so.n.n") as well. However, check this only after failing to find
9960 # ".so" anywhere, because yet other platforms (Debian) put the .so
9961 # symlink in a different directory from the underlying versioned shlib.
9962 if test "$found_shlib" != 1; then
9963 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9965 for f in "$d/lib${ldlibrary}.so."* ; do
9966 if test -e "$f"; then
9967 python_libdir="$d"
9968 found_shlib=1
9969 break 2
9971 done
9972 done
9974 # As usual, Windows has its own ideas. Possible default library
9975 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9976 # and the "lib" prefix might not be there.
9977 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9978 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9980 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9981 if test -e "$f"; then
9982 python_libdir="$d"
9983 found_shlib=1
9984 break 2
9986 done
9987 done
9990 if test "$found_shlib" != 1; then
9991 as_fn_error $? "could not find shared library for Python
9992 You might have to rebuild your Python installation. Refer to the
9993 documentation for details. Use --without-python to disable building
9994 PL/Python." "$LINENO" 5
9996 python_libspec="-L${python_libdir} -l${ldlibrary}"
9998 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10001 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10007 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10008 if test -z "$ZIC"; then
10009 for ac_prog in zic
10011 # Extract the first word of "$ac_prog", so it can be a program name with args.
10012 set dummy $ac_prog; ac_word=$2
10013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10014 $as_echo_n "checking for $ac_word... " >&6; }
10015 if ${ac_cv_path_ZIC+:} false; then :
10016 $as_echo_n "(cached) " >&6
10017 else
10018 case $ZIC in
10019 [\\/]* | ?:[\\/]*)
10020 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10024 for as_dir in $PATH
10026 IFS=$as_save_IFS
10027 test -z "$as_dir" && as_dir=.
10028 for ac_exec_ext in '' $ac_executable_extensions; do
10029 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10030 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10032 break 2
10034 done
10035 done
10036 IFS=$as_save_IFS
10039 esac
10041 ZIC=$ac_cv_path_ZIC
10042 if test -n "$ZIC"; then
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10044 $as_echo "$ZIC" >&6; }
10045 else
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10047 $as_echo "no" >&6; }
10051 test -n "$ZIC" && break
10052 done
10054 else
10055 # Report the value of ZIC in configure's output in all cases.
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10057 $as_echo_n "checking for ZIC... " >&6; }
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10059 $as_echo "$ZIC" >&6; }
10062 if test -z "$ZIC"; then
10063 as_fn_error $? "
10064 When cross-compiling, either use the option --with-system-tzdata to use
10065 existing time-zone data, or set the environment variable ZIC to a zic
10066 program to use during the build." "$LINENO" 5
10071 # Pthreads
10073 # For each platform, we need to know about any special compile and link
10074 # libraries, and whether the normal C function names are thread-safe.
10075 # See the comment at the top of src/port/thread.c for more information.
10076 # WIN32 doesn't need the pthread tests; it always uses threads
10078 # These tests are run before the library-tests, because linking with the
10079 # other libraries can pull in the pthread functions as a side-effect. We
10080 # want to use the -pthread or similar flags directly, and not rely on
10081 # the side-effects of linking with some other library.
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10084 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10085 if ${ac_cv_path_SED+:} false; then :
10086 $as_echo_n "(cached) " >&6
10087 else
10088 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10089 for ac_i in 1 2 3 4 5 6 7; do
10090 ac_script="$ac_script$as_nl$ac_script"
10091 done
10092 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10093 { ac_script=; unset ac_script;}
10094 if test -z "$SED"; then
10095 ac_path_SED_found=false
10096 # Loop through the user's path and test for each of PROGNAME-LIST
10097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10098 for as_dir in $PATH
10100 IFS=$as_save_IFS
10101 test -z "$as_dir" && as_dir=.
10102 for ac_prog in sed gsed; do
10103 for ac_exec_ext in '' $ac_executable_extensions; do
10104 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10105 as_fn_executable_p "$ac_path_SED" || continue
10106 # Check for GNU ac_path_SED and select it if it is found.
10107 # Check for GNU $ac_path_SED
10108 case `"$ac_path_SED" --version 2>&1` in
10109 *GNU*)
10110 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10112 ac_count=0
10113 $as_echo_n 0123456789 >"conftest.in"
10114 while :
10116 cat "conftest.in" "conftest.in" >"conftest.tmp"
10117 mv "conftest.tmp" "conftest.in"
10118 cp "conftest.in" "conftest.nl"
10119 $as_echo '' >> "conftest.nl"
10120 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10121 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10122 as_fn_arith $ac_count + 1 && ac_count=$as_val
10123 if test $ac_count -gt ${ac_path_SED_max-0}; then
10124 # Best one so far, save it but keep looking for a better one
10125 ac_cv_path_SED="$ac_path_SED"
10126 ac_path_SED_max=$ac_count
10128 # 10*(2^10) chars as input seems more than enough
10129 test $ac_count -gt 10 && break
10130 done
10131 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10132 esac
10134 $ac_path_SED_found && break 3
10135 done
10136 done
10137 done
10138 IFS=$as_save_IFS
10139 if test -z "$ac_cv_path_SED"; then
10140 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10142 else
10143 ac_cv_path_SED=$SED
10147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10148 $as_echo "$ac_cv_path_SED" >&6; }
10149 SED="$ac_cv_path_SED"
10150 rm -f conftest.sed
10153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10154 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10155 if ${ac_cv_path_GREP+:} false; then :
10156 $as_echo_n "(cached) " >&6
10157 else
10158 if test -z "$GREP"; then
10159 ac_path_GREP_found=false
10160 # Loop through the user's path and test for each of PROGNAME-LIST
10161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10162 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10164 IFS=$as_save_IFS
10165 test -z "$as_dir" && as_dir=.
10166 for ac_prog in grep ggrep; do
10167 for ac_exec_ext in '' $ac_executable_extensions; do
10168 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10169 as_fn_executable_p "$ac_path_GREP" || continue
10170 # Check for GNU ac_path_GREP and select it if it is found.
10171 # Check for GNU $ac_path_GREP
10172 case `"$ac_path_GREP" --version 2>&1` in
10173 *GNU*)
10174 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10176 ac_count=0
10177 $as_echo_n 0123456789 >"conftest.in"
10178 while :
10180 cat "conftest.in" "conftest.in" >"conftest.tmp"
10181 mv "conftest.tmp" "conftest.in"
10182 cp "conftest.in" "conftest.nl"
10183 $as_echo 'GREP' >> "conftest.nl"
10184 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10185 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10186 as_fn_arith $ac_count + 1 && ac_count=$as_val
10187 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10188 # Best one so far, save it but keep looking for a better one
10189 ac_cv_path_GREP="$ac_path_GREP"
10190 ac_path_GREP_max=$ac_count
10192 # 10*(2^10) chars as input seems more than enough
10193 test $ac_count -gt 10 && break
10194 done
10195 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10196 esac
10198 $ac_path_GREP_found && break 3
10199 done
10200 done
10201 done
10202 IFS=$as_save_IFS
10203 if test -z "$ac_cv_path_GREP"; then
10204 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10206 else
10207 ac_cv_path_GREP=$GREP
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10212 $as_echo "$ac_cv_path_GREP" >&6; }
10213 GREP="$ac_cv_path_GREP"
10216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10217 $as_echo_n "checking for egrep... " >&6; }
10218 if ${ac_cv_path_EGREP+:} false; then :
10219 $as_echo_n "(cached) " >&6
10220 else
10221 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10222 then ac_cv_path_EGREP="$GREP -E"
10223 else
10224 if test -z "$EGREP"; then
10225 ac_path_EGREP_found=false
10226 # Loop through the user's path and test for each of PROGNAME-LIST
10227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10228 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10230 IFS=$as_save_IFS
10231 test -z "$as_dir" && as_dir=.
10232 for ac_prog in egrep; do
10233 for ac_exec_ext in '' $ac_executable_extensions; do
10234 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10235 as_fn_executable_p "$ac_path_EGREP" || continue
10236 # Check for GNU ac_path_EGREP and select it if it is found.
10237 # Check for GNU $ac_path_EGREP
10238 case `"$ac_path_EGREP" --version 2>&1` in
10239 *GNU*)
10240 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10242 ac_count=0
10243 $as_echo_n 0123456789 >"conftest.in"
10244 while :
10246 cat "conftest.in" "conftest.in" >"conftest.tmp"
10247 mv "conftest.tmp" "conftest.in"
10248 cp "conftest.in" "conftest.nl"
10249 $as_echo 'EGREP' >> "conftest.nl"
10250 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10251 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10252 as_fn_arith $ac_count + 1 && ac_count=$as_val
10253 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10254 # Best one so far, save it but keep looking for a better one
10255 ac_cv_path_EGREP="$ac_path_EGREP"
10256 ac_path_EGREP_max=$ac_count
10258 # 10*(2^10) chars as input seems more than enough
10259 test $ac_count -gt 10 && break
10260 done
10261 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10262 esac
10264 $ac_path_EGREP_found && break 3
10265 done
10266 done
10267 done
10268 IFS=$as_save_IFS
10269 if test -z "$ac_cv_path_EGREP"; then
10270 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10272 else
10273 ac_cv_path_EGREP=$EGREP
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10279 $as_echo "$ac_cv_path_EGREP" >&6; }
10280 EGREP="$ac_cv_path_EGREP"
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10284 $as_echo_n "checking for ANSI C header files... " >&6; }
10285 if ${ac_cv_header_stdc+:} false; then :
10286 $as_echo_n "(cached) " >&6
10287 else
10288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10289 /* end confdefs.h. */
10290 #include <stdlib.h>
10291 #include <stdarg.h>
10292 #include <string.h>
10293 #include <float.h>
10296 main ()
10300 return 0;
10302 _ACEOF
10303 if ac_fn_c_try_compile "$LINENO"; then :
10304 ac_cv_header_stdc=yes
10305 else
10306 ac_cv_header_stdc=no
10308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10310 if test $ac_cv_header_stdc = yes; then
10311 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10313 /* end confdefs.h. */
10314 #include <string.h>
10316 _ACEOF
10317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10318 $EGREP "memchr" >/dev/null 2>&1; then :
10320 else
10321 ac_cv_header_stdc=no
10323 rm -f conftest*
10327 if test $ac_cv_header_stdc = yes; then
10328 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330 /* end confdefs.h. */
10331 #include <stdlib.h>
10333 _ACEOF
10334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10335 $EGREP "free" >/dev/null 2>&1; then :
10337 else
10338 ac_cv_header_stdc=no
10340 rm -f conftest*
10344 if test $ac_cv_header_stdc = yes; then
10345 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10346 if test "$cross_compiling" = yes; then :
10348 else
10349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10350 /* end confdefs.h. */
10351 #include <ctype.h>
10352 #include <stdlib.h>
10353 #if ((' ' & 0x0FF) == 0x020)
10354 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10355 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10356 #else
10357 # define ISLOWER(c) \
10358 (('a' <= (c) && (c) <= 'i') \
10359 || ('j' <= (c) && (c) <= 'r') \
10360 || ('s' <= (c) && (c) <= 'z'))
10361 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10362 #endif
10364 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10366 main ()
10368 int i;
10369 for (i = 0; i < 256; i++)
10370 if (XOR (islower (i), ISLOWER (i))
10371 || toupper (i) != TOUPPER (i))
10372 return 2;
10373 return 0;
10375 _ACEOF
10376 if ac_fn_c_try_run "$LINENO"; then :
10378 else
10379 ac_cv_header_stdc=no
10381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10382 conftest.$ac_objext conftest.beam conftest.$ac_ext
10387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10388 $as_echo "$ac_cv_header_stdc" >&6; }
10389 if test $ac_cv_header_stdc = yes; then
10391 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10395 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10396 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10397 inttypes.h stdint.h unistd.h
10398 do :
10399 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10400 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10402 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10403 cat >>confdefs.h <<_ACEOF
10404 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10405 _ACEOF
10409 done
10412 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10413 # then
10418 ac_ext=c
10419 ac_cpp='$CPP $CPPFLAGS'
10420 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10421 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10422 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10424 ax_pthread_ok=no
10426 # We used to check for pthread.h first, but this fails if pthread.h
10427 # requires special compiler flags (e.g. on Tru64 or Sequent).
10428 # It gets checked for in the link test anyway.
10430 # First of all, check if the user has set any of the PTHREAD_LIBS,
10431 # etcetera environment variables, and if threads linking works using
10432 # them:
10433 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10434 ax_pthread_save_CC="$CC"
10435 ax_pthread_save_CFLAGS="$CFLAGS"
10436 ax_pthread_save_LIBS="$LIBS"
10437 if test "x$PTHREAD_CC" != "x"; then :
10438 CC="$PTHREAD_CC"
10440 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10441 LIBS="$PTHREAD_LIBS $LIBS"
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10443 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10445 /* end confdefs.h. */
10447 /* Override any GCC internal prototype to avoid an error.
10448 Use char because int might match the return type of a GCC
10449 builtin and then its argument prototype would still apply. */
10450 #ifdef __cplusplus
10451 extern "C"
10452 #endif
10453 char pthread_join ();
10455 main ()
10457 return pthread_join ();
10459 return 0;
10461 _ACEOF
10462 if ac_fn_c_try_link "$LINENO"; then :
10463 ax_pthread_ok=yes
10465 rm -f core conftest.err conftest.$ac_objext \
10466 conftest$ac_exeext conftest.$ac_ext
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10468 $as_echo "$ax_pthread_ok" >&6; }
10469 if test "x$ax_pthread_ok" = "xno"; then
10470 PTHREAD_LIBS=""
10471 PTHREAD_CFLAGS=""
10473 CC="$ax_pthread_save_CC"
10474 CFLAGS="$ax_pthread_save_CFLAGS"
10475 LIBS="$ax_pthread_save_LIBS"
10478 # We must check for the threads library under a number of different
10479 # names; the ordering is very important because some systems
10480 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10481 # libraries is broken (non-POSIX).
10483 # Create a list of thread flags to try. Items starting with a "-" are
10484 # C compiler flags, and other items are library names, except for "none"
10485 # which indicates that we try without any flags at all, and "pthread-config"
10486 # which is a program returning the flags for the Pth emulation library.
10488 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10490 # The ordering *is* (sometimes) important. Some notes on the
10491 # individual items follow:
10493 # pthreads: AIX (must check this before -lpthread)
10494 # none: in case threads are in libc; should be tried before -Kthread and
10495 # other compiler flags to prevent continual compiler warnings
10496 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10497 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10498 # (Note: HP C rejects this with "bad form for `-t' option")
10499 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10500 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10501 # doesn't hurt to check since this sometimes defines pthreads and
10502 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10503 # is present but should not be used directly; and before -mthreads,
10504 # because the compiler interprets this as "-mt" + "-hreads")
10505 # -mthreads: Mingw32/gcc, Lynx/gcc
10506 # pthread: Linux, etcetera
10507 # --thread-safe: KAI C++
10508 # pthread-config: use pthread-config program (for GNU Pth library)
10510 case $host_os in
10512 freebsd*)
10514 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10515 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10517 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10520 hpux*)
10522 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10523 # multi-threading and also sets -lpthread."
10525 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10528 openedition*)
10530 # IBM z/OS requires a feature-test macro to be defined in order to
10531 # enable POSIX threads at all, so give the user a hint if this is
10532 # not set. (We don't define these ourselves, as they can affect
10533 # other portions of the system API in unpredictable ways.)
10535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10536 /* end confdefs.h. */
10538 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10539 AX_PTHREAD_ZOS_MISSING
10540 # endif
10542 _ACEOF
10543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10544 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10546 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10548 rm -f conftest*
10552 solaris*)
10554 # On Solaris (at least, for some versions), libc contains stubbed
10555 # (non-functional) versions of the pthreads routines, so link-based
10556 # tests will erroneously succeed. (N.B.: The stubs are missing
10557 # pthread_cleanup_push, or rather a function called by this macro,
10558 # so we could check for that, but who knows whether they'll stub
10559 # that too in a future libc.) So we'll check first for the
10560 # standard Solaris way of linking pthreads (-mt -lpthread).
10562 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10564 esac
10566 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10568 if test "x$GCC" = "xyes"; then :
10569 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10572 # The presence of a feature test macro requesting re-entrant function
10573 # definitions is, on some systems, a strong hint that pthreads support is
10574 # correctly enabled
10576 case $host_os in
10577 darwin* | hpux* | linux* | osf* | solaris*)
10578 ax_pthread_check_macro="_REENTRANT"
10581 aix*)
10582 ax_pthread_check_macro="_THREAD_SAFE"
10586 ax_pthread_check_macro="--"
10588 esac
10589 if test "x$ax_pthread_check_macro" = "x--"; then :
10590 ax_pthread_check_cond=0
10591 else
10592 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10595 # Are we compiling with Clang?
10597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10598 $as_echo_n "checking whether $CC is Clang... " >&6; }
10599 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10600 $as_echo_n "(cached) " >&6
10601 else
10602 ax_cv_PTHREAD_CLANG=no
10603 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10604 if test "x$GCC" = "xyes"; then
10605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10606 /* end confdefs.h. */
10607 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10608 # if defined(__clang__) && defined(__llvm__)
10609 AX_PTHREAD_CC_IS_CLANG
10610 # endif
10612 _ACEOF
10613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10614 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10615 ax_cv_PTHREAD_CLANG=yes
10617 rm -f conftest*
10622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10623 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10624 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10626 ax_pthread_clang_warning=no
10628 # Clang needs special handling, because older versions handle the -pthread
10629 # option in a rather... idiosyncratic way
10631 if test "x$ax_pthread_clang" = "xyes"; then
10633 # Clang takes -pthread; it has never supported any other flag
10635 # (Note 1: This will need to be revisited if a system that Clang
10636 # supports has POSIX threads in a separate library. This tends not
10637 # to be the way of modern systems, but it's conceivable.)
10639 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10640 # to get POSIX threads support; the API is always present and
10641 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10642 # -pthread does define _REENTRANT, and while the Darwin headers
10643 # ignore this macro, third-party headers might not.)
10645 PTHREAD_CFLAGS="-pthread"
10646 PTHREAD_LIBS=
10648 ax_pthread_ok=yes
10650 # However, older versions of Clang make a point of warning the user
10651 # that, in an invocation where only linking and no compilation is
10652 # taking place, the -pthread option has no effect ("argument unused
10653 # during compilation"). They expect -pthread to be passed in only
10654 # when source code is being compiled.
10656 # Problem is, this is at odds with the way Automake and most other
10657 # C build frameworks function, which is that the same flags used in
10658 # compilation (CFLAGS) are also used in linking. Many systems
10659 # supported by AX_PTHREAD require exactly this for POSIX threads
10660 # support, and in fact it is often not straightforward to specify a
10661 # flag that is used only in the compilation phase and not in
10662 # linking. Such a scenario is extremely rare in practice.
10664 # Even though use of the -pthread flag in linking would only print
10665 # a warning, this can be a nuisance for well-run software projects
10666 # that build with -Werror. So if the active version of Clang has
10667 # this misfeature, we search for an option to squash it.
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10670 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10671 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10672 $as_echo_n "(cached) " >&6
10673 else
10674 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10675 # Create an alternate version of $ac_link that compiles and
10676 # links in two steps (.c -> .o, .o -> exe) instead of one
10677 # (.c -> exe), because the warning occurs only in the second
10678 # step
10679 ax_pthread_save_ac_link="$ac_link"
10680 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10681 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10682 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10683 ax_pthread_save_CFLAGS="$CFLAGS"
10684 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10685 if test "x$ax_pthread_try" = "xunknown"; then :
10686 break
10688 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10689 ac_link="$ax_pthread_save_ac_link"
10690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10691 /* end confdefs.h. */
10692 int main(void){return 0;}
10693 _ACEOF
10694 if ac_fn_c_try_link "$LINENO"; then :
10695 ac_link="$ax_pthread_2step_ac_link"
10696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10697 /* end confdefs.h. */
10698 int main(void){return 0;}
10699 _ACEOF
10700 if ac_fn_c_try_link "$LINENO"; then :
10701 break
10703 rm -f core conftest.err conftest.$ac_objext \
10704 conftest$ac_exeext conftest.$ac_ext
10707 rm -f core conftest.err conftest.$ac_objext \
10708 conftest$ac_exeext conftest.$ac_ext
10709 done
10710 ac_link="$ax_pthread_save_ac_link"
10711 CFLAGS="$ax_pthread_save_CFLAGS"
10712 if test "x$ax_pthread_try" = "x"; then :
10713 ax_pthread_try=no
10715 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10719 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10721 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10722 no | unknown) ;;
10723 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10724 esac
10726 fi # $ax_pthread_clang = yes
10728 if test "x$ax_pthread_ok" = "xno"; then
10729 for ax_pthread_try_flag in $ax_pthread_flags; do
10731 case $ax_pthread_try_flag in
10732 none)
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10734 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10737 -mt,pthread)
10738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10739 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10740 PTHREAD_CFLAGS="-mt"
10741 PTHREAD_LIBS="-lpthread"
10745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10746 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10747 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10750 pthread-config)
10751 # Extract the first word of "pthread-config", so it can be a program name with args.
10752 set dummy pthread-config; ac_word=$2
10753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10754 $as_echo_n "checking for $ac_word... " >&6; }
10755 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10756 $as_echo_n "(cached) " >&6
10757 else
10758 if test -n "$ax_pthread_config"; then
10759 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10760 else
10761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762 for as_dir in $PATH
10764 IFS=$as_save_IFS
10765 test -z "$as_dir" && as_dir=.
10766 for ac_exec_ext in '' $ac_executable_extensions; do
10767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10768 ac_cv_prog_ax_pthread_config="yes"
10769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770 break 2
10772 done
10773 done
10774 IFS=$as_save_IFS
10776 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10779 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10780 if test -n "$ax_pthread_config"; then
10781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10782 $as_echo "$ax_pthread_config" >&6; }
10783 else
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785 $as_echo "no" >&6; }
10789 if test "x$ax_pthread_config" = "xno"; then :
10790 continue
10792 PTHREAD_CFLAGS="`pthread-config --cflags`"
10793 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10798 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10799 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10801 esac
10803 ax_pthread_save_CFLAGS="$CFLAGS"
10804 ax_pthread_save_LIBS="$LIBS"
10805 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10806 LIBS="$PTHREAD_LIBS $LIBS"
10808 # Check for various functions. We must include pthread.h,
10809 # since some functions may be macros. (On the Sequent, we
10810 # need a special flag -Kthread to make this header compile.)
10811 # We check for pthread_join because it is in -lpthread on IRIX
10812 # while pthread_create is in libc. We check for pthread_attr_init
10813 # due to DEC craziness with -lpthreads. We check for
10814 # pthread_cleanup_push because it is one of the few pthread
10815 # functions on Solaris that doesn't have a non-functional libc stub.
10816 # We try pthread_create on general principles.
10818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10819 /* end confdefs.h. */
10820 #include <pthread.h>
10821 # if $ax_pthread_check_cond
10822 # error "$ax_pthread_check_macro must be defined"
10823 # endif
10824 static void routine(void *a) { a = 0; }
10825 static void *start_routine(void *a) { return a; }
10827 main ()
10829 pthread_t th; pthread_attr_t attr;
10830 pthread_create(&th, 0, start_routine, 0);
10831 pthread_join(th, 0);
10832 pthread_attr_init(&attr);
10833 pthread_cleanup_push(routine, 0);
10834 pthread_cleanup_pop(0) /* ; */
10836 return 0;
10838 _ACEOF
10839 if ac_fn_c_try_link "$LINENO"; then :
10840 ax_pthread_ok=yes
10842 rm -f core conftest.err conftest.$ac_objext \
10843 conftest$ac_exeext conftest.$ac_ext
10845 CFLAGS="$ax_pthread_save_CFLAGS"
10846 LIBS="$ax_pthread_save_LIBS"
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10849 $as_echo "$ax_pthread_ok" >&6; }
10850 if test "x$ax_pthread_ok" = "xyes"; then :
10851 break
10854 PTHREAD_LIBS=""
10855 PTHREAD_CFLAGS=""
10856 done
10859 # Various other checks:
10860 if test "x$ax_pthread_ok" = "xyes"; then
10861 ax_pthread_save_CFLAGS="$CFLAGS"
10862 ax_pthread_save_LIBS="$LIBS"
10863 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10864 LIBS="$PTHREAD_LIBS $LIBS"
10866 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10868 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10869 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10870 $as_echo_n "(cached) " >&6
10871 else
10872 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10873 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10875 /* end confdefs.h. */
10876 #include <pthread.h>
10878 main ()
10880 int attr = $ax_pthread_attr; return attr /* ; */
10882 return 0;
10884 _ACEOF
10885 if ac_fn_c_try_link "$LINENO"; then :
10886 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10888 rm -f core conftest.err conftest.$ac_objext \
10889 conftest$ac_exeext conftest.$ac_ext
10890 done
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10894 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10895 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10896 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10897 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
10899 cat >>confdefs.h <<_ACEOF
10900 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10901 _ACEOF
10903 ax_pthread_joinable_attr_defined=yes
10907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10908 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
10909 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10910 $as_echo_n "(cached) " >&6
10911 else
10912 ax_cv_PTHREAD_SPECIAL_FLAGS=no
10913 case $host_os in
10914 solaris*)
10915 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10917 esac
10920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10921 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10922 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10923 test "x$ax_pthread_special_flags_added" != "xyes"; then :
10924 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10925 ax_pthread_special_flags_added=yes
10928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10929 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10930 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10931 $as_echo_n "(cached) " >&6
10932 else
10933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10934 /* end confdefs.h. */
10935 #include <pthread.h>
10937 main ()
10939 int i = PTHREAD_PRIO_INHERIT;
10941 return 0;
10943 _ACEOF
10944 if ac_fn_c_try_link "$LINENO"; then :
10945 ax_cv_PTHREAD_PRIO_INHERIT=yes
10946 else
10947 ax_cv_PTHREAD_PRIO_INHERIT=no
10949 rm -f core conftest.err conftest.$ac_objext \
10950 conftest$ac_exeext conftest.$ac_ext
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10954 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10955 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10956 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
10958 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10960 ax_pthread_prio_inherit_defined=yes
10964 CFLAGS="$ax_pthread_save_CFLAGS"
10965 LIBS="$ax_pthread_save_LIBS"
10967 # More AIX lossage: compile with *_r variant
10968 if test "x$GCC" != "xyes"; then
10969 case $host_os in
10970 aix*)
10971 case "x/$CC" in #(
10972 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10973 #handle absolute path differently from PATH based program lookup
10974 case "x$CC" in #(
10975 x/*) :
10976 if as_fn_executable_p ${CC}_r; then :
10977 PTHREAD_CC="${CC}_r"
10978 fi ;; #(
10979 *) :
10980 for ac_prog in ${CC}_r
10982 # Extract the first word of "$ac_prog", so it can be a program name with args.
10983 set dummy $ac_prog; ac_word=$2
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10985 $as_echo_n "checking for $ac_word... " >&6; }
10986 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10987 $as_echo_n "(cached) " >&6
10988 else
10989 if test -n "$PTHREAD_CC"; then
10990 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10991 else
10992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10993 for as_dir in $PATH
10995 IFS=$as_save_IFS
10996 test -z "$as_dir" && as_dir=.
10997 for ac_exec_ext in '' $ac_executable_extensions; do
10998 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10999 ac_cv_prog_PTHREAD_CC="$ac_prog"
11000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11001 break 2
11003 done
11004 done
11005 IFS=$as_save_IFS
11009 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11010 if test -n "$PTHREAD_CC"; then
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11012 $as_echo "$PTHREAD_CC" >&6; }
11013 else
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11015 $as_echo "no" >&6; }
11019 test -n "$PTHREAD_CC" && break
11020 done
11021 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11023 esac ;; #(
11024 *) :
11026 esac
11028 esac
11032 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11038 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11039 if test "x$ax_pthread_ok" = "xyes"; then
11041 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11044 else
11045 ax_pthread_ok=no
11048 ac_ext=c
11049 ac_cpp='$CPP $CPPFLAGS'
11050 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11051 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11052 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11054 # set thread flags
11056 # Some platforms use these, so just define them. They can't hurt if they
11057 # are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
11058 # enables 5-arg getpwuid_r, among other things.
11059 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
11061 # Check for *_r functions
11062 _CFLAGS="$CFLAGS"
11063 _LIBS="$LIBS"
11064 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11065 LIBS="$LIBS $PTHREAD_LIBS"
11067 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11068 if test "x$ac_cv_header_pthread_h" = xyes; then :
11070 else
11071 as_fn_error $? "
11072 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11077 for ac_func in strerror_r getpwuid_r gethostbyname_r
11078 do :
11079 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11080 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11081 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11082 cat >>confdefs.h <<_ACEOF
11083 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11084 _ACEOF
11087 done
11090 # Do test here with the proper thread flags
11091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11092 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11093 if ${pgac_cv_func_strerror_r_int+:} false; then :
11094 $as_echo_n "(cached) " >&6
11095 else
11096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11097 /* end confdefs.h. */
11098 #include <string.h>
11100 main ()
11102 char buf[100];
11103 switch (strerror_r(1, buf, sizeof(buf)))
11104 { case 0: break; default: break; }
11107 return 0;
11109 _ACEOF
11110 if ac_fn_c_try_compile "$LINENO"; then :
11111 pgac_cv_func_strerror_r_int=yes
11112 else
11113 pgac_cv_func_strerror_r_int=no
11115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11118 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11119 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11121 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11126 CFLAGS="$_CFLAGS"
11127 LIBS="$_LIBS"
11130 else
11131 # else
11132 # do not use values from template file
11133 PTHREAD_CFLAGS=
11134 PTHREAD_LIBS=
11136 fi # fi
11143 ## Libraries
11145 ## Most libraries are included only if they demonstrably provide a function
11146 ## we need, but libm is an exception: always include it, because there are
11147 ## too many compilers that play cute optimization games that will break
11148 ## probes for standard functions such as pow().
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11152 $as_echo_n "checking for main in -lm... " >&6; }
11153 if ${ac_cv_lib_m_main+:} false; then :
11154 $as_echo_n "(cached) " >&6
11155 else
11156 ac_check_lib_save_LIBS=$LIBS
11157 LIBS="-lm $LIBS"
11158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11159 /* end confdefs.h. */
11163 main ()
11165 return main ();
11167 return 0;
11169 _ACEOF
11170 if ac_fn_c_try_link "$LINENO"; then :
11171 ac_cv_lib_m_main=yes
11172 else
11173 ac_cv_lib_m_main=no
11175 rm -f core conftest.err conftest.$ac_objext \
11176 conftest$ac_exeext conftest.$ac_ext
11177 LIBS=$ac_check_lib_save_LIBS
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11180 $as_echo "$ac_cv_lib_m_main" >&6; }
11181 if test "x$ac_cv_lib_m_main" = xyes; then :
11182 cat >>confdefs.h <<_ACEOF
11183 #define HAVE_LIBM 1
11184 _ACEOF
11186 LIBS="-lm $LIBS"
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11191 $as_echo_n "checking for library containing setproctitle... " >&6; }
11192 if ${ac_cv_search_setproctitle+:} false; then :
11193 $as_echo_n "(cached) " >&6
11194 else
11195 ac_func_search_save_LIBS=$LIBS
11196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11197 /* end confdefs.h. */
11199 /* Override any GCC internal prototype to avoid an error.
11200 Use char because int might match the return type of a GCC
11201 builtin and then its argument prototype would still apply. */
11202 #ifdef __cplusplus
11203 extern "C"
11204 #endif
11205 char setproctitle ();
11207 main ()
11209 return setproctitle ();
11211 return 0;
11213 _ACEOF
11214 for ac_lib in '' util; do
11215 if test -z "$ac_lib"; then
11216 ac_res="none required"
11217 else
11218 ac_res=-l$ac_lib
11219 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11221 if ac_fn_c_try_link "$LINENO"; then :
11222 ac_cv_search_setproctitle=$ac_res
11224 rm -f core conftest.err conftest.$ac_objext \
11225 conftest$ac_exeext
11226 if ${ac_cv_search_setproctitle+:} false; then :
11227 break
11229 done
11230 if ${ac_cv_search_setproctitle+:} false; then :
11232 else
11233 ac_cv_search_setproctitle=no
11235 rm conftest.$ac_ext
11236 LIBS=$ac_func_search_save_LIBS
11238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11239 $as_echo "$ac_cv_search_setproctitle" >&6; }
11240 ac_res=$ac_cv_search_setproctitle
11241 if test "$ac_res" != no; then :
11242 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11247 $as_echo_n "checking for library containing dlopen... " >&6; }
11248 if ${ac_cv_search_dlopen+:} false; then :
11249 $as_echo_n "(cached) " >&6
11250 else
11251 ac_func_search_save_LIBS=$LIBS
11252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11253 /* end confdefs.h. */
11255 /* Override any GCC internal prototype to avoid an error.
11256 Use char because int might match the return type of a GCC
11257 builtin and then its argument prototype would still apply. */
11258 #ifdef __cplusplus
11259 extern "C"
11260 #endif
11261 char dlopen ();
11263 main ()
11265 return dlopen ();
11267 return 0;
11269 _ACEOF
11270 for ac_lib in '' dl; do
11271 if test -z "$ac_lib"; then
11272 ac_res="none required"
11273 else
11274 ac_res=-l$ac_lib
11275 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11277 if ac_fn_c_try_link "$LINENO"; then :
11278 ac_cv_search_dlopen=$ac_res
11280 rm -f core conftest.err conftest.$ac_objext \
11281 conftest$ac_exeext
11282 if ${ac_cv_search_dlopen+:} false; then :
11283 break
11285 done
11286 if ${ac_cv_search_dlopen+:} false; then :
11288 else
11289 ac_cv_search_dlopen=no
11291 rm conftest.$ac_ext
11292 LIBS=$ac_func_search_save_LIBS
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11295 $as_echo "$ac_cv_search_dlopen" >&6; }
11296 ac_res=$ac_cv_search_dlopen
11297 if test "$ac_res" != no; then :
11298 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11303 $as_echo_n "checking for library containing socket... " >&6; }
11304 if ${ac_cv_search_socket+:} false; then :
11305 $as_echo_n "(cached) " >&6
11306 else
11307 ac_func_search_save_LIBS=$LIBS
11308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11309 /* end confdefs.h. */
11311 /* Override any GCC internal prototype to avoid an error.
11312 Use char because int might match the return type of a GCC
11313 builtin and then its argument prototype would still apply. */
11314 #ifdef __cplusplus
11315 extern "C"
11316 #endif
11317 char socket ();
11319 main ()
11321 return socket ();
11323 return 0;
11325 _ACEOF
11326 for ac_lib in '' socket ws2_32; do
11327 if test -z "$ac_lib"; then
11328 ac_res="none required"
11329 else
11330 ac_res=-l$ac_lib
11331 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11333 if ac_fn_c_try_link "$LINENO"; then :
11334 ac_cv_search_socket=$ac_res
11336 rm -f core conftest.err conftest.$ac_objext \
11337 conftest$ac_exeext
11338 if ${ac_cv_search_socket+:} false; then :
11339 break
11341 done
11342 if ${ac_cv_search_socket+:} false; then :
11344 else
11345 ac_cv_search_socket=no
11347 rm conftest.$ac_ext
11348 LIBS=$ac_func_search_save_LIBS
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11351 $as_echo "$ac_cv_search_socket" >&6; }
11352 ac_res=$ac_cv_search_socket
11353 if test "$ac_res" != no; then :
11354 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11359 $as_echo_n "checking for library containing shl_load... " >&6; }
11360 if ${ac_cv_search_shl_load+:} false; then :
11361 $as_echo_n "(cached) " >&6
11362 else
11363 ac_func_search_save_LIBS=$LIBS
11364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11365 /* end confdefs.h. */
11367 /* Override any GCC internal prototype to avoid an error.
11368 Use char because int might match the return type of a GCC
11369 builtin and then its argument prototype would still apply. */
11370 #ifdef __cplusplus
11371 extern "C"
11372 #endif
11373 char shl_load ();
11375 main ()
11377 return shl_load ();
11379 return 0;
11381 _ACEOF
11382 for ac_lib in '' dld; do
11383 if test -z "$ac_lib"; then
11384 ac_res="none required"
11385 else
11386 ac_res=-l$ac_lib
11387 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11389 if ac_fn_c_try_link "$LINENO"; then :
11390 ac_cv_search_shl_load=$ac_res
11392 rm -f core conftest.err conftest.$ac_objext \
11393 conftest$ac_exeext
11394 if ${ac_cv_search_shl_load+:} false; then :
11395 break
11397 done
11398 if ${ac_cv_search_shl_load+:} false; then :
11400 else
11401 ac_cv_search_shl_load=no
11403 rm conftest.$ac_ext
11404 LIBS=$ac_func_search_save_LIBS
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11407 $as_echo "$ac_cv_search_shl_load" >&6; }
11408 ac_res=$ac_cv_search_shl_load
11409 if test "$ac_res" != no; then :
11410 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11415 $as_echo_n "checking for library containing getopt_long... " >&6; }
11416 if ${ac_cv_search_getopt_long+:} false; then :
11417 $as_echo_n "(cached) " >&6
11418 else
11419 ac_func_search_save_LIBS=$LIBS
11420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11421 /* end confdefs.h. */
11423 /* Override any GCC internal prototype to avoid an error.
11424 Use char because int might match the return type of a GCC
11425 builtin and then its argument prototype would still apply. */
11426 #ifdef __cplusplus
11427 extern "C"
11428 #endif
11429 char getopt_long ();
11431 main ()
11433 return getopt_long ();
11435 return 0;
11437 _ACEOF
11438 for ac_lib in '' getopt gnugetopt; do
11439 if test -z "$ac_lib"; then
11440 ac_res="none required"
11441 else
11442 ac_res=-l$ac_lib
11443 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11445 if ac_fn_c_try_link "$LINENO"; then :
11446 ac_cv_search_getopt_long=$ac_res
11448 rm -f core conftest.err conftest.$ac_objext \
11449 conftest$ac_exeext
11450 if ${ac_cv_search_getopt_long+:} false; then :
11451 break
11453 done
11454 if ${ac_cv_search_getopt_long+:} false; then :
11456 else
11457 ac_cv_search_getopt_long=no
11459 rm conftest.$ac_ext
11460 LIBS=$ac_func_search_save_LIBS
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11463 $as_echo "$ac_cv_search_getopt_long" >&6; }
11464 ac_res=$ac_cv_search_getopt_long
11465 if test "$ac_res" != no; then :
11466 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11471 $as_echo_n "checking for library containing shm_open... " >&6; }
11472 if ${ac_cv_search_shm_open+:} false; then :
11473 $as_echo_n "(cached) " >&6
11474 else
11475 ac_func_search_save_LIBS=$LIBS
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477 /* end confdefs.h. */
11479 /* Override any GCC internal prototype to avoid an error.
11480 Use char because int might match the return type of a GCC
11481 builtin and then its argument prototype would still apply. */
11482 #ifdef __cplusplus
11483 extern "C"
11484 #endif
11485 char shm_open ();
11487 main ()
11489 return shm_open ();
11491 return 0;
11493 _ACEOF
11494 for ac_lib in '' rt; do
11495 if test -z "$ac_lib"; then
11496 ac_res="none required"
11497 else
11498 ac_res=-l$ac_lib
11499 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11501 if ac_fn_c_try_link "$LINENO"; then :
11502 ac_cv_search_shm_open=$ac_res
11504 rm -f core conftest.err conftest.$ac_objext \
11505 conftest$ac_exeext
11506 if ${ac_cv_search_shm_open+:} false; then :
11507 break
11509 done
11510 if ${ac_cv_search_shm_open+:} false; then :
11512 else
11513 ac_cv_search_shm_open=no
11515 rm conftest.$ac_ext
11516 LIBS=$ac_func_search_save_LIBS
11518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11519 $as_echo "$ac_cv_search_shm_open" >&6; }
11520 ac_res=$ac_cv_search_shm_open
11521 if test "$ac_res" != no; then :
11522 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11527 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11528 if ${ac_cv_search_shm_unlink+:} false; then :
11529 $as_echo_n "(cached) " >&6
11530 else
11531 ac_func_search_save_LIBS=$LIBS
11532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11533 /* end confdefs.h. */
11535 /* Override any GCC internal prototype to avoid an error.
11536 Use char because int might match the return type of a GCC
11537 builtin and then its argument prototype would still apply. */
11538 #ifdef __cplusplus
11539 extern "C"
11540 #endif
11541 char shm_unlink ();
11543 main ()
11545 return shm_unlink ();
11547 return 0;
11549 _ACEOF
11550 for ac_lib in '' rt; do
11551 if test -z "$ac_lib"; then
11552 ac_res="none required"
11553 else
11554 ac_res=-l$ac_lib
11555 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11557 if ac_fn_c_try_link "$LINENO"; then :
11558 ac_cv_search_shm_unlink=$ac_res
11560 rm -f core conftest.err conftest.$ac_objext \
11561 conftest$ac_exeext
11562 if ${ac_cv_search_shm_unlink+:} false; then :
11563 break
11565 done
11566 if ${ac_cv_search_shm_unlink+:} false; then :
11568 else
11569 ac_cv_search_shm_unlink=no
11571 rm conftest.$ac_ext
11572 LIBS=$ac_func_search_save_LIBS
11574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11575 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11576 ac_res=$ac_cv_search_shm_unlink
11577 if test "$ac_res" != no; then :
11578 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11583 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11584 if ${ac_cv_search_clock_gettime+:} false; then :
11585 $as_echo_n "(cached) " >&6
11586 else
11587 ac_func_search_save_LIBS=$LIBS
11588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11589 /* end confdefs.h. */
11591 /* Override any GCC internal prototype to avoid an error.
11592 Use char because int might match the return type of a GCC
11593 builtin and then its argument prototype would still apply. */
11594 #ifdef __cplusplus
11595 extern "C"
11596 #endif
11597 char clock_gettime ();
11599 main ()
11601 return clock_gettime ();
11603 return 0;
11605 _ACEOF
11606 for ac_lib in '' rt posix4; do
11607 if test -z "$ac_lib"; then
11608 ac_res="none required"
11609 else
11610 ac_res=-l$ac_lib
11611 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11613 if ac_fn_c_try_link "$LINENO"; then :
11614 ac_cv_search_clock_gettime=$ac_res
11616 rm -f core conftest.err conftest.$ac_objext \
11617 conftest$ac_exeext
11618 if ${ac_cv_search_clock_gettime+:} false; then :
11619 break
11621 done
11622 if ${ac_cv_search_clock_gettime+:} false; then :
11624 else
11625 ac_cv_search_clock_gettime=no
11627 rm conftest.$ac_ext
11628 LIBS=$ac_func_search_save_LIBS
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11631 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11632 ac_res=$ac_cv_search_clock_gettime
11633 if test "$ac_res" != no; then :
11634 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11638 # Solaris:
11639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11640 $as_echo_n "checking for library containing fdatasync... " >&6; }
11641 if ${ac_cv_search_fdatasync+:} false; then :
11642 $as_echo_n "(cached) " >&6
11643 else
11644 ac_func_search_save_LIBS=$LIBS
11645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11646 /* end confdefs.h. */
11648 /* Override any GCC internal prototype to avoid an error.
11649 Use char because int might match the return type of a GCC
11650 builtin and then its argument prototype would still apply. */
11651 #ifdef __cplusplus
11652 extern "C"
11653 #endif
11654 char fdatasync ();
11656 main ()
11658 return fdatasync ();
11660 return 0;
11662 _ACEOF
11663 for ac_lib in '' rt posix4; do
11664 if test -z "$ac_lib"; then
11665 ac_res="none required"
11666 else
11667 ac_res=-l$ac_lib
11668 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11670 if ac_fn_c_try_link "$LINENO"; then :
11671 ac_cv_search_fdatasync=$ac_res
11673 rm -f core conftest.err conftest.$ac_objext \
11674 conftest$ac_exeext
11675 if ${ac_cv_search_fdatasync+:} false; then :
11676 break
11678 done
11679 if ${ac_cv_search_fdatasync+:} false; then :
11681 else
11682 ac_cv_search_fdatasync=no
11684 rm conftest.$ac_ext
11685 LIBS=$ac_func_search_save_LIBS
11687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11688 $as_echo "$ac_cv_search_fdatasync" >&6; }
11689 ac_res=$ac_cv_search_fdatasync
11690 if test "$ac_res" != no; then :
11691 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11695 # Required for thread_test.c on Solaris
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11697 $as_echo_n "checking for library containing sched_yield... " >&6; }
11698 if ${ac_cv_search_sched_yield+:} false; then :
11699 $as_echo_n "(cached) " >&6
11700 else
11701 ac_func_search_save_LIBS=$LIBS
11702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11703 /* end confdefs.h. */
11705 /* Override any GCC internal prototype to avoid an error.
11706 Use char because int might match the return type of a GCC
11707 builtin and then its argument prototype would still apply. */
11708 #ifdef __cplusplus
11709 extern "C"
11710 #endif
11711 char sched_yield ();
11713 main ()
11715 return sched_yield ();
11717 return 0;
11719 _ACEOF
11720 for ac_lib in '' rt; do
11721 if test -z "$ac_lib"; then
11722 ac_res="none required"
11723 else
11724 ac_res=-l$ac_lib
11725 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11727 if ac_fn_c_try_link "$LINENO"; then :
11728 ac_cv_search_sched_yield=$ac_res
11730 rm -f core conftest.err conftest.$ac_objext \
11731 conftest$ac_exeext
11732 if ${ac_cv_search_sched_yield+:} false; then :
11733 break
11735 done
11736 if ${ac_cv_search_sched_yield+:} false; then :
11738 else
11739 ac_cv_search_sched_yield=no
11741 rm conftest.$ac_ext
11742 LIBS=$ac_func_search_save_LIBS
11744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11745 $as_echo "$ac_cv_search_sched_yield" >&6; }
11746 ac_res=$ac_cv_search_sched_yield
11747 if test "$ac_res" != no; then :
11748 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11752 # Required for thread_test.c on Solaris 2.5:
11753 # Other ports use it too (HP-UX) so test unconditionally
11754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11755 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11756 if ${ac_cv_search_gethostbyname_r+:} false; then :
11757 $as_echo_n "(cached) " >&6
11758 else
11759 ac_func_search_save_LIBS=$LIBS
11760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11761 /* end confdefs.h. */
11763 /* Override any GCC internal prototype to avoid an error.
11764 Use char because int might match the return type of a GCC
11765 builtin and then its argument prototype would still apply. */
11766 #ifdef __cplusplus
11767 extern "C"
11768 #endif
11769 char gethostbyname_r ();
11771 main ()
11773 return gethostbyname_r ();
11775 return 0;
11777 _ACEOF
11778 for ac_lib in '' nsl; do
11779 if test -z "$ac_lib"; then
11780 ac_res="none required"
11781 else
11782 ac_res=-l$ac_lib
11783 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11785 if ac_fn_c_try_link "$LINENO"; then :
11786 ac_cv_search_gethostbyname_r=$ac_res
11788 rm -f core conftest.err conftest.$ac_objext \
11789 conftest$ac_exeext
11790 if ${ac_cv_search_gethostbyname_r+:} false; then :
11791 break
11793 done
11794 if ${ac_cv_search_gethostbyname_r+:} false; then :
11796 else
11797 ac_cv_search_gethostbyname_r=no
11799 rm conftest.$ac_ext
11800 LIBS=$ac_func_search_save_LIBS
11802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11803 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11804 ac_res=$ac_cv_search_gethostbyname_r
11805 if test "$ac_res" != no; then :
11806 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11810 # Cygwin:
11811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11812 $as_echo_n "checking for library containing shmget... " >&6; }
11813 if ${ac_cv_search_shmget+:} false; then :
11814 $as_echo_n "(cached) " >&6
11815 else
11816 ac_func_search_save_LIBS=$LIBS
11817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11818 /* end confdefs.h. */
11820 /* Override any GCC internal prototype to avoid an error.
11821 Use char because int might match the return type of a GCC
11822 builtin and then its argument prototype would still apply. */
11823 #ifdef __cplusplus
11824 extern "C"
11825 #endif
11826 char shmget ();
11828 main ()
11830 return shmget ();
11832 return 0;
11834 _ACEOF
11835 for ac_lib in '' cygipc; do
11836 if test -z "$ac_lib"; then
11837 ac_res="none required"
11838 else
11839 ac_res=-l$ac_lib
11840 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11842 if ac_fn_c_try_link "$LINENO"; then :
11843 ac_cv_search_shmget=$ac_res
11845 rm -f core conftest.err conftest.$ac_objext \
11846 conftest$ac_exeext
11847 if ${ac_cv_search_shmget+:} false; then :
11848 break
11850 done
11851 if ${ac_cv_search_shmget+:} false; then :
11853 else
11854 ac_cv_search_shmget=no
11856 rm conftest.$ac_ext
11857 LIBS=$ac_func_search_save_LIBS
11859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11860 $as_echo "$ac_cv_search_shmget" >&6; }
11861 ac_res=$ac_cv_search_shmget
11862 if test "$ac_res" != no; then :
11863 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11867 # *BSD:
11868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
11869 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
11870 if ${ac_cv_search_backtrace_symbols+:} false; then :
11871 $as_echo_n "(cached) " >&6
11872 else
11873 ac_func_search_save_LIBS=$LIBS
11874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11875 /* end confdefs.h. */
11877 /* Override any GCC internal prototype to avoid an error.
11878 Use char because int might match the return type of a GCC
11879 builtin and then its argument prototype would still apply. */
11880 #ifdef __cplusplus
11881 extern "C"
11882 #endif
11883 char backtrace_symbols ();
11885 main ()
11887 return backtrace_symbols ();
11889 return 0;
11891 _ACEOF
11892 for ac_lib in '' execinfo; do
11893 if test -z "$ac_lib"; then
11894 ac_res="none required"
11895 else
11896 ac_res=-l$ac_lib
11897 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11899 if ac_fn_c_try_link "$LINENO"; then :
11900 ac_cv_search_backtrace_symbols=$ac_res
11902 rm -f core conftest.err conftest.$ac_objext \
11903 conftest$ac_exeext
11904 if ${ac_cv_search_backtrace_symbols+:} false; then :
11905 break
11907 done
11908 if ${ac_cv_search_backtrace_symbols+:} false; then :
11910 else
11911 ac_cv_search_backtrace_symbols=no
11913 rm conftest.$ac_ext
11914 LIBS=$ac_func_search_save_LIBS
11916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
11917 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
11918 ac_res=$ac_cv_search_backtrace_symbols
11919 if test "$ac_res" != no; then :
11920 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11925 if test "$with_readline" = yes; then
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11929 $as_echo_n "checking for library containing readline... " >&6; }
11930 if ${pgac_cv_check_readline+:} false; then :
11931 $as_echo_n "(cached) " >&6
11932 else
11933 pgac_cv_check_readline=no
11934 pgac_save_LIBS=$LIBS
11935 if test x"$with_libedit_preferred" != x"yes"
11936 then READLINE_ORDER="-lreadline -ledit"
11937 else READLINE_ORDER="-ledit -lreadline"
11939 for pgac_rllib in $READLINE_ORDER ; do
11940 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11941 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11943 /* end confdefs.h. */
11945 /* Override any GCC internal prototype to avoid an error.
11946 Use char because int might match the return type of a GCC
11947 builtin and then its argument prototype would still apply. */
11948 #ifdef __cplusplus
11949 extern "C"
11950 #endif
11951 char readline ();
11953 main ()
11955 return readline ();
11957 return 0;
11959 _ACEOF
11960 if ac_fn_c_try_link "$LINENO"; then :
11962 # Older NetBSD and OpenBSD have a broken linker that does not
11963 # recognize dependent libraries; assume curses is needed if we didn't
11964 # find any dependency.
11965 case $host_os in
11966 netbsd* | openbsd*)
11967 if test x"$pgac_lib" = x"" ; then
11968 pgac_lib=" -lcurses"
11969 fi ;;
11970 esac
11972 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11973 break
11976 rm -f core conftest.err conftest.$ac_objext \
11977 conftest$ac_exeext conftest.$ac_ext
11978 done
11979 if test "$pgac_cv_check_readline" != no ; then
11980 break
11982 done
11983 LIBS=$pgac_save_LIBS
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11987 $as_echo "$pgac_cv_check_readline" >&6; }
11988 if test "$pgac_cv_check_readline" != no ; then
11989 LIBS="$pgac_cv_check_readline $LIBS"
11991 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11996 if test x"$pgac_cv_check_readline" = x"no"; then
11997 as_fn_error $? "readline library not found
11998 If you have readline already installed, see config.log for details on the
11999 failure. It is possible the compiler isn't looking in the proper directory.
12000 Use --without-readline to disable readline support." "$LINENO" 5
12004 if test "$with_zlib" = yes; then
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12006 $as_echo_n "checking for inflate in -lz... " >&6; }
12007 if ${ac_cv_lib_z_inflate+:} false; then :
12008 $as_echo_n "(cached) " >&6
12009 else
12010 ac_check_lib_save_LIBS=$LIBS
12011 LIBS="-lz $LIBS"
12012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12013 /* end confdefs.h. */
12015 /* Override any GCC internal prototype to avoid an error.
12016 Use char because int might match the return type of a GCC
12017 builtin and then its argument prototype would still apply. */
12018 #ifdef __cplusplus
12019 extern "C"
12020 #endif
12021 char inflate ();
12023 main ()
12025 return inflate ();
12027 return 0;
12029 _ACEOF
12030 if ac_fn_c_try_link "$LINENO"; then :
12031 ac_cv_lib_z_inflate=yes
12032 else
12033 ac_cv_lib_z_inflate=no
12035 rm -f core conftest.err conftest.$ac_objext \
12036 conftest$ac_exeext conftest.$ac_ext
12037 LIBS=$ac_check_lib_save_LIBS
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12040 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12041 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12042 cat >>confdefs.h <<_ACEOF
12043 #define HAVE_LIBZ 1
12044 _ACEOF
12046 LIBS="-lz $LIBS"
12048 else
12049 as_fn_error $? "zlib library not found
12050 If you have zlib already installed, see config.log for details on the
12051 failure. It is possible the compiler isn't looking in the proper directory.
12052 Use --without-zlib to disable zlib support." "$LINENO" 5
12057 if test "$enable_spinlocks" = yes; then
12059 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12061 else
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12063 *** Not using spinlocks will cause poor performance." >&5
12064 $as_echo "$as_me: WARNING:
12065 *** Not using spinlocks will cause poor performance." >&2;}
12068 if test "$enable_atomics" = yes; then
12070 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12072 else
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12074 *** Not using atomic operations will cause poor performance." >&5
12075 $as_echo "$as_me: WARNING:
12076 *** Not using atomic operations will cause poor performance." >&2;}
12079 if test "$with_gssapi" = yes ; then
12080 if test "$PORTNAME" != "win32"; then
12081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12082 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12083 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12084 $as_echo_n "(cached) " >&6
12085 else
12086 ac_func_search_save_LIBS=$LIBS
12087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12088 /* end confdefs.h. */
12090 /* Override any GCC internal prototype to avoid an error.
12091 Use char because int might match the return type of a GCC
12092 builtin and then its argument prototype would still apply. */
12093 #ifdef __cplusplus
12094 extern "C"
12095 #endif
12096 char gss_init_sec_context ();
12098 main ()
12100 return gss_init_sec_context ();
12102 return 0;
12104 _ACEOF
12105 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12106 if test -z "$ac_lib"; then
12107 ac_res="none required"
12108 else
12109 ac_res=-l$ac_lib
12110 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12112 if ac_fn_c_try_link "$LINENO"; then :
12113 ac_cv_search_gss_init_sec_context=$ac_res
12115 rm -f core conftest.err conftest.$ac_objext \
12116 conftest$ac_exeext
12117 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12118 break
12120 done
12121 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12123 else
12124 ac_cv_search_gss_init_sec_context=no
12126 rm conftest.$ac_ext
12127 LIBS=$ac_func_search_save_LIBS
12129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12130 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12131 ac_res=$ac_cv_search_gss_init_sec_context
12132 if test "$ac_res" != no; then :
12133 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12135 else
12136 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12139 else
12140 LIBS="$LIBS -lgssapi32"
12145 # SSL Library
12147 # There is currently only one supported SSL/TLS library: OpenSSL.
12152 # Check whether --with-ssl was given.
12153 if test "${with_ssl+set}" = set; then :
12154 withval=$with_ssl;
12155 case $withval in
12156 yes)
12157 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12160 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12165 esac
12170 if test x"$with_ssl" = x"" ; then
12171 with_ssl=no
12176 # Check whether --with-openssl was given.
12177 if test "${with_openssl+set}" = set; then :
12178 withval=$with_openssl;
12179 case $withval in
12180 yes)
12187 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12189 esac
12191 else
12192 with_openssl=no
12197 if test "$with_openssl" = yes ; then
12198 with_ssl=openssl
12201 if test "$with_ssl" = openssl ; then
12202 # Minimum required OpenSSL version is 1.0.1
12204 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12206 if test "$PORTNAME" != "win32"; then
12207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12208 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12209 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12210 $as_echo_n "(cached) " >&6
12211 else
12212 ac_check_lib_save_LIBS=$LIBS
12213 LIBS="-lcrypto $LIBS"
12214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12215 /* end confdefs.h. */
12217 /* Override any GCC internal prototype to avoid an error.
12218 Use char because int might match the return type of a GCC
12219 builtin and then its argument prototype would still apply. */
12220 #ifdef __cplusplus
12221 extern "C"
12222 #endif
12223 char CRYPTO_new_ex_data ();
12225 main ()
12227 return CRYPTO_new_ex_data ();
12229 return 0;
12231 _ACEOF
12232 if ac_fn_c_try_link "$LINENO"; then :
12233 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12234 else
12235 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12237 rm -f core conftest.err conftest.$ac_objext \
12238 conftest$ac_exeext conftest.$ac_ext
12239 LIBS=$ac_check_lib_save_LIBS
12241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12242 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12243 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12244 cat >>confdefs.h <<_ACEOF
12245 #define HAVE_LIBCRYPTO 1
12246 _ACEOF
12248 LIBS="-lcrypto $LIBS"
12250 else
12251 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12255 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12256 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12257 $as_echo_n "(cached) " >&6
12258 else
12259 ac_check_lib_save_LIBS=$LIBS
12260 LIBS="-lssl $LIBS"
12261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12262 /* end confdefs.h. */
12264 /* Override any GCC internal prototype to avoid an error.
12265 Use char because int might match the return type of a GCC
12266 builtin and then its argument prototype would still apply. */
12267 #ifdef __cplusplus
12268 extern "C"
12269 #endif
12270 char SSL_new ();
12272 main ()
12274 return SSL_new ();
12276 return 0;
12278 _ACEOF
12279 if ac_fn_c_try_link "$LINENO"; then :
12280 ac_cv_lib_ssl_SSL_new=yes
12281 else
12282 ac_cv_lib_ssl_SSL_new=no
12284 rm -f core conftest.err conftest.$ac_objext \
12285 conftest$ac_exeext conftest.$ac_ext
12286 LIBS=$ac_check_lib_save_LIBS
12288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12289 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12290 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12291 cat >>confdefs.h <<_ACEOF
12292 #define HAVE_LIBSSL 1
12293 _ACEOF
12295 LIBS="-lssl $LIBS"
12297 else
12298 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12301 else
12302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12303 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12304 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12305 $as_echo_n "(cached) " >&6
12306 else
12307 ac_func_search_save_LIBS=$LIBS
12308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12309 /* end confdefs.h. */
12311 /* Override any GCC internal prototype to avoid an error.
12312 Use char because int might match the return type of a GCC
12313 builtin and then its argument prototype would still apply. */
12314 #ifdef __cplusplus
12315 extern "C"
12316 #endif
12317 char CRYPTO_new_ex_data ();
12319 main ()
12321 return CRYPTO_new_ex_data ();
12323 return 0;
12325 _ACEOF
12326 for ac_lib in '' eay32 crypto; do
12327 if test -z "$ac_lib"; then
12328 ac_res="none required"
12329 else
12330 ac_res=-l$ac_lib
12331 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12333 if ac_fn_c_try_link "$LINENO"; then :
12334 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12336 rm -f core conftest.err conftest.$ac_objext \
12337 conftest$ac_exeext
12338 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12339 break
12341 done
12342 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12344 else
12345 ac_cv_search_CRYPTO_new_ex_data=no
12347 rm conftest.$ac_ext
12348 LIBS=$ac_func_search_save_LIBS
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12351 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12352 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12353 if test "$ac_res" != no; then :
12354 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12356 else
12357 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12361 $as_echo_n "checking for library containing SSL_new... " >&6; }
12362 if ${ac_cv_search_SSL_new+:} false; then :
12363 $as_echo_n "(cached) " >&6
12364 else
12365 ac_func_search_save_LIBS=$LIBS
12366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12367 /* end confdefs.h. */
12369 /* Override any GCC internal prototype to avoid an error.
12370 Use char because int might match the return type of a GCC
12371 builtin and then its argument prototype would still apply. */
12372 #ifdef __cplusplus
12373 extern "C"
12374 #endif
12375 char SSL_new ();
12377 main ()
12379 return SSL_new ();
12381 return 0;
12383 _ACEOF
12384 for ac_lib in '' ssleay32 ssl; do
12385 if test -z "$ac_lib"; then
12386 ac_res="none required"
12387 else
12388 ac_res=-l$ac_lib
12389 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12391 if ac_fn_c_try_link "$LINENO"; then :
12392 ac_cv_search_SSL_new=$ac_res
12394 rm -f core conftest.err conftest.$ac_objext \
12395 conftest$ac_exeext
12396 if ${ac_cv_search_SSL_new+:} false; then :
12397 break
12399 done
12400 if ${ac_cv_search_SSL_new+:} false; then :
12402 else
12403 ac_cv_search_SSL_new=no
12405 rm conftest.$ac_ext
12406 LIBS=$ac_func_search_save_LIBS
12408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12409 $as_echo "$ac_cv_search_SSL_new" >&6; }
12410 ac_res=$ac_cv_search_SSL_new
12411 if test "$ac_res" != no; then :
12412 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12414 else
12415 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12419 # Function introduced in OpenSSL 1.0.2.
12420 for ac_func in X509_get_signature_nid
12421 do :
12422 ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
12423 if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
12424 cat >>confdefs.h <<_ACEOF
12425 #define HAVE_X509_GET_SIGNATURE_NID 1
12426 _ACEOF
12429 done
12431 # Functions introduced in OpenSSL 1.1.0. We used to check for
12432 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12433 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12434 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12435 # functions.
12436 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data
12437 do :
12438 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12439 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12440 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12441 cat >>confdefs.h <<_ACEOF
12442 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12443 _ACEOF
12446 done
12448 # OpenSSL versions before 1.1.0 required setting callback functions, for
12449 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12450 # function was removed.
12451 for ac_func in CRYPTO_lock
12452 do :
12453 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12454 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12455 cat >>confdefs.h <<_ACEOF
12456 #define HAVE_CRYPTO_LOCK 1
12457 _ACEOF
12460 done
12463 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12465 elif test "$with_ssl" != no ; then
12466 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12470 if test "$with_pam" = yes ; then
12471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12472 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12473 if ${ac_cv_lib_pam_pam_start+:} false; then :
12474 $as_echo_n "(cached) " >&6
12475 else
12476 ac_check_lib_save_LIBS=$LIBS
12477 LIBS="-lpam $LIBS"
12478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12479 /* end confdefs.h. */
12481 /* Override any GCC internal prototype to avoid an error.
12482 Use char because int might match the return type of a GCC
12483 builtin and then its argument prototype would still apply. */
12484 #ifdef __cplusplus
12485 extern "C"
12486 #endif
12487 char pam_start ();
12489 main ()
12491 return pam_start ();
12493 return 0;
12495 _ACEOF
12496 if ac_fn_c_try_link "$LINENO"; then :
12497 ac_cv_lib_pam_pam_start=yes
12498 else
12499 ac_cv_lib_pam_pam_start=no
12501 rm -f core conftest.err conftest.$ac_objext \
12502 conftest$ac_exeext conftest.$ac_ext
12503 LIBS=$ac_check_lib_save_LIBS
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12506 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12507 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12508 cat >>confdefs.h <<_ACEOF
12509 #define HAVE_LIBPAM 1
12510 _ACEOF
12512 LIBS="-lpam $LIBS"
12514 else
12515 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12520 if test "$with_libxml" = yes ; then
12521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12522 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12523 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12524 $as_echo_n "(cached) " >&6
12525 else
12526 ac_check_lib_save_LIBS=$LIBS
12527 LIBS="-lxml2 $LIBS"
12528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12529 /* end confdefs.h. */
12531 /* Override any GCC internal prototype to avoid an error.
12532 Use char because int might match the return type of a GCC
12533 builtin and then its argument prototype would still apply. */
12534 #ifdef __cplusplus
12535 extern "C"
12536 #endif
12537 char xmlSaveToBuffer ();
12539 main ()
12541 return xmlSaveToBuffer ();
12543 return 0;
12545 _ACEOF
12546 if ac_fn_c_try_link "$LINENO"; then :
12547 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12548 else
12549 ac_cv_lib_xml2_xmlSaveToBuffer=no
12551 rm -f core conftest.err conftest.$ac_objext \
12552 conftest$ac_exeext conftest.$ac_ext
12553 LIBS=$ac_check_lib_save_LIBS
12555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12556 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12557 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12558 cat >>confdefs.h <<_ACEOF
12559 #define HAVE_LIBXML2 1
12560 _ACEOF
12562 LIBS="-lxml2 $LIBS"
12564 else
12565 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12570 if test "$with_libxslt" = yes ; then
12571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12572 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12573 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12574 $as_echo_n "(cached) " >&6
12575 else
12576 ac_check_lib_save_LIBS=$LIBS
12577 LIBS="-lxslt $LIBS"
12578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12579 /* end confdefs.h. */
12581 /* Override any GCC internal prototype to avoid an error.
12582 Use char because int might match the return type of a GCC
12583 builtin and then its argument prototype would still apply. */
12584 #ifdef __cplusplus
12585 extern "C"
12586 #endif
12587 char xsltCleanupGlobals ();
12589 main ()
12591 return xsltCleanupGlobals ();
12593 return 0;
12595 _ACEOF
12596 if ac_fn_c_try_link "$LINENO"; then :
12597 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12598 else
12599 ac_cv_lib_xslt_xsltCleanupGlobals=no
12601 rm -f core conftest.err conftest.$ac_objext \
12602 conftest$ac_exeext conftest.$ac_ext
12603 LIBS=$ac_check_lib_save_LIBS
12605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12606 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12607 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12608 cat >>confdefs.h <<_ACEOF
12609 #define HAVE_LIBXSLT 1
12610 _ACEOF
12612 LIBS="-lxslt $LIBS"
12614 else
12615 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12620 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12621 if test "$with_ldap" = yes ; then
12622 _LIBS="$LIBS"
12623 if test "$PORTNAME" != "win32"; then
12624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12625 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12626 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12627 $as_echo_n "(cached) " >&6
12628 else
12629 ac_check_lib_save_LIBS=$LIBS
12630 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12632 /* end confdefs.h. */
12634 /* Override any GCC internal prototype to avoid an error.
12635 Use char because int might match the return type of a GCC
12636 builtin and then its argument prototype would still apply. */
12637 #ifdef __cplusplus
12638 extern "C"
12639 #endif
12640 char ldap_bind ();
12642 main ()
12644 return ldap_bind ();
12646 return 0;
12648 _ACEOF
12649 if ac_fn_c_try_link "$LINENO"; then :
12650 ac_cv_lib_ldap_ldap_bind=yes
12651 else
12652 ac_cv_lib_ldap_ldap_bind=no
12654 rm -f core conftest.err conftest.$ac_objext \
12655 conftest$ac_exeext conftest.$ac_ext
12656 LIBS=$ac_check_lib_save_LIBS
12658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12659 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12660 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12661 cat >>confdefs.h <<_ACEOF
12662 #define HAVE_LIBLDAP 1
12663 _ACEOF
12665 LIBS="-lldap $LIBS"
12667 else
12668 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12671 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12672 if test "$enable_thread_safety" = yes; then
12673 # on some platforms ldap_r fails to link without PTHREAD_LIBS
12674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12675 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12676 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12677 $as_echo_n "(cached) " >&6
12678 else
12679 ac_check_lib_save_LIBS=$LIBS
12680 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12682 /* end confdefs.h. */
12684 /* Override any GCC internal prototype to avoid an error.
12685 Use char because int might match the return type of a GCC
12686 builtin and then its argument prototype would still apply. */
12687 #ifdef __cplusplus
12688 extern "C"
12689 #endif
12690 char ldap_simple_bind ();
12692 main ()
12694 return ldap_simple_bind ();
12696 return 0;
12698 _ACEOF
12699 if ac_fn_c_try_link "$LINENO"; then :
12700 ac_cv_lib_ldap_r_ldap_simple_bind=yes
12701 else
12702 ac_cv_lib_ldap_r_ldap_simple_bind=no
12704 rm -f core conftest.err conftest.$ac_objext \
12705 conftest$ac_exeext conftest.$ac_ext
12706 LIBS=$ac_check_lib_save_LIBS
12708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12709 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12710 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12711 cat >>confdefs.h <<_ACEOF
12712 #define HAVE_LIBLDAP_R 1
12713 _ACEOF
12715 LIBS="-lldap_r $LIBS"
12717 else
12718 as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12721 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12722 else
12723 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12725 for ac_func in ldap_initialize
12726 do :
12727 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12728 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12729 cat >>confdefs.h <<_ACEOF
12730 #define HAVE_LDAP_INITIALIZE 1
12731 _ACEOF
12734 done
12736 else
12737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12738 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12739 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12740 $as_echo_n "(cached) " >&6
12741 else
12742 ac_check_lib_save_LIBS=$LIBS
12743 LIBS="-lwldap32 $LIBS"
12744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12745 /* end confdefs.h. */
12747 /* Override any GCC internal prototype to avoid an error.
12748 Use char because int might match the return type of a GCC
12749 builtin and then its argument prototype would still apply. */
12750 #ifdef __cplusplus
12751 extern "C"
12752 #endif
12753 char ldap_bind ();
12755 main ()
12757 return ldap_bind ();
12759 return 0;
12761 _ACEOF
12762 if ac_fn_c_try_link "$LINENO"; then :
12763 ac_cv_lib_wldap32_ldap_bind=yes
12764 else
12765 ac_cv_lib_wldap32_ldap_bind=no
12767 rm -f core conftest.err conftest.$ac_objext \
12768 conftest$ac_exeext conftest.$ac_ext
12769 LIBS=$ac_check_lib_save_LIBS
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12772 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12773 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12774 cat >>confdefs.h <<_ACEOF
12775 #define HAVE_LIBWLDAP32 1
12776 _ACEOF
12778 LIBS="-lwldap32 $LIBS"
12780 else
12781 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12784 LDAP_LIBS_FE="-lwldap32"
12785 LDAP_LIBS_BE="-lwldap32"
12787 LIBS="$_LIBS"
12792 # for contrib/sepgsql
12793 if test "$with_selinux" = yes; then
12794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12795 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12796 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12797 $as_echo_n "(cached) " >&6
12798 else
12799 ac_check_lib_save_LIBS=$LIBS
12800 LIBS="-lselinux $LIBS"
12801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12802 /* end confdefs.h. */
12804 /* Override any GCC internal prototype to avoid an error.
12805 Use char because int might match the return type of a GCC
12806 builtin and then its argument prototype would still apply. */
12807 #ifdef __cplusplus
12808 extern "C"
12809 #endif
12810 char security_compute_create_name ();
12812 main ()
12814 return security_compute_create_name ();
12816 return 0;
12818 _ACEOF
12819 if ac_fn_c_try_link "$LINENO"; then :
12820 ac_cv_lib_selinux_security_compute_create_name=yes
12821 else
12822 ac_cv_lib_selinux_security_compute_create_name=no
12824 rm -f core conftest.err conftest.$ac_objext \
12825 conftest$ac_exeext conftest.$ac_ext
12826 LIBS=$ac_check_lib_save_LIBS
12828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12829 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12830 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12831 cat >>confdefs.h <<_ACEOF
12832 #define HAVE_LIBSELINUX 1
12833 _ACEOF
12835 LIBS="-lselinux $LIBS"
12837 else
12838 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12843 # for contrib/uuid-ossp
12844 if test "$with_uuid" = bsd ; then
12845 # On BSD, the UUID functions are in libc
12846 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12847 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12848 UUID_LIBS=""
12849 else
12850 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12853 elif test "$with_uuid" = e2fs ; then
12854 # On macOS, the UUID functions are in libc
12855 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12856 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12857 UUID_LIBS=""
12858 else
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12860 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12861 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12862 $as_echo_n "(cached) " >&6
12863 else
12864 ac_check_lib_save_LIBS=$LIBS
12865 LIBS="-luuid $LIBS"
12866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12867 /* end confdefs.h. */
12869 /* Override any GCC internal prototype to avoid an error.
12870 Use char because int might match the return type of a GCC
12871 builtin and then its argument prototype would still apply. */
12872 #ifdef __cplusplus
12873 extern "C"
12874 #endif
12875 char uuid_generate ();
12877 main ()
12879 return uuid_generate ();
12881 return 0;
12883 _ACEOF
12884 if ac_fn_c_try_link "$LINENO"; then :
12885 ac_cv_lib_uuid_uuid_generate=yes
12886 else
12887 ac_cv_lib_uuid_uuid_generate=no
12889 rm -f core conftest.err conftest.$ac_objext \
12890 conftest$ac_exeext conftest.$ac_ext
12891 LIBS=$ac_check_lib_save_LIBS
12893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12894 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12895 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12896 UUID_LIBS="-luuid"
12897 else
12898 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12903 elif test "$with_uuid" = ossp ; then
12904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12905 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12906 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12907 $as_echo_n "(cached) " >&6
12908 else
12909 ac_check_lib_save_LIBS=$LIBS
12910 LIBS="-lossp-uuid $LIBS"
12911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12912 /* end confdefs.h. */
12914 /* Override any GCC internal prototype to avoid an error.
12915 Use char because int might match the return type of a GCC
12916 builtin and then its argument prototype would still apply. */
12917 #ifdef __cplusplus
12918 extern "C"
12919 #endif
12920 char uuid_export ();
12922 main ()
12924 return uuid_export ();
12926 return 0;
12928 _ACEOF
12929 if ac_fn_c_try_link "$LINENO"; then :
12930 ac_cv_lib_ossp_uuid_uuid_export=yes
12931 else
12932 ac_cv_lib_ossp_uuid_uuid_export=no
12934 rm -f core conftest.err conftest.$ac_objext \
12935 conftest$ac_exeext conftest.$ac_ext
12936 LIBS=$ac_check_lib_save_LIBS
12938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12939 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12940 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12941 UUID_LIBS="-lossp-uuid"
12942 else
12943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12944 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12945 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12946 $as_echo_n "(cached) " >&6
12947 else
12948 ac_check_lib_save_LIBS=$LIBS
12949 LIBS="-luuid $LIBS"
12950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12951 /* end confdefs.h. */
12953 /* Override any GCC internal prototype to avoid an error.
12954 Use char because int might match the return type of a GCC
12955 builtin and then its argument prototype would still apply. */
12956 #ifdef __cplusplus
12957 extern "C"
12958 #endif
12959 char uuid_export ();
12961 main ()
12963 return uuid_export ();
12965 return 0;
12967 _ACEOF
12968 if ac_fn_c_try_link "$LINENO"; then :
12969 ac_cv_lib_uuid_uuid_export=yes
12970 else
12971 ac_cv_lib_uuid_uuid_export=no
12973 rm -f core conftest.err conftest.$ac_objext \
12974 conftest$ac_exeext conftest.$ac_ext
12975 LIBS=$ac_check_lib_save_LIBS
12977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12978 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12979 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12980 UUID_LIBS="-luuid"
12981 else
12982 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12992 ## Header files
12995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12996 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12997 if ${ac_cv_header_stdbool_h+:} false; then :
12998 $as_echo_n "(cached) " >&6
12999 else
13000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13001 /* end confdefs.h. */
13003 #include <stdbool.h>
13004 #ifndef bool
13005 "error: bool is not defined"
13006 #endif
13007 #ifndef false
13008 "error: false is not defined"
13009 #endif
13010 #if false
13011 "error: false is not 0"
13012 #endif
13013 #ifndef true
13014 "error: true is not defined"
13015 #endif
13016 #if true != 1
13017 "error: true is not 1"
13018 #endif
13019 #ifndef __bool_true_false_are_defined
13020 "error: __bool_true_false_are_defined is not defined"
13021 #endif
13023 struct s { _Bool s: 1; _Bool t; } s;
13025 char a[true == 1 ? 1 : -1];
13026 char b[false == 0 ? 1 : -1];
13027 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13028 char d[(bool) 0.5 == true ? 1 : -1];
13029 /* See body of main program for 'e'. */
13030 char f[(_Bool) 0.0 == false ? 1 : -1];
13031 char g[true];
13032 char h[sizeof (_Bool)];
13033 char i[sizeof s.t];
13034 enum { j = false, k = true, l = false * true, m = true * 256 };
13035 /* The following fails for
13036 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13037 _Bool n[m];
13038 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13039 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13040 /* Catch a bug in an HP-UX C compiler. See
13041 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13042 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13044 _Bool q = true;
13045 _Bool *pq = &q;
13048 main ()
13051 bool e = &s;
13052 *pq |= q;
13053 *pq |= ! q;
13054 /* Refer to every declared value, to avoid compiler optimizations. */
13055 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13056 + !m + !n + !o + !p + !q + !pq);
13059 return 0;
13061 _ACEOF
13062 if ac_fn_c_try_compile "$LINENO"; then :
13063 ac_cv_header_stdbool_h=yes
13064 else
13065 ac_cv_header_stdbool_h=no
13067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13070 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13071 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13072 if test "x$ac_cv_type__Bool" = xyes; then :
13074 cat >>confdefs.h <<_ACEOF
13075 #define HAVE__BOOL 1
13076 _ACEOF
13082 if test $ac_cv_header_stdbool_h = yes; then
13084 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13089 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
13090 do :
13091 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13092 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13093 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13094 cat >>confdefs.h <<_ACEOF
13095 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13096 _ACEOF
13100 done
13103 # On BSD, test for net/if.h will fail unless sys/socket.h
13104 # is included first.
13105 for ac_header in net/if.h
13106 do :
13107 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
13108 #include <sys/socket.h>
13111 if test "x$ac_cv_header_net_if_h" = xyes; then :
13112 cat >>confdefs.h <<_ACEOF
13113 #define HAVE_NET_IF_H 1
13114 _ACEOF
13118 done
13121 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
13122 # is included first.
13123 for ac_header in sys/ucred.h
13124 do :
13125 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13126 #include <sys/param.h>
13129 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13130 cat >>confdefs.h <<_ACEOF
13131 #define HAVE_SYS_UCRED_H 1
13132 _ACEOF
13136 done
13139 # At least on IRIX, test for netinet/tcp.h will fail unless
13140 # netinet/in.h is included first.
13141 for ac_header in netinet/tcp.h
13142 do :
13143 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13144 #include <netinet/in.h>
13147 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13148 cat >>confdefs.h <<_ACEOF
13149 #define HAVE_NETINET_TCP_H 1
13150 _ACEOF
13154 done
13157 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13158 for ac_header in readline/readline.h
13159 do :
13160 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13161 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13162 cat >>confdefs.h <<_ACEOF
13163 #define HAVE_READLINE_READLINE_H 1
13164 _ACEOF
13166 else
13167 for ac_header in readline.h
13168 do :
13169 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13170 if test "x$ac_cv_header_readline_h" = xyes; then :
13171 cat >>confdefs.h <<_ACEOF
13172 #define HAVE_READLINE_H 1
13173 _ACEOF
13175 else
13176 as_fn_error $? "readline header not found
13177 If you have readline already installed, see config.log for details on the
13178 failure. It is possible the compiler isn't looking in the proper directory.
13179 Use --without-readline to disable readline support." "$LINENO" 5
13182 done
13186 done
13188 for ac_header in readline/history.h
13189 do :
13190 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13191 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13192 cat >>confdefs.h <<_ACEOF
13193 #define HAVE_READLINE_HISTORY_H 1
13194 _ACEOF
13196 else
13197 for ac_header in history.h
13198 do :
13199 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13200 if test "x$ac_cv_header_history_h" = xyes; then :
13201 cat >>confdefs.h <<_ACEOF
13202 #define HAVE_HISTORY_H 1
13203 _ACEOF
13205 else
13206 as_fn_error $? "history header not found
13207 If you have readline already installed, see config.log for details on the
13208 failure. It is possible the compiler isn't looking in the proper directory.
13209 Use --without-readline to disable readline support." "$LINENO" 5
13212 done
13216 done
13220 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13221 # Some installations of libedit usurp /usr/include/readline/, which seems
13222 # bad practice, since in combined installations readline will have its headers
13223 # there. We might have to resort to AC_EGREP checks to make sure we found
13224 # the proper header...
13225 for ac_header in editline/readline.h
13226 do :
13227 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13228 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13229 cat >>confdefs.h <<_ACEOF
13230 #define HAVE_EDITLINE_READLINE_H 1
13231 _ACEOF
13233 else
13234 for ac_header in readline.h
13235 do :
13236 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13237 if test "x$ac_cv_header_readline_h" = xyes; then :
13238 cat >>confdefs.h <<_ACEOF
13239 #define HAVE_READLINE_H 1
13240 _ACEOF
13242 else
13243 for ac_header in readline/readline.h
13244 do :
13245 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13246 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13247 cat >>confdefs.h <<_ACEOF
13248 #define HAVE_READLINE_READLINE_H 1
13249 _ACEOF
13251 else
13252 as_fn_error $? "readline header not found
13253 If you have libedit already installed, see config.log for details on the
13254 failure. It is possible the compiler isn't looking in the proper directory.
13255 Use --without-readline to disable libedit support." "$LINENO" 5
13258 done
13262 done
13266 done
13268 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13269 # not be there at all. Hence, don't complain if not found. We must check
13270 # though, since in yet other versions it is an independent header.
13271 for ac_header in editline/history.h
13272 do :
13273 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13274 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13275 cat >>confdefs.h <<_ACEOF
13276 #define HAVE_EDITLINE_HISTORY_H 1
13277 _ACEOF
13279 else
13280 for ac_header in history.h
13281 do :
13282 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13283 if test "x$ac_cv_header_history_h" = xyes; then :
13284 cat >>confdefs.h <<_ACEOF
13285 #define HAVE_HISTORY_H 1
13286 _ACEOF
13288 else
13289 for ac_header in readline/history.h
13290 do :
13291 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13292 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13293 cat >>confdefs.h <<_ACEOF
13294 #define HAVE_READLINE_HISTORY_H 1
13295 _ACEOF
13299 done
13303 done
13307 done
13311 if test "$with_zlib" = yes; then
13312 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13313 if test "x$ac_cv_header_zlib_h" = xyes; then :
13315 else
13316 as_fn_error $? "zlib header not found
13317 If you have zlib already installed, see config.log for details on the
13318 failure. It is possible the compiler isn't looking in the proper directory.
13319 Use --without-zlib to disable zlib support." "$LINENO" 5
13325 if test "$with_gssapi" = yes ; then
13326 for ac_header in gssapi/gssapi.h
13327 do :
13328 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13329 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13330 cat >>confdefs.h <<_ACEOF
13331 #define HAVE_GSSAPI_GSSAPI_H 1
13332 _ACEOF
13334 else
13335 for ac_header in gssapi.h
13336 do :
13337 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13338 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13339 cat >>confdefs.h <<_ACEOF
13340 #define HAVE_GSSAPI_H 1
13341 _ACEOF
13343 else
13344 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13347 done
13351 done
13355 if test "$with_ssl" = openssl ; then
13356 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13357 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13359 else
13360 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13364 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13365 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13367 else
13368 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13374 if test "$with_pam" = yes ; then
13375 for ac_header in security/pam_appl.h
13376 do :
13377 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13378 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13379 cat >>confdefs.h <<_ACEOF
13380 #define HAVE_SECURITY_PAM_APPL_H 1
13381 _ACEOF
13383 else
13384 for ac_header in pam/pam_appl.h
13385 do :
13386 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13387 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13388 cat >>confdefs.h <<_ACEOF
13389 #define HAVE_PAM_PAM_APPL_H 1
13390 _ACEOF
13392 else
13393 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13396 done
13400 done
13404 if test "$with_bsd_auth" = yes ; then
13405 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13406 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13408 else
13409 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13415 if test "$with_systemd" = yes ; then
13416 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13417 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13419 else
13420 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13426 if test "$with_libxml" = yes ; then
13427 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13428 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13430 else
13431 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13437 if test "$with_libxslt" = yes ; then
13438 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13439 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13441 else
13442 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13448 if test "$with_ldap" = yes ; then
13449 if test "$PORTNAME" != "win32"; then
13450 for ac_header in ldap.h
13451 do :
13452 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13453 if test "x$ac_cv_header_ldap_h" = xyes; then :
13454 cat >>confdefs.h <<_ACEOF
13455 #define HAVE_LDAP_H 1
13456 _ACEOF
13458 else
13459 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13462 done
13464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13465 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13466 if ${pgac_cv_ldap_safe+:} false; then :
13467 $as_echo_n "(cached) " >&6
13468 else
13469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13470 /* end confdefs.h. */
13471 #include <ldap.h>
13472 #if !defined(LDAP_VENDOR_VERSION) || \
13473 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13474 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13475 choke me
13476 #endif
13478 main ()
13482 return 0;
13484 _ACEOF
13485 if ac_fn_c_try_compile "$LINENO"; then :
13486 pgac_cv_ldap_safe=yes
13487 else
13488 pgac_cv_ldap_safe=no
13490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13493 $as_echo "$pgac_cv_ldap_safe" >&6; }
13495 if test "$pgac_cv_ldap_safe" != yes; then
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13497 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13498 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13499 *** also uses LDAP will crash on exit." >&5
13500 $as_echo "$as_me: WARNING:
13501 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13502 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13503 *** also uses LDAP will crash on exit." >&2;}
13505 else
13506 for ac_header in winldap.h
13507 do :
13508 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13509 #include <windows.h>
13512 if test "x$ac_cv_header_winldap_h" = xyes; then :
13513 cat >>confdefs.h <<_ACEOF
13514 #define HAVE_WINLDAP_H 1
13515 _ACEOF
13517 else
13518 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13521 done
13526 if test "$with_bonjour" = yes ; then
13527 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13528 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13530 else
13531 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13537 # for contrib/uuid-ossp
13538 if test "$with_uuid" = bsd ; then
13539 for ac_header in uuid.h
13540 do :
13541 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13542 if test "x$ac_cv_header_uuid_h" = xyes; then :
13543 cat >>confdefs.h <<_ACEOF
13544 #define HAVE_UUID_H 1
13545 _ACEOF
13546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13547 /* end confdefs.h. */
13548 #include <uuid.h>
13550 _ACEOF
13551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13552 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13554 else
13555 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13557 rm -f conftest*
13559 else
13560 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13563 done
13565 elif test "$with_uuid" = e2fs ; then
13566 for ac_header in uuid/uuid.h
13567 do :
13568 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13569 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13570 cat >>confdefs.h <<_ACEOF
13571 #define HAVE_UUID_UUID_H 1
13572 _ACEOF
13573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13574 /* end confdefs.h. */
13575 #include <uuid/uuid.h>
13577 _ACEOF
13578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13579 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13581 else
13582 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13584 rm -f conftest*
13586 else
13587 for ac_header in uuid.h
13588 do :
13589 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13590 if test "x$ac_cv_header_uuid_h" = xyes; then :
13591 cat >>confdefs.h <<_ACEOF
13592 #define HAVE_UUID_H 1
13593 _ACEOF
13594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13595 /* end confdefs.h. */
13596 #include <uuid.h>
13598 _ACEOF
13599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13600 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13602 else
13603 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13605 rm -f conftest*
13607 else
13608 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13611 done
13615 done
13617 elif test "$with_uuid" = ossp ; then
13618 for ac_header in ossp/uuid.h
13619 do :
13620 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13621 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13622 cat >>confdefs.h <<_ACEOF
13623 #define HAVE_OSSP_UUID_H 1
13624 _ACEOF
13625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13626 /* end confdefs.h. */
13627 #include <ossp/uuid.h>
13629 _ACEOF
13630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13631 $EGREP "uuid_export" >/dev/null 2>&1; then :
13633 else
13634 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13636 rm -f conftest*
13638 else
13639 for ac_header in uuid.h
13640 do :
13641 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13642 if test "x$ac_cv_header_uuid_h" = xyes; then :
13643 cat >>confdefs.h <<_ACEOF
13644 #define HAVE_UUID_H 1
13645 _ACEOF
13646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13647 /* end confdefs.h. */
13648 #include <uuid.h>
13650 _ACEOF
13651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13652 $EGREP "uuid_export" >/dev/null 2>&1; then :
13654 else
13655 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13657 rm -f conftest*
13659 else
13660 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13663 done
13667 done
13671 if test "$PORTNAME" = "win32" ; then
13672 for ac_header in crtdefs.h
13673 do :
13674 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13675 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13676 cat >>confdefs.h <<_ACEOF
13677 #define HAVE_CRTDEFS_H 1
13678 _ACEOF
13682 done
13687 ## Types, structures, compiler characteristics
13690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13691 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13692 if ${ac_cv_c_bigendian+:} false; then :
13693 $as_echo_n "(cached) " >&6
13694 else
13695 ac_cv_c_bigendian=unknown
13696 # See if we're dealing with a universal compiler.
13697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13698 /* end confdefs.h. */
13699 #ifndef __APPLE_CC__
13700 not a universal capable compiler
13701 #endif
13702 typedef int dummy;
13704 _ACEOF
13705 if ac_fn_c_try_compile "$LINENO"; then :
13707 # Check for potential -arch flags. It is not universal unless
13708 # there are at least two -arch flags with different values.
13709 ac_arch=
13710 ac_prev=
13711 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13712 if test -n "$ac_prev"; then
13713 case $ac_word in
13714 i?86 | x86_64 | ppc | ppc64)
13715 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13716 ac_arch=$ac_word
13717 else
13718 ac_cv_c_bigendian=universal
13719 break
13722 esac
13723 ac_prev=
13724 elif test "x$ac_word" = "x-arch"; then
13725 ac_prev=arch
13727 done
13729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13730 if test $ac_cv_c_bigendian = unknown; then
13731 # See if sys/param.h defines the BYTE_ORDER macro.
13732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13733 /* end confdefs.h. */
13734 #include <sys/types.h>
13735 #include <sys/param.h>
13738 main ()
13740 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13741 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13742 && LITTLE_ENDIAN)
13743 bogus endian macros
13744 #endif
13747 return 0;
13749 _ACEOF
13750 if ac_fn_c_try_compile "$LINENO"; then :
13751 # It does; now see whether it defined to BIG_ENDIAN or not.
13752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13753 /* end confdefs.h. */
13754 #include <sys/types.h>
13755 #include <sys/param.h>
13758 main ()
13760 #if BYTE_ORDER != BIG_ENDIAN
13761 not big endian
13762 #endif
13765 return 0;
13767 _ACEOF
13768 if ac_fn_c_try_compile "$LINENO"; then :
13769 ac_cv_c_bigendian=yes
13770 else
13771 ac_cv_c_bigendian=no
13773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13777 if test $ac_cv_c_bigendian = unknown; then
13778 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13780 /* end confdefs.h. */
13781 #include <limits.h>
13784 main ()
13786 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13787 bogus endian macros
13788 #endif
13791 return 0;
13793 _ACEOF
13794 if ac_fn_c_try_compile "$LINENO"; then :
13795 # It does; now see whether it defined to _BIG_ENDIAN or not.
13796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13797 /* end confdefs.h. */
13798 #include <limits.h>
13801 main ()
13803 #ifndef _BIG_ENDIAN
13804 not big endian
13805 #endif
13808 return 0;
13810 _ACEOF
13811 if ac_fn_c_try_compile "$LINENO"; then :
13812 ac_cv_c_bigendian=yes
13813 else
13814 ac_cv_c_bigendian=no
13816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13820 if test $ac_cv_c_bigendian = unknown; then
13821 # Compile a test program.
13822 if test "$cross_compiling" = yes; then :
13823 # Try to guess by grepping values from an object file.
13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825 /* end confdefs.h. */
13826 short int ascii_mm[] =
13827 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13828 short int ascii_ii[] =
13829 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13830 int use_ascii (int i) {
13831 return ascii_mm[i] + ascii_ii[i];
13833 short int ebcdic_ii[] =
13834 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13835 short int ebcdic_mm[] =
13836 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13837 int use_ebcdic (int i) {
13838 return ebcdic_mm[i] + ebcdic_ii[i];
13840 extern int foo;
13843 main ()
13845 return use_ascii (foo) == use_ebcdic (foo);
13847 return 0;
13849 _ACEOF
13850 if ac_fn_c_try_compile "$LINENO"; then :
13851 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13852 ac_cv_c_bigendian=yes
13854 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13855 if test "$ac_cv_c_bigendian" = unknown; then
13856 ac_cv_c_bigendian=no
13857 else
13858 # finding both strings is unlikely to happen, but who knows?
13859 ac_cv_c_bigendian=unknown
13863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13864 else
13865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13866 /* end confdefs.h. */
13867 $ac_includes_default
13869 main ()
13872 /* Are we little or big endian? From Harbison&Steele. */
13873 union
13875 long int l;
13876 char c[sizeof (long int)];
13877 } u;
13878 u.l = 1;
13879 return u.c[sizeof (long int) - 1] == 1;
13882 return 0;
13884 _ACEOF
13885 if ac_fn_c_try_run "$LINENO"; then :
13886 ac_cv_c_bigendian=no
13887 else
13888 ac_cv_c_bigendian=yes
13890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13891 conftest.$ac_objext conftest.beam conftest.$ac_ext
13896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13897 $as_echo "$ac_cv_c_bigendian" >&6; }
13898 case $ac_cv_c_bigendian in #(
13899 yes)
13900 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13901 ;; #(
13903 ;; #(
13904 universal)
13906 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13908 ;; #(
13910 as_fn_error $? "unknown endianness
13911 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13912 esac
13914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13915 $as_echo_n "checking for inline... " >&6; }
13916 if ${ac_cv_c_inline+:} false; then :
13917 $as_echo_n "(cached) " >&6
13918 else
13919 ac_cv_c_inline=no
13920 for ac_kw in inline __inline__ __inline; do
13921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13922 /* end confdefs.h. */
13923 #ifndef __cplusplus
13924 typedef int foo_t;
13925 static $ac_kw foo_t static_foo () {return 0; }
13926 $ac_kw foo_t foo () {return 0; }
13927 #endif
13929 _ACEOF
13930 if ac_fn_c_try_compile "$LINENO"; then :
13931 ac_cv_c_inline=$ac_kw
13933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13934 test "$ac_cv_c_inline" != no && break
13935 done
13938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13939 $as_echo "$ac_cv_c_inline" >&6; }
13941 case $ac_cv_c_inline in
13942 inline | yes) ;;
13944 case $ac_cv_c_inline in
13945 no) ac_val=;;
13946 *) ac_val=$ac_cv_c_inline;;
13947 esac
13948 cat >>confdefs.h <<_ACEOF
13949 #ifndef __cplusplus
13950 #define inline $ac_val
13951 #endif
13952 _ACEOF
13954 esac
13956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13957 $as_echo_n "checking for printf format archetype... " >&6; }
13958 if ${pgac_cv_printf_archetype+:} false; then :
13959 $as_echo_n "(cached) " >&6
13960 else
13961 pgac_cv_printf_archetype=gnu_printf
13962 ac_save_c_werror_flag=$ac_c_werror_flag
13963 ac_c_werror_flag=yes
13964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13965 /* end confdefs.h. */
13966 extern void pgac_write(int ignore, const char *fmt,...)
13967 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13969 main ()
13971 pgac_write(0, "error %s: %m", "foo");
13973 return 0;
13975 _ACEOF
13976 if ac_fn_c_try_compile "$LINENO"; then :
13977 ac_archetype_ok=yes
13978 else
13979 ac_archetype_ok=no
13981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13982 ac_c_werror_flag=$ac_save_c_werror_flag
13984 if [ "$ac_archetype_ok" = no ]; then
13985 pgac_cv_printf_archetype=__syslog__
13986 ac_save_c_werror_flag=$ac_c_werror_flag
13987 ac_c_werror_flag=yes
13988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13989 /* end confdefs.h. */
13990 extern void pgac_write(int ignore, const char *fmt,...)
13991 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13993 main ()
13995 pgac_write(0, "error %s: %m", "foo");
13997 return 0;
13999 _ACEOF
14000 if ac_fn_c_try_compile "$LINENO"; then :
14001 ac_archetype_ok=yes
14002 else
14003 ac_archetype_ok=no
14005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14006 ac_c_werror_flag=$ac_save_c_werror_flag
14008 if [ "$ac_archetype_ok" = no ]; then
14009 pgac_cv_printf_archetype=printf
14013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14014 $as_echo "$pgac_cv_printf_archetype" >&6; }
14016 cat >>confdefs.h <<_ACEOF
14017 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14018 _ACEOF
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
14022 $as_echo_n "checking for __func__... " >&6; }
14023 if ${pgac_cv_funcname_func_support+:} false; then :
14024 $as_echo_n "(cached) " >&6
14025 else
14026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14027 /* end confdefs.h. */
14028 #include <stdio.h>
14030 main ()
14032 printf("%s\n", __func__);
14034 return 0;
14036 _ACEOF
14037 if ac_fn_c_try_compile "$LINENO"; then :
14038 pgac_cv_funcname_func_support=yes
14039 else
14040 pgac_cv_funcname_func_support=no
14042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
14045 $as_echo "$pgac_cv_funcname_func_support" >&6; }
14046 if test x"$pgac_cv_funcname_func_support" = xyes ; then
14048 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
14050 else
14051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
14052 $as_echo_n "checking for __FUNCTION__... " >&6; }
14053 if ${pgac_cv_funcname_function_support+:} false; then :
14054 $as_echo_n "(cached) " >&6
14055 else
14056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14057 /* end confdefs.h. */
14058 #include <stdio.h>
14060 main ()
14062 printf("%s\n", __FUNCTION__);
14064 return 0;
14066 _ACEOF
14067 if ac_fn_c_try_compile "$LINENO"; then :
14068 pgac_cv_funcname_function_support=yes
14069 else
14070 pgac_cv_funcname_function_support=no
14072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
14075 $as_echo "$pgac_cv_funcname_function_support" >&6; }
14076 if test x"$pgac_cv_funcname_function_support" = xyes ; then
14078 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
14082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14083 $as_echo_n "checking for _Static_assert... " >&6; }
14084 if ${pgac_cv__static_assert+:} false; then :
14085 $as_echo_n "(cached) " >&6
14086 else
14087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14088 /* end confdefs.h. */
14091 main ()
14093 ({ _Static_assert(1, "foo"); })
14095 return 0;
14097 _ACEOF
14098 if ac_fn_c_try_link "$LINENO"; then :
14099 pgac_cv__static_assert=yes
14100 else
14101 pgac_cv__static_assert=no
14103 rm -f core conftest.err conftest.$ac_objext \
14104 conftest$ac_exeext conftest.$ac_ext
14106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14107 $as_echo "$pgac_cv__static_assert" >&6; }
14108 if test x"$pgac_cv__static_assert" = xyes ; then
14110 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14114 $as_echo_n "checking for typeof... " >&6; }
14115 if ${pgac_cv_c_typeof+:} false; then :
14116 $as_echo_n "(cached) " >&6
14117 else
14118 pgac_cv_c_typeof=no
14119 for pgac_kw in typeof __typeof__ decltype; do
14120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14121 /* end confdefs.h. */
14124 main ()
14126 int x = 0;
14127 $pgac_kw(x) y;
14128 y = x;
14129 return y;
14131 return 0;
14133 _ACEOF
14134 if ac_fn_c_try_compile "$LINENO"; then :
14135 pgac_cv_c_typeof=$pgac_kw
14137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14138 test "$pgac_cv_c_typeof" != no && break
14139 done
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14142 $as_echo "$pgac_cv_c_typeof" >&6; }
14143 if test "$pgac_cv_c_typeof" != no; then
14145 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14147 if test "$pgac_cv_c_typeof" != typeof; then
14149 cat >>confdefs.h <<_ACEOF
14150 #define typeof $pgac_cv_c_typeof
14151 _ACEOF
14155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14156 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14157 if ${pgac_cv__types_compatible+:} false; then :
14158 $as_echo_n "(cached) " >&6
14159 else
14160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14161 /* end confdefs.h. */
14164 main ()
14166 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14168 return 0;
14170 _ACEOF
14171 if ac_fn_c_try_compile "$LINENO"; then :
14172 pgac_cv__types_compatible=yes
14173 else
14174 pgac_cv__types_compatible=no
14176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14179 $as_echo "$pgac_cv__types_compatible" >&6; }
14180 if test x"$pgac_cv__types_compatible" = xyes ; then
14182 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14186 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14187 if ${pgac_cv__builtin_constant_p+:} false; then :
14188 $as_echo_n "(cached) " >&6
14189 else
14190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14191 /* end confdefs.h. */
14192 static int x;
14193 static int y[__builtin_constant_p(x) ? x : 1];
14194 static int z[__builtin_constant_p("string literal") ? 1 : x];
14197 _ACEOF
14198 if ac_fn_c_try_compile "$LINENO"; then :
14199 pgac_cv__builtin_constant_p=yes
14200 else
14201 pgac_cv__builtin_constant_p=no
14203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14206 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14207 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14209 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14213 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14214 if ${pgac_cv__builtin_unreachable+:} false; then :
14215 $as_echo_n "(cached) " >&6
14216 else
14217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14218 /* end confdefs.h. */
14221 main ()
14223 __builtin_unreachable();
14225 return 0;
14227 _ACEOF
14228 if ac_fn_c_try_link "$LINENO"; then :
14229 pgac_cv__builtin_unreachable=yes
14230 else
14231 pgac_cv__builtin_unreachable=no
14233 rm -f core conftest.err conftest.$ac_objext \
14234 conftest$ac_exeext conftest.$ac_ext
14236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14237 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14238 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14240 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14244 $as_echo_n "checking for computed goto support... " >&6; }
14245 if ${pgac_cv_computed_goto+:} false; then :
14246 $as_echo_n "(cached) " >&6
14247 else
14248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14249 /* end confdefs.h. */
14252 main ()
14254 void *labeladdrs[] = {&&my_label};
14255 goto *labeladdrs[0];
14256 my_label:
14257 return 1;
14260 return 0;
14262 _ACEOF
14263 if ac_fn_c_try_compile "$LINENO"; then :
14264 pgac_cv_computed_goto=yes
14265 else
14266 pgac_cv_computed_goto=no
14268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14271 $as_echo "$pgac_cv_computed_goto" >&6; }
14272 if test x"$pgac_cv_computed_goto" = xyes ; then
14274 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14277 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14278 #include <time.h>
14281 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14283 cat >>confdefs.h <<_ACEOF
14284 #define HAVE_STRUCT_TM_TM_ZONE 1
14285 _ACEOF
14291 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14292 #ifdef HAVE_SYS_IPC_H
14293 #include <sys/ipc.h>
14294 #endif
14295 #ifdef HAVE_SYS_SEM_H
14296 #include <sys/sem.h>
14297 #endif
14299 if test "x$ac_cv_type_union_semun" = xyes; then :
14301 cat >>confdefs.h <<_ACEOF
14302 #define HAVE_UNION_SEMUN 1
14303 _ACEOF
14308 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14309 #ifdef HAVE_SYS_UN_H
14310 #include <sys/un.h>
14311 #endif
14314 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14316 cat >>confdefs.h <<_ACEOF
14317 #define HAVE_STRUCT_SOCKADDR_UN 1
14318 _ACEOF
14323 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14324 #include <sys/socket.h>
14327 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14329 cat >>confdefs.h <<_ACEOF
14330 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14331 _ACEOF
14336 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14337 #include <sys/socket.h>
14340 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14342 cat >>confdefs.h <<_ACEOF
14343 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14344 _ACEOF
14348 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14349 #include <sys/socket.h>
14352 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14354 cat >>confdefs.h <<_ACEOF
14355 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14356 _ACEOF
14360 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14361 #include <sys/socket.h>
14364 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14366 cat >>confdefs.h <<_ACEOF
14367 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14368 _ACEOF
14372 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14373 #include <sys/socket.h>
14376 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14378 cat >>confdefs.h <<_ACEOF
14379 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14380 _ACEOF
14384 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14385 #include <sys/socket.h>
14388 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14390 cat >>confdefs.h <<_ACEOF
14391 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14392 _ACEOF
14397 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14398 #include <sys/socket.h>
14399 #include <netdb.h>
14402 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14404 cat >>confdefs.h <<_ACEOF
14405 #define HAVE_STRUCT_ADDRINFO 1
14406 _ACEOF
14412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14413 $as_echo_n "checking for locale_t... " >&6; }
14414 if ${pgac_cv_type_locale_t+:} false; then :
14415 $as_echo_n "(cached) " >&6
14416 else
14417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14418 /* end confdefs.h. */
14419 #include <locale.h>
14420 locale_t x;
14422 main ()
14426 return 0;
14428 _ACEOF
14429 if ac_fn_c_try_compile "$LINENO"; then :
14430 pgac_cv_type_locale_t=yes
14431 else
14432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14433 /* end confdefs.h. */
14434 #include <xlocale.h>
14435 locale_t x;
14437 main ()
14441 return 0;
14443 _ACEOF
14444 if ac_fn_c_try_compile "$LINENO"; then :
14445 pgac_cv_type_locale_t='yes (in xlocale.h)'
14446 else
14447 pgac_cv_type_locale_t=no
14449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14454 $as_echo "$pgac_cv_type_locale_t" >&6; }
14455 if test "$pgac_cv_type_locale_t" != no; then
14457 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14460 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14462 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14466 # MSVC doesn't cope well with defining restrict to __restrict, the
14467 # spelling it understands, because it conflicts with
14468 # __declspec(restrict). Therefore we define pg_restrict to the
14469 # appropriate definition, which presumably won't conflict.
14471 # Allow platforms with buggy compilers to force restrict to not be
14472 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14473 # template.
14474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14475 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14476 if ${ac_cv_c_restrict+:} false; then :
14477 $as_echo_n "(cached) " >&6
14478 else
14479 ac_cv_c_restrict=no
14480 # The order here caters to the fact that C++ does not require restrict.
14481 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14483 /* end confdefs.h. */
14484 typedef int * int_ptr;
14485 int foo (int_ptr $ac_kw ip) {
14486 return ip[0];
14489 main ()
14491 int s[1];
14492 int * $ac_kw t = s;
14493 t[0] = 0;
14494 return foo(t)
14496 return 0;
14498 _ACEOF
14499 if ac_fn_c_try_compile "$LINENO"; then :
14500 ac_cv_c_restrict=$ac_kw
14502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14503 test "$ac_cv_c_restrict" != no && break
14504 done
14507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14508 $as_echo "$ac_cv_c_restrict" >&6; }
14510 case $ac_cv_c_restrict in
14511 restrict) ;;
14512 no) $as_echo "#define restrict /**/" >>confdefs.h
14514 *) cat >>confdefs.h <<_ACEOF
14515 #define restrict $ac_cv_c_restrict
14516 _ACEOF
14518 esac
14520 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14521 pg_restrict=""
14522 else
14523 pg_restrict="$ac_cv_c_restrict"
14526 cat >>confdefs.h <<_ACEOF
14527 #define pg_restrict $pg_restrict
14528 _ACEOF
14531 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14532 #include <sys/param.h>
14533 #ifdef HAVE_SYS_UCRED_H
14534 #include <sys/ucred.h>
14535 #endif
14537 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14539 cat >>confdefs.h <<_ACEOF
14540 #define HAVE_STRUCT_CMSGCRED 1
14541 _ACEOF
14547 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14548 #include <getopt.h>
14549 #endif
14551 if test "x$ac_cv_type_struct_option" = xyes; then :
14553 cat >>confdefs.h <<_ACEOF
14554 #define HAVE_STRUCT_OPTION 1
14555 _ACEOF
14561 if test "$with_zlib" = yes; then
14562 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14563 # did not). While we could work around the lack of z_streamp, it
14564 # seems unwise to encourage people to use such old zlib versions...
14565 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14567 if test "x$ac_cv_type_z_streamp" = xyes; then :
14569 else
14570 as_fn_error $? "zlib version is too old
14571 Use --without-zlib to disable zlib support." "$LINENO" 5
14576 case $host_cpu in
14577 x86_64)
14578 # On x86_64, check if we can compile a popcntq instruction
14579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14580 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14581 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14582 $as_echo_n "(cached) " >&6
14583 else
14584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14585 /* end confdefs.h. */
14588 main ()
14590 long long x = 1; long long r;
14591 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14593 return 0;
14595 _ACEOF
14596 if ac_fn_c_try_compile "$LINENO"; then :
14597 pgac_cv_have_x86_64_popcntq=yes
14598 else
14599 pgac_cv_have_x86_64_popcntq=no
14601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14604 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14605 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14607 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14611 ppc*|powerpc*)
14612 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14614 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14615 if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
14616 $as_echo_n "(cached) " >&6
14617 else
14618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14619 /* end confdefs.h. */
14622 main ()
14624 int a = 0; int *p = &a; int r;
14625 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14627 return 0;
14629 _ACEOF
14630 if ac_fn_c_try_compile "$LINENO"; then :
14631 pgac_cv_have_ppc_mutex_hint=yes
14632 else
14633 pgac_cv_have_ppc_mutex_hint=no
14635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14638 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14639 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14641 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14644 # Check if compiler accepts "i"(x) when __builtin_constant_p(x).
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14646 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14647 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14648 $as_echo_n "(cached) " >&6
14649 else
14650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14651 /* end confdefs.h. */
14652 static inline int
14653 addi(int ra, int si)
14655 int res = 0;
14656 if (__builtin_constant_p(si))
14657 __asm__ __volatile__(
14658 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14659 return res;
14661 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14663 main ()
14667 return 0;
14669 _ACEOF
14670 if ac_fn_c_try_compile "$LINENO"; then :
14671 pgac_cv_have_i_constraint__builtin_constant_p=yes
14672 else
14673 pgac_cv_have_i_constraint__builtin_constant_p=no
14675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14678 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14679 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14681 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14685 esac
14687 # Check largefile support. You might think this is a system service not a
14688 # compiler characteristic, but you'd be wrong. We must check this before
14689 # probing existence of related functions such as fseeko, since the largefile
14690 # defines can affect what is generated for that.
14691 if test "$PORTNAME" != "win32"; then
14692 # Check whether --enable-largefile was given.
14693 if test "${enable_largefile+set}" = set; then :
14694 enableval=$enable_largefile;
14697 if test "$enable_largefile" != no; then
14699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14700 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14701 if ${ac_cv_sys_largefile_CC+:} false; then :
14702 $as_echo_n "(cached) " >&6
14703 else
14704 ac_cv_sys_largefile_CC=no
14705 if test "$GCC" != yes; then
14706 ac_save_CC=$CC
14707 while :; do
14708 # IRIX 6.2 and later do not support large files by default,
14709 # so use the C compiler's -n32 option if that helps.
14710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14711 /* end confdefs.h. */
14712 #include <sys/types.h>
14713 /* Check that off_t can represent 2**63 - 1 correctly.
14714 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14715 since some C++ compilers masquerading as C compilers
14716 incorrectly reject 9223372036854775807. */
14717 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14718 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14719 && LARGE_OFF_T % 2147483647 == 1)
14720 ? 1 : -1];
14722 main ()
14726 return 0;
14728 _ACEOF
14729 if ac_fn_c_try_compile "$LINENO"; then :
14730 break
14732 rm -f core conftest.err conftest.$ac_objext
14733 CC="$CC -n32"
14734 if ac_fn_c_try_compile "$LINENO"; then :
14735 ac_cv_sys_largefile_CC=' -n32'; break
14737 rm -f core conftest.err conftest.$ac_objext
14738 break
14739 done
14740 CC=$ac_save_CC
14741 rm -f conftest.$ac_ext
14744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14745 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14746 if test "$ac_cv_sys_largefile_CC" != no; then
14747 CC=$CC$ac_cv_sys_largefile_CC
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14751 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14752 if ${ac_cv_sys_file_offset_bits+:} false; then :
14753 $as_echo_n "(cached) " >&6
14754 else
14755 while :; do
14756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14757 /* end confdefs.h. */
14758 #include <sys/types.h>
14759 /* Check that off_t can represent 2**63 - 1 correctly.
14760 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14761 since some C++ compilers masquerading as C compilers
14762 incorrectly reject 9223372036854775807. */
14763 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14764 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14765 && LARGE_OFF_T % 2147483647 == 1)
14766 ? 1 : -1];
14768 main ()
14772 return 0;
14774 _ACEOF
14775 if ac_fn_c_try_compile "$LINENO"; then :
14776 ac_cv_sys_file_offset_bits=no; break
14778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14780 /* end confdefs.h. */
14781 #define _FILE_OFFSET_BITS 64
14782 #include <sys/types.h>
14783 /* Check that off_t can represent 2**63 - 1 correctly.
14784 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14785 since some C++ compilers masquerading as C compilers
14786 incorrectly reject 9223372036854775807. */
14787 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14788 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14789 && LARGE_OFF_T % 2147483647 == 1)
14790 ? 1 : -1];
14792 main ()
14796 return 0;
14798 _ACEOF
14799 if ac_fn_c_try_compile "$LINENO"; then :
14800 ac_cv_sys_file_offset_bits=64; break
14802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14803 ac_cv_sys_file_offset_bits=unknown
14804 break
14805 done
14807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14808 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14809 case $ac_cv_sys_file_offset_bits in #(
14810 no | unknown) ;;
14812 cat >>confdefs.h <<_ACEOF
14813 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14814 _ACEOF
14816 esac
14817 rm -rf conftest*
14818 if test $ac_cv_sys_file_offset_bits = unknown; then
14819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14820 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14821 if ${ac_cv_sys_large_files+:} false; then :
14822 $as_echo_n "(cached) " >&6
14823 else
14824 while :; do
14825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14826 /* end confdefs.h. */
14827 #include <sys/types.h>
14828 /* Check that off_t can represent 2**63 - 1 correctly.
14829 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14830 since some C++ compilers masquerading as C compilers
14831 incorrectly reject 9223372036854775807. */
14832 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14833 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14834 && LARGE_OFF_T % 2147483647 == 1)
14835 ? 1 : -1];
14837 main ()
14841 return 0;
14843 _ACEOF
14844 if ac_fn_c_try_compile "$LINENO"; then :
14845 ac_cv_sys_large_files=no; break
14847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14849 /* end confdefs.h. */
14850 #define _LARGE_FILES 1
14851 #include <sys/types.h>
14852 /* Check that off_t can represent 2**63 - 1 correctly.
14853 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14854 since some C++ compilers masquerading as C compilers
14855 incorrectly reject 9223372036854775807. */
14856 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14857 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14858 && LARGE_OFF_T % 2147483647 == 1)
14859 ? 1 : -1];
14861 main ()
14865 return 0;
14867 _ACEOF
14868 if ac_fn_c_try_compile "$LINENO"; then :
14869 ac_cv_sys_large_files=1; break
14871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14872 ac_cv_sys_large_files=unknown
14873 break
14874 done
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14877 $as_echo "$ac_cv_sys_large_files" >&6; }
14878 case $ac_cv_sys_large_files in #(
14879 no | unknown) ;;
14881 cat >>confdefs.h <<_ACEOF
14882 #define _LARGE_FILES $ac_cv_sys_large_files
14883 _ACEOF
14885 esac
14886 rm -rf conftest*
14895 # The cast to long int works around a bug in the HP C Compiler
14896 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14897 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14898 # This bug is HP SR number 8606223364.
14899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14900 $as_echo_n "checking size of off_t... " >&6; }
14901 if ${ac_cv_sizeof_off_t+:} false; then :
14902 $as_echo_n "(cached) " >&6
14903 else
14904 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
14906 else
14907 if test "$ac_cv_type_off_t" = yes; then
14908 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14909 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14910 as_fn_error 77 "cannot compute sizeof (off_t)
14911 See \`config.log' for more details" "$LINENO" 5; }
14912 else
14913 ac_cv_sizeof_off_t=0
14918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14919 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14923 cat >>confdefs.h <<_ACEOF
14924 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14925 _ACEOF
14929 # If we don't have largefile support, can't handle segsize >= 2GB.
14930 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14931 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14934 # The cast to long int works around a bug in the HP C Compiler
14935 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14936 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14937 # This bug is HP SR number 8606223364.
14938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14939 $as_echo_n "checking size of bool... " >&6; }
14940 if ${ac_cv_sizeof_bool+:} false; then :
14941 $as_echo_n "(cached) " >&6
14942 else
14943 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
14944 #include <stdbool.h>
14945 #endif
14946 "; then :
14948 else
14949 if test "$ac_cv_type_bool" = yes; then
14950 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14951 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14952 as_fn_error 77 "cannot compute sizeof (bool)
14953 See \`config.log' for more details" "$LINENO" 5; }
14954 else
14955 ac_cv_sizeof_bool=0
14960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14961 $as_echo "$ac_cv_sizeof_bool" >&6; }
14965 cat >>confdefs.h <<_ACEOF
14966 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14967 _ACEOF
14971 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
14973 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
14979 ## Functions, global variables
14982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14983 $as_echo_n "checking for int timezone... " >&6; }
14984 if ${pgac_cv_var_int_timezone+:} false; then :
14985 $as_echo_n "(cached) " >&6
14986 else
14987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14988 /* end confdefs.h. */
14989 #include <time.h>
14990 int res;
14992 main ()
14994 #ifndef __CYGWIN__
14995 res = timezone / 60;
14996 #else
14997 res = _timezone / 60;
14998 #endif
15000 return 0;
15002 _ACEOF
15003 if ac_fn_c_try_link "$LINENO"; then :
15004 pgac_cv_var_int_timezone=yes
15005 else
15006 pgac_cv_var_int_timezone=no
15008 rm -f core conftest.err conftest.$ac_objext \
15009 conftest$ac_exeext conftest.$ac_ext
15011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15012 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15013 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15015 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15019 $as_echo_n "checking types of arguments for accept()... " >&6; }
15020 if ${ac_cv_func_accept_return+:} false; then :
15021 $as_echo_n "(cached) " >&6
15022 else
15023 if ${ac_cv_func_accept_arg1+:} false; then :
15024 $as_echo_n "(cached) " >&6
15025 else
15026 if ${ac_cv_func_accept_arg2+:} false; then :
15027 $as_echo_n "(cached) " >&6
15028 else
15029 if ${ac_cv_func_accept_arg3+:} false; then :
15030 $as_echo_n "(cached) " >&6
15031 else
15032 for ac_cv_func_accept_return in 'int' 'SOCKET WSAAPI' 'unsigned int PASCAL'; do
15033 for ac_cv_func_accept_arg1 in 'int' 'SOCKET' 'unsigned int'; do
15034 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15035 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15037 /* end confdefs.h. */
15038 #include <sys/types.h>
15039 #include <sys/socket.h>
15040 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15041 _ACEOF
15042 if ac_fn_c_try_compile "$LINENO"; then :
15043 ac_not_found=no; break 4
15044 else
15045 ac_not_found=yes
15047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15048 done
15049 done
15050 done
15051 done
15052 if test "$ac_not_found" = yes; then
15053 as_fn_error $? "could not determine argument types" "$LINENO" 5
15055 if test "$ac_cv_func_accept_arg3" = "void"; then
15056 ac_cv_func_accept_arg3=int
15066 { $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
15067 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15069 cat >>confdefs.h <<_ACEOF
15070 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15071 _ACEOF
15074 cat >>confdefs.h <<_ACEOF
15075 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15076 _ACEOF
15079 cat >>confdefs.h <<_ACEOF
15080 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15081 _ACEOF
15084 cat >>confdefs.h <<_ACEOF
15085 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15086 _ACEOF
15089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15090 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15091 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15092 $as_echo_n "(cached) " >&6
15093 else
15094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15095 /* end confdefs.h. */
15096 #include <sys/time.h>
15098 main ()
15100 struct timeval *tp;
15101 struct timezone *tzp;
15102 gettimeofday(tp,tzp);
15104 return 0;
15106 _ACEOF
15107 if ac_fn_c_try_compile "$LINENO"; then :
15108 pgac_cv_func_gettimeofday_1arg=no
15109 else
15110 pgac_cv_func_gettimeofday_1arg=yes
15112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15115 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15116 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15118 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15123 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15124 if ${pgac_cv_func_wcstombs_l+:} false; then :
15125 $as_echo_n "(cached) " >&6
15126 else
15127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15128 /* end confdefs.h. */
15129 #include <stdlib.h>
15130 #include <locale.h>
15132 main ()
15134 #ifndef wcstombs_l
15135 (void) wcstombs_l;
15136 #endif
15138 return 0;
15140 _ACEOF
15141 if ac_fn_c_try_compile "$LINENO"; then :
15142 pgac_cv_func_wcstombs_l='yes'
15143 else
15144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15145 /* end confdefs.h. */
15146 #include <stdlib.h>
15147 #include <locale.h>
15148 #include <xlocale.h>
15150 main ()
15152 #ifndef wcstombs_l
15153 (void) wcstombs_l;
15154 #endif
15156 return 0;
15158 _ACEOF
15159 if ac_fn_c_try_compile "$LINENO"; then :
15160 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15161 else
15162 pgac_cv_func_wcstombs_l='no'
15164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15169 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15170 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15172 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15176 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15177 # symbols that that library has no business exposing to the world. Pending
15178 # acquisition of a clue by those developers, ignore libedit (including its
15179 # possible alias of libreadline) while checking for everything else.
15180 LIBS_including_readline="$LIBS"
15181 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15183 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 sync_file_range uselocale wcstombs_l writev
15184 do :
15185 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15186 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15187 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15188 cat >>confdefs.h <<_ACEOF
15189 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15190 _ACEOF
15193 done
15196 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15198 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15199 if ${pgac_cv__builtin_bswap16+:} false; then :
15200 $as_echo_n "(cached) " >&6
15201 else
15202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15203 /* end confdefs.h. */
15206 call__builtin_bswap16(int x)
15208 return __builtin_bswap16(x);
15211 main ()
15215 return 0;
15217 _ACEOF
15218 if ac_fn_c_try_link "$LINENO"; then :
15219 pgac_cv__builtin_bswap16=yes
15220 else
15221 pgac_cv__builtin_bswap16=no
15223 rm -f core conftest.err conftest.$ac_objext \
15224 conftest$ac_exeext conftest.$ac_ext
15226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15227 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15228 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15230 cat >>confdefs.h <<_ACEOF
15231 #define HAVE__BUILTIN_BSWAP16 1
15232 _ACEOF
15235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15236 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15237 if ${pgac_cv__builtin_bswap32+:} false; then :
15238 $as_echo_n "(cached) " >&6
15239 else
15240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15241 /* end confdefs.h. */
15244 call__builtin_bswap32(int x)
15246 return __builtin_bswap32(x);
15249 main ()
15253 return 0;
15255 _ACEOF
15256 if ac_fn_c_try_link "$LINENO"; then :
15257 pgac_cv__builtin_bswap32=yes
15258 else
15259 pgac_cv__builtin_bswap32=no
15261 rm -f core conftest.err conftest.$ac_objext \
15262 conftest$ac_exeext conftest.$ac_ext
15264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15265 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15266 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15268 cat >>confdefs.h <<_ACEOF
15269 #define HAVE__BUILTIN_BSWAP32 1
15270 _ACEOF
15273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15274 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15275 if ${pgac_cv__builtin_bswap64+:} false; then :
15276 $as_echo_n "(cached) " >&6
15277 else
15278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15279 /* end confdefs.h. */
15282 call__builtin_bswap64(long int x)
15284 return __builtin_bswap64(x);
15287 main ()
15291 return 0;
15293 _ACEOF
15294 if ac_fn_c_try_link "$LINENO"; then :
15295 pgac_cv__builtin_bswap64=yes
15296 else
15297 pgac_cv__builtin_bswap64=no
15299 rm -f core conftest.err conftest.$ac_objext \
15300 conftest$ac_exeext conftest.$ac_ext
15302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15303 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15304 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15306 cat >>confdefs.h <<_ACEOF
15307 #define HAVE__BUILTIN_BSWAP64 1
15308 _ACEOF
15311 # We assume that we needn't test all widths of these explicitly:
15312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15313 $as_echo_n "checking for __builtin_clz... " >&6; }
15314 if ${pgac_cv__builtin_clz+:} false; then :
15315 $as_echo_n "(cached) " >&6
15316 else
15317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15318 /* end confdefs.h. */
15321 call__builtin_clz(unsigned int x)
15323 return __builtin_clz(x);
15326 main ()
15330 return 0;
15332 _ACEOF
15333 if ac_fn_c_try_link "$LINENO"; then :
15334 pgac_cv__builtin_clz=yes
15335 else
15336 pgac_cv__builtin_clz=no
15338 rm -f core conftest.err conftest.$ac_objext \
15339 conftest$ac_exeext conftest.$ac_ext
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15342 $as_echo "$pgac_cv__builtin_clz" >&6; }
15343 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15345 cat >>confdefs.h <<_ACEOF
15346 #define HAVE__BUILTIN_CLZ 1
15347 _ACEOF
15350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15351 $as_echo_n "checking for __builtin_ctz... " >&6; }
15352 if ${pgac_cv__builtin_ctz+:} false; then :
15353 $as_echo_n "(cached) " >&6
15354 else
15355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15356 /* end confdefs.h. */
15359 call__builtin_ctz(unsigned int x)
15361 return __builtin_ctz(x);
15364 main ()
15368 return 0;
15370 _ACEOF
15371 if ac_fn_c_try_link "$LINENO"; then :
15372 pgac_cv__builtin_ctz=yes
15373 else
15374 pgac_cv__builtin_ctz=no
15376 rm -f core conftest.err conftest.$ac_objext \
15377 conftest$ac_exeext conftest.$ac_ext
15379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15380 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15381 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15383 cat >>confdefs.h <<_ACEOF
15384 #define HAVE__BUILTIN_CTZ 1
15385 _ACEOF
15388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15389 $as_echo_n "checking for __builtin_popcount... " >&6; }
15390 if ${pgac_cv__builtin_popcount+:} false; then :
15391 $as_echo_n "(cached) " >&6
15392 else
15393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15394 /* end confdefs.h. */
15397 call__builtin_popcount(unsigned int x)
15399 return __builtin_popcount(x);
15402 main ()
15406 return 0;
15408 _ACEOF
15409 if ac_fn_c_try_link "$LINENO"; then :
15410 pgac_cv__builtin_popcount=yes
15411 else
15412 pgac_cv__builtin_popcount=no
15414 rm -f core conftest.err conftest.$ac_objext \
15415 conftest$ac_exeext conftest.$ac_ext
15417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15418 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15419 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15421 cat >>confdefs.h <<_ACEOF
15422 #define HAVE__BUILTIN_POPCOUNT 1
15423 _ACEOF
15427 # We require 64-bit fseeko() to be available, but run this check anyway
15428 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15430 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15431 if ${ac_cv_sys_largefile_source+:} false; then :
15432 $as_echo_n "(cached) " >&6
15433 else
15434 while :; do
15435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15436 /* end confdefs.h. */
15437 #include <sys/types.h> /* for off_t */
15438 #include <stdio.h>
15440 main ()
15442 int (*fp) (FILE *, off_t, int) = fseeko;
15443 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15445 return 0;
15447 _ACEOF
15448 if ac_fn_c_try_link "$LINENO"; then :
15449 ac_cv_sys_largefile_source=no; break
15451 rm -f core conftest.err conftest.$ac_objext \
15452 conftest$ac_exeext conftest.$ac_ext
15453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15454 /* end confdefs.h. */
15455 #define _LARGEFILE_SOURCE 1
15456 #include <sys/types.h> /* for off_t */
15457 #include <stdio.h>
15459 main ()
15461 int (*fp) (FILE *, off_t, int) = fseeko;
15462 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15464 return 0;
15466 _ACEOF
15467 if ac_fn_c_try_link "$LINENO"; then :
15468 ac_cv_sys_largefile_source=1; break
15470 rm -f core conftest.err conftest.$ac_objext \
15471 conftest$ac_exeext conftest.$ac_ext
15472 ac_cv_sys_largefile_source=unknown
15473 break
15474 done
15476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15477 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15478 case $ac_cv_sys_largefile_source in #(
15479 no | unknown) ;;
15481 cat >>confdefs.h <<_ACEOF
15482 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15483 _ACEOF
15485 esac
15486 rm -rf conftest*
15488 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15489 # in glibc 2.1.3, but that breaks too many other things.
15490 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15491 if test $ac_cv_sys_largefile_source != unknown; then
15493 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15498 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15499 # by calling it, 2009-04-02
15500 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15501 # The Clang compiler raises a warning for an undeclared identifier that matches
15502 # a compiler builtin function. All extant Clang versions are affected, as of
15503 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15504 # C and Objective C languages, but Clang does report an error under C++ and
15505 # Objective C++.
15507 # Passing -fno-builtin to the compiler would suppress this problem. That
15508 # strategy would have the advantage of being insensitive to stray warnings, but
15509 # it would make tests less realistic.
15510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15511 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15512 if ${ac_cv_c_decl_report+:} false; then :
15513 $as_echo_n "(cached) " >&6
15514 else
15515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15516 /* end confdefs.h. */
15519 main ()
15521 (void) strchr;
15523 return 0;
15525 _ACEOF
15526 if ac_fn_c_try_compile "$LINENO"; then :
15527 if test -s conftest.err; then :
15528 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15529 # valid AC_CHECK_DECL input. No library function is consistently available
15530 # on freestanding implementations, so test against a dummy declaration.
15531 # Include always-available headers on the off chance that they somehow
15532 # elicit warnings.
15533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15534 /* end confdefs.h. */
15535 #include <float.h>
15536 #include <limits.h>
15537 #include <stdarg.h>
15538 #include <stddef.h>
15539 extern void ac_decl (int, char *);
15541 main ()
15543 #ifdef __cplusplus
15544 (void) ac_decl ((int) 0, (char *) 0);
15545 (void) ac_decl;
15546 #else
15547 (void) ac_decl;
15548 #endif
15551 return 0;
15553 _ACEOF
15554 if ac_fn_c_try_compile "$LINENO"; then :
15555 if test -s conftest.err; then :
15556 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15557 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15558 as_fn_error $? "cannot detect from compiler exit status or warnings
15559 See \`config.log' for more details" "$LINENO" 5; }
15560 else
15561 ac_cv_c_decl_report=warning
15563 else
15564 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15565 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15566 as_fn_error $? "cannot compile a simple declaration test
15567 See \`config.log' for more details" "$LINENO" 5; }
15569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15570 else
15571 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15572 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15573 as_fn_error $? "compiler does not report undeclared identifiers
15574 See \`config.log' for more details" "$LINENO" 5; }
15576 else
15577 ac_cv_c_decl_report=error
15579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15582 $as_echo "$ac_cv_c_decl_report" >&6; }
15584 case $ac_cv_c_decl_report in
15585 warning) ac_c_decl_warn_flag=yes ;;
15586 *) ac_c_decl_warn_flag= ;;
15587 esac
15589 if test "$PORTNAME" != "solaris"; then :
15591 for ac_func in posix_fadvise
15592 do :
15593 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15594 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15595 cat >>confdefs.h <<_ACEOF
15596 #define HAVE_POSIX_FADVISE 1
15597 _ACEOF
15600 done
15602 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15604 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15605 ac_have_decl=1
15606 else
15607 ac_have_decl=0
15610 cat >>confdefs.h <<_ACEOF
15611 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15612 _ACEOF
15615 fi # fi
15617 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15619 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15620 ac_have_decl=1
15621 else
15622 ac_have_decl=0
15625 cat >>confdefs.h <<_ACEOF
15626 #define HAVE_DECL_FDATASYNC $ac_have_decl
15627 _ACEOF
15629 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15630 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15631 ac_have_decl=1
15632 else
15633 ac_have_decl=0
15636 cat >>confdefs.h <<_ACEOF
15637 #define HAVE_DECL_STRLCAT $ac_have_decl
15638 _ACEOF
15639 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15640 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15641 ac_have_decl=1
15642 else
15643 ac_have_decl=0
15646 cat >>confdefs.h <<_ACEOF
15647 #define HAVE_DECL_STRLCPY $ac_have_decl
15648 _ACEOF
15649 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15650 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15651 ac_have_decl=1
15652 else
15653 ac_have_decl=0
15656 cat >>confdefs.h <<_ACEOF
15657 #define HAVE_DECL_STRNLEN $ac_have_decl
15658 _ACEOF
15660 # This is probably only present on macOS, but may as well check always
15661 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15663 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15664 ac_have_decl=1
15665 else
15666 ac_have_decl=0
15669 cat >>confdefs.h <<_ACEOF
15670 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15671 _ACEOF
15674 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15676 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15677 ac_have_decl=1
15678 else
15679 ac_have_decl=0
15682 cat >>confdefs.h <<_ACEOF
15683 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15684 _ACEOF
15685 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15687 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15688 ac_have_decl=1
15689 else
15690 ac_have_decl=0
15693 cat >>confdefs.h <<_ACEOF
15694 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15695 _ACEOF
15698 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15699 #include <netinet/in.h>
15701 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15703 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15709 $as_echo_n "checking for PS_STRINGS... " >&6; }
15710 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15711 $as_echo_n "(cached) " >&6
15712 else
15713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15714 /* end confdefs.h. */
15715 #include <machine/vmparam.h>
15716 #include <sys/exec.h>
15719 main ()
15721 PS_STRINGS->ps_nargvstr = 1;
15722 PS_STRINGS->ps_argvstr = "foo";
15724 return 0;
15726 _ACEOF
15727 if ac_fn_c_try_link "$LINENO"; then :
15728 pgac_cv_var_PS_STRINGS=yes
15729 else
15730 pgac_cv_var_PS_STRINGS=no
15732 rm -f core conftest.err conftest.$ac_objext \
15733 conftest$ac_exeext conftest.$ac_ext
15735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15736 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15737 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15739 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15743 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15744 if test "x$ac_cv_func_dlopen" = xyes; then :
15745 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15747 else
15748 case " $LIBOBJS " in
15749 *" dlopen.$ac_objext "* ) ;;
15750 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15752 esac
15756 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
15757 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
15758 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
15760 else
15761 case " $LIBOBJS " in
15762 *" explicit_bzero.$ac_objext "* ) ;;
15763 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
15765 esac
15769 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15770 if test "x$ac_cv_func_fls" = xyes; then :
15771 $as_echo "#define HAVE_FLS 1" >>confdefs.h
15773 else
15774 case " $LIBOBJS " in
15775 *" fls.$ac_objext "* ) ;;
15776 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15778 esac
15782 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15783 if test "x$ac_cv_func_getopt" = xyes; then :
15784 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15786 else
15787 case " $LIBOBJS " in
15788 *" getopt.$ac_objext "* ) ;;
15789 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15791 esac
15795 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15796 if test "x$ac_cv_func_getpeereid" = xyes; then :
15797 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15799 else
15800 case " $LIBOBJS " in
15801 *" getpeereid.$ac_objext "* ) ;;
15802 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15804 esac
15808 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15809 if test "x$ac_cv_func_getrusage" = xyes; then :
15810 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15812 else
15813 case " $LIBOBJS " in
15814 *" getrusage.$ac_objext "* ) ;;
15815 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15817 esac
15821 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15822 if test "x$ac_cv_func_inet_aton" = xyes; then :
15823 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15825 else
15826 case " $LIBOBJS " in
15827 *" inet_aton.$ac_objext "* ) ;;
15828 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15830 esac
15834 ac_fn_c_check_func "$LINENO" "link" "ac_cv_func_link"
15835 if test "x$ac_cv_func_link" = xyes; then :
15836 $as_echo "#define HAVE_LINK 1" >>confdefs.h
15838 else
15839 case " $LIBOBJS " in
15840 *" link.$ac_objext "* ) ;;
15841 *) LIBOBJS="$LIBOBJS link.$ac_objext"
15843 esac
15847 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15848 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15849 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15851 else
15852 case " $LIBOBJS " in
15853 *" mkdtemp.$ac_objext "* ) ;;
15854 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15856 esac
15860 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15861 if test "x$ac_cv_func_pread" = xyes; then :
15862 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15864 else
15865 case " $LIBOBJS " in
15866 *" pread.$ac_objext "* ) ;;
15867 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15869 esac
15873 ac_fn_c_check_func "$LINENO" "preadv" "ac_cv_func_preadv"
15874 if test "x$ac_cv_func_preadv" = xyes; then :
15875 $as_echo "#define HAVE_PREADV 1" >>confdefs.h
15877 else
15878 case " $LIBOBJS " in
15879 *" preadv.$ac_objext "* ) ;;
15880 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
15882 esac
15886 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15887 if test "x$ac_cv_func_pwrite" = xyes; then :
15888 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15890 else
15891 case " $LIBOBJS " in
15892 *" pwrite.$ac_objext "* ) ;;
15893 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15895 esac
15899 ac_fn_c_check_func "$LINENO" "pwritev" "ac_cv_func_pwritev"
15900 if test "x$ac_cv_func_pwritev" = xyes; then :
15901 $as_echo "#define HAVE_PWRITEV 1" >>confdefs.h
15903 else
15904 case " $LIBOBJS " in
15905 *" pwritev.$ac_objext "* ) ;;
15906 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
15908 esac
15912 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15913 if test "x$ac_cv_func_random" = xyes; then :
15914 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15916 else
15917 case " $LIBOBJS " in
15918 *" random.$ac_objext "* ) ;;
15919 *) LIBOBJS="$LIBOBJS random.$ac_objext"
15921 esac
15925 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15926 if test "x$ac_cv_func_srandom" = xyes; then :
15927 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15929 else
15930 case " $LIBOBJS " in
15931 *" srandom.$ac_objext "* ) ;;
15932 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15934 esac
15938 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15939 if test "x$ac_cv_func_strlcat" = xyes; then :
15940 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15942 else
15943 case " $LIBOBJS " in
15944 *" strlcat.$ac_objext "* ) ;;
15945 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15947 esac
15951 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15952 if test "x$ac_cv_func_strlcpy" = xyes; then :
15953 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15955 else
15956 case " $LIBOBJS " in
15957 *" strlcpy.$ac_objext "* ) ;;
15958 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15960 esac
15964 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15965 if test "x$ac_cv_func_strnlen" = xyes; then :
15966 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15968 else
15969 case " $LIBOBJS " in
15970 *" strnlen.$ac_objext "* ) ;;
15971 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15973 esac
15977 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
15978 if test "x$ac_cv_func_strtof" = xyes; then :
15979 $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
15981 else
15982 case " $LIBOBJS " in
15983 *" strtof.$ac_objext "* ) ;;
15984 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15986 esac
15992 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
15993 # Cygwin and (apparently, based on test results) Mingw both
15994 # have a broken strtof(), so substitute the same replacement
15995 # code we use with VS2013. That's not a perfect fix, since
15996 # (unlike with VS2013) it doesn't avoid double-rounding, but
15997 # we have no better options. To get that, though, we have to
15998 # force the file to be compiled despite HAVE_STRTOF.
15999 case " $LIBOBJS " in
16000 *" strtof.$ac_objext "* ) ;;
16001 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16003 esac
16005 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16006 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16009 case $host_os in
16010 # Windows uses a specialised env handler
16011 mingw*)
16013 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16016 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16018 ac_cv_func_setenv=yes
16019 ac_cv_func_unsetenv=yes
16022 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
16023 if test "x$ac_cv_func_setenv" = xyes; then :
16024 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16026 else
16027 case " $LIBOBJS " in
16028 *" setenv.$ac_objext "* ) ;;
16029 *) LIBOBJS="$LIBOBJS setenv.$ac_objext"
16031 esac
16035 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16036 if test "x$ac_cv_func_unsetenv" = xyes; then :
16037 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16039 else
16040 case " $LIBOBJS " in
16041 *" unsetenv.$ac_objext "* ) ;;
16042 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16044 esac
16050 esac
16052 # System's version of getaddrinfo(), if any, may be used only if we found
16053 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16054 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16055 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16056 test "$PORTNAME" != "win32"; then
16057 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16058 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16059 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16061 else
16062 case " $LIBOBJS " in
16063 *" getaddrinfo.$ac_objext "* ) ;;
16064 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16066 esac
16071 else
16072 case " $LIBOBJS " in
16073 *" getaddrinfo.$ac_objext "* ) ;;
16074 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16076 esac
16080 # Similarly, use system's getopt_long() only if system provides struct option.
16081 if test x"$ac_cv_type_struct_option" = xyes ; then
16082 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16083 if test "x$ac_cv_func_getopt_long" = xyes; then :
16084 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16086 else
16087 case " $LIBOBJS " in
16088 *" getopt_long.$ac_objext "* ) ;;
16089 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16091 esac
16096 else
16097 case " $LIBOBJS " in
16098 *" getopt_long.$ac_objext "* ) ;;
16099 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16101 esac
16105 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16106 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16107 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16108 case " $LIBOBJS " in
16109 *" getopt.$ac_objext "* ) ;;
16110 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16112 esac
16116 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16117 # so always use our version on Windows.
16118 if test "$PORTNAME" = "win32"; then
16119 case " $LIBOBJS " in
16120 *" getopt.$ac_objext "* ) ;;
16121 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16123 esac
16125 case " $LIBOBJS " in
16126 *" getopt_long.$ac_objext "* ) ;;
16127 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16129 esac
16133 # Win32 (really MinGW) support
16134 if test "$PORTNAME" = "win32"; then
16135 for ac_func in _configthreadlocale
16136 do :
16137 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16138 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16139 cat >>confdefs.h <<_ACEOF
16140 #define HAVE__CONFIGTHREADLOCALE 1
16141 _ACEOF
16144 done
16146 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16147 if test "x$ac_cv_func_gettimeofday" = xyes; then :
16148 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16150 else
16151 case " $LIBOBJS " in
16152 *" gettimeofday.$ac_objext "* ) ;;
16153 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16155 esac
16160 case " $LIBOBJS " in
16161 *" dirmod.$ac_objext "* ) ;;
16162 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16164 esac
16166 case " $LIBOBJS " in
16167 *" kill.$ac_objext "* ) ;;
16168 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16170 esac
16172 case " $LIBOBJS " in
16173 *" open.$ac_objext "* ) ;;
16174 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16176 esac
16178 case " $LIBOBJS " in
16179 *" system.$ac_objext "* ) ;;
16180 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16182 esac
16184 case " $LIBOBJS " in
16185 *" win32env.$ac_objext "* ) ;;
16186 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16188 esac
16190 case " $LIBOBJS " in
16191 *" win32error.$ac_objext "* ) ;;
16192 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16194 esac
16196 case " $LIBOBJS " in
16197 *" win32security.$ac_objext "* ) ;;
16198 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16200 esac
16202 case " $LIBOBJS " in
16203 *" win32setlocale.$ac_objext "* ) ;;
16204 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16206 esac
16208 case " $LIBOBJS " in
16209 *" win32stat.$ac_objext "* ) ;;
16210 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16212 esac
16215 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16217 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16218 #define WIN32_LEAN_AND_MEAN
16219 #include <windows.h>
16220 #include <string.h>
16221 #include <dbghelp.h>
16223 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16225 cat >>confdefs.h <<_ACEOF
16226 #define HAVE_MINIDUMP_TYPE 1
16227 _ACEOF
16229 pgac_minidump_type=yes
16230 else
16231 pgac_minidump_type=no
16235 if test x"$pgac_minidump_type" = x"yes" ; then
16236 have_win32_dbghelp=yes
16238 else
16239 have_win32_dbghelp=no
16243 # Cygwin needs only a bit of that
16244 if test "$PORTNAME" = "cygwin"; then
16245 case " $LIBOBJS " in
16246 *" dirmod.$ac_objext "* ) ;;
16247 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16249 esac
16253 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16254 if test "x$ac_cv_func_syslog" = xyes; then :
16255 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16256 if test "x$ac_cv_header_syslog_h" = xyes; then :
16258 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16267 $as_echo_n "checking for opterr... " >&6; }
16268 if ${pgac_cv_var_int_opterr+:} false; then :
16269 $as_echo_n "(cached) " >&6
16270 else
16271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16272 /* end confdefs.h. */
16273 #include <unistd.h>
16275 main ()
16277 extern int opterr; opterr = 1;
16279 return 0;
16281 _ACEOF
16282 if ac_fn_c_try_link "$LINENO"; then :
16283 pgac_cv_var_int_opterr=yes
16284 else
16285 pgac_cv_var_int_opterr=no
16287 rm -f core conftest.err conftest.$ac_objext \
16288 conftest$ac_exeext conftest.$ac_ext
16290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16291 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16292 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16294 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16299 $as_echo_n "checking for optreset... " >&6; }
16300 if ${pgac_cv_var_int_optreset+:} false; then :
16301 $as_echo_n "(cached) " >&6
16302 else
16303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16304 /* end confdefs.h. */
16305 #include <unistd.h>
16307 main ()
16309 extern int optreset; optreset = 1;
16311 return 0;
16313 _ACEOF
16314 if ac_fn_c_try_link "$LINENO"; then :
16315 pgac_cv_var_int_optreset=yes
16316 else
16317 pgac_cv_var_int_optreset=no
16319 rm -f core conftest.err conftest.$ac_objext \
16320 conftest$ac_exeext conftest.$ac_ext
16322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16323 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16324 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16326 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16330 for ac_func in strtoll __strtoll strtoq
16331 do :
16332 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16333 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16334 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16335 cat >>confdefs.h <<_ACEOF
16336 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16337 _ACEOF
16338 break
16340 done
16342 for ac_func in strtoull __strtoull strtouq
16343 do :
16344 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16345 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16346 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16347 cat >>confdefs.h <<_ACEOF
16348 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16349 _ACEOF
16350 break
16352 done
16354 # strto[u]ll may exist but not be declared
16355 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16356 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16357 ac_have_decl=1
16358 else
16359 ac_have_decl=0
16362 cat >>confdefs.h <<_ACEOF
16363 #define HAVE_DECL_STRTOLL $ac_have_decl
16364 _ACEOF
16365 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16366 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16367 ac_have_decl=1
16368 else
16369 ac_have_decl=0
16372 cat >>confdefs.h <<_ACEOF
16373 #define HAVE_DECL_STRTOULL $ac_have_decl
16374 _ACEOF
16377 if test "$with_icu" = yes; then
16378 ac_save_CPPFLAGS=$CPPFLAGS
16379 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16381 # Verify we have ICU's header files
16382 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16383 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16385 else
16386 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16391 CPPFLAGS=$ac_save_CPPFLAGS
16394 if test "$with_llvm" = yes; then
16396 # Check which functionality is present
16397 SAVE_CPPFLAGS="$CPPFLAGS"
16398 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16399 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16401 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16402 ac_have_decl=1
16403 else
16404 ac_have_decl=0
16407 cat >>confdefs.h <<_ACEOF
16408 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16409 _ACEOF
16411 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16413 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16414 ac_have_decl=1
16415 else
16416 ac_have_decl=0
16419 cat >>confdefs.h <<_ACEOF
16420 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16421 _ACEOF
16422 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16424 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16425 ac_have_decl=1
16426 else
16427 ac_have_decl=0
16430 cat >>confdefs.h <<_ACEOF
16431 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16432 _ACEOF
16434 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16436 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16437 ac_have_decl=1
16438 else
16439 ac_have_decl=0
16442 cat >>confdefs.h <<_ACEOF
16443 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16444 _ACEOF
16445 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16447 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16448 ac_have_decl=1
16449 else
16450 ac_have_decl=0
16453 cat >>confdefs.h <<_ACEOF
16454 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16455 _ACEOF
16457 CPPFLAGS="$SAVE_CPPFLAGS"
16461 # Lastly, restore full LIBS list and check for readline/libedit symbols
16462 LIBS="$LIBS_including_readline"
16464 if test "$with_readline" = yes; then
16465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16466 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16467 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16468 $as_echo_n "(cached) " >&6
16469 else
16470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16471 /* end confdefs.h. */
16472 #include <stdio.h>
16473 #if defined(HAVE_READLINE_READLINE_H)
16474 #include <readline/readline.h>
16475 #elif defined(HAVE_EDITLINE_READLINE_H)
16476 #include <editline/readline.h>
16477 #elif defined(HAVE_READLINE_H)
16478 #include <readline.h>
16479 #endif
16482 main ()
16484 rl_completion_append_character = 'x';
16486 return 0;
16488 _ACEOF
16489 if ac_fn_c_try_link "$LINENO"; then :
16490 pgac_cv_var_rl_completion_append_character=yes
16491 else
16492 pgac_cv_var_rl_completion_append_character=no
16494 rm -f core conftest.err conftest.$ac_objext \
16495 conftest$ac_exeext conftest.$ac_ext
16497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16498 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16499 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16501 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16505 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16506 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16507 $as_echo_n "(cached) " >&6
16508 else
16509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16510 /* end confdefs.h. */
16511 #include <stdio.h>
16512 #if defined(HAVE_READLINE_READLINE_H)
16513 #include <readline/readline.h>
16514 #elif defined(HAVE_EDITLINE_READLINE_H)
16515 #include <editline/readline.h>
16516 #elif defined(HAVE_READLINE_H)
16517 #include <readline.h>
16518 #endif
16521 main ()
16523 rl_completion_suppress_quote = 1;
16525 return 0;
16527 _ACEOF
16528 if ac_fn_c_try_link "$LINENO"; then :
16529 pgac_cv_var_rl_completion_suppress_quote=yes
16530 else
16531 pgac_cv_var_rl_completion_suppress_quote=no
16533 rm -f core conftest.err conftest.$ac_objext \
16534 conftest$ac_exeext conftest.$ac_ext
16536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16537 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16538 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16540 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16544 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16545 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16546 $as_echo_n "(cached) " >&6
16547 else
16548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16549 /* end confdefs.h. */
16550 #include <stdio.h>
16551 #if defined(HAVE_READLINE_READLINE_H)
16552 #include <readline/readline.h>
16553 #elif defined(HAVE_EDITLINE_READLINE_H)
16554 #include <editline/readline.h>
16555 #elif defined(HAVE_READLINE_H)
16556 #include <readline.h>
16557 #endif
16560 main ()
16562 rl_filename_quote_characters = "x";
16564 return 0;
16566 _ACEOF
16567 if ac_fn_c_try_link "$LINENO"; then :
16568 pgac_cv_var_rl_filename_quote_characters=yes
16569 else
16570 pgac_cv_var_rl_filename_quote_characters=no
16572 rm -f core conftest.err conftest.$ac_objext \
16573 conftest$ac_exeext conftest.$ac_ext
16575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16576 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16577 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16579 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16583 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16584 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16585 $as_echo_n "(cached) " >&6
16586 else
16587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16588 /* end confdefs.h. */
16589 #include <stdio.h>
16590 #if defined(HAVE_READLINE_READLINE_H)
16591 #include <readline/readline.h>
16592 #elif defined(HAVE_EDITLINE_READLINE_H)
16593 #include <editline/readline.h>
16594 #elif defined(HAVE_READLINE_H)
16595 #include <readline.h>
16596 #endif
16599 main ()
16601 rl_filename_quoting_function = 0;
16603 return 0;
16605 _ACEOF
16606 if ac_fn_c_try_link "$LINENO"; then :
16607 pgac_cv_var_rl_filename_quoting_function=yes
16608 else
16609 pgac_cv_var_rl_filename_quoting_function=no
16611 rm -f core conftest.err conftest.$ac_objext \
16612 conftest$ac_exeext conftest.$ac_ext
16614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16615 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16616 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16618 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16622 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16623 do :
16624 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16625 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16626 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16627 cat >>confdefs.h <<_ACEOF
16628 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16629 _ACEOF
16632 done
16634 for ac_func in append_history history_truncate_file
16635 do :
16636 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16637 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16638 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16639 cat >>confdefs.h <<_ACEOF
16640 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16641 _ACEOF
16644 done
16649 # This test makes sure that run tests work at all. Sometimes a shared
16650 # library is found by the linker, but the runtime linker can't find it.
16651 # This check should come after all modifications of compiler or linker
16652 # variables, and before any other run tests.
16653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16654 $as_echo_n "checking test program... " >&6; }
16655 if test "$cross_compiling" = yes; then :
16656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16657 $as_echo "cross-compiling" >&6; }
16658 else
16659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16660 /* end confdefs.h. */
16661 int main() { return 0; }
16662 _ACEOF
16663 if ac_fn_c_try_run "$LINENO"; then :
16664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16665 $as_echo "ok" >&6; }
16666 else
16667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16668 $as_echo "failed" >&6; }
16669 as_fn_error $? "
16670 Could not execute a simple test program. This may be a problem
16671 related to locating shared libraries. Check the file 'config.log'
16672 for the exact reason." "$LINENO" 5
16674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16675 conftest.$ac_objext conftest.beam conftest.$ac_ext
16679 # --------------------
16680 # Run tests below here
16681 # --------------------
16684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16685 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16686 if ${pgac_cv_type_long_int_64+:} false; then :
16687 $as_echo_n "(cached) " >&6
16688 else
16689 if test "$cross_compiling" = yes; then :
16690 # If cross-compiling, check the size reported by the compiler and
16691 # trust that the arithmetic works.
16692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16693 /* end confdefs.h. */
16696 main ()
16698 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16699 test_array [0] = 0;
16700 return test_array [0];
16703 return 0;
16705 _ACEOF
16706 if ac_fn_c_try_compile "$LINENO"; then :
16707 pgac_cv_type_long_int_64=yes
16708 else
16709 pgac_cv_type_long_int_64=no
16711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16712 else
16713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16714 /* end confdefs.h. */
16715 typedef long int ac_int64;
16718 * These are globals to discourage the compiler from folding all the
16719 * arithmetic tests down to compile-time constants.
16721 ac_int64 a = 20000001;
16722 ac_int64 b = 40000005;
16724 int does_int64_work()
16726 ac_int64 c,d;
16728 if (sizeof(ac_int64) != 8)
16729 return 0; /* definitely not the right size */
16731 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16732 c = a * b;
16733 d = (c + b) / b;
16734 if (d != a+1)
16735 return 0;
16736 return 1;
16740 main() {
16741 return (! does_int64_work());
16743 _ACEOF
16744 if ac_fn_c_try_run "$LINENO"; then :
16745 pgac_cv_type_long_int_64=yes
16746 else
16747 pgac_cv_type_long_int_64=no
16749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16750 conftest.$ac_objext conftest.beam conftest.$ac_ext
16754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16755 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16757 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16758 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16760 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16765 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16766 pg_int64_type="long int"
16767 else
16768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16769 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16770 if ${pgac_cv_type_long_long_int_64+:} false; then :
16771 $as_echo_n "(cached) " >&6
16772 else
16773 if test "$cross_compiling" = yes; then :
16774 # If cross-compiling, check the size reported by the compiler and
16775 # trust that the arithmetic works.
16776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16777 /* end confdefs.h. */
16780 main ()
16782 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16783 test_array [0] = 0;
16784 return test_array [0];
16787 return 0;
16789 _ACEOF
16790 if ac_fn_c_try_compile "$LINENO"; then :
16791 pgac_cv_type_long_long_int_64=yes
16792 else
16793 pgac_cv_type_long_long_int_64=no
16795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16796 else
16797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16798 /* end confdefs.h. */
16799 typedef long long int ac_int64;
16802 * These are globals to discourage the compiler from folding all the
16803 * arithmetic tests down to compile-time constants.
16805 ac_int64 a = 20000001;
16806 ac_int64 b = 40000005;
16808 int does_int64_work()
16810 ac_int64 c,d;
16812 if (sizeof(ac_int64) != 8)
16813 return 0; /* definitely not the right size */
16815 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16816 c = a * b;
16817 d = (c + b) / b;
16818 if (d != a+1)
16819 return 0;
16820 return 1;
16824 main() {
16825 return (! does_int64_work());
16827 _ACEOF
16828 if ac_fn_c_try_run "$LINENO"; then :
16829 pgac_cv_type_long_long_int_64=yes
16830 else
16831 pgac_cv_type_long_long_int_64=no
16833 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16834 conftest.$ac_objext conftest.beam conftest.$ac_ext
16838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16839 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16841 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16842 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16844 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16848 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16849 pg_int64_type="long long int"
16850 else
16851 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16856 cat >>confdefs.h <<_ACEOF
16857 #define PG_INT64_TYPE $pg_int64_type
16858 _ACEOF
16861 # Select the printf length modifier that goes with that, too.
16862 if test x"$pg_int64_type" = x"long long int" ; then
16863 INT64_MODIFIER='"ll"'
16864 else
16865 INT64_MODIFIER='"l"'
16869 cat >>confdefs.h <<_ACEOF
16870 #define INT64_MODIFIER $INT64_MODIFIER
16871 _ACEOF
16874 # has to be down here, rather than with the other builtins, because
16875 # the test uses PG_INT64_TYPE.
16876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16877 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16878 if ${pgac_cv__builtin_op_overflow+:} false; then :
16879 $as_echo_n "(cached) " >&6
16880 else
16881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16882 /* end confdefs.h. */
16884 PG_INT64_TYPE a = 1;
16885 PG_INT64_TYPE b = 1;
16886 PG_INT64_TYPE result;
16887 int oflo;
16890 main ()
16892 oflo = __builtin_mul_overflow(a, b, &result);
16894 return 0;
16896 _ACEOF
16897 if ac_fn_c_try_link "$LINENO"; then :
16898 pgac_cv__builtin_op_overflow=yes
16899 else
16900 pgac_cv__builtin_op_overflow=no
16902 rm -f core conftest.err conftest.$ac_objext \
16903 conftest$ac_exeext conftest.$ac_ext
16905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16906 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16907 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16909 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16913 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16914 # The cast to long int works around a bug in the HP C Compiler
16915 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16916 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16917 # This bug is HP SR number 8606223364.
16918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16919 $as_echo_n "checking size of void *... " >&6; }
16920 if ${ac_cv_sizeof_void_p+:} false; then :
16921 $as_echo_n "(cached) " >&6
16922 else
16923 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16925 else
16926 if test "$ac_cv_type_void_p" = yes; then
16927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16928 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16929 as_fn_error 77 "cannot compute sizeof (void *)
16930 See \`config.log' for more details" "$LINENO" 5; }
16931 else
16932 ac_cv_sizeof_void_p=0
16937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16938 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16942 cat >>confdefs.h <<_ACEOF
16943 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16944 _ACEOF
16947 # The cast to long int works around a bug in the HP C Compiler
16948 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16949 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16950 # This bug is HP SR number 8606223364.
16951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16952 $as_echo_n "checking size of size_t... " >&6; }
16953 if ${ac_cv_sizeof_size_t+:} false; then :
16954 $as_echo_n "(cached) " >&6
16955 else
16956 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16958 else
16959 if test "$ac_cv_type_size_t" = yes; then
16960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16961 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16962 as_fn_error 77 "cannot compute sizeof (size_t)
16963 See \`config.log' for more details" "$LINENO" 5; }
16964 else
16965 ac_cv_sizeof_size_t=0
16970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16971 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16975 cat >>confdefs.h <<_ACEOF
16976 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16977 _ACEOF
16980 # The cast to long int works around a bug in the HP C Compiler
16981 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16982 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16983 # This bug is HP SR number 8606223364.
16984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16985 $as_echo_n "checking size of long... " >&6; }
16986 if ${ac_cv_sizeof_long+:} false; then :
16987 $as_echo_n "(cached) " >&6
16988 else
16989 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16991 else
16992 if test "$ac_cv_type_long" = yes; then
16993 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16994 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16995 as_fn_error 77 "cannot compute sizeof (long)
16996 See \`config.log' for more details" "$LINENO" 5; }
16997 else
16998 ac_cv_sizeof_long=0
17003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17004 $as_echo "$ac_cv_sizeof_long" >&6; }
17008 cat >>confdefs.h <<_ACEOF
17009 #define SIZEOF_LONG $ac_cv_sizeof_long
17010 _ACEOF
17014 # Determine memory alignment requirements for the basic C data types.
17016 # The cast to long int works around a bug in the HP C Compiler,
17017 # see AC_CHECK_SIZEOF for more information.
17018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17019 $as_echo_n "checking alignment of short... " >&6; }
17020 if ${ac_cv_alignof_short+:} false; then :
17021 $as_echo_n "(cached) " >&6
17022 else
17023 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17024 #ifndef offsetof
17025 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17026 #endif
17027 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17029 else
17030 if test "$ac_cv_type_short" = yes; then
17031 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17032 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17033 as_fn_error 77 "cannot compute alignment of short
17034 See \`config.log' for more details" "$LINENO" 5; }
17035 else
17036 ac_cv_alignof_short=0
17041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17042 $as_echo "$ac_cv_alignof_short" >&6; }
17046 cat >>confdefs.h <<_ACEOF
17047 #define ALIGNOF_SHORT $ac_cv_alignof_short
17048 _ACEOF
17051 # The cast to long int works around a bug in the HP C Compiler,
17052 # see AC_CHECK_SIZEOF for more information.
17053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17054 $as_echo_n "checking alignment of int... " >&6; }
17055 if ${ac_cv_alignof_int+:} false; then :
17056 $as_echo_n "(cached) " >&6
17057 else
17058 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17059 #ifndef offsetof
17060 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17061 #endif
17062 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17064 else
17065 if test "$ac_cv_type_int" = yes; then
17066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17067 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17068 as_fn_error 77 "cannot compute alignment of int
17069 See \`config.log' for more details" "$LINENO" 5; }
17070 else
17071 ac_cv_alignof_int=0
17076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17077 $as_echo "$ac_cv_alignof_int" >&6; }
17081 cat >>confdefs.h <<_ACEOF
17082 #define ALIGNOF_INT $ac_cv_alignof_int
17083 _ACEOF
17086 # The cast to long int works around a bug in the HP C Compiler,
17087 # see AC_CHECK_SIZEOF for more information.
17088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17089 $as_echo_n "checking alignment of long... " >&6; }
17090 if ${ac_cv_alignof_long+:} false; then :
17091 $as_echo_n "(cached) " >&6
17092 else
17093 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17094 #ifndef offsetof
17095 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17096 #endif
17097 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17099 else
17100 if test "$ac_cv_type_long" = yes; then
17101 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17102 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17103 as_fn_error 77 "cannot compute alignment of long
17104 See \`config.log' for more details" "$LINENO" 5; }
17105 else
17106 ac_cv_alignof_long=0
17111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17112 $as_echo "$ac_cv_alignof_long" >&6; }
17116 cat >>confdefs.h <<_ACEOF
17117 #define ALIGNOF_LONG $ac_cv_alignof_long
17118 _ACEOF
17121 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17122 # The cast to long int works around a bug in the HP C Compiler,
17123 # see AC_CHECK_SIZEOF for more information.
17124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17125 $as_echo_n "checking alignment of long long int... " >&6; }
17126 if ${ac_cv_alignof_long_long_int+:} false; then :
17127 $as_echo_n "(cached) " >&6
17128 else
17129 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17130 #ifndef offsetof
17131 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17132 #endif
17133 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17135 else
17136 if test "$ac_cv_type_long_long_int" = yes; then
17137 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17138 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17139 as_fn_error 77 "cannot compute alignment of long long int
17140 See \`config.log' for more details" "$LINENO" 5; }
17141 else
17142 ac_cv_alignof_long_long_int=0
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17148 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17152 cat >>confdefs.h <<_ACEOF
17153 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17154 _ACEOF
17158 # The cast to long int works around a bug in the HP C Compiler,
17159 # see AC_CHECK_SIZEOF for more information.
17160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17161 $as_echo_n "checking alignment of double... " >&6; }
17162 if ${ac_cv_alignof_double+:} false; then :
17163 $as_echo_n "(cached) " >&6
17164 else
17165 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17166 #ifndef offsetof
17167 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17168 #endif
17169 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17171 else
17172 if test "$ac_cv_type_double" = yes; then
17173 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17174 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17175 as_fn_error 77 "cannot compute alignment of double
17176 See \`config.log' for more details" "$LINENO" 5; }
17177 else
17178 ac_cv_alignof_double=0
17183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17184 $as_echo "$ac_cv_alignof_double" >&6; }
17188 cat >>confdefs.h <<_ACEOF
17189 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17190 _ACEOF
17194 # Compute maximum alignment of any basic type.
17195 # We assume long's alignment is at least as strong as char, short, or int;
17196 # but we must check long long (if it is being used for int64) and double.
17197 # Note that we intentionally do not consider any types wider than 64 bits,
17198 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17199 # for disk and memory space.
17201 MAX_ALIGNOF=$ac_cv_alignof_long
17202 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17203 MAX_ALIGNOF=$ac_cv_alignof_double
17205 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17206 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17209 cat >>confdefs.h <<_ACEOF
17210 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17211 _ACEOF
17215 # Some platforms predefine the types int8, int16, etc. Only check
17216 # a (hopefully) representative subset.
17217 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17219 if test "x$ac_cv_type_int8" = xyes; then :
17221 cat >>confdefs.h <<_ACEOF
17222 #define HAVE_INT8 1
17223 _ACEOF
17227 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17229 if test "x$ac_cv_type_uint8" = xyes; then :
17231 cat >>confdefs.h <<_ACEOF
17232 #define HAVE_UINT8 1
17233 _ACEOF
17237 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17239 if test "x$ac_cv_type_int64" = xyes; then :
17241 cat >>confdefs.h <<_ACEOF
17242 #define HAVE_INT64 1
17243 _ACEOF
17247 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17249 if test "x$ac_cv_type_uint64" = xyes; then :
17251 cat >>confdefs.h <<_ACEOF
17252 #define HAVE_UINT64 1
17253 _ACEOF
17259 # Some compilers offer a 128-bit integer scalar type.
17260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17261 $as_echo_n "checking for __int128... " >&6; }
17262 if ${pgac_cv__128bit_int+:} false; then :
17263 $as_echo_n "(cached) " >&6
17264 else
17265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17266 /* end confdefs.h. */
17269 * We don't actually run this test, just link it to verify that any support
17270 * functions needed for __int128 are present.
17272 * These are globals to discourage the compiler from folding all the
17273 * arithmetic tests down to compile-time constants. We do not have
17274 * convenient support for 128bit literals at this point...
17276 __int128 a = 48828125;
17277 __int128 b = 97656250;
17280 main ()
17283 __int128 c,d;
17284 a = (a << 12) + 1; /* 200000000001 */
17285 b = (b << 12) + 5; /* 400000000005 */
17286 /* try the most relevant arithmetic ops */
17287 c = a * b;
17288 d = (c + b) / b;
17289 /* must use the results, else compiler may optimize arithmetic away */
17290 if (d != a+1)
17291 return 1;
17294 return 0;
17296 _ACEOF
17297 if ac_fn_c_try_link "$LINENO"; then :
17298 pgac_cv__128bit_int=yes
17299 else
17300 pgac_cv__128bit_int=no
17302 rm -f core conftest.err conftest.$ac_objext \
17303 conftest$ac_exeext conftest.$ac_ext
17305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17306 $as_echo "$pgac_cv__128bit_int" >&6; }
17307 if test x"$pgac_cv__128bit_int" = xyes ; then
17308 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17309 # If not cross-compiling, we can test for bugs and disable use of __int128
17310 # with buggy compilers. If cross-compiling, hope for the best.
17311 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17313 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17314 if ${pgac_cv__128bit_int_bug+:} false; then :
17315 $as_echo_n "(cached) " >&6
17316 else
17317 if test "$cross_compiling" = yes; then :
17318 pgac_cv__128bit_int_bug="assuming ok"
17319 else
17320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17321 /* end confdefs.h. */
17323 /* This must match the corresponding code in c.h: */
17324 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17325 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17326 #endif
17327 typedef __int128 int128a
17328 #if defined(pg_attribute_aligned)
17329 pg_attribute_aligned(8)
17330 #endif
17332 int128a holder;
17333 void pass_by_val(void *buffer, int128a par) { holder = par; }
17336 main ()
17339 long int i64 = 97656225L << 12;
17340 int128a q;
17341 pass_by_val(main, (int128a) i64);
17342 q = (int128a) i64;
17343 if (q != holder)
17344 return 1;
17347 return 0;
17349 _ACEOF
17350 if ac_fn_c_try_run "$LINENO"; then :
17351 pgac_cv__128bit_int_bug=ok
17352 else
17353 pgac_cv__128bit_int_bug=broken
17355 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17356 conftest.$ac_objext conftest.beam conftest.$ac_ext
17360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17361 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17362 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17364 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17366 # The cast to long int works around a bug in the HP C Compiler,
17367 # see AC_CHECK_SIZEOF for more information.
17368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17369 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17370 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17371 $as_echo_n "(cached) " >&6
17372 else
17373 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17374 #ifndef offsetof
17375 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17376 #endif
17377 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17379 else
17380 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17381 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17382 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17383 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17384 See \`config.log' for more details" "$LINENO" 5; }
17385 else
17386 ac_cv_alignof_PG_INT128_TYPE=0
17391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17392 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17396 cat >>confdefs.h <<_ACEOF
17397 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17398 _ACEOF
17404 # Check for various atomic operations now that we have checked how to declare
17405 # 64bit integers.
17406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17407 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17408 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17409 $as_echo_n "(cached) " >&6
17410 else
17411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17412 /* end confdefs.h. */
17415 main ()
17417 char lock = 0;
17418 __sync_lock_test_and_set(&lock, 1);
17419 __sync_lock_release(&lock);
17421 return 0;
17423 _ACEOF
17424 if ac_fn_c_try_link "$LINENO"; then :
17425 pgac_cv_gcc_sync_char_tas="yes"
17426 else
17427 pgac_cv_gcc_sync_char_tas="no"
17429 rm -f core conftest.err conftest.$ac_objext \
17430 conftest$ac_exeext conftest.$ac_ext
17432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17433 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17434 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17436 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17440 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17441 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17442 $as_echo_n "(cached) " >&6
17443 else
17444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17445 /* end confdefs.h. */
17448 main ()
17450 int lock = 0;
17451 __sync_lock_test_and_set(&lock, 1);
17452 __sync_lock_release(&lock);
17454 return 0;
17456 _ACEOF
17457 if ac_fn_c_try_link "$LINENO"; then :
17458 pgac_cv_gcc_sync_int32_tas="yes"
17459 else
17460 pgac_cv_gcc_sync_int32_tas="no"
17462 rm -f core conftest.err conftest.$ac_objext \
17463 conftest$ac_exeext conftest.$ac_ext
17465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17466 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17467 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17469 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17473 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17474 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17475 $as_echo_n "(cached) " >&6
17476 else
17477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17478 /* end confdefs.h. */
17481 main ()
17483 int val = 0;
17484 __sync_val_compare_and_swap(&val, 0, 37);
17486 return 0;
17488 _ACEOF
17489 if ac_fn_c_try_link "$LINENO"; then :
17490 pgac_cv_gcc_sync_int32_cas="yes"
17491 else
17492 pgac_cv_gcc_sync_int32_cas="no"
17494 rm -f core conftest.err conftest.$ac_objext \
17495 conftest$ac_exeext conftest.$ac_ext
17497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17498 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17499 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17501 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17505 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17506 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17507 $as_echo_n "(cached) " >&6
17508 else
17509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17510 /* end confdefs.h. */
17513 main ()
17515 PG_INT64_TYPE lock = 0;
17516 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17518 return 0;
17520 _ACEOF
17521 if ac_fn_c_try_link "$LINENO"; then :
17522 pgac_cv_gcc_sync_int64_cas="yes"
17523 else
17524 pgac_cv_gcc_sync_int64_cas="no"
17526 rm -f core conftest.err conftest.$ac_objext \
17527 conftest$ac_exeext conftest.$ac_ext
17529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17530 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17531 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17533 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17537 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17538 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17539 $as_echo_n "(cached) " >&6
17540 else
17541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17542 /* end confdefs.h. */
17545 main ()
17547 int val = 0;
17548 int expect = 0;
17549 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17551 return 0;
17553 _ACEOF
17554 if ac_fn_c_try_link "$LINENO"; then :
17555 pgac_cv_gcc_atomic_int32_cas="yes"
17556 else
17557 pgac_cv_gcc_atomic_int32_cas="no"
17559 rm -f core conftest.err conftest.$ac_objext \
17560 conftest$ac_exeext conftest.$ac_ext
17562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17563 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17564 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17566 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17570 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17571 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17572 $as_echo_n "(cached) " >&6
17573 else
17574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17575 /* end confdefs.h. */
17578 main ()
17580 PG_INT64_TYPE val = 0;
17581 PG_INT64_TYPE expect = 0;
17582 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17584 return 0;
17586 _ACEOF
17587 if ac_fn_c_try_link "$LINENO"; then :
17588 pgac_cv_gcc_atomic_int64_cas="yes"
17589 else
17590 pgac_cv_gcc_atomic_int64_cas="no"
17592 rm -f core conftest.err conftest.$ac_objext \
17593 conftest$ac_exeext conftest.$ac_ext
17595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17596 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17597 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17599 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17604 # Check for x86 cpuid instruction
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17606 $as_echo_n "checking for __get_cpuid... " >&6; }
17607 if ${pgac_cv__get_cpuid+:} false; then :
17608 $as_echo_n "(cached) " >&6
17609 else
17610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17611 /* end confdefs.h. */
17612 #include <cpuid.h>
17614 main ()
17616 unsigned int exx[4] = {0, 0, 0, 0};
17617 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17620 return 0;
17622 _ACEOF
17623 if ac_fn_c_try_link "$LINENO"; then :
17624 pgac_cv__get_cpuid="yes"
17625 else
17626 pgac_cv__get_cpuid="no"
17628 rm -f core conftest.err conftest.$ac_objext \
17629 conftest$ac_exeext conftest.$ac_ext
17631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17632 $as_echo "$pgac_cv__get_cpuid" >&6; }
17633 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17635 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17640 $as_echo_n "checking for __cpuid... " >&6; }
17641 if ${pgac_cv__cpuid+:} false; then :
17642 $as_echo_n "(cached) " >&6
17643 else
17644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17645 /* end confdefs.h. */
17646 #include <intrin.h>
17648 main ()
17650 unsigned int exx[4] = {0, 0, 0, 0};
17651 __get_cpuid(exx[0], 1);
17654 return 0;
17656 _ACEOF
17657 if ac_fn_c_try_link "$LINENO"; then :
17658 pgac_cv__cpuid="yes"
17659 else
17660 pgac_cv__cpuid="no"
17662 rm -f core conftest.err conftest.$ac_objext \
17663 conftest$ac_exeext conftest.$ac_ext
17665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17666 $as_echo "$pgac_cv__cpuid" >&6; }
17667 if test x"$pgac_cv__cpuid" = x"yes"; then
17669 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17673 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17675 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17676 # with the default compiler flags. If not, check if adding the -msse4.2
17677 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17679 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17680 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17681 $as_echo_n "(cached) " >&6
17682 else
17683 pgac_save_CFLAGS=$CFLAGS
17684 CFLAGS="$pgac_save_CFLAGS "
17685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17686 /* end confdefs.h. */
17687 #include <nmmintrin.h>
17689 main ()
17691 unsigned int crc = 0;
17692 crc = _mm_crc32_u8(crc, 0);
17693 crc = _mm_crc32_u32(crc, 0);
17694 /* return computed value, to prevent the above being optimized away */
17695 return crc == 0;
17697 return 0;
17699 _ACEOF
17700 if ac_fn_c_try_link "$LINENO"; then :
17701 pgac_cv_sse42_crc32_intrinsics_=yes
17702 else
17703 pgac_cv_sse42_crc32_intrinsics_=no
17705 rm -f core conftest.err conftest.$ac_objext \
17706 conftest$ac_exeext conftest.$ac_ext
17707 CFLAGS="$pgac_save_CFLAGS"
17709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17710 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17711 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17712 CFLAGS_SSE42=""
17713 pgac_sse42_crc32_intrinsics=yes
17716 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17718 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17719 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17720 $as_echo_n "(cached) " >&6
17721 else
17722 pgac_save_CFLAGS=$CFLAGS
17723 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17725 /* end confdefs.h. */
17726 #include <nmmintrin.h>
17728 main ()
17730 unsigned int crc = 0;
17731 crc = _mm_crc32_u8(crc, 0);
17732 crc = _mm_crc32_u32(crc, 0);
17733 /* return computed value, to prevent the above being optimized away */
17734 return crc == 0;
17736 return 0;
17738 _ACEOF
17739 if ac_fn_c_try_link "$LINENO"; then :
17740 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17741 else
17742 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17744 rm -f core conftest.err conftest.$ac_objext \
17745 conftest$ac_exeext conftest.$ac_ext
17746 CFLAGS="$pgac_save_CFLAGS"
17748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17749 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17750 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17751 CFLAGS_SSE42="-msse4.2"
17752 pgac_sse42_crc32_intrinsics=yes
17758 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17759 # define __SSE4_2__ in that case.
17760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17761 /* end confdefs.h. */
17764 main ()
17767 #ifndef __SSE4_2__
17768 #error __SSE4_2__ not defined
17769 #endif
17772 return 0;
17774 _ACEOF
17775 if ac_fn_c_try_compile "$LINENO"; then :
17776 SSE4_2_TARGETED=1
17778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17780 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17782 # First check if __crc32c* intrinsics can be used with the default compiler
17783 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17784 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17786 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17787 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17788 $as_echo_n "(cached) " >&6
17789 else
17790 pgac_save_CFLAGS=$CFLAGS
17791 CFLAGS="$pgac_save_CFLAGS "
17792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17793 /* end confdefs.h. */
17794 #include <arm_acle.h>
17796 main ()
17798 unsigned int crc = 0;
17799 crc = __crc32cb(crc, 0);
17800 crc = __crc32ch(crc, 0);
17801 crc = __crc32cw(crc, 0);
17802 crc = __crc32cd(crc, 0);
17803 /* return computed value, to prevent the above being optimized away */
17804 return crc == 0;
17806 return 0;
17808 _ACEOF
17809 if ac_fn_c_try_link "$LINENO"; then :
17810 pgac_cv_armv8_crc32c_intrinsics_=yes
17811 else
17812 pgac_cv_armv8_crc32c_intrinsics_=no
17814 rm -f core conftest.err conftest.$ac_objext \
17815 conftest$ac_exeext conftest.$ac_ext
17816 CFLAGS="$pgac_save_CFLAGS"
17818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17819 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17820 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17821 CFLAGS_ARMV8_CRC32C=""
17822 pgac_armv8_crc32c_intrinsics=yes
17825 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17827 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17828 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17829 $as_echo_n "(cached) " >&6
17830 else
17831 pgac_save_CFLAGS=$CFLAGS
17832 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17834 /* end confdefs.h. */
17835 #include <arm_acle.h>
17837 main ()
17839 unsigned int crc = 0;
17840 crc = __crc32cb(crc, 0);
17841 crc = __crc32ch(crc, 0);
17842 crc = __crc32cw(crc, 0);
17843 crc = __crc32cd(crc, 0);
17844 /* return computed value, to prevent the above being optimized away */
17845 return crc == 0;
17847 return 0;
17849 _ACEOF
17850 if ac_fn_c_try_link "$LINENO"; then :
17851 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17852 else
17853 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17855 rm -f core conftest.err conftest.$ac_objext \
17856 conftest$ac_exeext conftest.$ac_ext
17857 CFLAGS="$pgac_save_CFLAGS"
17859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17860 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17861 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17862 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17863 pgac_armv8_crc32c_intrinsics=yes
17869 # Select CRC-32C implementation.
17871 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17872 # use the special CRC instructions for calculating CRC-32C. If we're not
17873 # targeting such a processor, but we can nevertheless produce code that uses
17874 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17875 # implementations and select which one to use at runtime, depending on whether
17876 # SSE 4.2 is supported by the processor we're running on.
17878 # Similarly, if we are targeting an ARM processor that has the CRC
17879 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17880 # we're not targeting such a processor, but can nevertheless produce code that
17881 # uses the CRC instructions, compile both, and select at runtime.
17883 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17884 # in the template or configure command line.
17885 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
17886 # Use Intel SSE 4.2 if available.
17887 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17888 USE_SSE42_CRC32C=1
17889 else
17890 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17891 # the runtime check.
17892 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
17893 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17894 else
17895 # Use ARM CRC Extension if available.
17896 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17897 USE_ARMV8_CRC32C=1
17898 else
17899 # ARM CRC Extension, with runtime check?
17900 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17901 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17902 else
17903 # fall back to slicing-by-8 algorithm, which doesn't require any
17904 # special CPU support.
17905 USE_SLICING_BY_8_CRC32C=1
17912 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17914 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17915 if test x"$USE_SSE42_CRC32C" = x"1"; then
17917 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17919 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17921 $as_echo "SSE 4.2" >&6; }
17922 else
17923 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17925 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17927 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17929 $as_echo "SSE 4.2 with runtime check" >&6; }
17930 else
17931 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17933 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17935 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17937 $as_echo "ARMv8 CRC instructions" >&6; }
17938 else
17939 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17941 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17943 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17945 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17946 else
17948 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17950 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17952 $as_echo "slicing-by-8" >&6; }
17960 # Select semaphore implementation type.
17961 if test "$PORTNAME" != "win32"; then
17962 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17963 # Need sem_open for this
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17965 $as_echo_n "checking for library containing sem_open... " >&6; }
17966 if ${ac_cv_search_sem_open+:} false; then :
17967 $as_echo_n "(cached) " >&6
17968 else
17969 ac_func_search_save_LIBS=$LIBS
17970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17971 /* end confdefs.h. */
17973 /* Override any GCC internal prototype to avoid an error.
17974 Use char because int might match the return type of a GCC
17975 builtin and then its argument prototype would still apply. */
17976 #ifdef __cplusplus
17977 extern "C"
17978 #endif
17979 char sem_open ();
17981 main ()
17983 return sem_open ();
17985 return 0;
17987 _ACEOF
17988 for ac_lib in '' rt pthread; do
17989 if test -z "$ac_lib"; then
17990 ac_res="none required"
17991 else
17992 ac_res=-l$ac_lib
17993 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17995 if ac_fn_c_try_link "$LINENO"; then :
17996 ac_cv_search_sem_open=$ac_res
17998 rm -f core conftest.err conftest.$ac_objext \
17999 conftest$ac_exeext
18000 if ${ac_cv_search_sem_open+:} false; then :
18001 break
18003 done
18004 if ${ac_cv_search_sem_open+:} false; then :
18006 else
18007 ac_cv_search_sem_open=no
18009 rm conftest.$ac_ext
18010 LIBS=$ac_func_search_save_LIBS
18012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18013 $as_echo "$ac_cv_search_sem_open" >&6; }
18014 ac_res=$ac_cv_search_sem_open
18015 if test "$ac_res" != no; then :
18016 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18017 USE_NAMED_POSIX_SEMAPHORES=1
18021 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18022 # Need sem_init for this
18023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18024 $as_echo_n "checking for library containing sem_init... " >&6; }
18025 if ${ac_cv_search_sem_init+:} false; then :
18026 $as_echo_n "(cached) " >&6
18027 else
18028 ac_func_search_save_LIBS=$LIBS
18029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18030 /* end confdefs.h. */
18032 /* Override any GCC internal prototype to avoid an error.
18033 Use char because int might match the return type of a GCC
18034 builtin and then its argument prototype would still apply. */
18035 #ifdef __cplusplus
18036 extern "C"
18037 #endif
18038 char sem_init ();
18040 main ()
18042 return sem_init ();
18044 return 0;
18046 _ACEOF
18047 for ac_lib in '' rt pthread; do
18048 if test -z "$ac_lib"; then
18049 ac_res="none required"
18050 else
18051 ac_res=-l$ac_lib
18052 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18054 if ac_fn_c_try_link "$LINENO"; then :
18055 ac_cv_search_sem_init=$ac_res
18057 rm -f core conftest.err conftest.$ac_objext \
18058 conftest$ac_exeext
18059 if ${ac_cv_search_sem_init+:} false; then :
18060 break
18062 done
18063 if ${ac_cv_search_sem_init+:} false; then :
18065 else
18066 ac_cv_search_sem_init=no
18068 rm conftest.$ac_ext
18069 LIBS=$ac_func_search_save_LIBS
18071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18072 $as_echo "$ac_cv_search_sem_init" >&6; }
18073 ac_res=$ac_cv_search_sem_init
18074 if test "$ac_res" != no; then :
18075 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18076 USE_UNNAMED_POSIX_SEMAPHORES=1
18080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18081 $as_echo_n "checking which semaphore API to use... " >&6; }
18082 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18084 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18086 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18087 sematype="named POSIX"
18088 else
18089 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18091 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18093 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18094 sematype="unnamed POSIX"
18095 else
18097 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18099 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18100 sematype="System V"
18103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18104 $as_echo "$sematype" >&6; }
18105 else
18107 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18109 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18113 # Select shared-memory implementation type.
18114 if test "$PORTNAME" != "win32"; then
18116 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18118 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18119 else
18121 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18123 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18126 # Select random number source. If a TLS library is used then it will be the
18127 # first choice, else the native platform sources (Windows API or /dev/urandom)
18128 # will be used.
18129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18130 $as_echo_n "checking which random number source to use... " >&6; }
18131 if test x"$with_ssl" = x"openssl" ; then
18132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18133 $as_echo "OpenSSL" >&6; }
18134 elif test x"$PORTNAME" = x"win32" ; then
18135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18136 $as_echo "Windows native" >&6; }
18137 else
18138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18139 $as_echo "/dev/urandom" >&6; }
18140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18141 $as_echo_n "checking for /dev/urandom... " >&6; }
18142 if ${ac_cv_file__dev_urandom+:} false; then :
18143 $as_echo_n "(cached) " >&6
18144 else
18145 test "$cross_compiling" = yes &&
18146 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18147 if test -r "/dev/urandom"; then
18148 ac_cv_file__dev_urandom=yes
18149 else
18150 ac_cv_file__dev_urandom=no
18153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18154 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18155 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18160 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18161 as_fn_error $? "
18162 no source of strong random numbers was found
18163 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18167 # If not set in template file, set bytes to use libc memset()
18168 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18169 MEMSET_LOOP_LIMIT=1024
18172 cat >>confdefs.h <<_ACEOF
18173 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18174 _ACEOF
18178 if test "$enable_nls" = yes ; then
18180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18181 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18182 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18183 $as_echo_n "(cached) " >&6
18184 else
18185 ac_func_search_save_LIBS=$LIBS
18186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18187 /* end confdefs.h. */
18189 /* Override any GCC internal prototype to avoid an error.
18190 Use char because int might match the return type of a GCC
18191 builtin and then its argument prototype would still apply. */
18192 #ifdef __cplusplus
18193 extern "C"
18194 #endif
18195 char bind_textdomain_codeset ();
18197 main ()
18199 return bind_textdomain_codeset ();
18201 return 0;
18203 _ACEOF
18204 for ac_lib in '' intl; do
18205 if test -z "$ac_lib"; then
18206 ac_res="none required"
18207 else
18208 ac_res=-l$ac_lib
18209 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18211 if ac_fn_c_try_link "$LINENO"; then :
18212 ac_cv_search_bind_textdomain_codeset=$ac_res
18214 rm -f core conftest.err conftest.$ac_objext \
18215 conftest$ac_exeext
18216 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18217 break
18219 done
18220 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18222 else
18223 ac_cv_search_bind_textdomain_codeset=no
18225 rm conftest.$ac_ext
18226 LIBS=$ac_func_search_save_LIBS
18228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18229 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18230 ac_res=$ac_cv_search_bind_textdomain_codeset
18231 if test "$ac_res" != no; then :
18232 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18234 else
18235 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18238 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18239 if test "x$ac_cv_header_libintl_h" = xyes; then :
18241 else
18242 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18246 if test -z "$MSGFMT"; then
18247 for ac_prog in msgfmt
18249 # Extract the first word of "$ac_prog", so it can be a program name with args.
18250 set dummy $ac_prog; ac_word=$2
18251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18252 $as_echo_n "checking for $ac_word... " >&6; }
18253 if ${ac_cv_path_MSGFMT+:} false; then :
18254 $as_echo_n "(cached) " >&6
18255 else
18256 case $MSGFMT in
18257 [\\/]* | ?:[\\/]*)
18258 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18262 for as_dir in $PATH
18264 IFS=$as_save_IFS
18265 test -z "$as_dir" && as_dir=.
18266 for ac_exec_ext in '' $ac_executable_extensions; do
18267 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18268 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18269 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18270 break 2
18272 done
18273 done
18274 IFS=$as_save_IFS
18277 esac
18279 MSGFMT=$ac_cv_path_MSGFMT
18280 if test -n "$MSGFMT"; then
18281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18282 $as_echo "$MSGFMT" >&6; }
18283 else
18284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18285 $as_echo "no" >&6; }
18289 test -n "$MSGFMT" && break
18290 done
18292 else
18293 # Report the value of MSGFMT in configure's output in all cases.
18294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18295 $as_echo_n "checking for MSGFMT... " >&6; }
18296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18297 $as_echo "$MSGFMT" >&6; }
18300 if test -z "$MSGFMT"; then
18301 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18304 $as_echo_n "checking for msgfmt flags... " >&6; }
18305 if ${pgac_cv_msgfmt_flags+:} false; then :
18306 $as_echo_n "(cached) " >&6
18307 else
18308 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18309 pgac_cv_msgfmt_flags=-c
18312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18313 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18314 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18316 if test -z "$MSGMERGE"; then
18317 for ac_prog in msgmerge
18319 # Extract the first word of "$ac_prog", so it can be a program name with args.
18320 set dummy $ac_prog; ac_word=$2
18321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18322 $as_echo_n "checking for $ac_word... " >&6; }
18323 if ${ac_cv_path_MSGMERGE+:} false; then :
18324 $as_echo_n "(cached) " >&6
18325 else
18326 case $MSGMERGE in
18327 [\\/]* | ?:[\\/]*)
18328 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18332 for as_dir in $PATH
18334 IFS=$as_save_IFS
18335 test -z "$as_dir" && as_dir=.
18336 for ac_exec_ext in '' $ac_executable_extensions; do
18337 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18338 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18340 break 2
18342 done
18343 done
18344 IFS=$as_save_IFS
18347 esac
18349 MSGMERGE=$ac_cv_path_MSGMERGE
18350 if test -n "$MSGMERGE"; then
18351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18352 $as_echo "$MSGMERGE" >&6; }
18353 else
18354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18355 $as_echo "no" >&6; }
18359 test -n "$MSGMERGE" && break
18360 done
18362 else
18363 # Report the value of MSGMERGE in configure's output in all cases.
18364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18365 $as_echo_n "checking for MSGMERGE... " >&6; }
18366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18367 $as_echo "$MSGMERGE" >&6; }
18370 if test -z "$XGETTEXT"; then
18371 for ac_prog in xgettext
18373 # Extract the first word of "$ac_prog", so it can be a program name with args.
18374 set dummy $ac_prog; ac_word=$2
18375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18376 $as_echo_n "checking for $ac_word... " >&6; }
18377 if ${ac_cv_path_XGETTEXT+:} false; then :
18378 $as_echo_n "(cached) " >&6
18379 else
18380 case $XGETTEXT in
18381 [\\/]* | ?:[\\/]*)
18382 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18386 for as_dir in $PATH
18388 IFS=$as_save_IFS
18389 test -z "$as_dir" && as_dir=.
18390 for ac_exec_ext in '' $ac_executable_extensions; do
18391 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18392 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18393 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18394 break 2
18396 done
18397 done
18398 IFS=$as_save_IFS
18401 esac
18403 XGETTEXT=$ac_cv_path_XGETTEXT
18404 if test -n "$XGETTEXT"; then
18405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18406 $as_echo "$XGETTEXT" >&6; }
18407 else
18408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18409 $as_echo "no" >&6; }
18413 test -n "$XGETTEXT" && break
18414 done
18416 else
18417 # Report the value of XGETTEXT in configure's output in all cases.
18418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18419 $as_echo_n "checking for XGETTEXT... " >&6; }
18420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18421 $as_echo "$XGETTEXT" >&6; }
18427 # Check for Tcl configuration script tclConfig.sh
18428 if test "$with_tcl" = yes; then
18429 if test -z "$TCLSH"; then
18430 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18432 # Extract the first word of "$ac_prog", so it can be a program name with args.
18433 set dummy $ac_prog; ac_word=$2
18434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18435 $as_echo_n "checking for $ac_word... " >&6; }
18436 if ${ac_cv_path_TCLSH+:} false; then :
18437 $as_echo_n "(cached) " >&6
18438 else
18439 case $TCLSH in
18440 [\\/]* | ?:[\\/]*)
18441 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18445 for as_dir in $PATH
18447 IFS=$as_save_IFS
18448 test -z "$as_dir" && as_dir=.
18449 for ac_exec_ext in '' $ac_executable_extensions; do
18450 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18451 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18452 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18453 break 2
18455 done
18456 done
18457 IFS=$as_save_IFS
18460 esac
18462 TCLSH=$ac_cv_path_TCLSH
18463 if test -n "$TCLSH"; then
18464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18465 $as_echo "$TCLSH" >&6; }
18466 else
18467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18468 $as_echo "no" >&6; }
18472 test -n "$TCLSH" && break
18473 done
18475 else
18476 # Report the value of TCLSH in configure's output in all cases.
18477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18478 $as_echo_n "checking for TCLSH... " >&6; }
18479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18480 $as_echo "$TCLSH" >&6; }
18483 if test x"$TCLSH" = x""; then
18484 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18488 $as_echo_n "checking for tclConfig.sh... " >&6; }
18489 # Let user override test
18490 if test -z "$TCL_CONFIG_SH"; then
18491 pgac_test_dirs="$with_tclconfig"
18493 set X $pgac_test_dirs; shift
18494 if test $# -eq 0; then
18495 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18496 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18497 # On newer macOS, $auto_path frequently doesn't include the place
18498 # where tclConfig.sh actually lives. Append that to the end, so as not
18499 # to break cases where a non-default Tcl installation is being used.
18500 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18501 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18503 set X $pgac_test_dirs; shift
18506 for pgac_dir do
18507 if test -r "$pgac_dir/tclConfig.sh"; then
18508 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18509 break
18511 done
18514 if test -z "$TCL_CONFIG_SH"; then
18515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18516 $as_echo "no" >&6; }
18517 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18518 else
18519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18520 $as_echo "$TCL_CONFIG_SH" >&6; }
18525 . "$TCL_CONFIG_SH"
18526 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18527 eval TCL_LIBS=\"$TCL_LIBS\"
18528 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18529 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18531 if test "$TCL_SHARED_BUILD" != 1; then
18532 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18533 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18535 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18536 ac_save_CPPFLAGS=$CPPFLAGS
18537 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18538 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18539 if test "x$ac_cv_header_tcl_h" = xyes; then :
18541 else
18542 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18546 CPPFLAGS=$ac_save_CPPFLAGS
18549 # check for <perl.h>
18550 if test "$with_perl" = yes; then
18551 ac_save_CPPFLAGS=$CPPFLAGS
18552 CPPFLAGS="$CPPFLAGS $perl_includespec"
18553 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18555 if test "x$ac_cv_header_perl_h" = xyes; then :
18557 else
18558 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18562 # While we're at it, check that we can link to libperl.
18563 # On most platforms, if perl.h is there then libperl.so will be too, but at
18564 # this writing Debian packages them separately. There is no known reason to
18565 # waste cycles on separate probes for the Tcl or Python libraries, though.
18566 # On some Red Hat platforms, the link attempt can fail if we don't use
18567 # CFLAGS_SL while building the test program.
18568 ac_save_CFLAGS=$CFLAGS
18569 CFLAGS="$CFLAGS $CFLAGS_SL"
18570 pgac_save_LIBS=$LIBS
18571 LIBS="$perl_embed_ldflags"
18572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18573 $as_echo_n "checking for libperl... " >&6; }
18574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18575 /* end confdefs.h. */
18577 #include <EXTERN.h>
18578 #include <perl.h>
18581 main ()
18583 perl_alloc();
18585 return 0;
18587 _ACEOF
18588 if ac_fn_c_try_link "$LINENO"; then :
18589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18590 $as_echo "yes" >&6; }
18591 else
18592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18593 $as_echo "no" >&6; }
18594 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18596 rm -f core conftest.err conftest.$ac_objext \
18597 conftest$ac_exeext conftest.$ac_ext
18598 LIBS=$pgac_save_LIBS
18599 CFLAGS=$ac_save_CFLAGS
18600 CPPFLAGS=$ac_save_CPPFLAGS
18603 # check for <Python.h>
18604 if test "$with_python" = yes; then
18605 ac_save_CPPFLAGS=$CPPFLAGS
18606 CPPFLAGS="$python_includespec $CPPFLAGS"
18607 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18608 if test "x$ac_cv_header_Python_h" = xyes; then :
18610 else
18611 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18615 CPPFLAGS=$ac_save_CPPFLAGS
18619 # Check for documentation-building tools
18621 if test -z "$XMLLINT"; then
18622 for ac_prog in xmllint
18624 # Extract the first word of "$ac_prog", so it can be a program name with args.
18625 set dummy $ac_prog; ac_word=$2
18626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18627 $as_echo_n "checking for $ac_word... " >&6; }
18628 if ${ac_cv_path_XMLLINT+:} false; then :
18629 $as_echo_n "(cached) " >&6
18630 else
18631 case $XMLLINT in
18632 [\\/]* | ?:[\\/]*)
18633 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18637 for as_dir in $PATH
18639 IFS=$as_save_IFS
18640 test -z "$as_dir" && as_dir=.
18641 for ac_exec_ext in '' $ac_executable_extensions; do
18642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18643 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18645 break 2
18647 done
18648 done
18649 IFS=$as_save_IFS
18652 esac
18654 XMLLINT=$ac_cv_path_XMLLINT
18655 if test -n "$XMLLINT"; then
18656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18657 $as_echo "$XMLLINT" >&6; }
18658 else
18659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18660 $as_echo "no" >&6; }
18664 test -n "$XMLLINT" && break
18665 done
18667 else
18668 # Report the value of XMLLINT in configure's output in all cases.
18669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18670 $as_echo_n "checking for XMLLINT... " >&6; }
18671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18672 $as_echo "$XMLLINT" >&6; }
18675 if test -z "$XSLTPROC"; then
18676 for ac_prog in xsltproc
18678 # Extract the first word of "$ac_prog", so it can be a program name with args.
18679 set dummy $ac_prog; ac_word=$2
18680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18681 $as_echo_n "checking for $ac_word... " >&6; }
18682 if ${ac_cv_path_XSLTPROC+:} false; then :
18683 $as_echo_n "(cached) " >&6
18684 else
18685 case $XSLTPROC in
18686 [\\/]* | ?:[\\/]*)
18687 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18691 for as_dir in $PATH
18693 IFS=$as_save_IFS
18694 test -z "$as_dir" && as_dir=.
18695 for ac_exec_ext in '' $ac_executable_extensions; do
18696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18697 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18699 break 2
18701 done
18702 done
18703 IFS=$as_save_IFS
18706 esac
18708 XSLTPROC=$ac_cv_path_XSLTPROC
18709 if test -n "$XSLTPROC"; then
18710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18711 $as_echo "$XSLTPROC" >&6; }
18712 else
18713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18714 $as_echo "no" >&6; }
18718 test -n "$XSLTPROC" && break
18719 done
18721 else
18722 # Report the value of XSLTPROC in configure's output in all cases.
18723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18724 $as_echo_n "checking for XSLTPROC... " >&6; }
18725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18726 $as_echo "$XSLTPROC" >&6; }
18729 if test -z "$FOP"; then
18730 for ac_prog in fop
18732 # Extract the first word of "$ac_prog", so it can be a program name with args.
18733 set dummy $ac_prog; ac_word=$2
18734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18735 $as_echo_n "checking for $ac_word... " >&6; }
18736 if ${ac_cv_path_FOP+:} false; then :
18737 $as_echo_n "(cached) " >&6
18738 else
18739 case $FOP in
18740 [\\/]* | ?:[\\/]*)
18741 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18745 for as_dir in $PATH
18747 IFS=$as_save_IFS
18748 test -z "$as_dir" && as_dir=.
18749 for ac_exec_ext in '' $ac_executable_extensions; do
18750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18751 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18753 break 2
18755 done
18756 done
18757 IFS=$as_save_IFS
18760 esac
18762 FOP=$ac_cv_path_FOP
18763 if test -n "$FOP"; then
18764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18765 $as_echo "$FOP" >&6; }
18766 else
18767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18768 $as_echo "no" >&6; }
18772 test -n "$FOP" && break
18773 done
18775 else
18776 # Report the value of FOP in configure's output in all cases.
18777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18778 $as_echo_n "checking for FOP... " >&6; }
18779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18780 $as_echo "$FOP" >&6; }
18783 if test -z "$DBTOEPUB"; then
18784 for ac_prog in dbtoepub
18786 # Extract the first word of "$ac_prog", so it can be a program name with args.
18787 set dummy $ac_prog; ac_word=$2
18788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18789 $as_echo_n "checking for $ac_word... " >&6; }
18790 if ${ac_cv_path_DBTOEPUB+:} false; then :
18791 $as_echo_n "(cached) " >&6
18792 else
18793 case $DBTOEPUB in
18794 [\\/]* | ?:[\\/]*)
18795 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18799 for as_dir in $PATH
18801 IFS=$as_save_IFS
18802 test -z "$as_dir" && as_dir=.
18803 for ac_exec_ext in '' $ac_executable_extensions; do
18804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18805 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18807 break 2
18809 done
18810 done
18811 IFS=$as_save_IFS
18814 esac
18816 DBTOEPUB=$ac_cv_path_DBTOEPUB
18817 if test -n "$DBTOEPUB"; then
18818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18819 $as_echo "$DBTOEPUB" >&6; }
18820 else
18821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18822 $as_echo "no" >&6; }
18826 test -n "$DBTOEPUB" && break
18827 done
18829 else
18830 # Report the value of DBTOEPUB in configure's output in all cases.
18831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18832 $as_echo_n "checking for DBTOEPUB... " >&6; }
18833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18834 $as_echo "$DBTOEPUB" >&6; }
18839 # Check for test tools
18841 if test "$enable_tap_tests" = yes; then
18842 # Check for necessary modules, unless user has specified the "prove" to use;
18843 # in that case it's her responsibility to have a working configuration.
18844 # (prove might be part of a different Perl installation than perl, eg on
18845 # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18846 if test -z "$PROVE"; then
18847 # Test::More and Time::HiRes are supposed to be part of core Perl,
18848 # but some distros omit them in a minimal installation.
18859 # Make sure we have perl
18860 if test -z "$PERL"; then
18861 # Extract the first word of "perl", so it can be a program name with args.
18862 set dummy perl; ac_word=$2
18863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18864 $as_echo_n "checking for $ac_word... " >&6; }
18865 if ${ac_cv_prog_PERL+:} false; then :
18866 $as_echo_n "(cached) " >&6
18867 else
18868 if test -n "$PERL"; then
18869 ac_cv_prog_PERL="$PERL" # Let the user override the test.
18870 else
18871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18872 for as_dir in $PATH
18874 IFS=$as_save_IFS
18875 test -z "$as_dir" && as_dir=.
18876 for ac_exec_ext in '' $ac_executable_extensions; do
18877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18878 ac_cv_prog_PERL="perl"
18879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18880 break 2
18882 done
18883 done
18884 IFS=$as_save_IFS
18888 PERL=$ac_cv_prog_PERL
18889 if test -n "$PERL"; then
18890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18891 $as_echo "$PERL" >&6; }
18892 else
18893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18894 $as_echo "no" >&6; }
18900 if test "x$PERL" != x; then
18901 ax_perl_modules_failed=0
18902 for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18904 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18906 # Would be nice to log result here, but can't rely on autoconf internals
18907 $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18908 if test $? -ne 0; then
18909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18910 $as_echo "no" >&6; };
18911 ax_perl_modules_failed=1
18912 else
18913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18914 $as_echo "ok" >&6; };
18916 done
18918 # Run optional shell commands
18919 if test "$ax_perl_modules_failed" = 0; then
18922 else
18924 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18926 else
18927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18928 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18931 # Now make sure we know where prove is
18932 if test -z "$PROVE"; then
18933 for ac_prog in prove
18935 # Extract the first word of "$ac_prog", so it can be a program name with args.
18936 set dummy $ac_prog; ac_word=$2
18937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18938 $as_echo_n "checking for $ac_word... " >&6; }
18939 if ${ac_cv_path_PROVE+:} false; then :
18940 $as_echo_n "(cached) " >&6
18941 else
18942 case $PROVE in
18943 [\\/]* | ?:[\\/]*)
18944 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18948 for as_dir in $PATH
18950 IFS=$as_save_IFS
18951 test -z "$as_dir" && as_dir=.
18952 for ac_exec_ext in '' $ac_executable_extensions; do
18953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18954 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18956 break 2
18958 done
18959 done
18960 IFS=$as_save_IFS
18963 esac
18965 PROVE=$ac_cv_path_PROVE
18966 if test -n "$PROVE"; then
18967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18968 $as_echo "$PROVE" >&6; }
18969 else
18970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18971 $as_echo "no" >&6; }
18975 test -n "$PROVE" && break
18976 done
18978 else
18979 # Report the value of PROVE in configure's output in all cases.
18980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18981 $as_echo_n "checking for PROVE... " >&6; }
18982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18983 $as_echo "$PROVE" >&6; }
18986 if test -z "$PROVE"; then
18987 as_fn_error $? "prove not found" "$LINENO" 5
18991 # Thread testing
18993 # We have to run the thread test near the end so we have all our symbols
18994 # defined. Cross compiling throws a warning.
18996 if test "$enable_thread_safety" = yes; then
18997 if test "$PORTNAME" != "win32"
18998 then
18999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
19000 $as_echo_n "checking thread safety of required library functions... " >&6; }
19002 _CFLAGS="$CFLAGS"
19003 _LIBS="$LIBS"
19004 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19005 LIBS="$LIBS $PTHREAD_LIBS"
19006 if test "$cross_compiling" = yes; then :
19007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
19008 $as_echo "maybe" >&6; }
19009 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19010 *** Skipping thread test program because of cross-compile build.
19011 " >&5
19012 $as_echo "$as_me: WARNING:
19013 *** Skipping thread test program because of cross-compile build.
19014 " >&2;}
19015 else
19016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19017 /* end confdefs.h. */
19018 #include "$srcdir/config/thread_test.c"
19019 _ACEOF
19020 if ac_fn_c_try_run "$LINENO"; then :
19021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19022 $as_echo "yes" >&6; }
19023 else
19024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19025 $as_echo "no" >&6; }
19026 as_fn_error $? "thread test program failed
19027 This platform is not thread-safe. Check the file 'config.log' for the
19028 exact reason, or use --disable-thread-safety to disable thread safety." "$LINENO" 5
19030 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19031 conftest.$ac_objext conftest.beam conftest.$ac_ext
19034 CFLAGS="$_CFLAGS"
19035 LIBS="$_LIBS"
19036 else
19037 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
19038 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
19042 # If compiler will take -Wl,--as-needed (or various platform-specific
19043 # spellings thereof) then add that to LDFLAGS. This is much easier than
19044 # trying to filter LIBS to the minimum for each executable.
19045 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19046 # libreadline; therefore we postpone testing it until we know what library
19047 # dependencies readline has. The test code will try to link with $LIBS.
19048 if test "$with_readline" = yes; then
19049 link_test_func=readline
19050 else
19051 link_test_func=exit
19054 if test "$PORTNAME" = "darwin"; then
19055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19056 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19057 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19058 $as_echo_n "(cached) " >&6
19059 else
19060 pgac_save_LDFLAGS=$LDFLAGS
19061 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19062 if test "$cross_compiling" = yes; then :
19063 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19064 else
19065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19066 /* end confdefs.h. */
19067 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19069 main ()
19073 return 0;
19075 _ACEOF
19076 if ac_fn_c_try_run "$LINENO"; then :
19077 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19078 else
19079 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19082 conftest.$ac_objext conftest.beam conftest.$ac_ext
19085 LDFLAGS="$pgac_save_LDFLAGS"
19087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19088 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19089 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19090 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19093 elif test "$PORTNAME" = "openbsd"; then
19094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19095 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19096 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19097 $as_echo_n "(cached) " >&6
19098 else
19099 pgac_save_LDFLAGS=$LDFLAGS
19100 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19101 if test "$cross_compiling" = yes; then :
19102 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19103 else
19104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19105 /* end confdefs.h. */
19106 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19108 main ()
19112 return 0;
19114 _ACEOF
19115 if ac_fn_c_try_run "$LINENO"; then :
19116 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19117 else
19118 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19120 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19121 conftest.$ac_objext conftest.beam conftest.$ac_ext
19124 LDFLAGS="$pgac_save_LDFLAGS"
19126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19127 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19128 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19129 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19132 else
19133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19134 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19135 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19136 $as_echo_n "(cached) " >&6
19137 else
19138 pgac_save_LDFLAGS=$LDFLAGS
19139 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19140 if test "$cross_compiling" = yes; then :
19141 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19142 else
19143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19144 /* end confdefs.h. */
19145 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19147 main ()
19151 return 0;
19153 _ACEOF
19154 if ac_fn_c_try_run "$LINENO"; then :
19155 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19156 else
19157 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19159 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19160 conftest.$ac_objext conftest.beam conftest.$ac_ext
19163 LDFLAGS="$pgac_save_LDFLAGS"
19165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19166 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19167 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19168 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19173 # Create compiler version string
19174 if test x"$GCC" = x"yes" ; then
19175 cc_string=`${CC} --version | sed q`
19176 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19177 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19178 cc_string=`${CC} -V 2>&1 | sed q`
19179 else
19180 cc_string=$CC
19184 cat >>confdefs.h <<_ACEOF
19185 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19186 _ACEOF
19189 # Supply a numeric version string for use by 3rd party add-ons
19190 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19191 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19192 $AWK '{printf "%d%04d", $1, $2}'`"
19194 cat >>confdefs.h <<_ACEOF
19195 #define PG_VERSION_NUM $PG_VERSION_NUM
19196 _ACEOF
19200 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19201 # literally, so that it's possible to override it at build time using
19202 # a command like "make ... PG_SYSROOT=path". This has to be done after
19203 # we've finished all configure checks that depend on CPPFLAGS.
19204 # The same for LDFLAGS, too.
19205 if test x"$PG_SYSROOT" != x; then
19206 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19207 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19212 # Begin output steps
19214 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19215 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19216 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19217 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19218 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19219 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19220 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19221 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19222 # Currently only used when LLVM is used
19223 if test "$with_llvm" = yes ; then
19224 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19225 $as_echo "$as_me: using CXX=$CXX" >&6;}
19226 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19227 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19228 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19229 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19230 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19231 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19232 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19233 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19236 # prepare build tree if outside source tree
19237 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19238 # Note 2: /bin/pwd might be better than shell's built-in at getting
19239 # a symlink-free name.
19240 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19241 vpath_build=no
19242 else
19243 vpath_build=yes
19244 if test "$no_create" != yes; then
19245 $as_echo_n "preparing build tree... " >&6
19246 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19247 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19248 || as_fn_error $? "failed" "$LINENO" 5
19249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19250 $as_echo "done" >&6; }
19256 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19259 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}"
19262 if test "$PORTNAME" = "win32"; then
19263 ac_config_commands="$ac_config_commands check_win32_symlinks"
19267 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19270 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19273 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19276 cat >confcache <<\_ACEOF
19277 # This file is a shell script that caches the results of configure
19278 # tests run on this system so they can be shared between configure
19279 # scripts and configure runs, see configure's option --config-cache.
19280 # It is not useful on other systems. If it contains results you don't
19281 # want to keep, you may remove or edit it.
19283 # config.status only pays attention to the cache file if you give it
19284 # the --recheck option to rerun configure.
19286 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19287 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19288 # following values.
19290 _ACEOF
19292 # The following way of writing the cache mishandles newlines in values,
19293 # but we know of no workaround that is simple, portable, and efficient.
19294 # So, we kill variables containing newlines.
19295 # Ultrix sh set writes to stderr and can't be redirected directly,
19296 # and sets the high bit in the cache file unless we assign to the vars.
19298 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19299 eval ac_val=\$$ac_var
19300 case $ac_val in #(
19301 *${as_nl}*)
19302 case $ac_var in #(
19303 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19304 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19305 esac
19306 case $ac_var in #(
19307 _ | IFS | as_nl) ;; #(
19308 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19309 *) { eval $ac_var=; unset $ac_var;} ;;
19310 esac ;;
19311 esac
19312 done
19314 (set) 2>&1 |
19315 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19316 *${as_nl}ac_space=\ *)
19317 # `set' does not quote correctly, so add quotes: double-quote
19318 # substitution turns \\\\ into \\, and sed turns \\ into \.
19319 sed -n \
19320 "s/'/'\\\\''/g;
19321 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19322 ;; #(
19324 # `set' quotes correctly as required by POSIX, so do not add quotes.
19325 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19327 esac |
19328 sort
19330 sed '
19331 /^ac_cv_env_/b end
19332 t clear
19333 :clear
19334 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19335 t end
19336 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19337 :end' >>confcache
19338 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19339 if test -w "$cache_file"; then
19340 if test "x$cache_file" != "x/dev/null"; then
19341 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19342 $as_echo "$as_me: updating cache $cache_file" >&6;}
19343 if test ! -f "$cache_file" || test -h "$cache_file"; then
19344 cat confcache >"$cache_file"
19345 else
19346 case $cache_file in #(
19347 */* | ?:*)
19348 mv -f confcache "$cache_file"$$ &&
19349 mv -f "$cache_file"$$ "$cache_file" ;; #(
19351 mv -f confcache "$cache_file" ;;
19352 esac
19355 else
19356 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19357 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19360 rm -f confcache
19362 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19363 # Let make expand exec_prefix.
19364 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19366 DEFS=-DHAVE_CONFIG_H
19368 ac_libobjs=
19369 ac_ltlibobjs=
19371 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19372 # 1. Remove the extension, and $U if already installed.
19373 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19374 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19375 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19376 # will be set to the directory where LIBOBJS objects are built.
19377 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19378 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19379 done
19380 LIBOBJS=$ac_libobjs
19382 LTLIBOBJS=$ac_ltlibobjs
19387 : "${CONFIG_STATUS=./config.status}"
19388 ac_write_fail=0
19389 ac_clean_files_save=$ac_clean_files
19390 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19391 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19392 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19393 as_write_fail=0
19394 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19395 #! $SHELL
19396 # Generated by $as_me.
19397 # Run this file to recreate the current configuration.
19398 # Compiler output produced by configure, useful for debugging
19399 # configure, is in config.log if it exists.
19401 debug=false
19402 ac_cs_recheck=false
19403 ac_cs_silent=false
19405 SHELL=\${CONFIG_SHELL-$SHELL}
19406 export SHELL
19407 _ASEOF
19408 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19409 ## -------------------- ##
19410 ## M4sh Initialization. ##
19411 ## -------------------- ##
19413 # Be more Bourne compatible
19414 DUALCASE=1; export DUALCASE # for MKS sh
19415 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19416 emulate sh
19417 NULLCMD=:
19418 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19419 # is contrary to our usage. Disable this feature.
19420 alias -g '${1+"$@"}'='"$@"'
19421 setopt NO_GLOB_SUBST
19422 else
19423 case `(set -o) 2>/dev/null` in #(
19424 *posix*) :
19425 set -o posix ;; #(
19426 *) :
19428 esac
19432 as_nl='
19434 export as_nl
19435 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19436 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19437 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19438 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19439 # Prefer a ksh shell builtin over an external printf program on Solaris,
19440 # but without wasting forks for bash or zsh.
19441 if test -z "$BASH_VERSION$ZSH_VERSION" \
19442 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19443 as_echo='print -r --'
19444 as_echo_n='print -rn --'
19445 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19446 as_echo='printf %s\n'
19447 as_echo_n='printf %s'
19448 else
19449 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19450 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19451 as_echo_n='/usr/ucb/echo -n'
19452 else
19453 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19454 as_echo_n_body='eval
19455 arg=$1;
19456 case $arg in #(
19457 *"$as_nl"*)
19458 expr "X$arg" : "X\\(.*\\)$as_nl";
19459 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19460 esac;
19461 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19463 export as_echo_n_body
19464 as_echo_n='sh -c $as_echo_n_body as_echo'
19466 export as_echo_body
19467 as_echo='sh -c $as_echo_body as_echo'
19470 # The user is always right.
19471 if test "${PATH_SEPARATOR+set}" != set; then
19472 PATH_SEPARATOR=:
19473 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19474 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19475 PATH_SEPARATOR=';'
19480 # IFS
19481 # We need space, tab and new line, in precisely that order. Quoting is
19482 # there to prevent editors from complaining about space-tab.
19483 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19484 # splitting by setting IFS to empty value.)
19485 IFS=" "" $as_nl"
19487 # Find who we are. Look in the path if we contain no directory separator.
19488 as_myself=
19489 case $0 in #((
19490 *[\\/]* ) as_myself=$0 ;;
19491 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19492 for as_dir in $PATH
19494 IFS=$as_save_IFS
19495 test -z "$as_dir" && as_dir=.
19496 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19497 done
19498 IFS=$as_save_IFS
19501 esac
19502 # We did not find ourselves, most probably we were run as `sh COMMAND'
19503 # in which case we are not to be found in the path.
19504 if test "x$as_myself" = x; then
19505 as_myself=$0
19507 if test ! -f "$as_myself"; then
19508 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19509 exit 1
19512 # Unset variables that we do not need and which cause bugs (e.g. in
19513 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19514 # suppresses any "Segmentation fault" message there. '((' could
19515 # trigger a bug in pdksh 5.2.14.
19516 for as_var in BASH_ENV ENV MAIL MAILPATH
19517 do eval test x\${$as_var+set} = xset \
19518 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19519 done
19520 PS1='$ '
19521 PS2='> '
19522 PS4='+ '
19524 # NLS nuisances.
19525 LC_ALL=C
19526 export LC_ALL
19527 LANGUAGE=C
19528 export LANGUAGE
19530 # CDPATH.
19531 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19534 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19535 # ----------------------------------------
19536 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19537 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19538 # script with STATUS, using 1 if that was 0.
19539 as_fn_error ()
19541 as_status=$1; test $as_status -eq 0 && as_status=1
19542 if test "$4"; then
19543 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19544 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19546 $as_echo "$as_me: error: $2" >&2
19547 as_fn_exit $as_status
19548 } # as_fn_error
19551 # as_fn_set_status STATUS
19552 # -----------------------
19553 # Set $? to STATUS, without forking.
19554 as_fn_set_status ()
19556 return $1
19557 } # as_fn_set_status
19559 # as_fn_exit STATUS
19560 # -----------------
19561 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19562 as_fn_exit ()
19564 set +e
19565 as_fn_set_status $1
19566 exit $1
19567 } # as_fn_exit
19569 # as_fn_unset VAR
19570 # ---------------
19571 # Portably unset VAR.
19572 as_fn_unset ()
19574 { eval $1=; unset $1;}
19576 as_unset=as_fn_unset
19577 # as_fn_append VAR VALUE
19578 # ----------------------
19579 # Append the text in VALUE to the end of the definition contained in VAR. Take
19580 # advantage of any shell optimizations that allow amortized linear growth over
19581 # repeated appends, instead of the typical quadratic growth present in naive
19582 # implementations.
19583 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19584 eval 'as_fn_append ()
19586 eval $1+=\$2
19588 else
19589 as_fn_append ()
19591 eval $1=\$$1\$2
19593 fi # as_fn_append
19595 # as_fn_arith ARG...
19596 # ------------------
19597 # Perform arithmetic evaluation on the ARGs, and store the result in the
19598 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19599 # must be portable across $(()) and expr.
19600 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19601 eval 'as_fn_arith ()
19603 as_val=$(( $* ))
19605 else
19606 as_fn_arith ()
19608 as_val=`expr "$@" || test $? -eq 1`
19610 fi # as_fn_arith
19613 if expr a : '\(a\)' >/dev/null 2>&1 &&
19614 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19615 as_expr=expr
19616 else
19617 as_expr=false
19620 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19621 as_basename=basename
19622 else
19623 as_basename=false
19626 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19627 as_dirname=dirname
19628 else
19629 as_dirname=false
19632 as_me=`$as_basename -- "$0" ||
19633 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19634 X"$0" : 'X\(//\)$' \| \
19635 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19636 $as_echo X/"$0" |
19637 sed '/^.*\/\([^/][^/]*\)\/*$/{
19638 s//\1/
19641 /^X\/\(\/\/\)$/{
19642 s//\1/
19645 /^X\/\(\/\).*/{
19646 s//\1/
19649 s/.*/./; q'`
19651 # Avoid depending upon Character Ranges.
19652 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19653 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19654 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19655 as_cr_digits='0123456789'
19656 as_cr_alnum=$as_cr_Letters$as_cr_digits
19658 ECHO_C= ECHO_N= ECHO_T=
19659 case `echo -n x` in #(((((
19660 -n*)
19661 case `echo 'xy\c'` in
19662 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19663 xy) ECHO_C='\c';;
19664 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19665 ECHO_T=' ';;
19666 esac;;
19668 ECHO_N='-n';;
19669 esac
19671 rm -f conf$$ conf$$.exe conf$$.file
19672 if test -d conf$$.dir; then
19673 rm -f conf$$.dir/conf$$.file
19674 else
19675 rm -f conf$$.dir
19676 mkdir conf$$.dir 2>/dev/null
19678 if (echo >conf$$.file) 2>/dev/null; then
19679 if ln -s conf$$.file conf$$ 2>/dev/null; then
19680 as_ln_s='ln -s'
19681 # ... but there are two gotchas:
19682 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19683 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19684 # In both cases, we have to default to `cp -pR'.
19685 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19686 as_ln_s='cp -pR'
19687 elif ln conf$$.file conf$$ 2>/dev/null; then
19688 as_ln_s=ln
19689 else
19690 as_ln_s='cp -pR'
19692 else
19693 as_ln_s='cp -pR'
19695 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19696 rmdir conf$$.dir 2>/dev/null
19699 # as_fn_mkdir_p
19700 # -------------
19701 # Create "$as_dir" as a directory, including parents if necessary.
19702 as_fn_mkdir_p ()
19705 case $as_dir in #(
19706 -*) as_dir=./$as_dir;;
19707 esac
19708 test -d "$as_dir" || eval $as_mkdir_p || {
19709 as_dirs=
19710 while :; do
19711 case $as_dir in #(
19712 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19713 *) as_qdir=$as_dir;;
19714 esac
19715 as_dirs="'$as_qdir' $as_dirs"
19716 as_dir=`$as_dirname -- "$as_dir" ||
19717 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19718 X"$as_dir" : 'X\(//\)[^/]' \| \
19719 X"$as_dir" : 'X\(//\)$' \| \
19720 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19721 $as_echo X"$as_dir" |
19722 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19723 s//\1/
19726 /^X\(\/\/\)[^/].*/{
19727 s//\1/
19730 /^X\(\/\/\)$/{
19731 s//\1/
19734 /^X\(\/\).*/{
19735 s//\1/
19738 s/.*/./; q'`
19739 test -d "$as_dir" && break
19740 done
19741 test -z "$as_dirs" || eval "mkdir $as_dirs"
19742 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19745 } # as_fn_mkdir_p
19746 if mkdir -p . 2>/dev/null; then
19747 as_mkdir_p='mkdir -p "$as_dir"'
19748 else
19749 test -d ./-p && rmdir ./-p
19750 as_mkdir_p=false
19754 # as_fn_executable_p FILE
19755 # -----------------------
19756 # Test if FILE is an executable regular file.
19757 as_fn_executable_p ()
19759 test -f "$1" && test -x "$1"
19760 } # as_fn_executable_p
19761 as_test_x='test -x'
19762 as_executable_p=as_fn_executable_p
19764 # Sed expression to map a string onto a valid CPP name.
19765 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19767 # Sed expression to map a string onto a valid variable name.
19768 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19771 exec 6>&1
19772 ## ----------------------------------- ##
19773 ## Main body of $CONFIG_STATUS script. ##
19774 ## ----------------------------------- ##
19775 _ASEOF
19776 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19778 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19779 # Save the log message, to keep $0 and so on meaningful, and to
19780 # report actual input values of CONFIG_FILES etc. instead of their
19781 # values after options handling.
19782 ac_log="
19783 This file was extended by PostgreSQL $as_me 14devel, which was
19784 generated by GNU Autoconf 2.69. Invocation command line was
19786 CONFIG_FILES = $CONFIG_FILES
19787 CONFIG_HEADERS = $CONFIG_HEADERS
19788 CONFIG_LINKS = $CONFIG_LINKS
19789 CONFIG_COMMANDS = $CONFIG_COMMANDS
19790 $ $0 $@
19792 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19795 _ACEOF
19797 case $ac_config_files in *"
19798 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19799 esac
19801 case $ac_config_headers in *"
19802 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19803 esac
19806 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19807 # Files that config.status was made for.
19808 config_files="$ac_config_files"
19809 config_headers="$ac_config_headers"
19810 config_links="$ac_config_links"
19811 config_commands="$ac_config_commands"
19813 _ACEOF
19815 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19816 ac_cs_usage="\
19817 \`$as_me' instantiates files and other configuration actions
19818 from templates according to the current configuration. Unless the files
19819 and actions are specified as TAGs, all are instantiated by default.
19821 Usage: $0 [OPTION]... [TAG]...
19823 -h, --help print this help, then exit
19824 -V, --version print version number and configuration settings, then exit
19825 --config print configuration, then exit
19826 -q, --quiet, --silent
19827 do not print progress messages
19828 -d, --debug don't remove temporary files
19829 --recheck update $as_me by reconfiguring in the same conditions
19830 --file=FILE[:TEMPLATE]
19831 instantiate the configuration file FILE
19832 --header=FILE[:TEMPLATE]
19833 instantiate the configuration header FILE
19835 Configuration files:
19836 $config_files
19838 Configuration headers:
19839 $config_headers
19841 Configuration links:
19842 $config_links
19844 Configuration commands:
19845 $config_commands
19847 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19848 PostgreSQL home page: <https://www.postgresql.org/>."
19850 _ACEOF
19851 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19852 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19853 ac_cs_version="\\
19854 PostgreSQL config.status 14devel
19855 configured by $0, generated by GNU Autoconf 2.69,
19856 with options \\"\$ac_cs_config\\"
19858 Copyright (C) 2012 Free Software Foundation, Inc.
19859 This config.status script is free software; the Free Software Foundation
19860 gives unlimited permission to copy, distribute and modify it."
19862 ac_pwd='$ac_pwd'
19863 srcdir='$srcdir'
19864 INSTALL='$INSTALL'
19865 MKDIR_P='$MKDIR_P'
19866 AWK='$AWK'
19867 test -n "\$AWK" || AWK=awk
19868 _ACEOF
19870 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19871 # The default lists apply if the user does not specify any file.
19872 ac_need_defaults=:
19873 while test $# != 0
19875 case $1 in
19876 --*=?*)
19877 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19878 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19879 ac_shift=:
19881 --*=)
19882 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19883 ac_optarg=
19884 ac_shift=:
19887 ac_option=$1
19888 ac_optarg=$2
19889 ac_shift=shift
19891 esac
19893 case $ac_option in
19894 # Handling of the options.
19895 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19896 ac_cs_recheck=: ;;
19897 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19898 $as_echo "$ac_cs_version"; exit ;;
19899 --config | --confi | --conf | --con | --co | --c )
19900 $as_echo "$ac_cs_config"; exit ;;
19901 --debug | --debu | --deb | --de | --d | -d )
19902 debug=: ;;
19903 --file | --fil | --fi | --f )
19904 $ac_shift
19905 case $ac_optarg in
19906 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19907 '') as_fn_error $? "missing file argument" ;;
19908 esac
19909 as_fn_append CONFIG_FILES " '$ac_optarg'"
19910 ac_need_defaults=false;;
19911 --header | --heade | --head | --hea )
19912 $ac_shift
19913 case $ac_optarg in
19914 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19915 esac
19916 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19917 ac_need_defaults=false;;
19918 --he | --h)
19919 # Conflict between --help and --header
19920 as_fn_error $? "ambiguous option: \`$1'
19921 Try \`$0 --help' for more information.";;
19922 --help | --hel | -h )
19923 $as_echo "$ac_cs_usage"; exit ;;
19924 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19925 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19926 ac_cs_silent=: ;;
19928 # This is an error.
19929 -*) as_fn_error $? "unrecognized option: \`$1'
19930 Try \`$0 --help' for more information." ;;
19932 *) as_fn_append ac_config_targets " $1"
19933 ac_need_defaults=false ;;
19935 esac
19936 shift
19937 done
19939 ac_configure_extra_args=
19941 if $ac_cs_silent; then
19942 exec 6>/dev/null
19943 ac_configure_extra_args="$ac_configure_extra_args --silent"
19946 _ACEOF
19947 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19948 if \$ac_cs_recheck; then
19949 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19950 shift
19951 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19952 CONFIG_SHELL='$SHELL'
19953 export CONFIG_SHELL
19954 exec "\$@"
19957 _ACEOF
19958 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19959 exec 5>>config.log
19961 echo
19962 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19963 ## Running $as_me. ##
19964 _ASBOX
19965 $as_echo "$ac_log"
19966 } >&5
19968 _ACEOF
19969 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19970 _ACEOF
19972 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19974 # Handling of arguments.
19975 for ac_config_target in $ac_config_targets
19977 case $ac_config_target in
19978 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19979 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19980 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19981 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19982 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19983 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19984 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19985 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19986 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19987 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19988 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19990 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19991 esac
19992 done
19995 # If the user did not use the arguments to specify the items to instantiate,
19996 # then the envvar interface is used. Set only those that are not.
19997 # We use the long form for the default assignment because of an extremely
19998 # bizarre bug on SunOS 4.1.3.
19999 if $ac_need_defaults; then
20000 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20001 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20002 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20003 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20006 # Have a temporary directory for convenience. Make it in the build tree
20007 # simply because there is no reason against having it here, and in addition,
20008 # creating and moving files from /tmp can sometimes cause problems.
20009 # Hook for its removal unless debugging.
20010 # Note that there is a small window in which the directory will not be cleaned:
20011 # after its creation but before its name has been assigned to `$tmp'.
20012 $debug ||
20014 tmp= ac_tmp=
20015 trap 'exit_status=$?
20016 : "${ac_tmp:=$tmp}"
20017 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20019 trap 'as_fn_exit 1' 1 2 13 15
20021 # Create a (secure) tmp directory for tmp files.
20024 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20025 test -d "$tmp"
20026 } ||
20028 tmp=./conf$$-$RANDOM
20029 (umask 077 && mkdir "$tmp")
20030 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20031 ac_tmp=$tmp
20033 # Set up the scripts for CONFIG_FILES section.
20034 # No need to generate them if there are no CONFIG_FILES.
20035 # This happens for instance with `./config.status config.h'.
20036 if test -n "$CONFIG_FILES"; then
20039 ac_cr=`echo X | tr X '\015'`
20040 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20041 # But we know of no other shell where ac_cr would be empty at this
20042 # point, so we can use a bashism as a fallback.
20043 if test "x$ac_cr" = x; then
20044 eval ac_cr=\$\'\\r\'
20046 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20047 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20048 ac_cs_awk_cr='\\r'
20049 else
20050 ac_cs_awk_cr=$ac_cr
20053 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20054 _ACEOF
20058 echo "cat >conf$$subs.awk <<_ACEOF" &&
20059 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20060 echo "_ACEOF"
20061 } >conf$$subs.sh ||
20062 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20063 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20064 ac_delim='%!_!# '
20065 for ac_last_try in false false false false false :; do
20066 . ./conf$$subs.sh ||
20067 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20069 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20070 if test $ac_delim_n = $ac_delim_num; then
20071 break
20072 elif $ac_last_try; then
20073 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20074 else
20075 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20077 done
20078 rm -f conf$$subs.sh
20080 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20081 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20082 _ACEOF
20083 sed -n '
20085 s/^/S["/; s/!.*/"]=/
20088 s/^[^!]*!//
20089 :repl
20090 t repl
20091 s/'"$ac_delim"'$//
20092 t delim
20095 s/\(.\{148\}\)..*/\1/
20096 t more1
20097 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20100 b repl
20101 :more1
20102 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20105 s/.\{148\}//
20106 t nl
20107 :delim
20109 s/\(.\{148\}\)..*/\1/
20110 t more2
20111 s/["\\]/\\&/g; s/^/"/; s/$/"/
20114 :more2
20115 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20118 s/.\{148\}//
20119 t delim
20120 ' <conf$$subs.awk | sed '
20121 /^[^""]/{
20123 s/\n//
20125 ' >>$CONFIG_STATUS || ac_write_fail=1
20126 rm -f conf$$subs.awk
20127 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20128 _ACAWK
20129 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20130 for (key in S) S_is_set[key] = 1
20131 FS = "\a"
20135 line = $ 0
20136 nfields = split(line, field, "@")
20137 substed = 0
20138 len = length(field[1])
20139 for (i = 2; i < nfields; i++) {
20140 key = field[i]
20141 keylen = length(key)
20142 if (S_is_set[key]) {
20143 value = S[key]
20144 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20145 len += length(value) + length(field[++i])
20146 substed = 1
20147 } else
20148 len += 1 + keylen
20151 print line
20154 _ACAWK
20155 _ACEOF
20156 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20157 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20158 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20159 else
20161 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20162 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20163 _ACEOF
20165 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20166 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20167 # trailing colons and then remove the whole line if VPATH becomes empty
20168 # (actually we leave an empty line to preserve line numbers).
20169 if test "x$srcdir" = x.; then
20170 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20172 s///
20173 s/^/:/
20174 s/[ ]*$/:/
20175 s/:\$(srcdir):/:/g
20176 s/:\${srcdir}:/:/g
20177 s/:@srcdir@:/:/g
20178 s/^:*//
20179 s/:*$//
20181 s/\(=[ ]*\).*/\1/
20183 s/\n//
20184 s/^[^=]*=[ ]*$//
20188 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20189 fi # test -n "$CONFIG_FILES"
20191 # Set up the scripts for CONFIG_HEADERS section.
20192 # No need to generate them if there are no CONFIG_HEADERS.
20193 # This happens for instance with `./config.status Makefile'.
20194 if test -n "$CONFIG_HEADERS"; then
20195 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20196 BEGIN {
20197 _ACEOF
20199 # Transform confdefs.h into an awk script `defines.awk', embedded as
20200 # here-document in config.status, that substitutes the proper values into
20201 # config.h.in to produce config.h.
20203 # Create a delimiter string that does not exist in confdefs.h, to ease
20204 # handling of long lines.
20205 ac_delim='%!_!# '
20206 for ac_last_try in false false :; do
20207 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20208 if test -z "$ac_tt"; then
20209 break
20210 elif $ac_last_try; then
20211 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20212 else
20213 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20215 done
20217 # For the awk script, D is an array of macro values keyed by name,
20218 # likewise P contains macro parameters if any. Preserve backslash
20219 # newline sequences.
20221 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20222 sed -n '
20223 s/.\{148\}/&'"$ac_delim"'/g
20224 t rset
20225 :rset
20226 s/^[ ]*#[ ]*define[ ][ ]*/ /
20227 t def
20229 :def
20230 s/\\$//
20231 t bsnl
20232 s/["\\]/\\&/g
20233 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20234 D["\1"]=" \3"/p
20235 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20237 :bsnl
20238 s/["\\]/\\&/g
20239 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20240 D["\1"]=" \3\\\\\\n"\\/p
20241 t cont
20242 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20243 t cont
20245 :cont
20247 s/.\{148\}/&'"$ac_delim"'/g
20248 t clear
20249 :clear
20250 s/\\$//
20251 t bsnlc
20252 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20254 :bsnlc
20255 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20256 b cont
20257 ' <confdefs.h | sed '
20258 s/'"$ac_delim"'/"\\\
20259 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20261 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20262 for (key in D) D_is_set[key] = 1
20263 FS = "\a"
20265 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20266 line = \$ 0
20267 split(line, arg, " ")
20268 if (arg[1] == "#") {
20269 defundef = arg[2]
20270 mac1 = arg[3]
20271 } else {
20272 defundef = substr(arg[1], 2)
20273 mac1 = arg[2]
20275 split(mac1, mac2, "(") #)
20276 macro = mac2[1]
20277 prefix = substr(line, 1, index(line, defundef) - 1)
20278 if (D_is_set[macro]) {
20279 # Preserve the white space surrounding the "#".
20280 print prefix "define", macro P[macro] D[macro]
20281 next
20282 } else {
20283 # Replace #undef with comments. This is necessary, for example,
20284 # in the case of _POSIX_SOURCE, which is predefined and required
20285 # on some systems where configure will not decide to define it.
20286 if (defundef == "undef") {
20287 print "/*", prefix defundef, macro, "*/"
20288 next
20292 { print }
20293 _ACAWK
20294 _ACEOF
20295 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20296 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20297 fi # test -n "$CONFIG_HEADERS"
20300 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20301 shift
20302 for ac_tag
20304 case $ac_tag in
20305 :[FHLC]) ac_mode=$ac_tag; continue;;
20306 esac
20307 case $ac_mode$ac_tag in
20308 :[FHL]*:*);;
20309 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20310 :[FH]-) ac_tag=-:-;;
20311 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20312 esac
20313 ac_save_IFS=$IFS
20314 IFS=:
20315 set x $ac_tag
20316 IFS=$ac_save_IFS
20317 shift
20318 ac_file=$1
20319 shift
20321 case $ac_mode in
20322 :L) ac_source=$1;;
20323 :[FH])
20324 ac_file_inputs=
20325 for ac_f
20327 case $ac_f in
20328 -) ac_f="$ac_tmp/stdin";;
20329 *) # Look for the file first in the build tree, then in the source tree
20330 # (if the path is not absolute). The absolute path cannot be DOS-style,
20331 # because $ac_f cannot contain `:'.
20332 test -f "$ac_f" ||
20333 case $ac_f in
20334 [\\/$]*) false;;
20335 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20336 esac ||
20337 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20338 esac
20339 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20340 as_fn_append ac_file_inputs " '$ac_f'"
20341 done
20343 # Let's still pretend it is `configure' which instantiates (i.e., don't
20344 # use $as_me), people would be surprised to read:
20345 # /* config.h. Generated by config.status. */
20346 configure_input='Generated from '`
20347 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20348 `' by configure.'
20349 if test x"$ac_file" != x-; then
20350 configure_input="$ac_file. $configure_input"
20351 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20352 $as_echo "$as_me: creating $ac_file" >&6;}
20354 # Neutralize special characters interpreted by sed in replacement strings.
20355 case $configure_input in #(
20356 *\&* | *\|* | *\\* )
20357 ac_sed_conf_input=`$as_echo "$configure_input" |
20358 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20359 *) ac_sed_conf_input=$configure_input;;
20360 esac
20362 case $ac_tag in
20363 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20364 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20365 esac
20367 esac
20369 ac_dir=`$as_dirname -- "$ac_file" ||
20370 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20371 X"$ac_file" : 'X\(//\)[^/]' \| \
20372 X"$ac_file" : 'X\(//\)$' \| \
20373 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20374 $as_echo X"$ac_file" |
20375 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20376 s//\1/
20379 /^X\(\/\/\)[^/].*/{
20380 s//\1/
20383 /^X\(\/\/\)$/{
20384 s//\1/
20387 /^X\(\/\).*/{
20388 s//\1/
20391 s/.*/./; q'`
20392 as_dir="$ac_dir"; as_fn_mkdir_p
20393 ac_builddir=.
20395 case "$ac_dir" in
20396 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20398 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20399 # A ".." for each directory in $ac_dir_suffix.
20400 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20401 case $ac_top_builddir_sub in
20402 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20403 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20404 esac ;;
20405 esac
20406 ac_abs_top_builddir=$ac_pwd
20407 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20408 # for backward compatibility:
20409 ac_top_builddir=$ac_top_build_prefix
20411 case $srcdir in
20412 .) # We are building in place.
20413 ac_srcdir=.
20414 ac_top_srcdir=$ac_top_builddir_sub
20415 ac_abs_top_srcdir=$ac_pwd ;;
20416 [\\/]* | ?:[\\/]* ) # Absolute name.
20417 ac_srcdir=$srcdir$ac_dir_suffix;
20418 ac_top_srcdir=$srcdir
20419 ac_abs_top_srcdir=$srcdir ;;
20420 *) # Relative name.
20421 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20422 ac_top_srcdir=$ac_top_build_prefix$srcdir
20423 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20424 esac
20425 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20428 case $ac_mode in
20431 # CONFIG_FILE
20434 case $INSTALL in
20435 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20436 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20437 esac
20438 ac_MKDIR_P=$MKDIR_P
20439 case $MKDIR_P in
20440 [\\/$]* | ?:[\\/]* ) ;;
20441 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20442 esac
20443 _ACEOF
20445 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20446 # If the template does not know about datarootdir, expand it.
20447 # FIXME: This hack should be removed a few years after 2.60.
20448 ac_datarootdir_hack=; ac_datarootdir_seen=
20449 ac_sed_dataroot='
20450 /datarootdir/ {
20454 /@datadir@/p
20455 /@docdir@/p
20456 /@infodir@/p
20457 /@localedir@/p
20458 /@mandir@/p'
20459 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20460 *datarootdir*) ac_datarootdir_seen=yes;;
20461 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20462 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20463 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20464 _ACEOF
20465 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20466 ac_datarootdir_hack='
20467 s&@datadir@&$datadir&g
20468 s&@docdir@&$docdir&g
20469 s&@infodir@&$infodir&g
20470 s&@localedir@&$localedir&g
20471 s&@mandir@&$mandir&g
20472 s&\\\${datarootdir}&$datarootdir&g' ;;
20473 esac
20474 _ACEOF
20476 # Neutralize VPATH when `$srcdir' = `.'.
20477 # Shell code in configure.ac might set extrasub.
20478 # FIXME: do we really want to maintain this feature?
20479 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20480 ac_sed_extra="$ac_vpsub
20481 $extrasub
20482 _ACEOF
20483 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20485 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20486 s|@configure_input@|$ac_sed_conf_input|;t t
20487 s&@top_builddir@&$ac_top_builddir_sub&;t t
20488 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20489 s&@srcdir@&$ac_srcdir&;t t
20490 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20491 s&@top_srcdir@&$ac_top_srcdir&;t t
20492 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20493 s&@builddir@&$ac_builddir&;t t
20494 s&@abs_builddir@&$ac_abs_builddir&;t t
20495 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20496 s&@INSTALL@&$ac_INSTALL&;t t
20497 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20498 $ac_datarootdir_hack
20500 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20501 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20503 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20504 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20505 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20506 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20507 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20508 which seems to be undefined. Please make sure it is defined" >&5
20509 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20510 which seems to be undefined. Please make sure it is defined" >&2;}
20512 rm -f "$ac_tmp/stdin"
20513 case $ac_file in
20514 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20515 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20516 esac \
20517 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20521 # CONFIG_HEADER
20523 if test x"$ac_file" != x-; then
20525 $as_echo "/* $configure_input */" \
20526 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20527 } >"$ac_tmp/config.h" \
20528 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20529 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20530 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20531 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20532 else
20533 rm -f "$ac_file"
20534 mv "$ac_tmp/config.h" "$ac_file" \
20535 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20537 else
20538 $as_echo "/* $configure_input */" \
20539 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20540 || as_fn_error $? "could not create -" "$LINENO" 5
20545 # CONFIG_LINK
20548 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20550 else
20551 # Prefer the file from the source tree if names are identical.
20552 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20553 ac_source=$srcdir/$ac_source
20556 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20557 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20559 if test ! -r "$ac_source"; then
20560 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20562 rm -f "$ac_file"
20564 # Try a relative symlink, then a hard link, then a copy.
20565 case $ac_source in
20566 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20567 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20568 esac
20569 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20570 ln "$ac_source" "$ac_file" 2>/dev/null ||
20571 cp -p "$ac_source" "$ac_file" ||
20572 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20575 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20576 $as_echo "$as_me: executing $ac_file commands" >&6;}
20578 esac
20581 case $ac_file$ac_mode in
20582 "check_win32_symlinks":C)
20583 # Links sometimes fail undetected on Mingw -
20584 # so here we detect it and warn the user
20585 for FILE in $CONFIG_LINKS
20587 # test -e works for symlinks in the MinGW console
20588 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20589 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20590 done
20592 "src/include/pg_config.h":H)
20593 # Update timestamp for pg_config.h (see Makefile.global)
20594 echo >src/include/stamp-h
20596 "src/include/pg_config_ext.h":H)
20597 # Update timestamp for pg_config_ext.h (see Makefile.global)
20598 echo >src/include/stamp-ext-h
20600 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20602 esac
20603 done # for ac_tag
20606 as_fn_exit 0
20607 _ACEOF
20608 ac_clean_files=$ac_clean_files_save
20610 test $ac_write_fail = 0 ||
20611 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20614 # configure is writing to config.log, and then calls config.status.
20615 # config.status does its own redirection, appending to config.log.
20616 # Unfortunately, on DOS this fails, as config.log is still kept open
20617 # by configure, so config.status won't be able to write to it; its
20618 # output is simply discarded. So we exec the FD to /dev/null,
20619 # effectively closing config.log, so it can be properly (re)opened and
20620 # appended to by config.status. When coming back to configure, we
20621 # need to make the FD available again.
20622 if test "$no_create" != yes; then
20623 ac_cs_success=:
20624 ac_config_status_args=
20625 test "$silent" = yes &&
20626 ac_config_status_args="$ac_config_status_args --quiet"
20627 exec 5>/dev/null
20628 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20629 exec 5>>config.log
20630 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20631 # would make configure fail if this is the last instruction.
20632 $ac_cs_success || as_fn_exit 1
20634 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20635 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20636 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}