]> granicus.if.org Git - postgresql/blob - configure
pg_rewind: test new --write-recovery-conf functionality
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 13devel.
4 #
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 #
14 # Copyright (c) 1996-2019, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
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   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
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"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
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=';'
82   }
83 fi
84
85
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"
92
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
99 do
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
105
106      ;;
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
112 fi
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
116 fi
117
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='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
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
161   fi
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   *) :
177      ;;
178 esac
179 fi
180 "
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; }
186
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 :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
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
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
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
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
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
229 fi
230 fi
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
240
241
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
262 fi
263
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."
276   fi
277   exit 1
278 fi
279 fi
280 fi
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
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
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 ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
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/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
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"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
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 ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
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 ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
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 ()
414 {
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
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
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
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
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
441 fi
442
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/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
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
468
469
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 '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
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; }
492
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
503 }
504
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;;
514 *)
515   ECHO_N='-n';;
516 esac
517
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
524 fi
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'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
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
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
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'"
557
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'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
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`
569
570 #
571 # Initializations.
572 #
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=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='13devel'
586 PACKAGE_STRING='PostgreSQL 13devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL=''
589
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"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 FOP
634 XSLTPROC
635 DBTOEPUB
636 have_docbook
637 XMLLINT
638 TCL_SHLIB_LD_LIBS
639 TCL_SHARED_BUILD
640 TCL_LIB_SPEC
641 TCL_LIBS
642 TCL_INCLUDE_SPEC
643 TCL_CONFIG_SH
644 TCLSH
645 XGETTEXT
646 MSGMERGE
647 MSGFMT_FLAGS
648 MSGFMT
649 PG_CRC32C_OBJS
650 CFLAGS_ARMV8_CRC32C
651 CFLAGS_SSE42
652 have_win32_dbghelp
653 LIBOBJS
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 PTHREAD_CFLAGS
658 PTHREAD_LIBS
659 PTHREAD_CC
660 ax_pthread_config
661 EGREP
662 GREP
663 SED
664 ZIC
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
685 TAR
686 install_bin
687 INSTALL_DATA
688 INSTALL_SCRIPT
689 INSTALL_PROGRAM
690 WINDRES
691 DLLWRAP
692 DLLTOOL
693 AR
694 STRIP_SHARED_LIB
695 STRIP_STATIC_LIB
696 STRIP
697 RANLIB
698 with_gnu_ld
699 LD
700 LDFLAGS_SL
701 LDFLAGS_EX
702 with_zlib
703 with_system_tzdata
704 with_libxslt
705 with_libxml
706 XML2_CONFIG
707 UUID_EXTRA_OBJS
708 with_uuid
709 with_systemd
710 with_selinux
711 with_openssl
712 with_ldap
713 with_krb_srvnam
714 krb_srvtab
715 with_gssapi
716 with_python
717 with_perl
718 with_tcl
719 ICU_LIBS
720 ICU_CFLAGS
721 PKG_CONFIG_LIBDIR
722 PKG_CONFIG_PATH
723 PKG_CONFIG
724 with_icu
725 enable_thread_safety
726 INCLUDES
727 autodepend
728 TAS
729 GCC
730 CPP
731 BITCODE_CXXFLAGS
732 BITCODE_CFLAGS
733 CFLAGS_VECTOR
734 PERMIT_DECLARATION_AFTER_STATEMENT
735 LLVM_BINPATH
736 LLVM_CXXFLAGS
737 LLVM_CFLAGS
738 LLVM_CPPFLAGS
739 LLVM_LIBS
740 CLANG
741 LLVM_CONFIG
742 AWK
743 with_llvm
744 SUN_STUDIO_CC
745 ac_ct_CXX
746 CXXFLAGS
747 CXX
748 OBJEXT
749 EXEEXT
750 ac_ct_CC
751 CPPFLAGS
752 LDFLAGS
753 CFLAGS
754 CC
755 enable_tap_tests
756 enable_dtrace
757 DTRACEFLAGS
758 DTRACE
759 enable_coverage
760 GENHTML
761 LCOV
762 GCOV
763 enable_debug
764 enable_rpath
765 default_port
766 WANTED_LANGUAGES
767 enable_nls
768 PORTNAME
769 host_os
770 host_vendor
771 host_cpu
772 host
773 build_os
774 build_vendor
775 build_cpu
776 build
777 PG_MAJORVERSION
778 configure_args
779 target_alias
780 host_alias
781 build_alias
782 LIBS
783 ECHO_T
784 ECHO_N
785 ECHO_C
786 DEFS
787 mandir
788 localedir
789 libdir
790 psdir
791 pdfdir
792 dvidir
793 htmldir
794 infodir
795 docdir
796 oldincludedir
797 includedir
798 localstatedir
799 sharedstatedir
800 sysconfdir
801 datadir
802 datarootdir
803 libexecdir
804 sbindir
805 bindir
806 program_transform_name
807 prefix
808 exec_prefix
809 PACKAGE_URL
810 PACKAGE_BUGREPORT
811 PACKAGE_STRING
812 PACKAGE_VERSION
813 PACKAGE_TARNAME
814 PACKAGE_NAME
815 PATH_SEPARATOR
816 SHELL'
817 ac_subst_files=''
818 ac_user_opts='
819 enable_option_checking
820 with_extra_version
821 with_template
822 with_includes
823 with_libraries
824 with_libs
825 enable_integer_datetimes
826 enable_nls
827 with_pgport
828 enable_rpath
829 enable_spinlocks
830 enable_atomics
831 enable_debug
832 enable_profiling
833 enable_coverage
834 enable_dtrace
835 enable_tap_tests
836 with_blocksize
837 with_segsize
838 with_wal_blocksize
839 with_CC
840 with_llvm
841 enable_depend
842 enable_cassert
843 enable_thread_safety
844 with_icu
845 with_tcl
846 with_tclconfig
847 with_perl
848 with_python
849 with_gssapi
850 with_krb_srvnam
851 with_pam
852 with_bsd_auth
853 with_ldap
854 with_bonjour
855 with_openssl
856 with_selinux
857 with_systemd
858 with_readline
859 with_libedit_preferred
860 with_uuid
861 with_ossp_uuid
862 with_libxml
863 with_libxslt
864 with_system_tzdata
865 with_zlib
866 with_gnu_ld
867 enable_largefile
868 enable_float4_byval
869 enable_float8_byval
870 '
871       ac_precious_vars='build_alias
872 host_alias
873 target_alias
874 CC
875 CFLAGS
876 LDFLAGS
877 LIBS
878 CPPFLAGS
879 CXX
880 CXXFLAGS
881 CCC
882 LLVM_CONFIG
883 CLANG
884 CPP
885 PKG_CONFIG
886 PKG_CONFIG_PATH
887 PKG_CONFIG_LIBDIR
888 ICU_CFLAGS
889 ICU_LIBS
890 XML2_CONFIG
891 LDFLAGS_EX
892 LDFLAGS_SL
893 PERL
894 PYTHON
895 MSGFMT
896 TCLSH'
897
898
899 # Initialize some variables set by options.
900 ac_init_help=
901 ac_init_version=false
902 ac_unrecognized_opts=
903 ac_unrecognized_sep=
904 # The variables have the same names as the options, with
905 # dashes changed to underlines.
906 cache_file=/dev/null
907 exec_prefix=NONE
908 no_create=
909 no_recursion=
910 prefix=NONE
911 program_prefix=NONE
912 program_suffix=NONE
913 program_transform_name=s,x,x,
914 silent=
915 site=
916 srcdir=
917 verbose=
918 x_includes=NONE
919 x_libraries=NONE
920
921 # Installation directory options.
922 # These are left unexpanded so users can "make install exec_prefix=/foo"
923 # and all the variables that are supposed to be based on exec_prefix
924 # by default will actually change.
925 # Use braces instead of parens because sh, perl, etc. also accept them.
926 # (The list follows the same order as the GNU Coding Standards.)
927 bindir='${exec_prefix}/bin'
928 sbindir='${exec_prefix}/sbin'
929 libexecdir='${exec_prefix}/libexec'
930 datarootdir='${prefix}/share'
931 datadir='${datarootdir}'
932 sysconfdir='${prefix}/etc'
933 sharedstatedir='${prefix}/com'
934 localstatedir='${prefix}/var'
935 includedir='${prefix}/include'
936 oldincludedir='/usr/include'
937 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
938 infodir='${datarootdir}/info'
939 htmldir='${docdir}'
940 dvidir='${docdir}'
941 pdfdir='${docdir}'
942 psdir='${docdir}'
943 libdir='${exec_prefix}/lib'
944 localedir='${datarootdir}/locale'
945 mandir='${datarootdir}/man'
946
947 ac_prev=
948 ac_dashdash=
949 for ac_option
950 do
951   # If the previous option needs an argument, assign it.
952   if test -n "$ac_prev"; then
953     eval $ac_prev=\$ac_option
954     ac_prev=
955     continue
956   fi
957
958   case $ac_option in
959   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
960   *=)   ac_optarg= ;;
961   *)    ac_optarg=yes ;;
962   esac
963
964   # Accept the important Cygnus configure options, so we can diagnose typos.
965
966   case $ac_dashdash$ac_option in
967   --)
968     ac_dashdash=yes ;;
969
970   -bindir | --bindir | --bindi | --bind | --bin | --bi)
971     ac_prev=bindir ;;
972   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
973     bindir=$ac_optarg ;;
974
975   -build | --build | --buil | --bui | --bu)
976     ac_prev=build_alias ;;
977   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
978     build_alias=$ac_optarg ;;
979
980   -cache-file | --cache-file | --cache-fil | --cache-fi \
981   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
982     ac_prev=cache_file ;;
983   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
984   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
985     cache_file=$ac_optarg ;;
986
987   --config-cache | -C)
988     cache_file=config.cache ;;
989
990   -datadir | --datadir | --datadi | --datad)
991     ac_prev=datadir ;;
992   -datadir=* | --datadir=* | --datadi=* | --datad=*)
993     datadir=$ac_optarg ;;
994
995   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
996   | --dataroo | --dataro | --datar)
997     ac_prev=datarootdir ;;
998   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
999   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1000     datarootdir=$ac_optarg ;;
1001
1002   -disable-* | --disable-*)
1003     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1004     # Reject names that are not valid shell variable names.
1005     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1006       as_fn_error $? "invalid feature name: $ac_useropt"
1007     ac_useropt_orig=$ac_useropt
1008     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1009     case $ac_user_opts in
1010       *"
1011 "enable_$ac_useropt"
1012 "*) ;;
1013       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1014          ac_unrecognized_sep=', ';;
1015     esac
1016     eval enable_$ac_useropt=no ;;
1017
1018   -docdir | --docdir | --docdi | --doc | --do)
1019     ac_prev=docdir ;;
1020   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1021     docdir=$ac_optarg ;;
1022
1023   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1024     ac_prev=dvidir ;;
1025   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1026     dvidir=$ac_optarg ;;
1027
1028   -enable-* | --enable-*)
1029     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1030     # Reject names that are not valid shell variable names.
1031     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1032       as_fn_error $? "invalid feature name: $ac_useropt"
1033     ac_useropt_orig=$ac_useropt
1034     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1035     case $ac_user_opts in
1036       *"
1037 "enable_$ac_useropt"
1038 "*) ;;
1039       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1040          ac_unrecognized_sep=', ';;
1041     esac
1042     eval enable_$ac_useropt=\$ac_optarg ;;
1043
1044   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1045   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1046   | --exec | --exe | --ex)
1047     ac_prev=exec_prefix ;;
1048   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1049   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1050   | --exec=* | --exe=* | --ex=*)
1051     exec_prefix=$ac_optarg ;;
1052
1053   -gas | --gas | --ga | --g)
1054     # Obsolete; use --with-gas.
1055     with_gas=yes ;;
1056
1057   -help | --help | --hel | --he | -h)
1058     ac_init_help=long ;;
1059   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1060     ac_init_help=recursive ;;
1061   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1062     ac_init_help=short ;;
1063
1064   -host | --host | --hos | --ho)
1065     ac_prev=host_alias ;;
1066   -host=* | --host=* | --hos=* | --ho=*)
1067     host_alias=$ac_optarg ;;
1068
1069   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1070     ac_prev=htmldir ;;
1071   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1072   | --ht=*)
1073     htmldir=$ac_optarg ;;
1074
1075   -includedir | --includedir | --includedi | --included | --include \
1076   | --includ | --inclu | --incl | --inc)
1077     ac_prev=includedir ;;
1078   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1079   | --includ=* | --inclu=* | --incl=* | --inc=*)
1080     includedir=$ac_optarg ;;
1081
1082   -infodir | --infodir | --infodi | --infod | --info | --inf)
1083     ac_prev=infodir ;;
1084   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1085     infodir=$ac_optarg ;;
1086
1087   -libdir | --libdir | --libdi | --libd)
1088     ac_prev=libdir ;;
1089   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1090     libdir=$ac_optarg ;;
1091
1092   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1093   | --libexe | --libex | --libe)
1094     ac_prev=libexecdir ;;
1095   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1096   | --libexe=* | --libex=* | --libe=*)
1097     libexecdir=$ac_optarg ;;
1098
1099   -localedir | --localedir | --localedi | --localed | --locale)
1100     ac_prev=localedir ;;
1101   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1102     localedir=$ac_optarg ;;
1103
1104   -localstatedir | --localstatedir | --localstatedi | --localstated \
1105   | --localstate | --localstat | --localsta | --localst | --locals)
1106     ac_prev=localstatedir ;;
1107   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1108   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1109     localstatedir=$ac_optarg ;;
1110
1111   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1112     ac_prev=mandir ;;
1113   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1114     mandir=$ac_optarg ;;
1115
1116   -nfp | --nfp | --nf)
1117     # Obsolete; use --without-fp.
1118     with_fp=no ;;
1119
1120   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1121   | --no-cr | --no-c | -n)
1122     no_create=yes ;;
1123
1124   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1125   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1126     no_recursion=yes ;;
1127
1128   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1129   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1130   | --oldin | --oldi | --old | --ol | --o)
1131     ac_prev=oldincludedir ;;
1132   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1133   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1134   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1135     oldincludedir=$ac_optarg ;;
1136
1137   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1138     ac_prev=prefix ;;
1139   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1140     prefix=$ac_optarg ;;
1141
1142   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1143   | --program-pre | --program-pr | --program-p)
1144     ac_prev=program_prefix ;;
1145   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1146   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1147     program_prefix=$ac_optarg ;;
1148
1149   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1150   | --program-suf | --program-su | --program-s)
1151     ac_prev=program_suffix ;;
1152   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1153   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1154     program_suffix=$ac_optarg ;;
1155
1156   -program-transform-name | --program-transform-name \
1157   | --program-transform-nam | --program-transform-na \
1158   | --program-transform-n | --program-transform- \
1159   | --program-transform | --program-transfor \
1160   | --program-transfo | --program-transf \
1161   | --program-trans | --program-tran \
1162   | --progr-tra | --program-tr | --program-t)
1163     ac_prev=program_transform_name ;;
1164   -program-transform-name=* | --program-transform-name=* \
1165   | --program-transform-nam=* | --program-transform-na=* \
1166   | --program-transform-n=* | --program-transform-=* \
1167   | --program-transform=* | --program-transfor=* \
1168   | --program-transfo=* | --program-transf=* \
1169   | --program-trans=* | --program-tran=* \
1170   | --progr-tra=* | --program-tr=* | --program-t=*)
1171     program_transform_name=$ac_optarg ;;
1172
1173   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1174     ac_prev=pdfdir ;;
1175   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1176     pdfdir=$ac_optarg ;;
1177
1178   -psdir | --psdir | --psdi | --psd | --ps)
1179     ac_prev=psdir ;;
1180   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1181     psdir=$ac_optarg ;;
1182
1183   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1184   | -silent | --silent | --silen | --sile | --sil)
1185     silent=yes ;;
1186
1187   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1188     ac_prev=sbindir ;;
1189   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1190   | --sbi=* | --sb=*)
1191     sbindir=$ac_optarg ;;
1192
1193   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1194   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1195   | --sharedst | --shareds | --shared | --share | --shar \
1196   | --sha | --sh)
1197     ac_prev=sharedstatedir ;;
1198   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1199   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1200   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1201   | --sha=* | --sh=*)
1202     sharedstatedir=$ac_optarg ;;
1203
1204   -site | --site | --sit)
1205     ac_prev=site ;;
1206   -site=* | --site=* | --sit=*)
1207     site=$ac_optarg ;;
1208
1209   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1210     ac_prev=srcdir ;;
1211   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1212     srcdir=$ac_optarg ;;
1213
1214   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1215   | --syscon | --sysco | --sysc | --sys | --sy)
1216     ac_prev=sysconfdir ;;
1217   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1218   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1219     sysconfdir=$ac_optarg ;;
1220
1221   -target | --target | --targe | --targ | --tar | --ta | --t)
1222     ac_prev=target_alias ;;
1223   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1224     target_alias=$ac_optarg ;;
1225
1226   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1227     verbose=yes ;;
1228
1229   -version | --version | --versio | --versi | --vers | -V)
1230     ac_init_version=: ;;
1231
1232   -with-* | --with-*)
1233     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1234     # Reject names that are not valid shell variable names.
1235     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1236       as_fn_error $? "invalid package name: $ac_useropt"
1237     ac_useropt_orig=$ac_useropt
1238     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1239     case $ac_user_opts in
1240       *"
1241 "with_$ac_useropt"
1242 "*) ;;
1243       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1244          ac_unrecognized_sep=', ';;
1245     esac
1246     eval with_$ac_useropt=\$ac_optarg ;;
1247
1248   -without-* | --without-*)
1249     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1250     # Reject names that are not valid shell variable names.
1251     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1252       as_fn_error $? "invalid package name: $ac_useropt"
1253     ac_useropt_orig=$ac_useropt
1254     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1255     case $ac_user_opts in
1256       *"
1257 "with_$ac_useropt"
1258 "*) ;;
1259       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1260          ac_unrecognized_sep=', ';;
1261     esac
1262     eval with_$ac_useropt=no ;;
1263
1264   --x)
1265     # Obsolete; use --with-x.
1266     with_x=yes ;;
1267
1268   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1269   | --x-incl | --x-inc | --x-in | --x-i)
1270     ac_prev=x_includes ;;
1271   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1272   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1273     x_includes=$ac_optarg ;;
1274
1275   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1276   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1277     ac_prev=x_libraries ;;
1278   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1279   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1280     x_libraries=$ac_optarg ;;
1281
1282   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1283 Try \`$0 --help' for more information"
1284     ;;
1285
1286   *=*)
1287     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1288     # Reject names that are not valid shell variable names.
1289     case $ac_envvar in #(
1290       '' | [0-9]* | *[!_$as_cr_alnum]* )
1291       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1292     esac
1293     eval $ac_envvar=\$ac_optarg
1294     export $ac_envvar ;;
1295
1296   *)
1297     # FIXME: should be removed in autoconf 3.0.
1298     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1299     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1300       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1301     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1302     ;;
1303
1304   esac
1305 done
1306
1307 if test -n "$ac_prev"; then
1308   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1309   as_fn_error $? "missing argument to $ac_option"
1310 fi
1311
1312 if test -n "$ac_unrecognized_opts"; then
1313   case $enable_option_checking in
1314     no) ;;
1315     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1316     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1317   esac
1318 fi
1319
1320 # Check all directory arguments for consistency.
1321 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1322                 datadir sysconfdir sharedstatedir localstatedir includedir \
1323                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1324                 libdir localedir mandir
1325 do
1326   eval ac_val=\$$ac_var
1327   # Remove trailing slashes.
1328   case $ac_val in
1329     */ )
1330       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1331       eval $ac_var=\$ac_val;;
1332   esac
1333   # Be sure to have absolute directory names.
1334   case $ac_val in
1335     [\\/$]* | ?:[\\/]* )  continue;;
1336     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1337   esac
1338   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1339 done
1340
1341 # There might be people who depend on the old broken behavior: `$host'
1342 # used to hold the argument of --host etc.
1343 # FIXME: To remove some day.
1344 build=$build_alias
1345 host=$host_alias
1346 target=$target_alias
1347
1348 # FIXME: To remove some day.
1349 if test "x$host_alias" != x; then
1350   if test "x$build_alias" = x; then
1351     cross_compiling=maybe
1352   elif test "x$build_alias" != "x$host_alias"; then
1353     cross_compiling=yes
1354   fi
1355 fi
1356
1357 ac_tool_prefix=
1358 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1359
1360 test "$silent" = yes && exec 6>/dev/null
1361
1362
1363 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1364 ac_ls_di=`ls -di .` &&
1365 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1366   as_fn_error $? "working directory cannot be determined"
1367 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1368   as_fn_error $? "pwd does not report name of working directory"
1369
1370
1371 # Find the source files, if location was not specified.
1372 if test -z "$srcdir"; then
1373   ac_srcdir_defaulted=yes
1374   # Try the directory containing this script, then the parent directory.
1375   ac_confdir=`$as_dirname -- "$as_myself" ||
1376 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1377          X"$as_myself" : 'X\(//\)[^/]' \| \
1378          X"$as_myself" : 'X\(//\)$' \| \
1379          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1380 $as_echo X"$as_myself" |
1381     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1382             s//\1/
1383             q
1384           }
1385           /^X\(\/\/\)[^/].*/{
1386             s//\1/
1387             q
1388           }
1389           /^X\(\/\/\)$/{
1390             s//\1/
1391             q
1392           }
1393           /^X\(\/\).*/{
1394             s//\1/
1395             q
1396           }
1397           s/.*/./; q'`
1398   srcdir=$ac_confdir
1399   if test ! -r "$srcdir/$ac_unique_file"; then
1400     srcdir=..
1401   fi
1402 else
1403   ac_srcdir_defaulted=no
1404 fi
1405 if test ! -r "$srcdir/$ac_unique_file"; then
1406   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1407   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1408 fi
1409 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1410 ac_abs_confdir=`(
1411         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1412         pwd)`
1413 # When building in place, set srcdir=.
1414 if test "$ac_abs_confdir" = "$ac_pwd"; then
1415   srcdir=.
1416 fi
1417 # Remove unnecessary trailing slashes from srcdir.
1418 # Double slashes in file names in object file debugging info
1419 # mess up M-x gdb in Emacs.
1420 case $srcdir in
1421 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1422 esac
1423 for ac_var in $ac_precious_vars; do
1424   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1425   eval ac_env_${ac_var}_value=\$${ac_var}
1426   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1427   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1428 done
1429
1430 #
1431 # Report the --help message.
1432 #
1433 if test "$ac_init_help" = "long"; then
1434   # Omit some internal or obsolete options to make the list less imposing.
1435   # This message is too long to be a string in the A/UX 3.1 sh.
1436   cat <<_ACEOF
1437 \`configure' configures PostgreSQL 13devel to adapt to many kinds of systems.
1438
1439 Usage: $0 [OPTION]... [VAR=VALUE]...
1440
1441 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1442 VAR=VALUE.  See below for descriptions of some of the useful variables.
1443
1444 Defaults for the options are specified in brackets.
1445
1446 Configuration:
1447   -h, --help              display this help and exit
1448       --help=short        display options specific to this package
1449       --help=recursive    display the short help of all the included packages
1450   -V, --version           display version information and exit
1451   -q, --quiet, --silent   do not print \`checking ...' messages
1452       --cache-file=FILE   cache test results in FILE [disabled]
1453   -C, --config-cache      alias for \`--cache-file=config.cache'
1454   -n, --no-create         do not create output files
1455       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1456
1457 Installation directories:
1458   --prefix=PREFIX         install architecture-independent files in PREFIX
1459                           [$ac_default_prefix]
1460   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1461                           [PREFIX]
1462
1463 By default, \`make install' will install all the files in
1464 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1465 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1466 for instance \`--prefix=\$HOME'.
1467
1468 For better control, use the options below.
1469
1470 Fine tuning of the installation directories:
1471   --bindir=DIR            user executables [EPREFIX/bin]
1472   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1473   --libexecdir=DIR        program executables [EPREFIX/libexec]
1474   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1475   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1476   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1477   --libdir=DIR            object code libraries [EPREFIX/lib]
1478   --includedir=DIR        C header files [PREFIX/include]
1479   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1480   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1481   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1482   --infodir=DIR           info documentation [DATAROOTDIR/info]
1483   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1484   --mandir=DIR            man documentation [DATAROOTDIR/man]
1485   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1486   --htmldir=DIR           html documentation [DOCDIR]
1487   --dvidir=DIR            dvi documentation [DOCDIR]
1488   --pdfdir=DIR            pdf documentation [DOCDIR]
1489   --psdir=DIR             ps documentation [DOCDIR]
1490 _ACEOF
1491
1492   cat <<\_ACEOF
1493
1494 System types:
1495   --build=BUILD     configure for building on BUILD [guessed]
1496   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1497 _ACEOF
1498 fi
1499
1500 if test -n "$ac_init_help"; then
1501   case $ac_init_help in
1502      short | recursive ) echo "Configuration of PostgreSQL 13devel:";;
1503    esac
1504   cat <<\_ACEOF
1505
1506 Optional Features:
1507   --disable-option-checking  ignore unrecognized --enable/--with options
1508   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1509   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1510   --disable-integer-datetimes
1511                           obsolete option, no longer supported
1512   --enable-nls[=LANGUAGES]
1513                           enable Native Language Support
1514   --disable-rpath         do not embed shared library search path in
1515                           executables
1516   --disable-spinlocks     do not use spinlocks
1517   --disable-atomics       do not use atomic operations
1518   --enable-debug          build with debugging symbols (-g)
1519   --enable-profiling      build with profiling enabled
1520   --enable-coverage       build with coverage testing instrumentation
1521   --enable-dtrace         build with DTrace support
1522   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1523   --enable-depend         turn on automatic dependency tracking
1524   --enable-cassert        enable assertion checks (for debugging)
1525   --disable-thread-safety disable thread-safety in client libraries
1526   --disable-largefile     omit support for large files
1527   --disable-float4-byval  disable float4 passed by value
1528   --disable-float8-byval  disable float8 passed by value
1529
1530 Optional Packages:
1531   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1532   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1533   --with-extra-version=STRING
1534                           append STRING to version
1535   --with-template=NAME    override operating system template
1536   --with-includes=DIRS    look for additional header files in DIRS
1537   --with-libraries=DIRS   look for additional libraries in DIRS
1538   --with-libs=DIRS        alternative spelling of --with-libraries
1539   --with-pgport=PORTNUM   set default port number [5432]
1540   --with-blocksize=BLOCKSIZE
1541                           set table block size in kB [8]
1542   --with-segsize=SEGSIZE  set table segment size in GB [1]
1543   --with-wal-blocksize=BLOCKSIZE
1544                           set WAL block size in kB [8]
1545   --with-CC=CMD           set compiler (deprecated)
1546   --with-llvm             build with LLVM based JIT support
1547   --with-icu              build with ICU support
1548   --with-tcl              build Tcl modules (PL/Tcl)
1549   --with-tclconfig=DIR    tclConfig.sh is in DIR
1550   --with-perl             build Perl modules (PL/Perl)
1551   --with-python           build Python modules (PL/Python)
1552   --with-gssapi           build with GSSAPI support
1553   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1554                           [postgres]
1555   --with-pam              build with PAM support
1556   --with-bsd-auth         build with BSD Authentication support
1557   --with-ldap             build with LDAP support
1558   --with-bonjour          build with Bonjour support
1559   --with-openssl          build with OpenSSL 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
1574 Some influential environment variables:
1575   CC          C compiler command
1576   CFLAGS      C compiler flags
1577   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1578               nonstandard directory <lib dir>
1579   LIBS        libraries to pass to the linker, e.g. -l<library>
1580   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1581               you have headers in a nonstandard directory <include dir>
1582   CXX         C++ compiler command
1583   CXXFLAGS    C++ compiler flags
1584   LLVM_CONFIG path to llvm-config command
1585   CLANG       path to clang compiler to generate bitcode
1586   CPP         C preprocessor
1587   PKG_CONFIG  path to pkg-config utility
1588   PKG_CONFIG_PATH
1589               directories to add to pkg-config's search path
1590   PKG_CONFIG_LIBDIR
1591               path overriding pkg-config's built-in search path
1592   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1593   ICU_LIBS    linker flags for ICU, overriding pkg-config
1594   XML2_CONFIG path to xml2-config utility
1595   LDFLAGS_EX  extra linker flags for linking executables only
1596   LDFLAGS_SL  extra linker flags for linking shared libraries only
1597   PERL        Perl program
1598   PYTHON      Python program
1599   MSGFMT      msgfmt program for NLS
1600   TCLSH       Tcl interpreter program (tclsh)
1601
1602 Use these variables to override the choices made by `configure' or to help
1603 it to find libraries and programs with nonstandard names/locations.
1604
1605 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1606 _ACEOF
1607 ac_status=$?
1608 fi
1609
1610 if test "$ac_init_help" = "recursive"; then
1611   # If there are subdirs, report their specific --help.
1612   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1613     test -d "$ac_dir" ||
1614       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1615       continue
1616     ac_builddir=.
1617
1618 case "$ac_dir" in
1619 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1620 *)
1621   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1622   # A ".." for each directory in $ac_dir_suffix.
1623   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1624   case $ac_top_builddir_sub in
1625   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1626   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1627   esac ;;
1628 esac
1629 ac_abs_top_builddir=$ac_pwd
1630 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1631 # for backward compatibility:
1632 ac_top_builddir=$ac_top_build_prefix
1633
1634 case $srcdir in
1635   .)  # We are building in place.
1636     ac_srcdir=.
1637     ac_top_srcdir=$ac_top_builddir_sub
1638     ac_abs_top_srcdir=$ac_pwd ;;
1639   [\\/]* | ?:[\\/]* )  # Absolute name.
1640     ac_srcdir=$srcdir$ac_dir_suffix;
1641     ac_top_srcdir=$srcdir
1642     ac_abs_top_srcdir=$srcdir ;;
1643   *) # Relative name.
1644     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1645     ac_top_srcdir=$ac_top_build_prefix$srcdir
1646     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1647 esac
1648 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1649
1650     cd "$ac_dir" || { ac_status=$?; continue; }
1651     # Check for guested configure.
1652     if test -f "$ac_srcdir/configure.gnu"; then
1653       echo &&
1654       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1655     elif test -f "$ac_srcdir/configure"; then
1656       echo &&
1657       $SHELL "$ac_srcdir/configure" --help=recursive
1658     else
1659       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1660     fi || ac_status=$?
1661     cd "$ac_pwd" || { ac_status=$?; break; }
1662   done
1663 fi
1664
1665 test -n "$ac_init_help" && exit $ac_status
1666 if $ac_init_version; then
1667   cat <<\_ACEOF
1668 PostgreSQL configure 13devel
1669 generated by GNU Autoconf 2.69
1670
1671 Copyright (C) 2012 Free Software Foundation, Inc.
1672 This configure script is free software; the Free Software Foundation
1673 gives unlimited permission to copy, distribute and modify it.
1674
1675 Copyright (c) 1996-2019, PostgreSQL Global Development Group
1676 _ACEOF
1677   exit
1678 fi
1679
1680 ## ------------------------ ##
1681 ## Autoconf initialization. ##
1682 ## ------------------------ ##
1683
1684 # ac_fn_c_try_compile LINENO
1685 # --------------------------
1686 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1687 ac_fn_c_try_compile ()
1688 {
1689   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690   rm -f conftest.$ac_objext
1691   if { { ac_try="$ac_compile"
1692 case "(($ac_try" in
1693   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694   *) ac_try_echo=$ac_try;;
1695 esac
1696 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697 $as_echo "$ac_try_echo"; } >&5
1698   (eval "$ac_compile") 2>conftest.err
1699   ac_status=$?
1700   if test -s conftest.err; then
1701     grep -v '^ *+' conftest.err >conftest.er1
1702     cat conftest.er1 >&5
1703     mv -f conftest.er1 conftest.err
1704   fi
1705   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706   test $ac_status = 0; } && {
1707          test -z "$ac_c_werror_flag" ||
1708          test ! -s conftest.err
1709        } && test -s conftest.$ac_objext; then :
1710   ac_retval=0
1711 else
1712   $as_echo "$as_me: failed program was:" >&5
1713 sed 's/^/| /' conftest.$ac_ext >&5
1714
1715         ac_retval=1
1716 fi
1717   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1718   as_fn_set_status $ac_retval
1719
1720 } # ac_fn_c_try_compile
1721
1722 # ac_fn_cxx_try_compile LINENO
1723 # ----------------------------
1724 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1725 ac_fn_cxx_try_compile ()
1726 {
1727   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728   rm -f conftest.$ac_objext
1729   if { { ac_try="$ac_compile"
1730 case "(($ac_try" in
1731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732   *) ac_try_echo=$ac_try;;
1733 esac
1734 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735 $as_echo "$ac_try_echo"; } >&5
1736   (eval "$ac_compile") 2>conftest.err
1737   ac_status=$?
1738   if test -s conftest.err; then
1739     grep -v '^ *+' conftest.err >conftest.er1
1740     cat conftest.er1 >&5
1741     mv -f conftest.er1 conftest.err
1742   fi
1743   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744   test $ac_status = 0; } && {
1745          test -z "$ac_cxx_werror_flag" ||
1746          test ! -s conftest.err
1747        } && test -s conftest.$ac_objext; then :
1748   ac_retval=0
1749 else
1750   $as_echo "$as_me: failed program was:" >&5
1751 sed 's/^/| /' conftest.$ac_ext >&5
1752
1753         ac_retval=1
1754 fi
1755   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1756   as_fn_set_status $ac_retval
1757
1758 } # ac_fn_cxx_try_compile
1759
1760 # ac_fn_c_try_link LINENO
1761 # -----------------------
1762 # Try to link conftest.$ac_ext, and return whether this succeeded.
1763 ac_fn_c_try_link ()
1764 {
1765   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766   rm -f conftest.$ac_objext conftest$ac_exeext
1767   if { { ac_try="$ac_link"
1768 case "(($ac_try" in
1769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770   *) ac_try_echo=$ac_try;;
1771 esac
1772 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773 $as_echo "$ac_try_echo"; } >&5
1774   (eval "$ac_link") 2>conftest.err
1775   ac_status=$?
1776   if test -s conftest.err; then
1777     grep -v '^ *+' conftest.err >conftest.er1
1778     cat conftest.er1 >&5
1779     mv -f conftest.er1 conftest.err
1780   fi
1781   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782   test $ac_status = 0; } && {
1783          test -z "$ac_c_werror_flag" ||
1784          test ! -s conftest.err
1785        } && test -s conftest$ac_exeext && {
1786          test "$cross_compiling" = yes ||
1787          test -x conftest$ac_exeext
1788        }; then :
1789   ac_retval=0
1790 else
1791   $as_echo "$as_me: failed program was:" >&5
1792 sed 's/^/| /' conftest.$ac_ext >&5
1793
1794         ac_retval=1
1795 fi
1796   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1797   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1798   # interfere with the next link command; also delete a directory that is
1799   # left behind by Apple's compiler.  We do this before executing the actions.
1800   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1801   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1802   as_fn_set_status $ac_retval
1803
1804 } # ac_fn_c_try_link
1805
1806 # ac_fn_c_try_cpp LINENO
1807 # ----------------------
1808 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1809 ac_fn_c_try_cpp ()
1810 {
1811   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812   if { { ac_try="$ac_cpp conftest.$ac_ext"
1813 case "(($ac_try" in
1814   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1815   *) ac_try_echo=$ac_try;;
1816 esac
1817 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1818 $as_echo "$ac_try_echo"; } >&5
1819   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1820   ac_status=$?
1821   if test -s conftest.err; then
1822     grep -v '^ *+' conftest.err >conftest.er1
1823     cat conftest.er1 >&5
1824     mv -f conftest.er1 conftest.err
1825   fi
1826   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827   test $ac_status = 0; } > conftest.i && {
1828          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1829          test ! -s conftest.err
1830        }; then :
1831   ac_retval=0
1832 else
1833   $as_echo "$as_me: failed program was:" >&5
1834 sed 's/^/| /' conftest.$ac_ext >&5
1835
1836     ac_retval=1
1837 fi
1838   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1839   as_fn_set_status $ac_retval
1840
1841 } # ac_fn_c_try_cpp
1842
1843 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1844 # -------------------------------------------------------
1845 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1846 # the include files in INCLUDES and setting the cache variable VAR
1847 # accordingly.
1848 ac_fn_c_check_header_mongrel ()
1849 {
1850   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1851   if eval \${$3+:} false; then :
1852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1853 $as_echo_n "checking for $2... " >&6; }
1854 if eval \${$3+:} false; then :
1855   $as_echo_n "(cached) " >&6
1856 fi
1857 eval ac_res=\$$3
1858                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1859 $as_echo "$ac_res" >&6; }
1860 else
1861   # Is the header compilable?
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1863 $as_echo_n "checking $2 usability... " >&6; }
1864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1865 /* end confdefs.h.  */
1866 $4
1867 #include <$2>
1868 _ACEOF
1869 if ac_fn_c_try_compile "$LINENO"; then :
1870   ac_header_compiler=yes
1871 else
1872   ac_header_compiler=no
1873 fi
1874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1876 $as_echo "$ac_header_compiler" >&6; }
1877
1878 # Is the header present?
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1880 $as_echo_n "checking $2 presence... " >&6; }
1881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882 /* end confdefs.h.  */
1883 #include <$2>
1884 _ACEOF
1885 if ac_fn_c_try_cpp "$LINENO"; then :
1886   ac_header_preproc=yes
1887 else
1888   ac_header_preproc=no
1889 fi
1890 rm -f conftest.err conftest.i conftest.$ac_ext
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1892 $as_echo "$ac_header_preproc" >&6; }
1893
1894 # So?  What about this header?
1895 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1896   yes:no: )
1897     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1898 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1899     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1900 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1901     ;;
1902   no:yes:* )
1903     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1904 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1905     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1906 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1907     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1908 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1909     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1910 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1911     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1912 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1913 ( $as_echo "## ---------------------------------------------- ##
1914 ## Report this to pgsql-bugs@lists.postgresql.org ##
1915 ## ---------------------------------------------- ##"
1916      ) | sed "s/^/$as_me: WARNING:     /" >&2
1917     ;;
1918 esac
1919   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1920 $as_echo_n "checking for $2... " >&6; }
1921 if eval \${$3+:} false; then :
1922   $as_echo_n "(cached) " >&6
1923 else
1924   eval "$3=\$ac_header_compiler"
1925 fi
1926 eval ac_res=\$$3
1927                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928 $as_echo "$ac_res" >&6; }
1929 fi
1930   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1931
1932 } # ac_fn_c_check_header_mongrel
1933
1934 # ac_fn_c_try_run LINENO
1935 # ----------------------
1936 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1937 # that executables *can* be run.
1938 ac_fn_c_try_run ()
1939 {
1940   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941   if { { ac_try="$ac_link"
1942 case "(($ac_try" in
1943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1944   *) ac_try_echo=$ac_try;;
1945 esac
1946 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1947 $as_echo "$ac_try_echo"; } >&5
1948   (eval "$ac_link") 2>&5
1949   ac_status=$?
1950   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1951   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1952   { { case "(($ac_try" in
1953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1954   *) ac_try_echo=$ac_try;;
1955 esac
1956 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1957 $as_echo "$ac_try_echo"; } >&5
1958   (eval "$ac_try") 2>&5
1959   ac_status=$?
1960   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1961   test $ac_status = 0; }; }; then :
1962   ac_retval=0
1963 else
1964   $as_echo "$as_me: program exited with status $ac_status" >&5
1965        $as_echo "$as_me: failed program was:" >&5
1966 sed 's/^/| /' conftest.$ac_ext >&5
1967
1968        ac_retval=$ac_status
1969 fi
1970   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1971   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1972   as_fn_set_status $ac_retval
1973
1974 } # ac_fn_c_try_run
1975
1976 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1977 # -------------------------------------------------------
1978 # Tests whether HEADER exists and can be compiled using the include files in
1979 # INCLUDES, setting the cache variable VAR accordingly.
1980 ac_fn_c_check_header_compile ()
1981 {
1982   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1983   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1984 $as_echo_n "checking for $2... " >&6; }
1985 if eval \${$3+:} false; then :
1986   $as_echo_n "(cached) " >&6
1987 else
1988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989 /* end confdefs.h.  */
1990 $4
1991 #include <$2>
1992 _ACEOF
1993 if ac_fn_c_try_compile "$LINENO"; then :
1994   eval "$3=yes"
1995 else
1996   eval "$3=no"
1997 fi
1998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1999 fi
2000 eval ac_res=\$$3
2001                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002 $as_echo "$ac_res" >&6; }
2003   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2004
2005 } # ac_fn_c_check_header_compile
2006
2007 # ac_fn_c_check_func LINENO FUNC VAR
2008 # ----------------------------------
2009 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2010 ac_fn_c_check_func ()
2011 {
2012   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2014 $as_echo_n "checking for $2... " >&6; }
2015 if eval \${$3+:} false; then :
2016   $as_echo_n "(cached) " >&6
2017 else
2018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019 /* end confdefs.h.  */
2020 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2021    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2022 #define $2 innocuous_$2
2023
2024 /* System header to define __stub macros and hopefully few prototypes,
2025     which can conflict with char $2 (); below.
2026     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2027     <limits.h> exists even on freestanding compilers.  */
2028
2029 #ifdef __STDC__
2030 # include <limits.h>
2031 #else
2032 # include <assert.h>
2033 #endif
2034
2035 #undef $2
2036
2037 /* Override any GCC internal prototype to avoid an error.
2038    Use char because int might match the return type of a GCC
2039    builtin and then its argument prototype would still apply.  */
2040 #ifdef __cplusplus
2041 extern "C"
2042 #endif
2043 char $2 ();
2044 /* The GNU C library defines this for functions which it implements
2045     to always fail with ENOSYS.  Some functions are actually named
2046     something starting with __ and the normal name is an alias.  */
2047 #if defined __stub_$2 || defined __stub___$2
2048 choke me
2049 #endif
2050
2051 int
2052 main ()
2053 {
2054 return $2 ();
2055   ;
2056   return 0;
2057 }
2058 _ACEOF
2059 if ac_fn_c_try_link "$LINENO"; then :
2060   eval "$3=yes"
2061 else
2062   eval "$3=no"
2063 fi
2064 rm -f core conftest.err conftest.$ac_objext \
2065     conftest$ac_exeext conftest.$ac_ext
2066 fi
2067 eval ac_res=\$$3
2068                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2069 $as_echo "$ac_res" >&6; }
2070   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2071
2072 } # ac_fn_c_check_func
2073
2074 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2075 # -------------------------------------------
2076 # Tests whether TYPE exists after having included INCLUDES, setting cache
2077 # variable VAR accordingly.
2078 ac_fn_c_check_type ()
2079 {
2080   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2082 $as_echo_n "checking for $2... " >&6; }
2083 if eval \${$3+:} false; then :
2084   $as_echo_n "(cached) " >&6
2085 else
2086   eval "$3=no"
2087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088 /* end confdefs.h.  */
2089 $4
2090 int
2091 main ()
2092 {
2093 if (sizeof ($2))
2094          return 0;
2095   ;
2096   return 0;
2097 }
2098 _ACEOF
2099 if ac_fn_c_try_compile "$LINENO"; then :
2100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101 /* end confdefs.h.  */
2102 $4
2103 int
2104 main ()
2105 {
2106 if (sizeof (($2)))
2107             return 0;
2108   ;
2109   return 0;
2110 }
2111 _ACEOF
2112 if ac_fn_c_try_compile "$LINENO"; then :
2113
2114 else
2115   eval "$3=yes"
2116 fi
2117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118 fi
2119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120 fi
2121 eval ac_res=\$$3
2122                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2123 $as_echo "$ac_res" >&6; }
2124   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2125
2126 } # ac_fn_c_check_type
2127
2128 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2129 # ----------------------------------------------------
2130 # Tries to find if the field MEMBER exists in type AGGR, after including
2131 # INCLUDES, setting cache variable VAR accordingly.
2132 ac_fn_c_check_member ()
2133 {
2134   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2136 $as_echo_n "checking for $2.$3... " >&6; }
2137 if eval \${$4+:} false; then :
2138   $as_echo_n "(cached) " >&6
2139 else
2140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141 /* end confdefs.h.  */
2142 $5
2143 int
2144 main ()
2145 {
2146 static $2 ac_aggr;
2147 if (ac_aggr.$3)
2148 return 0;
2149   ;
2150   return 0;
2151 }
2152 _ACEOF
2153 if ac_fn_c_try_compile "$LINENO"; then :
2154   eval "$4=yes"
2155 else
2156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157 /* end confdefs.h.  */
2158 $5
2159 int
2160 main ()
2161 {
2162 static $2 ac_aggr;
2163 if (sizeof ac_aggr.$3)
2164 return 0;
2165   ;
2166   return 0;
2167 }
2168 _ACEOF
2169 if ac_fn_c_try_compile "$LINENO"; then :
2170   eval "$4=yes"
2171 else
2172   eval "$4=no"
2173 fi
2174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2175 fi
2176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177 fi
2178 eval ac_res=\$$4
2179                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2180 $as_echo "$ac_res" >&6; }
2181   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2182
2183 } # ac_fn_c_check_member
2184
2185 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2186 # --------------------------------------------
2187 # Tries to find the compile-time value of EXPR in a program that includes
2188 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2189 # computed
2190 ac_fn_c_compute_int ()
2191 {
2192   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2193   if test "$cross_compiling" = yes; then
2194     # Depending upon the size, compute the lo and hi bounds.
2195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196 /* end confdefs.h.  */
2197 $4
2198 int
2199 main ()
2200 {
2201 static int test_array [1 - 2 * !(($2) >= 0)];
2202 test_array [0] = 0;
2203 return test_array [0];
2204
2205   ;
2206   return 0;
2207 }
2208 _ACEOF
2209 if ac_fn_c_try_compile "$LINENO"; then :
2210   ac_lo=0 ac_mid=0
2211   while :; do
2212     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213 /* end confdefs.h.  */
2214 $4
2215 int
2216 main ()
2217 {
2218 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2219 test_array [0] = 0;
2220 return test_array [0];
2221
2222   ;
2223   return 0;
2224 }
2225 _ACEOF
2226 if ac_fn_c_try_compile "$LINENO"; then :
2227   ac_hi=$ac_mid; break
2228 else
2229   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2230                         if test $ac_lo -le $ac_mid; then
2231                           ac_lo= ac_hi=
2232                           break
2233                         fi
2234                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2235 fi
2236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2237   done
2238 else
2239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240 /* end confdefs.h.  */
2241 $4
2242 int
2243 main ()
2244 {
2245 static int test_array [1 - 2 * !(($2) < 0)];
2246 test_array [0] = 0;
2247 return test_array [0];
2248
2249   ;
2250   return 0;
2251 }
2252 _ACEOF
2253 if ac_fn_c_try_compile "$LINENO"; then :
2254   ac_hi=-1 ac_mid=-1
2255   while :; do
2256     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257 /* end confdefs.h.  */
2258 $4
2259 int
2260 main ()
2261 {
2262 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2263 test_array [0] = 0;
2264 return test_array [0];
2265
2266   ;
2267   return 0;
2268 }
2269 _ACEOF
2270 if ac_fn_c_try_compile "$LINENO"; then :
2271   ac_lo=$ac_mid; break
2272 else
2273   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2274                         if test $ac_mid -le $ac_hi; then
2275                           ac_lo= ac_hi=
2276                           break
2277                         fi
2278                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2279 fi
2280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281   done
2282 else
2283   ac_lo= ac_hi=
2284 fi
2285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286 fi
2287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288 # Binary search between lo and hi bounds.
2289 while test "x$ac_lo" != "x$ac_hi"; do
2290   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2291   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2292 /* end confdefs.h.  */
2293 $4
2294 int
2295 main ()
2296 {
2297 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2298 test_array [0] = 0;
2299 return test_array [0];
2300
2301   ;
2302   return 0;
2303 }
2304 _ACEOF
2305 if ac_fn_c_try_compile "$LINENO"; then :
2306   ac_hi=$ac_mid
2307 else
2308   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2309 fi
2310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311 done
2312 case $ac_lo in #((
2313 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2314 '') ac_retval=1 ;;
2315 esac
2316   else
2317     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318 /* end confdefs.h.  */
2319 $4
2320 static long int longval () { return $2; }
2321 static unsigned long int ulongval () { return $2; }
2322 #include <stdio.h>
2323 #include <stdlib.h>
2324 int
2325 main ()
2326 {
2327
2328   FILE *f = fopen ("conftest.val", "w");
2329   if (! f)
2330     return 1;
2331   if (($2) < 0)
2332     {
2333       long int i = longval ();
2334       if (i != ($2))
2335         return 1;
2336       fprintf (f, "%ld", i);
2337     }
2338   else
2339     {
2340       unsigned long int i = ulongval ();
2341       if (i != ($2))
2342         return 1;
2343       fprintf (f, "%lu", i);
2344     }
2345   /* Do not output a trailing newline, as this causes \r\n confusion
2346      on some platforms.  */
2347   return ferror (f) || fclose (f) != 0;
2348
2349   ;
2350   return 0;
2351 }
2352 _ACEOF
2353 if ac_fn_c_try_run "$LINENO"; then :
2354   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2355 else
2356   ac_retval=1
2357 fi
2358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2359   conftest.$ac_objext conftest.beam conftest.$ac_ext
2360 rm -f conftest.val
2361
2362   fi
2363   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2364   as_fn_set_status $ac_retval
2365
2366 } # ac_fn_c_compute_int
2367
2368 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2369 # ---------------------------------------------
2370 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2371 # accordingly.
2372 ac_fn_c_check_decl ()
2373 {
2374   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2375   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2376       as_decl_name=`echo $2|sed 's/ *(.*//'`
2377   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2378   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2379 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2380 if eval \${$3+:} false; then :
2381   $as_echo_n "(cached) " >&6
2382 else
2383   ac_save_werror_flag=$ac_c_werror_flag
2384   ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386 /* end confdefs.h.  */
2387 $4
2388 int
2389 main ()
2390 {
2391 #ifndef $as_decl_name
2392 #ifdef __cplusplus
2393   (void) $as_decl_use;
2394 #else
2395   (void) $as_decl_name;
2396 #endif
2397 #endif
2398
2399   ;
2400   return 0;
2401 }
2402 _ACEOF
2403 if ac_fn_c_try_compile "$LINENO"; then :
2404   eval "$3=yes"
2405 else
2406   eval "$3=no"
2407 fi
2408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409   ac_c_werror_flag=$ac_save_werror_flag
2410 fi
2411 eval ac_res=\$$3
2412                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2413 $as_echo "$ac_res" >&6; }
2414   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2415
2416 } # ac_fn_c_check_decl
2417 cat >config.log <<_ACEOF
2418 This file contains any messages produced by compilers while
2419 running configure, to aid debugging if configure makes a mistake.
2420
2421 It was created by PostgreSQL $as_me 13devel, which was
2422 generated by GNU Autoconf 2.69.  Invocation command line was
2423
2424   $ $0 $@
2425
2426 _ACEOF
2427 exec 5>>config.log
2428 {
2429 cat <<_ASUNAME
2430 ## --------- ##
2431 ## Platform. ##
2432 ## --------- ##
2433
2434 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2435 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2436 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2437 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2438 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2439
2440 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2441 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2442
2443 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2444 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2445 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2446 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2447 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2448 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2449 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2450
2451 _ASUNAME
2452
2453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2454 for as_dir in $PATH
2455 do
2456   IFS=$as_save_IFS
2457   test -z "$as_dir" && as_dir=.
2458     $as_echo "PATH: $as_dir"
2459   done
2460 IFS=$as_save_IFS
2461
2462 } >&5
2463
2464 cat >&5 <<_ACEOF
2465
2466
2467 ## ----------- ##
2468 ## Core tests. ##
2469 ## ----------- ##
2470
2471 _ACEOF
2472
2473
2474 # Keep a trace of the command line.
2475 # Strip out --no-create and --no-recursion so they do not pile up.
2476 # Strip out --silent because we don't want to record it for future runs.
2477 # Also quote any args containing shell meta-characters.
2478 # Make two passes to allow for proper duplicate-argument suppression.
2479 ac_configure_args=
2480 ac_configure_args0=
2481 ac_configure_args1=
2482 ac_must_keep_next=false
2483 for ac_pass in 1 2
2484 do
2485   for ac_arg
2486   do
2487     case $ac_arg in
2488     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2489     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2490     | -silent | --silent | --silen | --sile | --sil)
2491       continue ;;
2492     *\'*)
2493       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2494     esac
2495     case $ac_pass in
2496     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2497     2)
2498       as_fn_append ac_configure_args1 " '$ac_arg'"
2499       if test $ac_must_keep_next = true; then
2500         ac_must_keep_next=false # Got value, back to normal.
2501       else
2502         case $ac_arg in
2503           *=* | --config-cache | -C | -disable-* | --disable-* \
2504           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2505           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2506           | -with-* | --with-* | -without-* | --without-* | --x)
2507             case "$ac_configure_args0 " in
2508               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2509             esac
2510             ;;
2511           -* ) ac_must_keep_next=true ;;
2512         esac
2513       fi
2514       as_fn_append ac_configure_args " '$ac_arg'"
2515       ;;
2516     esac
2517   done
2518 done
2519 { ac_configure_args0=; unset ac_configure_args0;}
2520 { ac_configure_args1=; unset ac_configure_args1;}
2521
2522 # When interrupted or exit'd, cleanup temporary files, and complete
2523 # config.log.  We remove comments because anyway the quotes in there
2524 # would cause problems or look ugly.
2525 # WARNING: Use '\'' to represent an apostrophe within the trap.
2526 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2527 trap 'exit_status=$?
2528   # Save into config.log some information that might help in debugging.
2529   {
2530     echo
2531
2532     $as_echo "## ---------------- ##
2533 ## Cache variables. ##
2534 ## ---------------- ##"
2535     echo
2536     # The following way of writing the cache mishandles newlines in values,
2537 (
2538   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2539     eval ac_val=\$$ac_var
2540     case $ac_val in #(
2541     *${as_nl}*)
2542       case $ac_var in #(
2543       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2544 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2545       esac
2546       case $ac_var in #(
2547       _ | IFS | as_nl) ;; #(
2548       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2549       *) { eval $ac_var=; unset $ac_var;} ;;
2550       esac ;;
2551     esac
2552   done
2553   (set) 2>&1 |
2554     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2555     *${as_nl}ac_space=\ *)
2556       sed -n \
2557         "s/'\''/'\''\\\\'\'''\''/g;
2558           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2559       ;; #(
2560     *)
2561       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2562       ;;
2563     esac |
2564     sort
2565 )
2566     echo
2567
2568     $as_echo "## ----------------- ##
2569 ## Output variables. ##
2570 ## ----------------- ##"
2571     echo
2572     for ac_var in $ac_subst_vars
2573     do
2574       eval ac_val=\$$ac_var
2575       case $ac_val in
2576       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2577       esac
2578       $as_echo "$ac_var='\''$ac_val'\''"
2579     done | sort
2580     echo
2581
2582     if test -n "$ac_subst_files"; then
2583       $as_echo "## ------------------- ##
2584 ## File substitutions. ##
2585 ## ------------------- ##"
2586       echo
2587       for ac_var in $ac_subst_files
2588       do
2589         eval ac_val=\$$ac_var
2590         case $ac_val in
2591         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2592         esac
2593         $as_echo "$ac_var='\''$ac_val'\''"
2594       done | sort
2595       echo
2596     fi
2597
2598     if test -s confdefs.h; then
2599       $as_echo "## ----------- ##
2600 ## confdefs.h. ##
2601 ## ----------- ##"
2602       echo
2603       cat confdefs.h
2604       echo
2605     fi
2606     test "$ac_signal" != 0 &&
2607       $as_echo "$as_me: caught signal $ac_signal"
2608     $as_echo "$as_me: exit $exit_status"
2609   } >&5
2610   rm -f core *.core core.conftest.* &&
2611     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2612     exit $exit_status
2613 ' 0
2614 for ac_signal in 1 2 13 15; do
2615   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2616 done
2617 ac_signal=0
2618
2619 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2620 rm -f -r conftest* confdefs.h
2621
2622 $as_echo "/* confdefs.h */" > confdefs.h
2623
2624 # Predefined preprocessor variables.
2625
2626 cat >>confdefs.h <<_ACEOF
2627 #define PACKAGE_NAME "$PACKAGE_NAME"
2628 _ACEOF
2629
2630 cat >>confdefs.h <<_ACEOF
2631 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2632 _ACEOF
2633
2634 cat >>confdefs.h <<_ACEOF
2635 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2636 _ACEOF
2637
2638 cat >>confdefs.h <<_ACEOF
2639 #define PACKAGE_STRING "$PACKAGE_STRING"
2640 _ACEOF
2641
2642 cat >>confdefs.h <<_ACEOF
2643 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2644 _ACEOF
2645
2646 cat >>confdefs.h <<_ACEOF
2647 #define PACKAGE_URL "$PACKAGE_URL"
2648 _ACEOF
2649
2650
2651 # Let the site file select an alternate cache file if it wants to.
2652 # Prefer an explicitly selected file to automatically selected ones.
2653 ac_site_file1=NONE
2654 ac_site_file2=NONE
2655 if test -n "$CONFIG_SITE"; then
2656   # We do not want a PATH search for config.site.
2657   case $CONFIG_SITE in #((
2658     -*)  ac_site_file1=./$CONFIG_SITE;;
2659     */*) ac_site_file1=$CONFIG_SITE;;
2660     *)   ac_site_file1=./$CONFIG_SITE;;
2661   esac
2662 elif test "x$prefix" != xNONE; then
2663   ac_site_file1=$prefix/share/config.site
2664   ac_site_file2=$prefix/etc/config.site
2665 else
2666   ac_site_file1=$ac_default_prefix/share/config.site
2667   ac_site_file2=$ac_default_prefix/etc/config.site
2668 fi
2669 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2670 do
2671   test "x$ac_site_file" = xNONE && continue
2672   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2673     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2674 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2675     sed 's/^/| /' "$ac_site_file" >&5
2676     . "$ac_site_file" \
2677       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2678 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2679 as_fn_error $? "failed to load site script $ac_site_file
2680 See \`config.log' for more details" "$LINENO" 5; }
2681   fi
2682 done
2683
2684 if test -r "$cache_file"; then
2685   # Some versions of bash will fail to source /dev/null (special files
2686   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2687   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2688     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2689 $as_echo "$as_me: loading cache $cache_file" >&6;}
2690     case $cache_file in
2691       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2692       *)                      . "./$cache_file";;
2693     esac
2694   fi
2695 else
2696   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2697 $as_echo "$as_me: creating cache $cache_file" >&6;}
2698   >$cache_file
2699 fi
2700
2701 # Check that the precious variables saved in the cache have kept the same
2702 # value.
2703 ac_cache_corrupted=false
2704 for ac_var in $ac_precious_vars; do
2705   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2706   eval ac_new_set=\$ac_env_${ac_var}_set
2707   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2708   eval ac_new_val=\$ac_env_${ac_var}_value
2709   case $ac_old_set,$ac_new_set in
2710     set,)
2711       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2712 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2713       ac_cache_corrupted=: ;;
2714     ,set)
2715       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2716 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2717       ac_cache_corrupted=: ;;
2718     ,);;
2719     *)
2720       if test "x$ac_old_val" != "x$ac_new_val"; then
2721         # differences in whitespace do not lead to failure.
2722         ac_old_val_w=`echo x $ac_old_val`
2723         ac_new_val_w=`echo x $ac_new_val`
2724         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2725           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2726 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2727           ac_cache_corrupted=:
2728         else
2729           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2730 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2731           eval $ac_var=\$ac_old_val
2732         fi
2733         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2734 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2735         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2736 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2737       fi;;
2738   esac
2739   # Pass precious variables to config.status.
2740   if test "$ac_new_set" = set; then
2741     case $ac_new_val in
2742     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2743     *) ac_arg=$ac_var=$ac_new_val ;;
2744     esac
2745     case " $ac_configure_args " in
2746       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2747       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2748     esac
2749   fi
2750 done
2751 if $ac_cache_corrupted; then
2752   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2753 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2754   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2755 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2756   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2757 fi
2758 ## -------------------- ##
2759 ## Main body of script. ##
2760 ## -------------------- ##
2761
2762 ac_ext=c
2763 ac_cpp='$CPP $CPPFLAGS'
2764 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2765 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2766 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2767
2768
2769
2770
2771
2772
2773 ac_aux_dir=
2774 for ac_dir in config "$srcdir"/config; do
2775   if test -f "$ac_dir/install-sh"; then
2776     ac_aux_dir=$ac_dir
2777     ac_install_sh="$ac_aux_dir/install-sh -c"
2778     break
2779   elif test -f "$ac_dir/install.sh"; then
2780     ac_aux_dir=$ac_dir
2781     ac_install_sh="$ac_aux_dir/install.sh -c"
2782     break
2783   elif test -f "$ac_dir/shtool"; then
2784     ac_aux_dir=$ac_dir
2785     ac_install_sh="$ac_aux_dir/shtool install -c"
2786     break
2787   fi
2788 done
2789 if test -z "$ac_aux_dir"; then
2790   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2791 fi
2792
2793 # These three variables are undocumented and unsupported,
2794 # and are intended to be withdrawn in a future Autoconf release.
2795 # They can cause serious problems if a builder's source tree is in a directory
2796 # whose full name contains unusual characters.
2797 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2798 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2799 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2800
2801
2802
2803 configure_args=$ac_configure_args
2804
2805
2806 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2807
2808
2809 cat >>confdefs.h <<_ACEOF
2810 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2811 _ACEOF
2812
2813
2814
2815
2816
2817 # Check whether --with-extra-version was given.
2818 if test "${with_extra_version+set}" = set; then :
2819   withval=$with_extra_version;
2820   case $withval in
2821     yes)
2822       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2823       ;;
2824     no)
2825       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2826       ;;
2827     *)
2828       PG_VERSION="$PACKAGE_VERSION$withval"
2829       ;;
2830   esac
2831
2832 else
2833   PG_VERSION="$PACKAGE_VERSION"
2834 fi
2835
2836
2837
2838 cat >>confdefs.h <<_ACEOF
2839 #define PG_VERSION "$PG_VERSION"
2840 _ACEOF
2841
2842
2843 # Make sure we can run config.sub.
2844 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2845   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2846
2847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2848 $as_echo_n "checking build system type... " >&6; }
2849 if ${ac_cv_build+:} false; then :
2850   $as_echo_n "(cached) " >&6
2851 else
2852   ac_build_alias=$build_alias
2853 test "x$ac_build_alias" = x &&
2854   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2855 test "x$ac_build_alias" = x &&
2856   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2857 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2858   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2859
2860 fi
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2862 $as_echo "$ac_cv_build" >&6; }
2863 case $ac_cv_build in
2864 *-*-*) ;;
2865 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2866 esac
2867 build=$ac_cv_build
2868 ac_save_IFS=$IFS; IFS='-'
2869 set x $ac_cv_build
2870 shift
2871 build_cpu=$1
2872 build_vendor=$2
2873 shift; shift
2874 # Remember, the first character of IFS is used to create $*,
2875 # except with old shells:
2876 build_os=$*
2877 IFS=$ac_save_IFS
2878 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2879
2880
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2882 $as_echo_n "checking host system type... " >&6; }
2883 if ${ac_cv_host+:} false; then :
2884   $as_echo_n "(cached) " >&6
2885 else
2886   if test "x$host_alias" = x; then
2887   ac_cv_host=$ac_cv_build
2888 else
2889   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2890     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2891 fi
2892
2893 fi
2894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2895 $as_echo "$ac_cv_host" >&6; }
2896 case $ac_cv_host in
2897 *-*-*) ;;
2898 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2899 esac
2900 host=$ac_cv_host
2901 ac_save_IFS=$IFS; IFS='-'
2902 set x $ac_cv_host
2903 shift
2904 host_cpu=$1
2905 host_vendor=$2
2906 shift; shift
2907 # Remember, the first character of IFS is used to create $*,
2908 # except with old shells:
2909 host_os=$*
2910 IFS=$ac_save_IFS
2911 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2912
2913
2914
2915 template=
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2917 $as_echo_n "checking which template to use... " >&6; }
2918
2919
2920
2921
2922 # Check whether --with-template was given.
2923 if test "${with_template+set}" = set; then :
2924   withval=$with_template;
2925   case $withval in
2926     yes)
2927       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2928       ;;
2929     no)
2930       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2931       ;;
2932     *)
2933
2934   case $withval in
2935     list)   echo; ls "$srcdir/src/template"; exit;;
2936     *)      if test -f "$srcdir/src/template/$with_template" ; then
2937               template=$withval
2938             else
2939               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2940             fi;;
2941   esac
2942
2943       ;;
2944   esac
2945
2946 else
2947
2948 # --with-template not given
2949
2950 case $host_os in
2951      aix*) template=aix ;;
2952   cygwin*) template=cygwin ;;
2953   darwin*) template=darwin ;;
2954 dragonfly*) template=netbsd ;;
2955  freebsd*) template=freebsd ;;
2956     hpux*) template=hpux ;;
2957  linux*|gnu*|k*bsd*-gnu)
2958            template=linux ;;
2959    mingw*) template=win32 ;;
2960   netbsd*) template=netbsd ;;
2961  openbsd*) template=openbsd ;;
2962  solaris*) template=solaris ;;
2963 esac
2964
2965   if test x"$template" = x"" ; then
2966     as_fn_error $? "
2967 *******************************************************************
2968 PostgreSQL has apparently not been ported to your platform yet.
2969 To try a manual configuration, look into the src/template directory
2970 for a similar platform and use the '--with-template=' option.
2971
2972 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
2973 rectifying this.  Include the above 'checking host system type...'
2974 line.
2975 *******************************************************************
2976 " "$LINENO" 5
2977   fi
2978
2979
2980 fi
2981
2982
2983
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2985 $as_echo "$template" >&6; }
2986
2987 PORTNAME=$template
2988
2989
2990 # Initialize default assumption that we do not need separate assembly code
2991 # for TAS (test-and-set).  This can be overridden by the template file
2992 # when it's executed.
2993 need_tas=no
2994 tas_file=dummy.s
2995
2996
2997
2998 ##
2999 ## Command line options
3000 ##
3001
3002 #
3003 # Add non-standard directories to the include path
3004 #
3005
3006
3007
3008 # Check whether --with-includes was given.
3009 if test "${with_includes+set}" = set; then :
3010   withval=$with_includes;
3011   case $withval in
3012     yes)
3013       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3014       ;;
3015     no)
3016       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3017       ;;
3018     *)
3019
3020       ;;
3021   esac
3022
3023 fi
3024
3025
3026
3027
3028 #
3029 # Add non-standard directories to the library search path
3030 #
3031
3032
3033
3034 # Check whether --with-libraries was given.
3035 if test "${with_libraries+set}" = set; then :
3036   withval=$with_libraries;
3037   case $withval in
3038     yes)
3039       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3040       ;;
3041     no)
3042       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3043       ;;
3044     *)
3045       LIBRARY_DIRS=$withval
3046       ;;
3047   esac
3048
3049 fi
3050
3051
3052
3053
3054
3055
3056 # Check whether --with-libs was given.
3057 if test "${with_libs+set}" = set; then :
3058   withval=$with_libs;
3059   case $withval in
3060     yes)
3061       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3062       ;;
3063     no)
3064       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3065       ;;
3066     *)
3067       LIBRARY_DIRS=$withval
3068       ;;
3069   esac
3070
3071 fi
3072
3073
3074
3075
3076 #
3077 # 64-bit integer date/time storage is now the only option, but to avoid
3078 # unnecessary breakage of build scripts, continue to accept an explicit
3079 # "--enable-integer-datetimes" switch.
3080 #
3081
3082
3083 # Check whether --enable-integer-datetimes was given.
3084 if test "${enable_integer_datetimes+set}" = set; then :
3085   enableval=$enable_integer_datetimes;
3086   case $enableval in
3087     yes)
3088       :
3089       ;;
3090     no)
3091       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3092       ;;
3093     *)
3094       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3095       ;;
3096   esac
3097
3098 else
3099   enable_integer_datetimes=yes
3100
3101 fi
3102
3103
3104
3105
3106 #
3107 # NLS
3108 #
3109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3110 $as_echo_n "checking whether NLS is wanted... " >&6; }
3111
3112
3113 # Check whether --enable-nls was given.
3114 if test "${enable_nls+set}" = set; then :
3115   enableval=$enable_nls;
3116   case $enableval in
3117     yes)
3118       :
3119       ;;
3120     no)
3121       :
3122       ;;
3123     *)
3124       enable_nls=yes
3125 WANTED_LANGUAGES=$enableval
3126       ;;
3127   esac
3128
3129 else
3130   enable_nls=no
3131 fi
3132
3133
3134
3135 if test "$enable_nls" = yes; then
3136
3137 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3138
3139 fi
3140
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3142 $as_echo "$enable_nls" >&6; }
3143
3144
3145
3146 #
3147 # Default port number (--with-pgport), default 5432
3148 #
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3150 $as_echo_n "checking for default port number... " >&6; }
3151
3152
3153
3154 # Check whether --with-pgport was given.
3155 if test "${with_pgport+set}" = set; then :
3156   withval=$with_pgport;
3157   case $withval in
3158     yes)
3159       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3160       ;;
3161     no)
3162       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3163       ;;
3164     *)
3165       default_port=$withval
3166       ;;
3167   esac
3168
3169 else
3170   default_port=5432
3171 fi
3172
3173
3174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3175 $as_echo "$default_port" >&6; }
3176 # Need both of these because some places want an integer and some a string
3177
3178 cat >>confdefs.h <<_ACEOF
3179 #define DEF_PGPORT ${default_port}
3180 _ACEOF
3181
3182
3183 cat >>confdefs.h <<_ACEOF
3184 #define DEF_PGPORT_STR "${default_port}"
3185 _ACEOF
3186
3187
3188
3189 # It's worth validating port; you can get very confusing errors otherwise
3190 if test x"$default_port" = x""; then
3191   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3192 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3193   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3194 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3195   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3196 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3197   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3198 fi
3199
3200 #
3201 # '-rpath'-like feature can be disabled
3202 #
3203
3204
3205 # Check whether --enable-rpath was given.
3206 if test "${enable_rpath+set}" = set; then :
3207   enableval=$enable_rpath;
3208   case $enableval in
3209     yes)
3210       :
3211       ;;
3212     no)
3213       :
3214       ;;
3215     *)
3216       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3217       ;;
3218   esac
3219
3220 else
3221   enable_rpath=yes
3222
3223 fi
3224
3225
3226
3227
3228 #
3229 # Spinlocks
3230 #
3231
3232
3233 # Check whether --enable-spinlocks was given.
3234 if test "${enable_spinlocks+set}" = set; then :
3235   enableval=$enable_spinlocks;
3236   case $enableval in
3237     yes)
3238       :
3239       ;;
3240     no)
3241       :
3242       ;;
3243     *)
3244       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3245       ;;
3246   esac
3247
3248 else
3249   enable_spinlocks=yes
3250
3251 fi
3252
3253
3254
3255 #
3256 # Atomic operations
3257 #
3258
3259
3260 # Check whether --enable-atomics was given.
3261 if test "${enable_atomics+set}" = set; then :
3262   enableval=$enable_atomics;
3263   case $enableval in
3264     yes)
3265       :
3266       ;;
3267     no)
3268       :
3269       ;;
3270     *)
3271       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3272       ;;
3273   esac
3274
3275 else
3276   enable_atomics=yes
3277
3278 fi
3279
3280
3281
3282 #
3283 # --enable-debug adds -g to compiler flags
3284 #
3285
3286
3287 # Check whether --enable-debug was given.
3288 if test "${enable_debug+set}" = set; then :
3289   enableval=$enable_debug;
3290   case $enableval in
3291     yes)
3292       :
3293       ;;
3294     no)
3295       :
3296       ;;
3297     *)
3298       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3299       ;;
3300   esac
3301
3302 else
3303   enable_debug=no
3304
3305 fi
3306
3307
3308
3309
3310 #
3311 # --enable-profiling enables gcc profiling
3312 #
3313
3314
3315 # Check whether --enable-profiling was given.
3316 if test "${enable_profiling+set}" = set; then :
3317   enableval=$enable_profiling;
3318   case $enableval in
3319     yes)
3320       :
3321       ;;
3322     no)
3323       :
3324       ;;
3325     *)
3326       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3327       ;;
3328   esac
3329
3330 else
3331   enable_profiling=no
3332
3333 fi
3334
3335
3336
3337 #
3338 # --enable-coverage enables generation of code coverage metrics with gcov
3339 #
3340
3341
3342 # Check whether --enable-coverage was given.
3343 if test "${enable_coverage+set}" = set; then :
3344   enableval=$enable_coverage;
3345   case $enableval in
3346     yes)
3347       if test -z "$GCOV"; then
3348   for ac_prog in gcov
3349 do
3350   # Extract the first word of "$ac_prog", so it can be a program name with args.
3351 set dummy $ac_prog; ac_word=$2
3352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3353 $as_echo_n "checking for $ac_word... " >&6; }
3354 if ${ac_cv_path_GCOV+:} false; then :
3355   $as_echo_n "(cached) " >&6
3356 else
3357   case $GCOV in
3358   [\\/]* | ?:[\\/]*)
3359   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3360   ;;
3361   *)
3362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3363 for as_dir in $PATH
3364 do
3365   IFS=$as_save_IFS
3366   test -z "$as_dir" && as_dir=.
3367     for ac_exec_ext in '' $ac_executable_extensions; do
3368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3369     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3371     break 2
3372   fi
3373 done
3374   done
3375 IFS=$as_save_IFS
3376
3377   ;;
3378 esac
3379 fi
3380 GCOV=$ac_cv_path_GCOV
3381 if test -n "$GCOV"; then
3382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3383 $as_echo "$GCOV" >&6; }
3384 else
3385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3386 $as_echo "no" >&6; }
3387 fi
3388
3389
3390   test -n "$GCOV" && break
3391 done
3392
3393 else
3394   # Report the value of GCOV in configure's output in all cases.
3395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3396 $as_echo_n "checking for GCOV... " >&6; }
3397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3398 $as_echo "$GCOV" >&6; }
3399 fi
3400
3401 if test -z "$GCOV"; then
3402   as_fn_error $? "gcov not found" "$LINENO" 5
3403 fi
3404 if test -z "$LCOV"; then
3405   for ac_prog in lcov
3406 do
3407   # Extract the first word of "$ac_prog", so it can be a program name with args.
3408 set dummy $ac_prog; ac_word=$2
3409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3410 $as_echo_n "checking for $ac_word... " >&6; }
3411 if ${ac_cv_path_LCOV+:} false; then :
3412   $as_echo_n "(cached) " >&6
3413 else
3414   case $LCOV in
3415   [\\/]* | ?:[\\/]*)
3416   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3417   ;;
3418   *)
3419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3420 for as_dir in $PATH
3421 do
3422   IFS=$as_save_IFS
3423   test -z "$as_dir" && as_dir=.
3424     for ac_exec_ext in '' $ac_executable_extensions; do
3425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3426     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3428     break 2
3429   fi
3430 done
3431   done
3432 IFS=$as_save_IFS
3433
3434   ;;
3435 esac
3436 fi
3437 LCOV=$ac_cv_path_LCOV
3438 if test -n "$LCOV"; then
3439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3440 $as_echo "$LCOV" >&6; }
3441 else
3442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3443 $as_echo "no" >&6; }
3444 fi
3445
3446
3447   test -n "$LCOV" && break
3448 done
3449
3450 else
3451   # Report the value of LCOV in configure's output in all cases.
3452   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3453 $as_echo_n "checking for LCOV... " >&6; }
3454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3455 $as_echo "$LCOV" >&6; }
3456 fi
3457
3458 if test -z "$LCOV"; then
3459   as_fn_error $? "lcov not found" "$LINENO" 5
3460 fi
3461 if test -z "$GENHTML"; then
3462   for ac_prog in genhtml
3463 do
3464   # Extract the first word of "$ac_prog", so it can be a program name with args.
3465 set dummy $ac_prog; ac_word=$2
3466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3467 $as_echo_n "checking for $ac_word... " >&6; }
3468 if ${ac_cv_path_GENHTML+:} false; then :
3469   $as_echo_n "(cached) " >&6
3470 else
3471   case $GENHTML in
3472   [\\/]* | ?:[\\/]*)
3473   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3474   ;;
3475   *)
3476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3477 for as_dir in $PATH
3478 do
3479   IFS=$as_save_IFS
3480   test -z "$as_dir" && as_dir=.
3481     for ac_exec_ext in '' $ac_executable_extensions; do
3482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3483     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3485     break 2
3486   fi
3487 done
3488   done
3489 IFS=$as_save_IFS
3490
3491   ;;
3492 esac
3493 fi
3494 GENHTML=$ac_cv_path_GENHTML
3495 if test -n "$GENHTML"; then
3496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3497 $as_echo "$GENHTML" >&6; }
3498 else
3499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3500 $as_echo "no" >&6; }
3501 fi
3502
3503
3504   test -n "$GENHTML" && break
3505 done
3506
3507 else
3508   # Report the value of GENHTML in configure's output in all cases.
3509   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3510 $as_echo_n "checking for GENHTML... " >&6; }
3511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3512 $as_echo "$GENHTML" >&6; }
3513 fi
3514
3515 if test -z "$GENHTML"; then
3516   as_fn_error $? "genhtml not found" "$LINENO" 5
3517 fi
3518       ;;
3519     no)
3520       :
3521       ;;
3522     *)
3523       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3524       ;;
3525   esac
3526
3527 else
3528   enable_coverage=no
3529
3530 fi
3531
3532
3533
3534
3535 #
3536 # DTrace
3537 #
3538
3539
3540 # Check whether --enable-dtrace was given.
3541 if test "${enable_dtrace+set}" = set; then :
3542   enableval=$enable_dtrace;
3543   case $enableval in
3544     yes)
3545       if test -z "$DTRACE"; then
3546   for ac_prog in dtrace
3547 do
3548   # Extract the first word of "$ac_prog", so it can be a program name with args.
3549 set dummy $ac_prog; ac_word=$2
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3551 $as_echo_n "checking for $ac_word... " >&6; }
3552 if ${ac_cv_path_DTRACE+:} false; then :
3553   $as_echo_n "(cached) " >&6
3554 else
3555   case $DTRACE in
3556   [\\/]* | ?:[\\/]*)
3557   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3558   ;;
3559   *)
3560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3561 for as_dir in $PATH
3562 do
3563   IFS=$as_save_IFS
3564   test -z "$as_dir" && as_dir=.
3565     for ac_exec_ext in '' $ac_executable_extensions; do
3566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3567     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3569     break 2
3570   fi
3571 done
3572   done
3573 IFS=$as_save_IFS
3574
3575   ;;
3576 esac
3577 fi
3578 DTRACE=$ac_cv_path_DTRACE
3579 if test -n "$DTRACE"; then
3580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3581 $as_echo "$DTRACE" >&6; }
3582 else
3583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3584 $as_echo "no" >&6; }
3585 fi
3586
3587
3588   test -n "$DTRACE" && break
3589 done
3590
3591 else
3592   # Report the value of DTRACE in configure's output in all cases.
3593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3594 $as_echo_n "checking for DTRACE... " >&6; }
3595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3596 $as_echo "$DTRACE" >&6; }
3597 fi
3598
3599 if test -z "$DTRACE"; then
3600   as_fn_error $? "dtrace not found" "$LINENO" 5
3601 fi
3602
3603       ;;
3604     no)
3605       :
3606       ;;
3607     *)
3608       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3609       ;;
3610   esac
3611
3612 else
3613   enable_dtrace=no
3614
3615 fi
3616
3617
3618
3619
3620 #
3621 # TAP tests
3622 #
3623
3624
3625 # Check whether --enable-tap-tests was given.
3626 if test "${enable_tap_tests+set}" = set; then :
3627   enableval=$enable_tap_tests;
3628   case $enableval in
3629     yes)
3630       :
3631       ;;
3632     no)
3633       :
3634       ;;
3635     *)
3636       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3637       ;;
3638   esac
3639
3640 else
3641   enable_tap_tests=no
3642
3643 fi
3644
3645
3646
3647
3648 #
3649 # Block size
3650 #
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3652 $as_echo_n "checking for block size... " >&6; }
3653
3654
3655
3656 # Check whether --with-blocksize was given.
3657 if test "${with_blocksize+set}" = set; then :
3658   withval=$with_blocksize;
3659   case $withval in
3660     yes)
3661       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3662       ;;
3663     no)
3664       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3665       ;;
3666     *)
3667       blocksize=$withval
3668       ;;
3669   esac
3670
3671 else
3672   blocksize=8
3673 fi
3674
3675
3676 case ${blocksize} in
3677   1) BLCKSZ=1024;;
3678   2) BLCKSZ=2048;;
3679   4) BLCKSZ=4096;;
3680   8) BLCKSZ=8192;;
3681  16) BLCKSZ=16384;;
3682  32) BLCKSZ=32768;;
3683   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3684 esac
3685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3686 $as_echo "${blocksize}kB" >&6; }
3687
3688
3689 cat >>confdefs.h <<_ACEOF
3690 #define BLCKSZ ${BLCKSZ}
3691 _ACEOF
3692
3693
3694 #
3695 # Relation segment size
3696 #
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3698 $as_echo_n "checking for segment size... " >&6; }
3699
3700
3701
3702 # Check whether --with-segsize was given.
3703 if test "${with_segsize+set}" = set; then :
3704   withval=$with_segsize;
3705   case $withval in
3706     yes)
3707       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3708       ;;
3709     no)
3710       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3711       ;;
3712     *)
3713       segsize=$withval
3714       ;;
3715   esac
3716
3717 else
3718   segsize=1
3719 fi
3720
3721
3722 # this expression is set up to avoid unnecessary integer overflow
3723 # blocksize is already guaranteed to be a factor of 1024
3724 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3725 test $? -eq 0 || exit 1
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3727 $as_echo "${segsize}GB" >&6; }
3728
3729
3730 cat >>confdefs.h <<_ACEOF
3731 #define RELSEG_SIZE ${RELSEG_SIZE}
3732 _ACEOF
3733
3734
3735 #
3736 # WAL block size
3737 #
3738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3739 $as_echo_n "checking for WAL block size... " >&6; }
3740
3741
3742
3743 # Check whether --with-wal-blocksize was given.
3744 if test "${with_wal_blocksize+set}" = set; then :
3745   withval=$with_wal_blocksize;
3746   case $withval in
3747     yes)
3748       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3749       ;;
3750     no)
3751       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3752       ;;
3753     *)
3754       wal_blocksize=$withval
3755       ;;
3756   esac
3757
3758 else
3759   wal_blocksize=8
3760 fi
3761
3762
3763 case ${wal_blocksize} in
3764   1) XLOG_BLCKSZ=1024;;
3765   2) XLOG_BLCKSZ=2048;;
3766   4) XLOG_BLCKSZ=4096;;
3767   8) XLOG_BLCKSZ=8192;;
3768  16) XLOG_BLCKSZ=16384;;
3769  32) XLOG_BLCKSZ=32768;;
3770  64) XLOG_BLCKSZ=65536;;
3771   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3772 esac
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3774 $as_echo "${wal_blocksize}kB" >&6; }
3775
3776
3777 cat >>confdefs.h <<_ACEOF
3778 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3779 _ACEOF
3780
3781
3782 #
3783 # C compiler
3784 #
3785
3786 # For historical reasons you can also use --with-CC to specify the C compiler
3787 # to use, although the standard way to do this is to set the CC environment
3788 # variable.
3789
3790
3791
3792 # Check whether --with-CC was given.
3793 if test "${with_CC+set}" = set; then :
3794   withval=$with_CC;
3795   case $withval in
3796     yes)
3797       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3798       ;;
3799     no)
3800       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3801       ;;
3802     *)
3803       CC=$with_CC
3804       ;;
3805   esac
3806
3807 fi
3808
3809
3810
3811 case $template in
3812   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3813     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3814 esac
3815
3816 ac_ext=c
3817 ac_cpp='$CPP $CPPFLAGS'
3818 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3819 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3820 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3821 if test -n "$ac_tool_prefix"; then
3822   for ac_prog in $pgac_cc_list
3823   do
3824     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3825 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3827 $as_echo_n "checking for $ac_word... " >&6; }
3828 if ${ac_cv_prog_CC+:} false; then :
3829   $as_echo_n "(cached) " >&6
3830 else
3831   if test -n "$CC"; then
3832   ac_cv_prog_CC="$CC" # Let the user override the test.
3833 else
3834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3835 for as_dir in $PATH
3836 do
3837   IFS=$as_save_IFS
3838   test -z "$as_dir" && as_dir=.
3839     for ac_exec_ext in '' $ac_executable_extensions; do
3840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3841     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3843     break 2
3844   fi
3845 done
3846   done
3847 IFS=$as_save_IFS
3848
3849 fi
3850 fi
3851 CC=$ac_cv_prog_CC
3852 if test -n "$CC"; then
3853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3854 $as_echo "$CC" >&6; }
3855 else
3856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3857 $as_echo "no" >&6; }
3858 fi
3859
3860
3861     test -n "$CC" && break
3862   done
3863 fi
3864 if test -z "$CC"; then
3865   ac_ct_CC=$CC
3866   for ac_prog in $pgac_cc_list
3867 do
3868   # Extract the first word of "$ac_prog", so it can be a program name with args.
3869 set dummy $ac_prog; ac_word=$2
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871 $as_echo_n "checking for $ac_word... " >&6; }
3872 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3873   $as_echo_n "(cached) " >&6
3874 else
3875   if test -n "$ac_ct_CC"; then
3876   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3877 else
3878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3879 for as_dir in $PATH
3880 do
3881   IFS=$as_save_IFS
3882   test -z "$as_dir" && as_dir=.
3883     for ac_exec_ext in '' $ac_executable_extensions; do
3884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3885     ac_cv_prog_ac_ct_CC="$ac_prog"
3886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3887     break 2
3888   fi
3889 done
3890   done
3891 IFS=$as_save_IFS
3892
3893 fi
3894 fi
3895 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3896 if test -n "$ac_ct_CC"; then
3897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3898 $as_echo "$ac_ct_CC" >&6; }
3899 else
3900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901 $as_echo "no" >&6; }
3902 fi
3903
3904
3905   test -n "$ac_ct_CC" && break
3906 done
3907
3908   if test "x$ac_ct_CC" = x; then
3909     CC=""
3910   else
3911     case $cross_compiling:$ac_tool_warned in
3912 yes:)
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3914 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3915 ac_tool_warned=yes ;;
3916 esac
3917     CC=$ac_ct_CC
3918   fi
3919 fi
3920
3921
3922 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3923 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3924 as_fn_error $? "no acceptable C compiler found in \$PATH
3925 See \`config.log' for more details" "$LINENO" 5; }
3926
3927 # Provide some information about the compiler.
3928 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3929 set X $ac_compile
3930 ac_compiler=$2
3931 for ac_option in --version -v -V -qversion; do
3932   { { ac_try="$ac_compiler $ac_option >&5"
3933 case "(($ac_try" in
3934   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3935   *) ac_try_echo=$ac_try;;
3936 esac
3937 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3938 $as_echo "$ac_try_echo"; } >&5
3939   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3940   ac_status=$?
3941   if test -s conftest.err; then
3942     sed '10a\
3943 ... rest of stderr output deleted ...
3944          10q' conftest.err >conftest.er1
3945     cat conftest.er1 >&5
3946   fi
3947   rm -f conftest.er1 conftest.err
3948   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3949   test $ac_status = 0; }
3950 done
3951
3952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3953 /* end confdefs.h.  */
3954
3955 int
3956 main ()
3957 {
3958
3959   ;
3960   return 0;
3961 }
3962 _ACEOF
3963 ac_clean_files_save=$ac_clean_files
3964 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3965 # Try to create an executable without -o first, disregard a.out.
3966 # It will help us diagnose broken compilers, and finding out an intuition
3967 # of exeext.
3968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3969 $as_echo_n "checking whether the C compiler works... " >&6; }
3970 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3971
3972 # The possible output files:
3973 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3974
3975 ac_rmfiles=
3976 for ac_file in $ac_files
3977 do
3978   case $ac_file in
3979     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3980     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3981   esac
3982 done
3983 rm -f $ac_rmfiles
3984
3985 if { { ac_try="$ac_link_default"
3986 case "(($ac_try" in
3987   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3988   *) ac_try_echo=$ac_try;;
3989 esac
3990 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3991 $as_echo "$ac_try_echo"; } >&5
3992   (eval "$ac_link_default") 2>&5
3993   ac_status=$?
3994   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3995   test $ac_status = 0; }; then :
3996   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3997 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3998 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3999 # so that the user can short-circuit this test for compilers unknown to
4000 # Autoconf.
4001 for ac_file in $ac_files ''
4002 do
4003   test -f "$ac_file" || continue
4004   case $ac_file in
4005     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4006         ;;
4007     [ab].out )
4008         # We found the default executable, but exeext='' is most
4009         # certainly right.
4010         break;;
4011     *.* )
4012         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4013         then :; else
4014            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4015         fi
4016         # We set ac_cv_exeext here because the later test for it is not
4017         # safe: cross compilers may not add the suffix if given an `-o'
4018         # argument, so we may need to know it at that point already.
4019         # Even if this section looks crufty: it has the advantage of
4020         # actually working.
4021         break;;
4022     * )
4023         break;;
4024   esac
4025 done
4026 test "$ac_cv_exeext" = no && ac_cv_exeext=
4027
4028 else
4029   ac_file=''
4030 fi
4031 if test -z "$ac_file"; then :
4032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033 $as_echo "no" >&6; }
4034 $as_echo "$as_me: failed program was:" >&5
4035 sed 's/^/| /' conftest.$ac_ext >&5
4036
4037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4039 as_fn_error 77 "C compiler cannot create executables
4040 See \`config.log' for more details" "$LINENO" 5; }
4041 else
4042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4043 $as_echo "yes" >&6; }
4044 fi
4045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4046 $as_echo_n "checking for C compiler default output file name... " >&6; }
4047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4048 $as_echo "$ac_file" >&6; }
4049 ac_exeext=$ac_cv_exeext
4050
4051 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4052 ac_clean_files=$ac_clean_files_save
4053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4054 $as_echo_n "checking for suffix of executables... " >&6; }
4055 if { { ac_try="$ac_link"
4056 case "(($ac_try" in
4057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058   *) ac_try_echo=$ac_try;;
4059 esac
4060 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4061 $as_echo "$ac_try_echo"; } >&5
4062   (eval "$ac_link") 2>&5
4063   ac_status=$?
4064   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4065   test $ac_status = 0; }; then :
4066   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4067 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4068 # work properly (i.e., refer to `conftest.exe'), while it won't with
4069 # `rm'.
4070 for ac_file in conftest.exe conftest conftest.*; do
4071   test -f "$ac_file" || continue
4072   case $ac_file in
4073     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4074     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4075           break;;
4076     * ) break;;
4077   esac
4078 done
4079 else
4080   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4081 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4082 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4083 See \`config.log' for more details" "$LINENO" 5; }
4084 fi
4085 rm -f conftest conftest$ac_cv_exeext
4086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4087 $as_echo "$ac_cv_exeext" >&6; }
4088
4089 rm -f conftest.$ac_ext
4090 EXEEXT=$ac_cv_exeext
4091 ac_exeext=$EXEEXT
4092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4093 /* end confdefs.h.  */
4094 #include <stdio.h>
4095 int
4096 main ()
4097 {
4098 FILE *f = fopen ("conftest.out", "w");
4099  return ferror (f) || fclose (f) != 0;
4100
4101   ;
4102   return 0;
4103 }
4104 _ACEOF
4105 ac_clean_files="$ac_clean_files conftest.out"
4106 # Check that the compiler produces executables we can run.  If not, either
4107 # the compiler is broken, or we cross compile.
4108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4109 $as_echo_n "checking whether we are cross compiling... " >&6; }
4110 if test "$cross_compiling" != yes; then
4111   { { ac_try="$ac_link"
4112 case "(($ac_try" in
4113   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4114   *) ac_try_echo=$ac_try;;
4115 esac
4116 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4117 $as_echo "$ac_try_echo"; } >&5
4118   (eval "$ac_link") 2>&5
4119   ac_status=$?
4120   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4121   test $ac_status = 0; }
4122   if { ac_try='./conftest$ac_cv_exeext'
4123   { { case "(($ac_try" in
4124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4125   *) ac_try_echo=$ac_try;;
4126 esac
4127 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4128 $as_echo "$ac_try_echo"; } >&5
4129   (eval "$ac_try") 2>&5
4130   ac_status=$?
4131   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4132   test $ac_status = 0; }; }; then
4133     cross_compiling=no
4134   else
4135     if test "$cross_compiling" = maybe; then
4136         cross_compiling=yes
4137     else
4138         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4139 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4140 as_fn_error $? "cannot run C compiled programs.
4141 If you meant to cross compile, use \`--host'.
4142 See \`config.log' for more details" "$LINENO" 5; }
4143     fi
4144   fi
4145 fi
4146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4147 $as_echo "$cross_compiling" >&6; }
4148
4149 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4150 ac_clean_files=$ac_clean_files_save
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4152 $as_echo_n "checking for suffix of object files... " >&6; }
4153 if ${ac_cv_objext+:} false; then :
4154   $as_echo_n "(cached) " >&6
4155 else
4156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4157 /* end confdefs.h.  */
4158
4159 int
4160 main ()
4161 {
4162
4163   ;
4164   return 0;
4165 }
4166 _ACEOF
4167 rm -f conftest.o conftest.obj
4168 if { { ac_try="$ac_compile"
4169 case "(($ac_try" in
4170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4171   *) ac_try_echo=$ac_try;;
4172 esac
4173 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4174 $as_echo "$ac_try_echo"; } >&5
4175   (eval "$ac_compile") 2>&5
4176   ac_status=$?
4177   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4178   test $ac_status = 0; }; then :
4179   for ac_file in conftest.o conftest.obj conftest.*; do
4180   test -f "$ac_file" || continue;
4181   case $ac_file in
4182     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4183     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4184        break;;
4185   esac
4186 done
4187 else
4188   $as_echo "$as_me: failed program was:" >&5
4189 sed 's/^/| /' conftest.$ac_ext >&5
4190
4191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4192 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4193 as_fn_error $? "cannot compute suffix of object files: cannot compile
4194 See \`config.log' for more details" "$LINENO" 5; }
4195 fi
4196 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4197 fi
4198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4199 $as_echo "$ac_cv_objext" >&6; }
4200 OBJEXT=$ac_cv_objext
4201 ac_objext=$OBJEXT
4202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4203 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4204 if ${ac_cv_c_compiler_gnu+:} false; then :
4205   $as_echo_n "(cached) " >&6
4206 else
4207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4208 /* end confdefs.h.  */
4209
4210 int
4211 main ()
4212 {
4213 #ifndef __GNUC__
4214        choke me
4215 #endif
4216
4217   ;
4218   return 0;
4219 }
4220 _ACEOF
4221 if ac_fn_c_try_compile "$LINENO"; then :
4222   ac_compiler_gnu=yes
4223 else
4224   ac_compiler_gnu=no
4225 fi
4226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4227 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4228
4229 fi
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4231 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4232 if test $ac_compiler_gnu = yes; then
4233   GCC=yes
4234 else
4235   GCC=
4236 fi
4237 ac_test_CFLAGS=${CFLAGS+set}
4238 ac_save_CFLAGS=$CFLAGS
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4240 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4241 if ${ac_cv_prog_cc_g+:} false; then :
4242   $as_echo_n "(cached) " >&6
4243 else
4244   ac_save_c_werror_flag=$ac_c_werror_flag
4245    ac_c_werror_flag=yes
4246    ac_cv_prog_cc_g=no
4247    CFLAGS="-g"
4248    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4249 /* end confdefs.h.  */
4250
4251 int
4252 main ()
4253 {
4254
4255   ;
4256   return 0;
4257 }
4258 _ACEOF
4259 if ac_fn_c_try_compile "$LINENO"; then :
4260   ac_cv_prog_cc_g=yes
4261 else
4262   CFLAGS=""
4263       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4264 /* end confdefs.h.  */
4265
4266 int
4267 main ()
4268 {
4269
4270   ;
4271   return 0;
4272 }
4273 _ACEOF
4274 if ac_fn_c_try_compile "$LINENO"; then :
4275
4276 else
4277   ac_c_werror_flag=$ac_save_c_werror_flag
4278          CFLAGS="-g"
4279          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4280 /* end confdefs.h.  */
4281
4282 int
4283 main ()
4284 {
4285
4286   ;
4287   return 0;
4288 }
4289 _ACEOF
4290 if ac_fn_c_try_compile "$LINENO"; then :
4291   ac_cv_prog_cc_g=yes
4292 fi
4293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4294 fi
4295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4296 fi
4297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4298    ac_c_werror_flag=$ac_save_c_werror_flag
4299 fi
4300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4301 $as_echo "$ac_cv_prog_cc_g" >&6; }
4302 if test "$ac_test_CFLAGS" = set; then
4303   CFLAGS=$ac_save_CFLAGS
4304 elif test $ac_cv_prog_cc_g = yes; then
4305   if test "$GCC" = yes; then
4306     CFLAGS="-g -O2"
4307   else
4308     CFLAGS="-g"
4309   fi
4310 else
4311   if test "$GCC" = yes; then
4312     CFLAGS="-O2"
4313   else
4314     CFLAGS=
4315   fi
4316 fi
4317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4318 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4319 if ${ac_cv_prog_cc_c89+:} false; then :
4320   $as_echo_n "(cached) " >&6
4321 else
4322   ac_cv_prog_cc_c89=no
4323 ac_save_CC=$CC
4324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4325 /* end confdefs.h.  */
4326 #include <stdarg.h>
4327 #include <stdio.h>
4328 struct stat;
4329 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4330 struct buf { int x; };
4331 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4332 static char *e (p, i)
4333      char **p;
4334      int i;
4335 {
4336   return p[i];
4337 }
4338 static char *f (char * (*g) (char **, int), char **p, ...)
4339 {
4340   char *s;
4341   va_list v;
4342   va_start (v,p);
4343   s = g (p, va_arg (v,int));
4344   va_end (v);
4345   return s;
4346 }
4347
4348 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4349    function prototypes and stuff, but not '\xHH' hex character constants.
4350    These don't provoke an error unfortunately, instead are silently treated
4351    as 'x'.  The following induces an error, until -std is added to get
4352    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4353    array size at least.  It's necessary to write '\x00'==0 to get something
4354    that's true only with -std.  */
4355 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4356
4357 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4358    inside strings and character constants.  */
4359 #define FOO(x) 'x'
4360 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4361
4362 int test (int i, double x);
4363 struct s1 {int (*f) (int a);};
4364 struct s2 {int (*f) (double a);};
4365 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4366 int argc;
4367 char **argv;
4368 int
4369 main ()
4370 {
4371 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4372   ;
4373   return 0;
4374 }
4375 _ACEOF
4376 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4377         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4378 do
4379   CC="$ac_save_CC $ac_arg"
4380   if ac_fn_c_try_compile "$LINENO"; then :
4381   ac_cv_prog_cc_c89=$ac_arg
4382 fi
4383 rm -f core conftest.err conftest.$ac_objext
4384   test "x$ac_cv_prog_cc_c89" != "xno" && break
4385 done
4386 rm -f conftest.$ac_ext
4387 CC=$ac_save_CC
4388
4389 fi
4390 # AC_CACHE_VAL
4391 case "x$ac_cv_prog_cc_c89" in
4392   x)
4393     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4394 $as_echo "none needed" >&6; } ;;
4395   xno)
4396     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4397 $as_echo "unsupported" >&6; } ;;
4398   *)
4399     CC="$CC $ac_cv_prog_cc_c89"
4400     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4401 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4402 esac
4403 if test "x$ac_cv_prog_cc_c89" != xno; then :
4404
4405 fi
4406
4407 ac_ext=c
4408 ac_cpp='$CPP $CPPFLAGS'
4409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4412
4413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4414 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4415 if ${ac_cv_prog_cc_c99+:} false; then :
4416   $as_echo_n "(cached) " >&6
4417 else
4418   ac_cv_prog_cc_c99=no
4419 ac_save_CC=$CC
4420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4421 /* end confdefs.h.  */
4422 #include <stdarg.h>
4423 #include <stdbool.h>
4424 #include <stdlib.h>
4425 #include <wchar.h>
4426 #include <stdio.h>
4427
4428 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4429 #define debug(...) fprintf (stderr, __VA_ARGS__)
4430 #define showlist(...) puts (#__VA_ARGS__)
4431 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4432 static void
4433 test_varargs_macros (void)
4434 {
4435   int x = 1234;
4436   int y = 5678;
4437   debug ("Flag");
4438   debug ("X = %d\n", x);
4439   showlist (The first, second, and third items.);
4440   report (x>y, "x is %d but y is %d", x, y);
4441 }
4442
4443 // Check long long types.
4444 #define BIG64 18446744073709551615ull
4445 #define BIG32 4294967295ul
4446 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4447 #if !BIG_OK
4448   your preprocessor is broken;
4449 #endif
4450 #if BIG_OK
4451 #else
4452   your preprocessor is broken;
4453 #endif
4454 static long long int bignum = -9223372036854775807LL;
4455 static unsigned long long int ubignum = BIG64;
4456
4457 struct incomplete_array
4458 {
4459   int datasize;
4460   double data[];
4461 };
4462
4463 struct named_init {
4464   int number;
4465   const wchar_t *name;
4466   double average;
4467 };
4468
4469 typedef const char *ccp;
4470
4471 static inline int
4472 test_restrict (ccp restrict text)
4473 {
4474   // See if C++-style comments work.
4475   // Iterate through items via the restricted pointer.
4476   // Also check for declarations in for loops.
4477   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4478     continue;
4479   return 0;
4480 }
4481
4482 // Check varargs and va_copy.
4483 static void
4484 test_varargs (const char *format, ...)
4485 {
4486   va_list args;
4487   va_start (args, format);
4488   va_list args_copy;
4489   va_copy (args_copy, args);
4490
4491   const char *str;
4492   int number;
4493   float fnumber;
4494
4495   while (*format)
4496     {
4497       switch (*format++)
4498         {
4499         case 's': // string
4500           str = va_arg (args_copy, const char *);
4501           break;
4502         case 'd': // int
4503           number = va_arg (args_copy, int);
4504           break;
4505         case 'f': // float
4506           fnumber = va_arg (args_copy, double);
4507           break;
4508         default:
4509           break;
4510         }
4511     }
4512   va_end (args_copy);
4513   va_end (args);
4514 }
4515
4516 int
4517 main ()
4518 {
4519
4520   // Check bool.
4521   _Bool success = false;
4522
4523   // Check restrict.
4524   if (test_restrict ("String literal") == 0)
4525     success = true;
4526   char *restrict newvar = "Another string";
4527
4528   // Check varargs.
4529   test_varargs ("s, d' f .", "string", 65, 34.234);
4530   test_varargs_macros ();
4531
4532   // Check flexible array members.
4533   struct incomplete_array *ia =
4534     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4535   ia->datasize = 10;
4536   for (int i = 0; i < ia->datasize; ++i)
4537     ia->data[i] = i * 1.234;
4538
4539   // Check named initializers.
4540   struct named_init ni = {
4541     .number = 34,
4542     .name = L"Test wide string",
4543     .average = 543.34343,
4544   };
4545
4546   ni.number = 58;
4547
4548   int dynamic_array[ni.number];
4549   dynamic_array[ni.number - 1] = 543;
4550
4551   // work around unused variable warnings
4552   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4553           || dynamic_array[ni.number - 1] != 543);
4554
4555   ;
4556   return 0;
4557 }
4558 _ACEOF
4559 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4560 do
4561   CC="$ac_save_CC $ac_arg"
4562   if ac_fn_c_try_compile "$LINENO"; then :
4563   ac_cv_prog_cc_c99=$ac_arg
4564 fi
4565 rm -f core conftest.err conftest.$ac_objext
4566   test "x$ac_cv_prog_cc_c99" != "xno" && break
4567 done
4568 rm -f conftest.$ac_ext
4569 CC=$ac_save_CC
4570
4571 fi
4572 # AC_CACHE_VAL
4573 case "x$ac_cv_prog_cc_c99" in
4574   x)
4575     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4576 $as_echo "none needed" >&6; } ;;
4577   xno)
4578     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4579 $as_echo "unsupported" >&6; } ;;
4580   *)
4581     CC="$CC $ac_cv_prog_cc_c99"
4582     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4583 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4584 esac
4585 if test "x$ac_cv_prog_cc_c99" != xno; then :
4586
4587 fi
4588
4589
4590
4591 # Error out if the compiler does not support C99, as the codebase
4592 # relies on that.
4593 if test "$ac_cv_prog_cc_c99" = no; then
4594     as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4595 fi
4596
4597 ac_ext=cpp
4598 ac_cpp='$CXXCPP $CPPFLAGS'
4599 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4600 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4601 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4602 if test -z "$CXX"; then
4603   if test -n "$CCC"; then
4604     CXX=$CCC
4605   else
4606     if test -n "$ac_tool_prefix"; then
4607   for ac_prog in $pgac_cxx_list
4608   do
4609     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4610 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612 $as_echo_n "checking for $ac_word... " >&6; }
4613 if ${ac_cv_prog_CXX+:} false; then :
4614   $as_echo_n "(cached) " >&6
4615 else
4616   if test -n "$CXX"; then
4617   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4618 else
4619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4620 for as_dir in $PATH
4621 do
4622   IFS=$as_save_IFS
4623   test -z "$as_dir" && as_dir=.
4624     for ac_exec_ext in '' $ac_executable_extensions; do
4625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4626     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4628     break 2
4629   fi
4630 done
4631   done
4632 IFS=$as_save_IFS
4633
4634 fi
4635 fi
4636 CXX=$ac_cv_prog_CXX
4637 if test -n "$CXX"; then
4638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4639 $as_echo "$CXX" >&6; }
4640 else
4641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4642 $as_echo "no" >&6; }
4643 fi
4644
4645
4646     test -n "$CXX" && break
4647   done
4648 fi
4649 if test -z "$CXX"; then
4650   ac_ct_CXX=$CXX
4651   for ac_prog in $pgac_cxx_list
4652 do
4653   # Extract the first word of "$ac_prog", so it can be a program name with args.
4654 set dummy $ac_prog; ac_word=$2
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656 $as_echo_n "checking for $ac_word... " >&6; }
4657 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4658   $as_echo_n "(cached) " >&6
4659 else
4660   if test -n "$ac_ct_CXX"; then
4661   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4662 else
4663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664 for as_dir in $PATH
4665 do
4666   IFS=$as_save_IFS
4667   test -z "$as_dir" && as_dir=.
4668     for ac_exec_ext in '' $ac_executable_extensions; do
4669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4670     ac_cv_prog_ac_ct_CXX="$ac_prog"
4671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672     break 2
4673   fi
4674 done
4675   done
4676 IFS=$as_save_IFS
4677
4678 fi
4679 fi
4680 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4681 if test -n "$ac_ct_CXX"; then
4682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4683 $as_echo "$ac_ct_CXX" >&6; }
4684 else
4685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686 $as_echo "no" >&6; }
4687 fi
4688
4689
4690   test -n "$ac_ct_CXX" && break
4691 done
4692
4693   if test "x$ac_ct_CXX" = x; then
4694     CXX="g++"
4695   else
4696     case $cross_compiling:$ac_tool_warned in
4697 yes:)
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4699 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4700 ac_tool_warned=yes ;;
4701 esac
4702     CXX=$ac_ct_CXX
4703   fi
4704 fi
4705
4706   fi
4707 fi
4708 # Provide some information about the compiler.
4709 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4710 set X $ac_compile
4711 ac_compiler=$2
4712 for ac_option in --version -v -V -qversion; do
4713   { { ac_try="$ac_compiler $ac_option >&5"
4714 case "(($ac_try" in
4715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4716   *) ac_try_echo=$ac_try;;
4717 esac
4718 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4719 $as_echo "$ac_try_echo"; } >&5
4720   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4721   ac_status=$?
4722   if test -s conftest.err; then
4723     sed '10a\
4724 ... rest of stderr output deleted ...
4725          10q' conftest.err >conftest.er1
4726     cat conftest.er1 >&5
4727   fi
4728   rm -f conftest.er1 conftest.err
4729   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4730   test $ac_status = 0; }
4731 done
4732
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4734 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4735 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4736   $as_echo_n "(cached) " >&6
4737 else
4738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4739 /* end confdefs.h.  */
4740
4741 int
4742 main ()
4743 {
4744 #ifndef __GNUC__
4745        choke me
4746 #endif
4747
4748   ;
4749   return 0;
4750 }
4751 _ACEOF
4752 if ac_fn_cxx_try_compile "$LINENO"; then :
4753   ac_compiler_gnu=yes
4754 else
4755   ac_compiler_gnu=no
4756 fi
4757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4758 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4759
4760 fi
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4762 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4763 if test $ac_compiler_gnu = yes; then
4764   GXX=yes
4765 else
4766   GXX=
4767 fi
4768 ac_test_CXXFLAGS=${CXXFLAGS+set}
4769 ac_save_CXXFLAGS=$CXXFLAGS
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4771 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4772 if ${ac_cv_prog_cxx_g+:} false; then :
4773   $as_echo_n "(cached) " >&6
4774 else
4775   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4776    ac_cxx_werror_flag=yes
4777    ac_cv_prog_cxx_g=no
4778    CXXFLAGS="-g"
4779    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4780 /* end confdefs.h.  */
4781
4782 int
4783 main ()
4784 {
4785
4786   ;
4787   return 0;
4788 }
4789 _ACEOF
4790 if ac_fn_cxx_try_compile "$LINENO"; then :
4791   ac_cv_prog_cxx_g=yes
4792 else
4793   CXXFLAGS=""
4794       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4795 /* end confdefs.h.  */
4796
4797 int
4798 main ()
4799 {
4800
4801   ;
4802   return 0;
4803 }
4804 _ACEOF
4805 if ac_fn_cxx_try_compile "$LINENO"; then :
4806
4807 else
4808   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4809          CXXFLAGS="-g"
4810          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4811 /* end confdefs.h.  */
4812
4813 int
4814 main ()
4815 {
4816
4817   ;
4818   return 0;
4819 }
4820 _ACEOF
4821 if ac_fn_cxx_try_compile "$LINENO"; then :
4822   ac_cv_prog_cxx_g=yes
4823 fi
4824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4825 fi
4826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4827 fi
4828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4829    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4830 fi
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4832 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4833 if test "$ac_test_CXXFLAGS" = set; then
4834   CXXFLAGS=$ac_save_CXXFLAGS
4835 elif test $ac_cv_prog_cxx_g = yes; then
4836   if test "$GXX" = yes; then
4837     CXXFLAGS="-g -O2"
4838   else
4839     CXXFLAGS="-g"
4840   fi
4841 else
4842   if test "$GXX" = yes; then
4843     CXXFLAGS="-O2"
4844   else
4845     CXXFLAGS=
4846   fi
4847 fi
4848 ac_ext=c
4849 ac_cpp='$CPP $CPPFLAGS'
4850 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4851 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4852 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4853
4854
4855 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4856 # but has idiosyncrasies of its own.  We assume icc will define
4857 # __INTEL_COMPILER regardless of CFLAGS.
4858
4859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4860 /* end confdefs.h.  */
4861
4862 int
4863 main ()
4864 {
4865 #ifndef __INTEL_COMPILER
4866 choke me
4867 #endif
4868   ;
4869   return 0;
4870 }
4871 _ACEOF
4872 if ac_fn_c_try_compile "$LINENO"; then :
4873   ICC=yes
4874 else
4875   ICC=no
4876 fi
4877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4878
4879 # Check if it's Sun Studio compiler. We assume that
4880 # __SUNPRO_C will be defined for Sun Studio compilers
4881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4882 /* end confdefs.h.  */
4883
4884 int
4885 main ()
4886 {
4887 #ifndef __SUNPRO_C
4888 choke me
4889 #endif
4890   ;
4891   return 0;
4892 }
4893 _ACEOF
4894 if ac_fn_c_try_compile "$LINENO"; then :
4895   SUN_STUDIO_CC=yes
4896 else
4897   SUN_STUDIO_CC=no
4898 fi
4899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4900
4901
4902
4903
4904 #
4905 # LLVM
4906 #
4907 # Checked early because subsequent tests depend on it.
4908
4909
4910
4911 # Check whether --with-llvm was given.
4912 if test "${with_llvm+set}" = set; then :
4913   withval=$with_llvm;
4914   case $withval in
4915     yes)
4916
4917 $as_echo "#define USE_LLVM 1" >>confdefs.h
4918
4919       ;;
4920     no)
4921       :
4922       ;;
4923     *)
4924       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4925       ;;
4926   esac
4927
4928 else
4929   with_llvm=no
4930
4931 fi
4932
4933
4934
4935 for ac_prog in gawk mawk nawk awk
4936 do
4937   # Extract the first word of "$ac_prog", so it can be a program name with args.
4938 set dummy $ac_prog; ac_word=$2
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940 $as_echo_n "checking for $ac_word... " >&6; }
4941 if ${ac_cv_prog_AWK+:} false; then :
4942   $as_echo_n "(cached) " >&6
4943 else
4944   if test -n "$AWK"; then
4945   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4946 else
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948 for as_dir in $PATH
4949 do
4950   IFS=$as_save_IFS
4951   test -z "$as_dir" && as_dir=.
4952     for ac_exec_ext in '' $ac_executable_extensions; do
4953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4954     ac_cv_prog_AWK="$ac_prog"
4955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956     break 2
4957   fi
4958 done
4959   done
4960 IFS=$as_save_IFS
4961
4962 fi
4963 fi
4964 AWK=$ac_cv_prog_AWK
4965 if test -n "$AWK"; then
4966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4967 $as_echo "$AWK" >&6; }
4968 else
4969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970 $as_echo "no" >&6; }
4971 fi
4972
4973
4974   test -n "$AWK" && break
4975 done
4976
4977 if test "$with_llvm" = yes; then :
4978
4979
4980
4981
4982
4983   if test -z "$LLVM_CONFIG"; then
4984   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
4985 do
4986   # Extract the first word of "$ac_prog", so it can be a program name with args.
4987 set dummy $ac_prog; ac_word=$2
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4989 $as_echo_n "checking for $ac_word... " >&6; }
4990 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4991   $as_echo_n "(cached) " >&6
4992 else
4993   case $LLVM_CONFIG in
4994   [\\/]* | ?:[\\/]*)
4995   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4996   ;;
4997   *)
4998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4999 for as_dir in $PATH
5000 do
5001   IFS=$as_save_IFS
5002   test -z "$as_dir" && as_dir=.
5003     for ac_exec_ext in '' $ac_executable_extensions; do
5004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5005     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5007     break 2
5008   fi
5009 done
5010   done
5011 IFS=$as_save_IFS
5012
5013   ;;
5014 esac
5015 fi
5016 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5017 if test -n "$LLVM_CONFIG"; then
5018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5019 $as_echo "$LLVM_CONFIG" >&6; }
5020 else
5021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022 $as_echo "no" >&6; }
5023 fi
5024
5025
5026   test -n "$LLVM_CONFIG" && break
5027 done
5028
5029 else
5030   # Report the value of LLVM_CONFIG in configure's output in all cases.
5031   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5032 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5034 $as_echo "$LLVM_CONFIG" >&6; }
5035 fi
5036
5037
5038   # no point continuing if llvm wasn't found
5039   if test -z "$LLVM_CONFIG"; then
5040     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5041   fi
5042   # check if detected $LLVM_CONFIG is executable
5043   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5044   if test "x$pgac_llvm_version" = "xno"; then
5045     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5046   fi
5047   # and whether the version is supported
5048   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5049     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5050   fi
5051
5052   # need clang to create some bitcode files
5053
5054   if test -z "$CLANG"; then
5055   for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5056 do
5057   # Extract the first word of "$ac_prog", so it can be a program name with args.
5058 set dummy $ac_prog; ac_word=$2
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5060 $as_echo_n "checking for $ac_word... " >&6; }
5061 if ${ac_cv_path_CLANG+:} false; then :
5062   $as_echo_n "(cached) " >&6
5063 else
5064   case $CLANG in
5065   [\\/]* | ?:[\\/]*)
5066   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5067   ;;
5068   *)
5069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070 for as_dir in $PATH
5071 do
5072   IFS=$as_save_IFS
5073   test -z "$as_dir" && as_dir=.
5074     for ac_exec_ext in '' $ac_executable_extensions; do
5075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5076     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5078     break 2
5079   fi
5080 done
5081   done
5082 IFS=$as_save_IFS
5083
5084   ;;
5085 esac
5086 fi
5087 CLANG=$ac_cv_path_CLANG
5088 if test -n "$CLANG"; then
5089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5090 $as_echo "$CLANG" >&6; }
5091 else
5092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5093 $as_echo "no" >&6; }
5094 fi
5095
5096
5097   test -n "$CLANG" && break
5098 done
5099
5100 else
5101   # Report the value of CLANG in configure's output in all cases.
5102   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5103 $as_echo_n "checking for CLANG... " >&6; }
5104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5105 $as_echo "$CLANG" >&6; }
5106 fi
5107
5108   if test -z "$CLANG"; then
5109     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5110   fi
5111   # make sure clang is executable
5112   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5113     as_fn_error $? "$CLANG does not work" "$LINENO" 5
5114   fi
5115   # Could check clang version, but it doesn't seem that
5116   # important. Systems with a new enough LLVM version are usually
5117   # going to have a decent clang version too. It's also not entirely
5118   # clear what the minimum version is.
5119
5120   # Collect compiler flags necessary to build the LLVM dependent
5121   # shared library.
5122   for pgac_option in `$LLVM_CONFIG --cppflags`; do
5123     case $pgac_option in
5124       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5125     esac
5126   done
5127
5128   for pgac_option in `$LLVM_CONFIG --ldflags`; do
5129     case $pgac_option in
5130       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5131     esac
5132   done
5133
5134   # ABI influencing options, standard influencing options
5135   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5136     case $pgac_option in
5137       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5138       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5139     esac
5140   done
5141
5142   # Look for components we're interested in, collect necessary
5143   # libs. As some components are optional, we can't just list all of
5144   # them as it'd raise an error.
5145   pgac_components='';
5146   for pgac_component in `$LLVM_CONFIG --components`; do
5147     case $pgac_component in
5148       engine) pgac_components="$pgac_components $pgac_component";;
5149       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5150       orcjit) pgac_components="$pgac_components $pgac_component";;
5151       passes) pgac_components="$pgac_components $pgac_component";;
5152       perfjitevents) pgac_components="$pgac_components $pgac_component";;
5153     esac
5154   done;
5155
5156   # And then get the libraries that need to be linked in for the
5157   # selected components.  They're large libraries, we only want to
5158   # link them into the LLVM using shared library.
5159   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5160     case $pgac_option in
5161       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5162     esac
5163   done
5164
5165   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175 fi # fi
5176
5177
5178 unset CFLAGS
5179 unset CXXFLAGS
5180
5181 #
5182 # Read the template
5183 #
5184 . "$srcdir/src/template/$template" || exit
5185
5186 # C[XX]FLAGS are selected so:
5187 # If the user specifies something in the environment, that is used.
5188 # else:  If the template file set something, that is used.
5189 # else:  If coverage was enabled, don't set anything.
5190 # else:  If the compiler is GCC, then we use -O2.
5191 # else:  If the compiler is something else, then we use -O, unless debugging.
5192
5193 if test "$ac_env_CFLAGS_set" = set; then
5194   CFLAGS=$ac_env_CFLAGS_value
5195 elif test "${CFLAGS+set}" = set; then
5196   : # (keep what template set)
5197 elif test "$enable_coverage" = yes; then
5198   : # no optimization by default
5199 elif test "$GCC" = yes; then
5200   CFLAGS="-O2"
5201 else
5202   # if the user selected debug mode, don't use -O
5203   if test "$enable_debug" != yes; then
5204     CFLAGS="-O"
5205   fi
5206 fi
5207
5208 if test "$ac_env_CXXFLAGS_set" = set; then
5209   CXXFLAGS=$ac_env_CXXFLAGS_value
5210 elif test "${CXXFLAGS+set}" = set; then
5211   : # (keep what template set)
5212 elif test "$enable_coverage" = yes; then
5213   : # no optimization by default
5214 elif test "$GCC" = yes; then
5215   CXXFLAGS="-O2"
5216 else
5217   # if the user selected debug mode, don't use -O
5218   if test "$enable_debug" != yes; then
5219     CXXFLAGS="-O"
5220   fi
5221 fi
5222
5223 # When generating bitcode (for inlining) we always want to use -O2
5224 # even when --enable-debug is specified. The bitcode it's not going to
5225 # be used for line-by-line debugging, and JIT inlining doesn't work
5226 # without at least -O1 (otherwise clang will emit 'noinline'
5227 # attributes everywhere), which is bad for testing.  Still allow the
5228 # environment to override if done explicitly.
5229 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5230   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5231 else
5232   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5233 fi
5234 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5235   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5236 else
5237   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5238 fi
5239
5240 # C[XX]FLAGS we determined above will be added back at the end
5241 user_CFLAGS=$CFLAGS
5242 CFLAGS=""
5243 user_CXXFLAGS=$CXXFLAGS
5244 CXXFLAGS=""
5245 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5246 BITCODE_CFLAGS=""
5247 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5248 BITCODE_CXXFLAGS=""
5249
5250 # set CFLAGS_VECTOR from the environment, if available
5251 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5252   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5253 fi
5254
5255 # Some versions of GCC support some additional useful warning flags.
5256 # Check whether they are supported, and add them to CFLAGS if so.
5257 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5258 # but has its own.  Also check other compiler-specific flags here.
5259
5260 if test "$GCC" = yes -a "$ICC" = no; then
5261   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5262   CXXFLAGS="-Wall -Wpointer-arith"
5263   # These work in some but not all gcc versions
5264   save_CFLAGS=$CFLAGS
5265
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5267 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5268 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5269   $as_echo_n "(cached) " >&6
5270 else
5271   pgac_save_CFLAGS=$CFLAGS
5272 pgac_save_CC=$CC
5273 CC=${CC}
5274 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5275 ac_save_c_werror_flag=$ac_c_werror_flag
5276 ac_c_werror_flag=yes
5277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5278 /* end confdefs.h.  */
5279
5280 int
5281 main ()
5282 {
5283
5284   ;
5285   return 0;
5286 }
5287 _ACEOF
5288 if ac_fn_c_try_compile "$LINENO"; then :
5289   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5290 else
5291   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5292 fi
5293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5294 ac_c_werror_flag=$ac_save_c_werror_flag
5295 CFLAGS="$pgac_save_CFLAGS"
5296 CC="$pgac_save_CC"
5297 fi
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5299 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5300 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5301   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5302 fi
5303
5304
5305   # -Wdeclaration-after-statement isn't applicable for C++.  Specific C files
5306   # disable it, so AC_SUBST the negative form.
5307   PERMIT_DECLARATION_AFTER_STATEMENT=
5308   if test x"$save_CFLAGS" != x"$CFLAGS"; then
5309     PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5310   fi
5311
5312   # Really don't want VLAs to be used in our dialect of C
5313
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5315 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5316 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5317   $as_echo_n "(cached) " >&6
5318 else
5319   pgac_save_CFLAGS=$CFLAGS
5320 pgac_save_CC=$CC
5321 CC=${CC}
5322 CFLAGS="${CFLAGS} -Werror=vla"
5323 ac_save_c_werror_flag=$ac_c_werror_flag
5324 ac_c_werror_flag=yes
5325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5326 /* end confdefs.h.  */
5327
5328 int
5329 main ()
5330 {
5331
5332   ;
5333   return 0;
5334 }
5335 _ACEOF
5336 if ac_fn_c_try_compile "$LINENO"; then :
5337   pgac_cv_prog_CC_cflags__Werror_vla=yes
5338 else
5339   pgac_cv_prog_CC_cflags__Werror_vla=no
5340 fi
5341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5342 ac_c_werror_flag=$ac_save_c_werror_flag
5343 CFLAGS="$pgac_save_CFLAGS"
5344 CC="$pgac_save_CC"
5345 fi
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5347 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5348 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5349   CFLAGS="${CFLAGS} -Werror=vla"
5350 fi
5351
5352
5353   # -Wvla is not applicable for C++
5354
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5356 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5357 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5358   $as_echo_n "(cached) " >&6
5359 else
5360   pgac_save_CFLAGS=$CFLAGS
5361 pgac_save_CC=$CC
5362 CC=${CC}
5363 CFLAGS="${CFLAGS} -Wendif-labels"
5364 ac_save_c_werror_flag=$ac_c_werror_flag
5365 ac_c_werror_flag=yes
5366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5367 /* end confdefs.h.  */
5368
5369 int
5370 main ()
5371 {
5372
5373   ;
5374   return 0;
5375 }
5376 _ACEOF
5377 if ac_fn_c_try_compile "$LINENO"; then :
5378   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5379 else
5380   pgac_cv_prog_CC_cflags__Wendif_labels=no
5381 fi
5382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5383 ac_c_werror_flag=$ac_save_c_werror_flag
5384 CFLAGS="$pgac_save_CFLAGS"
5385 CC="$pgac_save_CC"
5386 fi
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5388 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5389 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5390   CFLAGS="${CFLAGS} -Wendif-labels"
5391 fi
5392
5393
5394   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5395 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5396 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5397   $as_echo_n "(cached) " >&6
5398 else
5399   pgac_save_CXXFLAGS=$CXXFLAGS
5400 pgac_save_CXX=$CXX
5401 CXX=${CXX}
5402 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5403 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5404 ac_cxx_werror_flag=yes
5405 ac_ext=cpp
5406 ac_cpp='$CXXCPP $CPPFLAGS'
5407 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5408 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5409 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5410
5411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5412 /* end confdefs.h.  */
5413
5414 int
5415 main ()
5416 {
5417
5418   ;
5419   return 0;
5420 }
5421 _ACEOF
5422 if ac_fn_cxx_try_compile "$LINENO"; then :
5423   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5424 else
5425   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5426 fi
5427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5428 ac_ext=c
5429 ac_cpp='$CPP $CPPFLAGS'
5430 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5431 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5432 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5433
5434 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5435 CXXFLAGS="$pgac_save_CXXFLAGS"
5436 CXX="$pgac_save_CXX"
5437 fi
5438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5439 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5440 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5441   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5442 fi
5443
5444
5445
5446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5447 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5448 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5449   $as_echo_n "(cached) " >&6
5450 else
5451   pgac_save_CFLAGS=$CFLAGS
5452 pgac_save_CC=$CC
5453 CC=${CC}
5454 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5455 ac_save_c_werror_flag=$ac_c_werror_flag
5456 ac_c_werror_flag=yes
5457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5458 /* end confdefs.h.  */
5459
5460 int
5461 main ()
5462 {
5463
5464   ;
5465   return 0;
5466 }
5467 _ACEOF
5468 if ac_fn_c_try_compile "$LINENO"; then :
5469   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5470 else
5471   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5472 fi
5473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5474 ac_c_werror_flag=$ac_save_c_werror_flag
5475 CFLAGS="$pgac_save_CFLAGS"
5476 CC="$pgac_save_CC"
5477 fi
5478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5479 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5480 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5481   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5482 fi
5483
5484
5485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5486 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5487 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5488   $as_echo_n "(cached) " >&6
5489 else
5490   pgac_save_CXXFLAGS=$CXXFLAGS
5491 pgac_save_CXX=$CXX
5492 CXX=${CXX}
5493 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5494 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5495 ac_cxx_werror_flag=yes
5496 ac_ext=cpp
5497 ac_cpp='$CXXCPP $CPPFLAGS'
5498 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5499 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5500 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5501
5502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5503 /* end confdefs.h.  */
5504
5505 int
5506 main ()
5507 {
5508
5509   ;
5510   return 0;
5511 }
5512 _ACEOF
5513 if ac_fn_cxx_try_compile "$LINENO"; then :
5514   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5515 else
5516   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5517 fi
5518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5519 ac_ext=c
5520 ac_cpp='$CPP $CPPFLAGS'
5521 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5522 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5523 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5524
5525 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5526 CXXFLAGS="$pgac_save_CXXFLAGS"
5527 CXX="$pgac_save_CXX"
5528 fi
5529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5530 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5531 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5532   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5533 fi
5534
5535
5536   # This was included in -Wall/-Wformat in older GCC versions
5537
5538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5539 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5540 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5541   $as_echo_n "(cached) " >&6
5542 else
5543   pgac_save_CFLAGS=$CFLAGS
5544 pgac_save_CC=$CC
5545 CC=${CC}
5546 CFLAGS="${CFLAGS} -Wformat-security"
5547 ac_save_c_werror_flag=$ac_c_werror_flag
5548 ac_c_werror_flag=yes
5549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5550 /* end confdefs.h.  */
5551
5552 int
5553 main ()
5554 {
5555
5556   ;
5557   return 0;
5558 }
5559 _ACEOF
5560 if ac_fn_c_try_compile "$LINENO"; then :
5561   pgac_cv_prog_CC_cflags__Wformat_security=yes
5562 else
5563   pgac_cv_prog_CC_cflags__Wformat_security=no
5564 fi
5565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5566 ac_c_werror_flag=$ac_save_c_werror_flag
5567 CFLAGS="$pgac_save_CFLAGS"
5568 CC="$pgac_save_CC"
5569 fi
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5571 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5572 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5573   CFLAGS="${CFLAGS} -Wformat-security"
5574 fi
5575
5576
5577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5578 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5579 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5580   $as_echo_n "(cached) " >&6
5581 else
5582   pgac_save_CXXFLAGS=$CXXFLAGS
5583 pgac_save_CXX=$CXX
5584 CXX=${CXX}
5585 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5586 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5587 ac_cxx_werror_flag=yes
5588 ac_ext=cpp
5589 ac_cpp='$CXXCPP $CPPFLAGS'
5590 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5591 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5592 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5593
5594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5595 /* end confdefs.h.  */
5596
5597 int
5598 main ()
5599 {
5600
5601   ;
5602   return 0;
5603 }
5604 _ACEOF
5605 if ac_fn_cxx_try_compile "$LINENO"; then :
5606   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5607 else
5608   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5609 fi
5610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5611 ac_ext=c
5612 ac_cpp='$CPP $CPPFLAGS'
5613 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5614 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5615 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5616
5617 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5618 CXXFLAGS="$pgac_save_CXXFLAGS"
5619 CXX="$pgac_save_CXX"
5620 fi
5621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5622 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5623 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5624   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5625 fi
5626
5627
5628   # Disable strict-aliasing rules; needed for gcc 3.3+
5629
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5631 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5632 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5633   $as_echo_n "(cached) " >&6
5634 else
5635   pgac_save_CFLAGS=$CFLAGS
5636 pgac_save_CC=$CC
5637 CC=${CC}
5638 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5639 ac_save_c_werror_flag=$ac_c_werror_flag
5640 ac_c_werror_flag=yes
5641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5642 /* end confdefs.h.  */
5643
5644 int
5645 main ()
5646 {
5647
5648   ;
5649   return 0;
5650 }
5651 _ACEOF
5652 if ac_fn_c_try_compile "$LINENO"; then :
5653   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5654 else
5655   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5656 fi
5657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5658 ac_c_werror_flag=$ac_save_c_werror_flag
5659 CFLAGS="$pgac_save_CFLAGS"
5660 CC="$pgac_save_CC"
5661 fi
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5663 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5664 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5665   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5666 fi
5667
5668
5669   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5670 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5671 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5672   $as_echo_n "(cached) " >&6
5673 else
5674   pgac_save_CXXFLAGS=$CXXFLAGS
5675 pgac_save_CXX=$CXX
5676 CXX=${CXX}
5677 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5678 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5679 ac_cxx_werror_flag=yes
5680 ac_ext=cpp
5681 ac_cpp='$CXXCPP $CPPFLAGS'
5682 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5683 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5684 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5685
5686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5687 /* end confdefs.h.  */
5688
5689 int
5690 main ()
5691 {
5692
5693   ;
5694   return 0;
5695 }
5696 _ACEOF
5697 if ac_fn_cxx_try_compile "$LINENO"; then :
5698   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5699 else
5700   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5701 fi
5702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5703 ac_ext=c
5704 ac_cpp='$CPP $CPPFLAGS'
5705 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5706 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5707 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5708
5709 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5710 CXXFLAGS="$pgac_save_CXXFLAGS"
5711 CXX="$pgac_save_CXX"
5712 fi
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5714 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5715 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5716   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5717 fi
5718
5719
5720   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5721
5722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5723 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5724 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5725   $as_echo_n "(cached) " >&6
5726 else
5727   pgac_save_CFLAGS=$CFLAGS
5728 pgac_save_CC=$CC
5729 CC=${CC}
5730 CFLAGS="${CFLAGS} -fwrapv"
5731 ac_save_c_werror_flag=$ac_c_werror_flag
5732 ac_c_werror_flag=yes
5733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5734 /* end confdefs.h.  */
5735
5736 int
5737 main ()
5738 {
5739
5740   ;
5741   return 0;
5742 }
5743 _ACEOF
5744 if ac_fn_c_try_compile "$LINENO"; then :
5745   pgac_cv_prog_CC_cflags__fwrapv=yes
5746 else
5747   pgac_cv_prog_CC_cflags__fwrapv=no
5748 fi
5749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5750 ac_c_werror_flag=$ac_save_c_werror_flag
5751 CFLAGS="$pgac_save_CFLAGS"
5752 CC="$pgac_save_CC"
5753 fi
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5755 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5756 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5757   CFLAGS="${CFLAGS} -fwrapv"
5758 fi
5759
5760
5761   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5762 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5763 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5764   $as_echo_n "(cached) " >&6
5765 else
5766   pgac_save_CXXFLAGS=$CXXFLAGS
5767 pgac_save_CXX=$CXX
5768 CXX=${CXX}
5769 CXXFLAGS="${CXXFLAGS} -fwrapv"
5770 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5771 ac_cxx_werror_flag=yes
5772 ac_ext=cpp
5773 ac_cpp='$CXXCPP $CPPFLAGS'
5774 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5775 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5776 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5777
5778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5779 /* end confdefs.h.  */
5780
5781 int
5782 main ()
5783 {
5784
5785   ;
5786   return 0;
5787 }
5788 _ACEOF
5789 if ac_fn_cxx_try_compile "$LINENO"; then :
5790   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5791 else
5792   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5793 fi
5794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5795 ac_ext=c
5796 ac_cpp='$CPP $CPPFLAGS'
5797 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5798 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5799 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5800
5801 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5802 CXXFLAGS="$pgac_save_CXXFLAGS"
5803 CXX="$pgac_save_CXX"
5804 fi
5805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5806 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5807 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5808   CXXFLAGS="${CXXFLAGS} -fwrapv"
5809 fi
5810
5811
5812   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5813
5814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5815 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5816 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5817   $as_echo_n "(cached) " >&6
5818 else
5819   pgac_save_CFLAGS=$CFLAGS
5820 pgac_save_CC=$CC
5821 CC=${CC}
5822 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5823 ac_save_c_werror_flag=$ac_c_werror_flag
5824 ac_c_werror_flag=yes
5825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5826 /* end confdefs.h.  */
5827
5828 int
5829 main ()
5830 {
5831
5832   ;
5833   return 0;
5834 }
5835 _ACEOF
5836 if ac_fn_c_try_compile "$LINENO"; then :
5837   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5838 else
5839   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5840 fi
5841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5842 ac_c_werror_flag=$ac_save_c_werror_flag
5843 CFLAGS="$pgac_save_CFLAGS"
5844 CC="$pgac_save_CC"
5845 fi
5846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5847 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5848 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5849   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5850 fi
5851
5852
5853   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5854 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5855 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5856   $as_echo_n "(cached) " >&6
5857 else
5858   pgac_save_CXXFLAGS=$CXXFLAGS
5859 pgac_save_CXX=$CXX
5860 CXX=${CXX}
5861 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5862 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5863 ac_cxx_werror_flag=yes
5864 ac_ext=cpp
5865 ac_cpp='$CXXCPP $CPPFLAGS'
5866 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5867 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5868 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5869
5870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5871 /* end confdefs.h.  */
5872
5873 int
5874 main ()
5875 {
5876
5877   ;
5878   return 0;
5879 }
5880 _ACEOF
5881 if ac_fn_cxx_try_compile "$LINENO"; then :
5882   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5883 else
5884   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5885 fi
5886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5887 ac_ext=c
5888 ac_cpp='$CPP $CPPFLAGS'
5889 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5890 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5891 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5892
5893 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5894 CXXFLAGS="$pgac_save_CXXFLAGS"
5895 CXX="$pgac_save_CXX"
5896 fi
5897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5898 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5899 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5900   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5901 fi
5902
5903
5904   # Optimization flags for specific files that benefit from vectorization
5905   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5906 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5907 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5908   $as_echo_n "(cached) " >&6
5909 else
5910   pgac_save_CFLAGS=$CFLAGS
5911 pgac_save_CC=$CC
5912 CC=${CC}
5913 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5914 ac_save_c_werror_flag=$ac_c_werror_flag
5915 ac_c_werror_flag=yes
5916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5917 /* end confdefs.h.  */
5918
5919 int
5920 main ()
5921 {
5922
5923   ;
5924   return 0;
5925 }
5926 _ACEOF
5927 if ac_fn_c_try_compile "$LINENO"; then :
5928   pgac_cv_prog_CC_cflags__funroll_loops=yes
5929 else
5930   pgac_cv_prog_CC_cflags__funroll_loops=no
5931 fi
5932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5933 ac_c_werror_flag=$ac_save_c_werror_flag
5934 CFLAGS="$pgac_save_CFLAGS"
5935 CC="$pgac_save_CC"
5936 fi
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5938 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5939 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5940   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5941 fi
5942
5943
5944   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5945 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5946 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5947   $as_echo_n "(cached) " >&6
5948 else
5949   pgac_save_CFLAGS=$CFLAGS
5950 pgac_save_CC=$CC
5951 CC=${CC}
5952 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5953 ac_save_c_werror_flag=$ac_c_werror_flag
5954 ac_c_werror_flag=yes
5955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5956 /* end confdefs.h.  */
5957
5958 int
5959 main ()
5960 {
5961
5962   ;
5963   return 0;
5964 }
5965 _ACEOF
5966 if ac_fn_c_try_compile "$LINENO"; then :
5967   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5968 else
5969   pgac_cv_prog_CC_cflags__ftree_vectorize=no
5970 fi
5971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5972 ac_c_werror_flag=$ac_save_c_werror_flag
5973 CFLAGS="$pgac_save_CFLAGS"
5974 CC="$pgac_save_CC"
5975 fi
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5977 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5978 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5979   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5980 fi
5981
5982
5983   # We want to suppress clang's unhelpful unused-command-line-argument warnings
5984   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5985   # test for the positive form and if that works, add the negative form
5986   NOT_THE_CFLAGS=""
5987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5988 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5989 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
5990   $as_echo_n "(cached) " >&6
5991 else
5992   pgac_save_CFLAGS=$CFLAGS
5993 pgac_save_CC=$CC
5994 CC=${CC}
5995 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5996 ac_save_c_werror_flag=$ac_c_werror_flag
5997 ac_c_werror_flag=yes
5998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5999 /* end confdefs.h.  */
6000
6001 int
6002 main ()
6003 {
6004
6005   ;
6006   return 0;
6007 }
6008 _ACEOF
6009 if ac_fn_c_try_compile "$LINENO"; then :
6010   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6011 else
6012   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6013 fi
6014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6015 ac_c_werror_flag=$ac_save_c_werror_flag
6016 CFLAGS="$pgac_save_CFLAGS"
6017 CC="$pgac_save_CC"
6018 fi
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6020 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6021 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6022   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6023 fi
6024
6025
6026   if test -n "$NOT_THE_CFLAGS"; then
6027     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6028   fi
6029   # Similarly disable useless truncation warnings from gcc 8+
6030   NOT_THE_CFLAGS=""
6031   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6032 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6033 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6034   $as_echo_n "(cached) " >&6
6035 else
6036   pgac_save_CFLAGS=$CFLAGS
6037 pgac_save_CC=$CC
6038 CC=${CC}
6039 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6040 ac_save_c_werror_flag=$ac_c_werror_flag
6041 ac_c_werror_flag=yes
6042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6043 /* end confdefs.h.  */
6044
6045 int
6046 main ()
6047 {
6048
6049   ;
6050   return 0;
6051 }
6052 _ACEOF
6053 if ac_fn_c_try_compile "$LINENO"; then :
6054   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6055 else
6056   pgac_cv_prog_CC_cflags__Wformat_truncation=no
6057 fi
6058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6059 ac_c_werror_flag=$ac_save_c_werror_flag
6060 CFLAGS="$pgac_save_CFLAGS"
6061 CC="$pgac_save_CC"
6062 fi
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6064 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6065 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6066   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6067 fi
6068
6069
6070   if test -n "$NOT_THE_CFLAGS"; then
6071     CFLAGS="$CFLAGS -Wno-format-truncation"
6072   fi
6073   NOT_THE_CFLAGS=""
6074   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6075 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6076 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6077   $as_echo_n "(cached) " >&6
6078 else
6079   pgac_save_CFLAGS=$CFLAGS
6080 pgac_save_CC=$CC
6081 CC=${CC}
6082 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6083 ac_save_c_werror_flag=$ac_c_werror_flag
6084 ac_c_werror_flag=yes
6085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6086 /* end confdefs.h.  */
6087
6088 int
6089 main ()
6090 {
6091
6092   ;
6093   return 0;
6094 }
6095 _ACEOF
6096 if ac_fn_c_try_compile "$LINENO"; then :
6097   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6098 else
6099   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6100 fi
6101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6102 ac_c_werror_flag=$ac_save_c_werror_flag
6103 CFLAGS="$pgac_save_CFLAGS"
6104 CC="$pgac_save_CC"
6105 fi
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6107 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6108 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6109   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6110 fi
6111
6112
6113   if test -n "$NOT_THE_CFLAGS"; then
6114     CFLAGS="$CFLAGS -Wno-stringop-truncation"
6115   fi
6116 elif test "$ICC" = yes; then
6117   # Intel's compiler has a bug/misoptimization in checking for
6118   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6119
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6121 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6122 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6123   $as_echo_n "(cached) " >&6
6124 else
6125   pgac_save_CFLAGS=$CFLAGS
6126 pgac_save_CC=$CC
6127 CC=${CC}
6128 CFLAGS="${CFLAGS} -mp1"
6129 ac_save_c_werror_flag=$ac_c_werror_flag
6130 ac_c_werror_flag=yes
6131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6132 /* end confdefs.h.  */
6133
6134 int
6135 main ()
6136 {
6137
6138   ;
6139   return 0;
6140 }
6141 _ACEOF
6142 if ac_fn_c_try_compile "$LINENO"; then :
6143   pgac_cv_prog_CC_cflags__mp1=yes
6144 else
6145   pgac_cv_prog_CC_cflags__mp1=no
6146 fi
6147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6148 ac_c_werror_flag=$ac_save_c_werror_flag
6149 CFLAGS="$pgac_save_CFLAGS"
6150 CC="$pgac_save_CC"
6151 fi
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6153 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6154 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6155   CFLAGS="${CFLAGS} -mp1"
6156 fi
6157
6158
6159   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6160 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6161 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6162   $as_echo_n "(cached) " >&6
6163 else
6164   pgac_save_CXXFLAGS=$CXXFLAGS
6165 pgac_save_CXX=$CXX
6166 CXX=${CXX}
6167 CXXFLAGS="${CXXFLAGS} -mp1"
6168 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6169 ac_cxx_werror_flag=yes
6170 ac_ext=cpp
6171 ac_cpp='$CXXCPP $CPPFLAGS'
6172 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6173 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6174 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6175
6176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6177 /* end confdefs.h.  */
6178
6179 int
6180 main ()
6181 {
6182
6183   ;
6184   return 0;
6185 }
6186 _ACEOF
6187 if ac_fn_cxx_try_compile "$LINENO"; then :
6188   pgac_cv_prog_CXX_cxxflags__mp1=yes
6189 else
6190   pgac_cv_prog_CXX_cxxflags__mp1=no
6191 fi
6192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6193 ac_ext=c
6194 ac_cpp='$CPP $CPPFLAGS'
6195 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6196 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6197 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6198
6199 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6200 CXXFLAGS="$pgac_save_CXXFLAGS"
6201 CXX="$pgac_save_CXX"
6202 fi
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6204 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6205 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6206   CXXFLAGS="${CXXFLAGS} -mp1"
6207 fi
6208
6209
6210   # Make sure strict aliasing is off (though this is said to be the default)
6211
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6213 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6214 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6215   $as_echo_n "(cached) " >&6
6216 else
6217   pgac_save_CFLAGS=$CFLAGS
6218 pgac_save_CC=$CC
6219 CC=${CC}
6220 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6221 ac_save_c_werror_flag=$ac_c_werror_flag
6222 ac_c_werror_flag=yes
6223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6224 /* end confdefs.h.  */
6225
6226 int
6227 main ()
6228 {
6229
6230   ;
6231   return 0;
6232 }
6233 _ACEOF
6234 if ac_fn_c_try_compile "$LINENO"; then :
6235   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6236 else
6237   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6238 fi
6239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6240 ac_c_werror_flag=$ac_save_c_werror_flag
6241 CFLAGS="$pgac_save_CFLAGS"
6242 CC="$pgac_save_CC"
6243 fi
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6245 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6246 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6247   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6248 fi
6249
6250
6251   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6252 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6253 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6254   $as_echo_n "(cached) " >&6
6255 else
6256   pgac_save_CXXFLAGS=$CXXFLAGS
6257 pgac_save_CXX=$CXX
6258 CXX=${CXX}
6259 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6260 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6261 ac_cxx_werror_flag=yes
6262 ac_ext=cpp
6263 ac_cpp='$CXXCPP $CPPFLAGS'
6264 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6265 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6266 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6267
6268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6269 /* end confdefs.h.  */
6270
6271 int
6272 main ()
6273 {
6274
6275   ;
6276   return 0;
6277 }
6278 _ACEOF
6279 if ac_fn_cxx_try_compile "$LINENO"; then :
6280   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6281 else
6282   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6283 fi
6284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6285 ac_ext=c
6286 ac_cpp='$CPP $CPPFLAGS'
6287 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6288 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6289 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6290
6291 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6292 CXXFLAGS="$pgac_save_CXXFLAGS"
6293 CXX="$pgac_save_CXX"
6294 fi
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6296 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6297 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6298   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6299 fi
6300
6301
6302 elif test "$PORTNAME" = "aix"; then
6303   # AIX's xlc has to have strict aliasing turned off too
6304
6305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6306 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6307 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6308   $as_echo_n "(cached) " >&6
6309 else
6310   pgac_save_CFLAGS=$CFLAGS
6311 pgac_save_CC=$CC
6312 CC=${CC}
6313 CFLAGS="${CFLAGS} -qnoansialias"
6314 ac_save_c_werror_flag=$ac_c_werror_flag
6315 ac_c_werror_flag=yes
6316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6317 /* end confdefs.h.  */
6318
6319 int
6320 main ()
6321 {
6322
6323   ;
6324   return 0;
6325 }
6326 _ACEOF
6327 if ac_fn_c_try_compile "$LINENO"; then :
6328   pgac_cv_prog_CC_cflags__qnoansialias=yes
6329 else
6330   pgac_cv_prog_CC_cflags__qnoansialias=no
6331 fi
6332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6333 ac_c_werror_flag=$ac_save_c_werror_flag
6334 CFLAGS="$pgac_save_CFLAGS"
6335 CC="$pgac_save_CC"
6336 fi
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6338 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6339 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6340   CFLAGS="${CFLAGS} -qnoansialias"
6341 fi
6342
6343
6344   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6345 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6346 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6347   $as_echo_n "(cached) " >&6
6348 else
6349   pgac_save_CXXFLAGS=$CXXFLAGS
6350 pgac_save_CXX=$CXX
6351 CXX=${CXX}
6352 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6353 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6354 ac_cxx_werror_flag=yes
6355 ac_ext=cpp
6356 ac_cpp='$CXXCPP $CPPFLAGS'
6357 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6358 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6359 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6360
6361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6362 /* end confdefs.h.  */
6363
6364 int
6365 main ()
6366 {
6367
6368   ;
6369   return 0;
6370 }
6371 _ACEOF
6372 if ac_fn_cxx_try_compile "$LINENO"; then :
6373   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6374 else
6375   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6376 fi
6377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6378 ac_ext=c
6379 ac_cpp='$CPP $CPPFLAGS'
6380 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6381 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6382 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6383
6384 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6385 CXXFLAGS="$pgac_save_CXXFLAGS"
6386 CXX="$pgac_save_CXX"
6387 fi
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6389 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6390 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6391   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6392 fi
6393
6394
6395
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6397 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6398 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6399   $as_echo_n "(cached) " >&6
6400 else
6401   pgac_save_CFLAGS=$CFLAGS
6402 pgac_save_CC=$CC
6403 CC=${CC}
6404 CFLAGS="${CFLAGS} -qlonglong"
6405 ac_save_c_werror_flag=$ac_c_werror_flag
6406 ac_c_werror_flag=yes
6407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6408 /* end confdefs.h.  */
6409
6410 int
6411 main ()
6412 {
6413
6414   ;
6415   return 0;
6416 }
6417 _ACEOF
6418 if ac_fn_c_try_compile "$LINENO"; then :
6419   pgac_cv_prog_CC_cflags__qlonglong=yes
6420 else
6421   pgac_cv_prog_CC_cflags__qlonglong=no
6422 fi
6423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6424 ac_c_werror_flag=$ac_save_c_werror_flag
6425 CFLAGS="$pgac_save_CFLAGS"
6426 CC="$pgac_save_CC"
6427 fi
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6429 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6430 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6431   CFLAGS="${CFLAGS} -qlonglong"
6432 fi
6433
6434
6435   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6436 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6437 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6438   $as_echo_n "(cached) " >&6
6439 else
6440   pgac_save_CXXFLAGS=$CXXFLAGS
6441 pgac_save_CXX=$CXX
6442 CXX=${CXX}
6443 CXXFLAGS="${CXXFLAGS} -qlonglong"
6444 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6445 ac_cxx_werror_flag=yes
6446 ac_ext=cpp
6447 ac_cpp='$CXXCPP $CPPFLAGS'
6448 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6449 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6450 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6451
6452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6453 /* end confdefs.h.  */
6454
6455 int
6456 main ()
6457 {
6458
6459   ;
6460   return 0;
6461 }
6462 _ACEOF
6463 if ac_fn_cxx_try_compile "$LINENO"; then :
6464   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6465 else
6466   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6467 fi
6468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6469 ac_ext=c
6470 ac_cpp='$CPP $CPPFLAGS'
6471 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6472 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6473 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6474
6475 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6476 CXXFLAGS="$pgac_save_CXXFLAGS"
6477 CXX="$pgac_save_CXX"
6478 fi
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6480 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6481 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6482   CXXFLAGS="${CXXFLAGS} -qlonglong"
6483 fi
6484
6485
6486 elif test "$PORTNAME" = "hpux"; then
6487   # On some versions of HP-UX, libm functions do not set errno by default.
6488   # Fix that by using +Olibmerrno if the compiler recognizes it.
6489
6490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6491 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6492 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6493   $as_echo_n "(cached) " >&6
6494 else
6495   pgac_save_CFLAGS=$CFLAGS
6496 pgac_save_CC=$CC
6497 CC=${CC}
6498 CFLAGS="${CFLAGS} +Olibmerrno"
6499 ac_save_c_werror_flag=$ac_c_werror_flag
6500 ac_c_werror_flag=yes
6501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6502 /* end confdefs.h.  */
6503
6504 int
6505 main ()
6506 {
6507
6508   ;
6509   return 0;
6510 }
6511 _ACEOF
6512 if ac_fn_c_try_compile "$LINENO"; then :
6513   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6514 else
6515   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6516 fi
6517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6518 ac_c_werror_flag=$ac_save_c_werror_flag
6519 CFLAGS="$pgac_save_CFLAGS"
6520 CC="$pgac_save_CC"
6521 fi
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6523 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6524 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6525   CFLAGS="${CFLAGS} +Olibmerrno"
6526 fi
6527
6528
6529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6530 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6531 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6532   $as_echo_n "(cached) " >&6
6533 else
6534   pgac_save_CXXFLAGS=$CXXFLAGS
6535 pgac_save_CXX=$CXX
6536 CXX=${CXX}
6537 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6538 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6539 ac_cxx_werror_flag=yes
6540 ac_ext=cpp
6541 ac_cpp='$CXXCPP $CPPFLAGS'
6542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6545
6546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6547 /* end confdefs.h.  */
6548
6549 int
6550 main ()
6551 {
6552
6553   ;
6554   return 0;
6555 }
6556 _ACEOF
6557 if ac_fn_cxx_try_compile "$LINENO"; then :
6558   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6559 else
6560   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6561 fi
6562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6563 ac_ext=c
6564 ac_cpp='$CPP $CPPFLAGS'
6565 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6566 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6567 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6568
6569 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6570 CXXFLAGS="$pgac_save_CXXFLAGS"
6571 CXX="$pgac_save_CXX"
6572 fi
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6574 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6575 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6576   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6577 fi
6578
6579
6580 fi
6581
6582 CFLAGS_VECTOR=$CFLAGS_VECTOR
6583
6584
6585 # Determine flags used to emit bitcode for JIT inlining. Need to test
6586 # for behaviour changing compiler flags, to keep compatibility with
6587 # compiler used for normal postgres code.
6588 if test "$with_llvm" = yes ; then
6589   CLANGXX="$CLANG -xc++"
6590
6591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6592 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6593 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6594   $as_echo_n "(cached) " >&6
6595 else
6596   pgac_save_CFLAGS=$CFLAGS
6597 pgac_save_CC=$CC
6598 CC=${CLANG}
6599 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6600 ac_save_c_werror_flag=$ac_c_werror_flag
6601 ac_c_werror_flag=yes
6602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6603 /* end confdefs.h.  */
6604
6605 int
6606 main ()
6607 {
6608
6609   ;
6610   return 0;
6611 }
6612 _ACEOF
6613 if ac_fn_c_try_compile "$LINENO"; then :
6614   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6615 else
6616   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6617 fi
6618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6619 ac_c_werror_flag=$ac_save_c_werror_flag
6620 CFLAGS="$pgac_save_CFLAGS"
6621 CC="$pgac_save_CC"
6622 fi
6623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6624 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6625 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6626   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6627 fi
6628
6629   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6630 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6631 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6632   $as_echo_n "(cached) " >&6
6633 else
6634   pgac_save_CXXFLAGS=$CXXFLAGS
6635 pgac_save_CXX=$CXX
6636 CXX=${CLANGXX}
6637 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6638 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6639 ac_cxx_werror_flag=yes
6640 ac_ext=cpp
6641 ac_cpp='$CXXCPP $CPPFLAGS'
6642 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6643 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6644 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6645
6646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6647 /* end confdefs.h.  */
6648
6649 int
6650 main ()
6651 {
6652
6653   ;
6654   return 0;
6655 }
6656 _ACEOF
6657 if ac_fn_cxx_try_compile "$LINENO"; then :
6658   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6659 else
6660   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6661 fi
6662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6663 ac_ext=c
6664 ac_cpp='$CPP $CPPFLAGS'
6665 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6666 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6667 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6668
6669 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6670 CXXFLAGS="$pgac_save_CXXFLAGS"
6671 CXX="$pgac_save_CXX"
6672 fi
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6674 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6675 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6676   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6677 fi
6678
6679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6680 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6681 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6682   $as_echo_n "(cached) " >&6
6683 else
6684   pgac_save_CFLAGS=$CFLAGS
6685 pgac_save_CC=$CC
6686 CC=${CLANG}
6687 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6688 ac_save_c_werror_flag=$ac_c_werror_flag
6689 ac_c_werror_flag=yes
6690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6691 /* end confdefs.h.  */
6692
6693 int
6694 main ()
6695 {
6696
6697   ;
6698   return 0;
6699 }
6700 _ACEOF
6701 if ac_fn_c_try_compile "$LINENO"; then :
6702   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6703 else
6704   pgac_cv_prog_CLANG_cflags__fwrapv=no
6705 fi
6706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6707 ac_c_werror_flag=$ac_save_c_werror_flag
6708 CFLAGS="$pgac_save_CFLAGS"
6709 CC="$pgac_save_CC"
6710 fi
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6712 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6713 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6714   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6715 fi
6716
6717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6718 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6719 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6720   $as_echo_n "(cached) " >&6
6721 else
6722   pgac_save_CXXFLAGS=$CXXFLAGS
6723 pgac_save_CXX=$CXX
6724 CXX=${CLANGXX}
6725 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6726 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6727 ac_cxx_werror_flag=yes
6728 ac_ext=cpp
6729 ac_cpp='$CXXCPP $CPPFLAGS'
6730 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6731 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6732 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6733
6734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6735 /* end confdefs.h.  */
6736
6737 int
6738 main ()
6739 {
6740
6741   ;
6742   return 0;
6743 }
6744 _ACEOF
6745 if ac_fn_cxx_try_compile "$LINENO"; then :
6746   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6747 else
6748   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6749 fi
6750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6751 ac_ext=c
6752 ac_cpp='$CPP $CPPFLAGS'
6753 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6754 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6755 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6756
6757 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6758 CXXFLAGS="$pgac_save_CXXFLAGS"
6759 CXX="$pgac_save_CXX"
6760 fi
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6762 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6763 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6764   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6765 fi
6766
6767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6768 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6769 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6770   $as_echo_n "(cached) " >&6
6771 else
6772   pgac_save_CFLAGS=$CFLAGS
6773 pgac_save_CC=$CC
6774 CC=${CLANG}
6775 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6776 ac_save_c_werror_flag=$ac_c_werror_flag
6777 ac_c_werror_flag=yes
6778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6779 /* end confdefs.h.  */
6780
6781 int
6782 main ()
6783 {
6784
6785   ;
6786   return 0;
6787 }
6788 _ACEOF
6789 if ac_fn_c_try_compile "$LINENO"; then :
6790   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6791 else
6792   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6793 fi
6794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6795 ac_c_werror_flag=$ac_save_c_werror_flag
6796 CFLAGS="$pgac_save_CFLAGS"
6797 CC="$pgac_save_CC"
6798 fi
6799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6800 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6801 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6802   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6803 fi
6804
6805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6806 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6807 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6808   $as_echo_n "(cached) " >&6
6809 else
6810   pgac_save_CXXFLAGS=$CXXFLAGS
6811 pgac_save_CXX=$CXX
6812 CXX=${CLANGXX}
6813 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6814 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6815 ac_cxx_werror_flag=yes
6816 ac_ext=cpp
6817 ac_cpp='$CXXCPP $CPPFLAGS'
6818 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6819 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6820 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6821
6822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6823 /* end confdefs.h.  */
6824
6825 int
6826 main ()
6827 {
6828
6829   ;
6830   return 0;
6831 }
6832 _ACEOF
6833 if ac_fn_cxx_try_compile "$LINENO"; then :
6834   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6835 else
6836   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6837 fi
6838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6839 ac_ext=c
6840 ac_cpp='$CPP $CPPFLAGS'
6841 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6842 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6843 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6844
6845 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6846 CXXFLAGS="$pgac_save_CXXFLAGS"
6847 CXX="$pgac_save_CXX"
6848 fi
6849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6850 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6851 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6852   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6853 fi
6854
6855 fi
6856
6857 # supply -g if --enable-debug
6858 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6859   CFLAGS="$CFLAGS -g"
6860 fi
6861
6862 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6863   CXXFLAGS="$CXXFLAGS -g"
6864 fi
6865
6866 # enable code coverage if --enable-coverage
6867 if test "$enable_coverage" = yes; then
6868   if test "$GCC" = yes; then
6869     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6870     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6871   else
6872     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6873   fi
6874 fi
6875
6876 # enable profiling if --enable-profiling
6877 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6878   if test "$GCC" = yes; then
6879
6880 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6881
6882     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6883     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6884   else
6885     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6886   fi
6887 fi
6888
6889 # We already have this in Makefile.win32, but configure needs it too
6890 if test "$PORTNAME" = "win32"; then
6891   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6892 fi
6893
6894 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6895 # user-specified flags (if any) at the end.  This lets users override
6896 # the automatic additions.
6897 CFLAGS="$CFLAGS $user_CFLAGS"
6898 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6899 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6900 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6901
6902 BITCODE_CFLAGS=$BITCODE_CFLAGS
6903
6904 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6905
6906
6907 # Check if the compiler still works with the final flag settings
6908 # (note, we're not checking that for CXX, which is optional)
6909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6910 $as_echo_n "checking whether the C compiler still works... " >&6; }
6911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6912 /* end confdefs.h.  */
6913
6914 int
6915 main ()
6916 {
6917 return 0;
6918   ;
6919   return 0;
6920 }
6921 _ACEOF
6922 if ac_fn_c_try_link "$LINENO"; then :
6923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6924 $as_echo "yes" >&6; }
6925 else
6926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6927 $as_echo "no" >&6; }
6928    as_fn_error $? "cannot proceed" "$LINENO" 5
6929 fi
6930 rm -f core conftest.err conftest.$ac_objext \
6931     conftest$ac_exeext conftest.$ac_ext
6932
6933 # Defend against gcc -ffast-math
6934 if test "$GCC" = yes; then
6935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6936 /* end confdefs.h.  */
6937
6938 int
6939 main ()
6940 {
6941 #ifdef __FAST_MATH__
6942 choke me
6943 #endif
6944   ;
6945   return 0;
6946 }
6947 _ACEOF
6948 if ac_fn_c_try_compile "$LINENO"; then :
6949
6950 else
6951   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6952 fi
6953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6954 fi
6955
6956 # Defend against clang being used on x86-32 without SSE2 enabled.  As current
6957 # versions of clang do not understand -fexcess-precision=standard, the use of
6958 # x87 floating point operations leads to problems like isinf possibly returning
6959 # false for a value that is infinite when converted from the 80bit register to
6960 # the 8byte memory representation.
6961 #
6962 # Only perform the test if the compiler doesn't understand
6963 # -fexcess-precision=standard, that way a potentially fixed compiler will work
6964 # automatically.
6965 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6967 /* end confdefs.h.  */
6968
6969 int
6970 main ()
6971 {
6972
6973 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6974 choke me
6975 #endif
6976
6977   ;
6978   return 0;
6979 }
6980 _ACEOF
6981 if ac_fn_c_try_compile "$LINENO"; then :
6982
6983 else
6984   as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
6985 fi
6986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6987 fi
6988
6989 ac_ext=c
6990 ac_cpp='$CPP $CPPFLAGS'
6991 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6992 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6993 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6995 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6996 # On Suns, sometimes $CPP names a directory.
6997 if test -n "$CPP" && test -d "$CPP"; then
6998   CPP=
6999 fi
7000 if test -z "$CPP"; then
7001   if ${ac_cv_prog_CPP+:} false; then :
7002   $as_echo_n "(cached) " >&6
7003 else
7004       # Double quotes because CPP needs to be expanded
7005     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7006     do
7007       ac_preproc_ok=false
7008 for ac_c_preproc_warn_flag in '' yes
7009 do
7010   # Use a header file that comes with gcc, so configuring glibc
7011   # with a fresh cross-compiler works.
7012   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7013   # <limits.h> exists even on freestanding compilers.
7014   # On the NeXT, cc -E runs the code through the compiler's parser,
7015   # not just through cpp. "Syntax error" is here to catch this case.
7016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7017 /* end confdefs.h.  */
7018 #ifdef __STDC__
7019 # include <limits.h>
7020 #else
7021 # include <assert.h>
7022 #endif
7023                      Syntax error
7024 _ACEOF
7025 if ac_fn_c_try_cpp "$LINENO"; then :
7026
7027 else
7028   # Broken: fails on valid input.
7029 continue
7030 fi
7031 rm -f conftest.err conftest.i conftest.$ac_ext
7032
7033   # OK, works on sane cases.  Now check whether nonexistent headers
7034   # can be detected and how.
7035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7036 /* end confdefs.h.  */
7037 #include <ac_nonexistent.h>
7038 _ACEOF
7039 if ac_fn_c_try_cpp "$LINENO"; then :
7040   # Broken: success on invalid input.
7041 continue
7042 else
7043   # Passes both tests.
7044 ac_preproc_ok=:
7045 break
7046 fi
7047 rm -f conftest.err conftest.i conftest.$ac_ext
7048
7049 done
7050 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7051 rm -f conftest.i conftest.err conftest.$ac_ext
7052 if $ac_preproc_ok; then :
7053   break
7054 fi
7055
7056     done
7057     ac_cv_prog_CPP=$CPP
7058
7059 fi
7060   CPP=$ac_cv_prog_CPP
7061 else
7062   ac_cv_prog_CPP=$CPP
7063 fi
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7065 $as_echo "$CPP" >&6; }
7066 ac_preproc_ok=false
7067 for ac_c_preproc_warn_flag in '' yes
7068 do
7069   # Use a header file that comes with gcc, so configuring glibc
7070   # with a fresh cross-compiler works.
7071   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7072   # <limits.h> exists even on freestanding compilers.
7073   # On the NeXT, cc -E runs the code through the compiler's parser,
7074   # not just through cpp. "Syntax error" is here to catch this case.
7075   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7076 /* end confdefs.h.  */
7077 #ifdef __STDC__
7078 # include <limits.h>
7079 #else
7080 # include <assert.h>
7081 #endif
7082                      Syntax error
7083 _ACEOF
7084 if ac_fn_c_try_cpp "$LINENO"; then :
7085
7086 else
7087   # Broken: fails on valid input.
7088 continue
7089 fi
7090 rm -f conftest.err conftest.i conftest.$ac_ext
7091
7092   # OK, works on sane cases.  Now check whether nonexistent headers
7093   # can be detected and how.
7094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7095 /* end confdefs.h.  */
7096 #include <ac_nonexistent.h>
7097 _ACEOF
7098 if ac_fn_c_try_cpp "$LINENO"; then :
7099   # Broken: success on invalid input.
7100 continue
7101 else
7102   # Passes both tests.
7103 ac_preproc_ok=:
7104 break
7105 fi
7106 rm -f conftest.err conftest.i conftest.$ac_ext
7107
7108 done
7109 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7110 rm -f conftest.i conftest.err conftest.$ac_ext
7111 if $ac_preproc_ok; then :
7112
7113 else
7114   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7115 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7116 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7117 See \`config.log' for more details" "$LINENO" 5; }
7118 fi
7119
7120 ac_ext=c
7121 ac_cpp='$CPP $CPPFLAGS'
7122 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7123 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7124 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7125
7126
7127
7128
7129 #
7130 # Set up TAS assembly code if needed; the template file has now had its
7131 # chance to request this.
7132 #
7133 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7134
7135
7136 if test "$need_tas" = yes ; then
7137   TAS=tas.o
7138 else
7139   TAS=""
7140 fi
7141
7142
7143
7144 #
7145 # Automatic dependency tracking
7146 #
7147
7148
7149 # Check whether --enable-depend was given.
7150 if test "${enable_depend+set}" = set; then :
7151   enableval=$enable_depend;
7152   case $enableval in
7153     yes)
7154       autodepend=yes
7155       ;;
7156     no)
7157       :
7158       ;;
7159     *)
7160       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7161       ;;
7162   esac
7163
7164 else
7165   enable_depend=no
7166
7167 fi
7168
7169
7170
7171
7172
7173 #
7174 # Enable assert checks
7175 #
7176
7177
7178 # Check whether --enable-cassert was given.
7179 if test "${enable_cassert+set}" = set; then :
7180   enableval=$enable_cassert;
7181   case $enableval in
7182     yes)
7183
7184 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7185
7186       ;;
7187     no)
7188       :
7189       ;;
7190     *)
7191       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7192       ;;
7193   esac
7194
7195 else
7196   enable_cassert=no
7197
7198 fi
7199
7200
7201
7202
7203 #
7204 # Include directories
7205 #
7206 ac_save_IFS=$IFS
7207 IFS="${IFS}${PATH_SEPARATOR}"
7208 # SRCH_INC comes from the template file
7209 for dir in $with_includes $SRCH_INC; do
7210   if test -d "$dir"; then
7211     INCLUDES="$INCLUDES -I$dir"
7212   else
7213     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7214 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7215   fi
7216 done
7217 IFS=$ac_save_IFS
7218
7219
7220
7221 #
7222 # Library directories
7223 #
7224 ac_save_IFS=$IFS
7225 IFS="${IFS}${PATH_SEPARATOR}"
7226 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7227 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7228   if test -d "$dir"; then
7229     LIBDIRS="$LIBDIRS -L$dir"
7230   else
7231     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7232 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7233   fi
7234 done
7235 IFS=$ac_save_IFS
7236
7237 #
7238 # Enable thread-safe client libraries
7239 #
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7241 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7242
7243
7244 # Check whether --enable-thread-safety was given.
7245 if test "${enable_thread_safety+set}" = set; then :
7246   enableval=$enable_thread_safety;
7247   case $enableval in
7248     yes)
7249       :
7250       ;;
7251     no)
7252       :
7253       ;;
7254     *)
7255       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7256       ;;
7257   esac
7258
7259 else
7260   enable_thread_safety=yes
7261
7262 fi
7263
7264
7265 if test "$enable_thread_safety" = yes; then
7266
7267 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7268
7269 fi
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7271 $as_echo "$enable_thread_safety" >&6; }
7272
7273
7274 #
7275 # ICU
7276 #
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7278 $as_echo_n "checking whether to build with ICU support... " >&6; }
7279
7280
7281
7282 # Check whether --with-icu was given.
7283 if test "${with_icu+set}" = set; then :
7284   withval=$with_icu;
7285   case $withval in
7286     yes)
7287
7288 $as_echo "#define USE_ICU 1" >>confdefs.h
7289
7290       ;;
7291     no)
7292       :
7293       ;;
7294     *)
7295       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7296       ;;
7297   esac
7298
7299 else
7300   with_icu=no
7301
7302 fi
7303
7304
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7306 $as_echo "$with_icu" >&6; }
7307
7308
7309 if test "$with_icu" = yes; then
7310
7311
7312
7313
7314
7315
7316
7317 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7318         if test -n "$ac_tool_prefix"; then
7319   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7320 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7322 $as_echo_n "checking for $ac_word... " >&6; }
7323 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7324   $as_echo_n "(cached) " >&6
7325 else
7326   case $PKG_CONFIG in
7327   [\\/]* | ?:[\\/]*)
7328   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7329   ;;
7330   *)
7331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7332 for as_dir in $PATH
7333 do
7334   IFS=$as_save_IFS
7335   test -z "$as_dir" && as_dir=.
7336     for ac_exec_ext in '' $ac_executable_extensions; do
7337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7338     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7340     break 2
7341   fi
7342 done
7343   done
7344 IFS=$as_save_IFS
7345
7346   ;;
7347 esac
7348 fi
7349 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7350 if test -n "$PKG_CONFIG"; then
7351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7352 $as_echo "$PKG_CONFIG" >&6; }
7353 else
7354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7355 $as_echo "no" >&6; }
7356 fi
7357
7358
7359 fi
7360 if test -z "$ac_cv_path_PKG_CONFIG"; then
7361   ac_pt_PKG_CONFIG=$PKG_CONFIG
7362   # Extract the first word of "pkg-config", so it can be a program name with args.
7363 set dummy pkg-config; ac_word=$2
7364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7365 $as_echo_n "checking for $ac_word... " >&6; }
7366 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7367   $as_echo_n "(cached) " >&6
7368 else
7369   case $ac_pt_PKG_CONFIG in
7370   [\\/]* | ?:[\\/]*)
7371   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7372   ;;
7373   *)
7374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7375 for as_dir in $PATH
7376 do
7377   IFS=$as_save_IFS
7378   test -z "$as_dir" && as_dir=.
7379     for ac_exec_ext in '' $ac_executable_extensions; do
7380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7381     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7383     break 2
7384   fi
7385 done
7386   done
7387 IFS=$as_save_IFS
7388
7389   ;;
7390 esac
7391 fi
7392 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7393 if test -n "$ac_pt_PKG_CONFIG"; then
7394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7395 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7396 else
7397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7398 $as_echo "no" >&6; }
7399 fi
7400
7401   if test "x$ac_pt_PKG_CONFIG" = x; then
7402     PKG_CONFIG=""
7403   else
7404     case $cross_compiling:$ac_tool_warned in
7405 yes:)
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7407 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7408 ac_tool_warned=yes ;;
7409 esac
7410     PKG_CONFIG=$ac_pt_PKG_CONFIG
7411   fi
7412 else
7413   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7414 fi
7415
7416 fi
7417 if test -n "$PKG_CONFIG"; then
7418         _pkg_min_version=0.9.0
7419         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7420 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7421         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7422                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7423 $as_echo "yes" >&6; }
7424         else
7425                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7426 $as_echo "no" >&6; }
7427                 PKG_CONFIG=""
7428         fi
7429 fi
7430
7431 pkg_failed=no
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7433 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7434
7435 if test -n "$ICU_CFLAGS"; then
7436     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7437  elif test -n "$PKG_CONFIG"; then
7438     if test -n "$PKG_CONFIG" && \
7439     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7440   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7441   ac_status=$?
7442   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7443   test $ac_status = 0; }; then
7444   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7445                       test "x$?" != "x0" && pkg_failed=yes
7446 else
7447   pkg_failed=yes
7448 fi
7449  else
7450     pkg_failed=untried
7451 fi
7452 if test -n "$ICU_LIBS"; then
7453     pkg_cv_ICU_LIBS="$ICU_LIBS"
7454  elif test -n "$PKG_CONFIG"; then
7455     if test -n "$PKG_CONFIG" && \
7456     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7457   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7458   ac_status=$?
7459   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7460   test $ac_status = 0; }; then
7461   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7462                       test "x$?" != "x0" && pkg_failed=yes
7463 else
7464   pkg_failed=yes
7465 fi
7466  else
7467     pkg_failed=untried
7468 fi
7469
7470
7471
7472 if test $pkg_failed = yes; then
7473         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474 $as_echo "no" >&6; }
7475
7476 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7477         _pkg_short_errors_supported=yes
7478 else
7479         _pkg_short_errors_supported=no
7480 fi
7481         if test $_pkg_short_errors_supported = yes; then
7482                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7483         else
7484                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7485         fi
7486         # Put the nasty error message in config.log where it belongs
7487         echo "$ICU_PKG_ERRORS" >&5
7488
7489         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7490
7491 $ICU_PKG_ERRORS
7492
7493 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7494 installed software in a non-standard prefix.
7495
7496 Alternatively, you may set the environment variables ICU_CFLAGS
7497 and ICU_LIBS to avoid the need to call pkg-config.
7498 See the pkg-config man page for more details." "$LINENO" 5
7499 elif test $pkg_failed = untried; then
7500         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7501 $as_echo "no" >&6; }
7502         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7503 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7504 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7505 is in your PATH or set the PKG_CONFIG environment variable to the full
7506 path to pkg-config.
7507
7508 Alternatively, you may set the environment variables ICU_CFLAGS
7509 and ICU_LIBS to avoid the need to call pkg-config.
7510 See the pkg-config man page for more details.
7511
7512 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7513 See \`config.log' for more details" "$LINENO" 5; }
7514 else
7515         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7516         ICU_LIBS=$pkg_cv_ICU_LIBS
7517         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7518 $as_echo "yes" >&6; }
7519
7520 fi
7521 fi
7522
7523 #
7524 # Optionally build Tcl modules (PL/Tcl)
7525 #
7526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7527 $as_echo_n "checking whether to build with Tcl... " >&6; }
7528
7529
7530
7531 # Check whether --with-tcl was given.
7532 if test "${with_tcl+set}" = set; then :
7533   withval=$with_tcl;
7534   case $withval in
7535     yes)
7536       :
7537       ;;
7538     no)
7539       :
7540       ;;
7541     *)
7542       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7543       ;;
7544   esac
7545
7546 else
7547   with_tcl=no
7548
7549 fi
7550
7551
7552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7553 $as_echo "$with_tcl" >&6; }
7554
7555
7556 # We see if the path to the Tcl/Tk configuration scripts is specified.
7557 # This will override the use of tclsh to find the paths to search.
7558
7559
7560
7561
7562 # Check whether --with-tclconfig was given.
7563 if test "${with_tclconfig+set}" = set; then :
7564   withval=$with_tclconfig;
7565   case $withval in
7566     yes)
7567       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7568       ;;
7569     no)
7570       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7571       ;;
7572     *)
7573
7574       ;;
7575   esac
7576
7577 fi
7578
7579
7580
7581 #
7582 # Optionally build Perl modules (PL/Perl)
7583 #
7584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7585 $as_echo_n "checking whether to build Perl modules... " >&6; }
7586
7587
7588
7589 # Check whether --with-perl was given.
7590 if test "${with_perl+set}" = set; then :
7591   withval=$with_perl;
7592   case $withval in
7593     yes)
7594       :
7595       ;;
7596     no)
7597       :
7598       ;;
7599     *)
7600       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7601       ;;
7602   esac
7603
7604 else
7605   with_perl=no
7606
7607 fi
7608
7609
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7611 $as_echo "$with_perl" >&6; }
7612
7613
7614 #
7615 # Optionally build Python modules (PL/Python)
7616 #
7617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7618 $as_echo_n "checking whether to build Python modules... " >&6; }
7619
7620
7621
7622 # Check whether --with-python was given.
7623 if test "${with_python+set}" = set; then :
7624   withval=$with_python;
7625   case $withval in
7626     yes)
7627       :
7628       ;;
7629     no)
7630       :
7631       ;;
7632     *)
7633       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7634       ;;
7635   esac
7636
7637 else
7638   with_python=no
7639
7640 fi
7641
7642
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7644 $as_echo "$with_python" >&6; }
7645
7646
7647 #
7648 # GSSAPI
7649 #
7650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7651 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7652
7653
7654
7655 # Check whether --with-gssapi was given.
7656 if test "${with_gssapi+set}" = set; then :
7657   withval=$with_gssapi;
7658   case $withval in
7659     yes)
7660
7661
7662 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7663
7664   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7665
7666       ;;
7667     no)
7668       :
7669       ;;
7670     *)
7671       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7672       ;;
7673   esac
7674
7675 else
7676   with_gssapi=no
7677
7678 fi
7679
7680
7681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7682 $as_echo "$with_gssapi" >&6; }
7683
7684
7685
7686
7687
7688
7689 #
7690 # Kerberos configuration parameters
7691 #
7692
7693
7694
7695 # Check whether --with-krb-srvnam was given.
7696 if test "${with_krb_srvnam+set}" = set; then :
7697   withval=$with_krb_srvnam;
7698   case $withval in
7699     yes)
7700       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7701       ;;
7702     no)
7703       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7704       ;;
7705     *)
7706
7707       ;;
7708   esac
7709
7710 else
7711   with_krb_srvnam="postgres"
7712 fi
7713
7714
7715
7716
7717 cat >>confdefs.h <<_ACEOF
7718 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7719 _ACEOF
7720
7721
7722
7723 #
7724 # PAM
7725 #
7726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7727 $as_echo_n "checking whether to build with PAM support... " >&6; }
7728
7729
7730
7731 # Check whether --with-pam was given.
7732 if test "${with_pam+set}" = set; then :
7733   withval=$with_pam;
7734   case $withval in
7735     yes)
7736
7737 $as_echo "#define USE_PAM 1" >>confdefs.h
7738
7739       ;;
7740     no)
7741       :
7742       ;;
7743     *)
7744       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7745       ;;
7746   esac
7747
7748 else
7749   with_pam=no
7750
7751 fi
7752
7753
7754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7755 $as_echo "$with_pam" >&6; }
7756
7757
7758 #
7759 # BSD AUTH
7760 #
7761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7762 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7763
7764
7765
7766 # Check whether --with-bsd-auth was given.
7767 if test "${with_bsd_auth+set}" = set; then :
7768   withval=$with_bsd_auth;
7769   case $withval in
7770     yes)
7771
7772 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7773
7774       ;;
7775     no)
7776       :
7777       ;;
7778     *)
7779       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7780       ;;
7781   esac
7782
7783 else
7784   with_bsd_auth=no
7785
7786 fi
7787
7788
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7790 $as_echo "$with_bsd_auth" >&6; }
7791
7792
7793 #
7794 # LDAP
7795 #
7796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7797 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7798
7799
7800
7801 # Check whether --with-ldap was given.
7802 if test "${with_ldap+set}" = set; then :
7803   withval=$with_ldap;
7804   case $withval in
7805     yes)
7806
7807 $as_echo "#define USE_LDAP 1" >>confdefs.h
7808
7809       ;;
7810     no)
7811       :
7812       ;;
7813     *)
7814       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7815       ;;
7816   esac
7817
7818 else
7819   with_ldap=no
7820
7821 fi
7822
7823
7824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7825 $as_echo "$with_ldap" >&6; }
7826
7827
7828
7829 #
7830 # Bonjour
7831 #
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7833 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7834
7835
7836
7837 # Check whether --with-bonjour was given.
7838 if test "${with_bonjour+set}" = set; then :
7839   withval=$with_bonjour;
7840   case $withval in
7841     yes)
7842
7843 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7844
7845       ;;
7846     no)
7847       :
7848       ;;
7849     *)
7850       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7851       ;;
7852   esac
7853
7854 else
7855   with_bonjour=no
7856
7857 fi
7858
7859
7860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7861 $as_echo "$with_bonjour" >&6; }
7862
7863
7864 #
7865 # OpenSSL
7866 #
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7868 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7869
7870
7871
7872 # Check whether --with-openssl was given.
7873 if test "${with_openssl+set}" = set; then :
7874   withval=$with_openssl;
7875   case $withval in
7876     yes)
7877
7878 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7879
7880       ;;
7881     no)
7882       :
7883       ;;
7884     *)
7885       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7886       ;;
7887   esac
7888
7889 else
7890   with_openssl=no
7891
7892 fi
7893
7894
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7896 $as_echo "$with_openssl" >&6; }
7897
7898
7899 #
7900 # SELinux
7901 #
7902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7903 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7904
7905
7906
7907 # Check whether --with-selinux was given.
7908 if test "${with_selinux+set}" = set; then :
7909   withval=$with_selinux;
7910   case $withval in
7911     yes)
7912       :
7913       ;;
7914     no)
7915       :
7916       ;;
7917     *)
7918       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7919       ;;
7920   esac
7921
7922 else
7923   with_selinux=no
7924
7925 fi
7926
7927
7928
7929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7930 $as_echo "$with_selinux" >&6; }
7931
7932 #
7933 # Systemd
7934 #
7935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7936 $as_echo_n "checking whether to build with systemd support... " >&6; }
7937
7938
7939
7940 # Check whether --with-systemd was given.
7941 if test "${with_systemd+set}" = set; then :
7942   withval=$with_systemd;
7943   case $withval in
7944     yes)
7945
7946 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7947
7948       ;;
7949     no)
7950       :
7951       ;;
7952     *)
7953       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7954       ;;
7955   esac
7956
7957 else
7958   with_systemd=no
7959
7960 fi
7961
7962
7963
7964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7965 $as_echo "$with_systemd" >&6; }
7966
7967 #
7968 # Readline
7969 #
7970
7971
7972
7973 # Check whether --with-readline was given.
7974 if test "${with_readline+set}" = set; then :
7975   withval=$with_readline;
7976   case $withval in
7977     yes)
7978       :
7979       ;;
7980     no)
7981       :
7982       ;;
7983     *)
7984       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7985       ;;
7986   esac
7987
7988 else
7989   with_readline=yes
7990
7991 fi
7992
7993
7994 # readline on MinGW has problems with backslashes in psql and other bugs.
7995 # This is particularly a problem with non-US code pages.
7996 # Therefore disable its use until we understand the cause. 2004-07-20
7997 if test "$PORTNAME" = "win32"; then
7998   if test "$with_readline" = yes; then
7999     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8000 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8001     with_readline=no
8002   fi
8003 fi
8004
8005
8006 #
8007 # Prefer libedit
8008 #
8009
8010
8011
8012 # Check whether --with-libedit-preferred was given.
8013 if test "${with_libedit_preferred+set}" = set; then :
8014   withval=$with_libedit_preferred;
8015   case $withval in
8016     yes)
8017       :
8018       ;;
8019     no)
8020       :
8021       ;;
8022     *)
8023       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8024       ;;
8025   esac
8026
8027 else
8028   with_libedit_preferred=no
8029
8030 fi
8031
8032
8033
8034
8035 #
8036 # UUID library
8037 #
8038 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8039 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8040 # UUID library.  More than one of these might be present on a given platform,
8041 # so we make the user say which one she wants.
8042 #
8043
8044
8045
8046 # Check whether --with-uuid was given.
8047 if test "${with_uuid+set}" = set; then :
8048   withval=$with_uuid;
8049   case $withval in
8050     yes)
8051       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8052       ;;
8053     no)
8054       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8055       ;;
8056     *)
8057
8058       ;;
8059   esac
8060
8061 fi
8062
8063
8064 if test x"$with_uuid" = x"" ; then
8065   with_uuid=no
8066 fi
8067
8068
8069
8070 # Check whether --with-ossp-uuid was given.
8071 if test "${with_ossp_uuid+set}" = set; then :
8072   withval=$with_ossp_uuid;
8073   case $withval in
8074     yes)
8075       :
8076       ;;
8077     no)
8078       :
8079       ;;
8080     *)
8081       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8082       ;;
8083   esac
8084
8085 else
8086   with_ossp_uuid=no
8087
8088 fi
8089
8090
8091 if test "$with_ossp_uuid" = yes ; then
8092   with_uuid=ossp
8093 fi
8094
8095 if test "$with_uuid" = bsd ; then
8096
8097 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8098
8099   UUID_EXTRA_OBJS="md5.o sha1.o"
8100 elif test "$with_uuid" = e2fs ; then
8101
8102 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8103
8104   UUID_EXTRA_OBJS="md5.o sha1.o"
8105 elif test "$with_uuid" = ossp ; then
8106
8107 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8108
8109   UUID_EXTRA_OBJS=""
8110 elif test "$with_uuid" = no ; then
8111   UUID_EXTRA_OBJS=""
8112 else
8113   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8114 fi
8115
8116
8117
8118
8119 #
8120 # XML
8121 #
8122
8123
8124
8125 # Check whether --with-libxml was given.
8126 if test "${with_libxml+set}" = set; then :
8127   withval=$with_libxml;
8128   case $withval in
8129     yes)
8130
8131 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8132
8133       ;;
8134     no)
8135       :
8136       ;;
8137     *)
8138       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8139       ;;
8140   esac
8141
8142 else
8143   with_libxml=no
8144
8145 fi
8146
8147
8148
8149 if test "$with_libxml" = yes ; then
8150   if test -z "$XML2_CONFIG"; then
8151   for ac_prog in xml2-config
8152 do
8153   # Extract the first word of "$ac_prog", so it can be a program name with args.
8154 set dummy $ac_prog; ac_word=$2
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8156 $as_echo_n "checking for $ac_word... " >&6; }
8157 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8158   $as_echo_n "(cached) " >&6
8159 else
8160   case $XML2_CONFIG in
8161   [\\/]* | ?:[\\/]*)
8162   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8163   ;;
8164   *)
8165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8166 for as_dir in $PATH
8167 do
8168   IFS=$as_save_IFS
8169   test -z "$as_dir" && as_dir=.
8170     for ac_exec_ext in '' $ac_executable_extensions; do
8171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8172     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8174     break 2
8175   fi
8176 done
8177   done
8178 IFS=$as_save_IFS
8179
8180   ;;
8181 esac
8182 fi
8183 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8184 if test -n "$XML2_CONFIG"; then
8185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8186 $as_echo "$XML2_CONFIG" >&6; }
8187 else
8188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8189 $as_echo "no" >&6; }
8190 fi
8191
8192
8193   test -n "$XML2_CONFIG" && break
8194 done
8195
8196 else
8197   # Report the value of XML2_CONFIG in configure's output in all cases.
8198   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8199 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8201 $as_echo "$XML2_CONFIG" >&6; }
8202 fi
8203
8204     if test -n "$XML2_CONFIG"; then
8205     for pgac_option in `$XML2_CONFIG --cflags`; do
8206       case $pgac_option in
8207         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8208       esac
8209     done
8210     for pgac_option in `$XML2_CONFIG --libs`; do
8211       case $pgac_option in
8212         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8213       esac
8214     done
8215   fi
8216 fi
8217
8218
8219
8220 #
8221 # XSLT
8222 #
8223
8224
8225
8226 # Check whether --with-libxslt was given.
8227 if test "${with_libxslt+set}" = set; then :
8228   withval=$with_libxslt;
8229   case $withval in
8230     yes)
8231
8232 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8233
8234       ;;
8235     no)
8236       :
8237       ;;
8238     *)
8239       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8240       ;;
8241   esac
8242
8243 else
8244   with_libxslt=no
8245
8246 fi
8247
8248
8249
8250
8251
8252
8253 #
8254 # tzdata
8255 #
8256
8257
8258
8259 # Check whether --with-system-tzdata was given.
8260 if test "${with_system_tzdata+set}" = set; then :
8261   withval=$with_system_tzdata;
8262   case $withval in
8263     yes)
8264       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8265       ;;
8266     no)
8267       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8268       ;;
8269     *)
8270
8271       ;;
8272   esac
8273
8274 fi
8275
8276
8277
8278
8279 #
8280 # Zlib
8281 #
8282
8283
8284
8285 # Check whether --with-zlib was given.
8286 if test "${with_zlib+set}" = set; then :
8287   withval=$with_zlib;
8288   case $withval in
8289     yes)
8290       :
8291       ;;
8292     no)
8293       :
8294       ;;
8295     *)
8296       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8297       ;;
8298   esac
8299
8300 else
8301   with_zlib=yes
8302
8303 fi
8304
8305
8306
8307
8308 #
8309 # Assignments
8310 #
8311
8312 CPPFLAGS="$CPPFLAGS $INCLUDES"
8313 LDFLAGS="$LDFLAGS $LIBDIRS"
8314
8315
8316
8317
8318
8319 # Check whether --with-gnu-ld was given.
8320 if test "${with_gnu_ld+set}" = set; then :
8321   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8322 else
8323   with_gnu_ld=no
8324 fi
8325
8326 ac_prog=ld
8327 if test "$GCC" = yes; then
8328   # Check if gcc -print-prog-name=ld gives a path.
8329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8330 $as_echo_n "checking for ld used by GCC... " >&6; }
8331   case $host in
8332   *-*-mingw*)
8333     # gcc leaves a trailing carriage return which upsets mingw
8334     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8335   *)
8336     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8337   esac
8338   case "$ac_prog" in
8339     # Accept absolute paths.
8340     [\\/]* | [A-Za-z]:[\\/]*)
8341       re_direlt='/[^/][^/]*/\.\./'
8342       # Canonicalize the path of ld
8343       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8344       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8345         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8346       done
8347       test -z "$LD" && LD="$ac_prog"
8348       ;;
8349   "")
8350     # If it fails, then pretend we aren't using GCC.
8351     ac_prog=ld
8352     ;;
8353   *)
8354     # If it is relative, then search for the first ld in PATH.
8355     with_gnu_ld=unknown
8356     ;;
8357   esac
8358 elif test "$with_gnu_ld" = yes; then
8359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8360 $as_echo_n "checking for GNU ld... " >&6; }
8361 else
8362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8363 $as_echo_n "checking for non-GNU ld... " >&6; }
8364 fi
8365 if ${ac_cv_path_LD+:} false; then :
8366   $as_echo_n "(cached) " >&6
8367 else
8368   if test -z "$LD"; then
8369   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8370   for ac_dir in $PATH; do
8371     test -z "$ac_dir" && ac_dir=.
8372     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8373       ac_cv_path_LD="$ac_dir/$ac_prog"
8374       # Check to see if the program is GNU ld.  I'd rather use --version,
8375       # but apparently some GNU ld's only accept -v.
8376       # Break only if it was the GNU/non-GNU ld that we prefer.
8377       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8378         test "$with_gnu_ld" != no && break
8379       else
8380         test "$with_gnu_ld" != yes && break
8381       fi
8382     fi
8383   done
8384   IFS="$ac_save_ifs"
8385 else
8386   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8387 fi
8388 fi
8389
8390 LD="$ac_cv_path_LD"
8391 if test -n "$LD"; then
8392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8393 $as_echo "$LD" >&6; }
8394 else
8395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8396 $as_echo "no" >&6; }
8397 fi
8398 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8400 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8401 if ${ac_cv_prog_gnu_ld+:} false; then :
8402   $as_echo_n "(cached) " >&6
8403 else
8404   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8405 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8406   ac_cv_prog_gnu_ld=yes
8407 else
8408   ac_cv_prog_gnu_ld=no
8409 fi
8410 fi
8411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8412 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8413 with_gnu_ld=$ac_cv_prog_gnu_ld
8414
8415
8416
8417
8418 if test -n "$ac_tool_prefix"; then
8419   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8420 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8422 $as_echo_n "checking for $ac_word... " >&6; }
8423 if ${ac_cv_prog_RANLIB+:} false; then :
8424   $as_echo_n "(cached) " >&6
8425 else
8426   if test -n "$RANLIB"; then
8427   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8428 else
8429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8430 for as_dir in $PATH
8431 do
8432   IFS=$as_save_IFS
8433   test -z "$as_dir" && as_dir=.
8434     for ac_exec_ext in '' $ac_executable_extensions; do
8435   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8436     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8438     break 2
8439   fi
8440 done
8441   done
8442 IFS=$as_save_IFS
8443
8444 fi
8445 fi
8446 RANLIB=$ac_cv_prog_RANLIB
8447 if test -n "$RANLIB"; then
8448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8449 $as_echo "$RANLIB" >&6; }
8450 else
8451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8452 $as_echo "no" >&6; }
8453 fi
8454
8455
8456 fi
8457 if test -z "$ac_cv_prog_RANLIB"; then
8458   ac_ct_RANLIB=$RANLIB
8459   # Extract the first word of "ranlib", so it can be a program name with args.
8460 set dummy ranlib; ac_word=$2
8461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8462 $as_echo_n "checking for $ac_word... " >&6; }
8463 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8464   $as_echo_n "(cached) " >&6
8465 else
8466   if test -n "$ac_ct_RANLIB"; then
8467   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8468 else
8469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8470 for as_dir in $PATH
8471 do
8472   IFS=$as_save_IFS
8473   test -z "$as_dir" && as_dir=.
8474     for ac_exec_ext in '' $ac_executable_extensions; do
8475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8476     ac_cv_prog_ac_ct_RANLIB="ranlib"
8477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8478     break 2
8479   fi
8480 done
8481   done
8482 IFS=$as_save_IFS
8483
8484 fi
8485 fi
8486 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8487 if test -n "$ac_ct_RANLIB"; then
8488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8489 $as_echo "$ac_ct_RANLIB" >&6; }
8490 else
8491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8492 $as_echo "no" >&6; }
8493 fi
8494
8495   if test "x$ac_ct_RANLIB" = x; then
8496     RANLIB=":"
8497   else
8498     case $cross_compiling:$ac_tool_warned in
8499 yes:)
8500 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8501 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8502 ac_tool_warned=yes ;;
8503 esac
8504     RANLIB=$ac_ct_RANLIB
8505   fi
8506 else
8507   RANLIB="$ac_cv_prog_RANLIB"
8508 fi
8509
8510
8511   if test -n "$ac_tool_prefix"; then
8512   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8513 set dummy ${ac_tool_prefix}strip; ac_word=$2
8514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8515 $as_echo_n "checking for $ac_word... " >&6; }
8516 if ${ac_cv_prog_STRIP+:} false; then :
8517   $as_echo_n "(cached) " >&6
8518 else
8519   if test -n "$STRIP"; then
8520   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8521 else
8522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8523 for as_dir in $PATH
8524 do
8525   IFS=$as_save_IFS
8526   test -z "$as_dir" && as_dir=.
8527     for ac_exec_ext in '' $ac_executable_extensions; do
8528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8529     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8531     break 2
8532   fi
8533 done
8534   done
8535 IFS=$as_save_IFS
8536
8537 fi
8538 fi
8539 STRIP=$ac_cv_prog_STRIP
8540 if test -n "$STRIP"; then
8541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8542 $as_echo "$STRIP" >&6; }
8543 else
8544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8545 $as_echo "no" >&6; }
8546 fi
8547
8548
8549 fi
8550 if test -z "$ac_cv_prog_STRIP"; then
8551   ac_ct_STRIP=$STRIP
8552   # Extract the first word of "strip", so it can be a program name with args.
8553 set dummy strip; ac_word=$2
8554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8555 $as_echo_n "checking for $ac_word... " >&6; }
8556 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8557   $as_echo_n "(cached) " >&6
8558 else
8559   if test -n "$ac_ct_STRIP"; then
8560   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8561 else
8562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8563 for as_dir in $PATH
8564 do
8565   IFS=$as_save_IFS
8566   test -z "$as_dir" && as_dir=.
8567     for ac_exec_ext in '' $ac_executable_extensions; do
8568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8569     ac_cv_prog_ac_ct_STRIP="strip"
8570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8571     break 2
8572   fi
8573 done
8574   done
8575 IFS=$as_save_IFS
8576
8577 fi
8578 fi
8579 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8580 if test -n "$ac_ct_STRIP"; then
8581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8582 $as_echo "$ac_ct_STRIP" >&6; }
8583 else
8584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8585 $as_echo "no" >&6; }
8586 fi
8587
8588   if test "x$ac_ct_STRIP" = x; then
8589     STRIP=":"
8590   else
8591     case $cross_compiling:$ac_tool_warned in
8592 yes:)
8593 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8594 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8595 ac_tool_warned=yes ;;
8596 esac
8597     STRIP=$ac_ct_STRIP
8598   fi
8599 else
8600   STRIP="$ac_cv_prog_STRIP"
8601 fi
8602
8603
8604   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8605 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8606   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8607     STRIP_STATIC_LIB="$STRIP -x"
8608     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8609     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8610 $as_echo "yes" >&6; }
8611   else
8612     case $host_os in
8613       darwin*)
8614         STRIP="$STRIP -x"
8615         STRIP_STATIC_LIB=$STRIP
8616         STRIP_SHARED_LIB=$STRIP
8617         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8618 $as_echo "yes" >&6; }
8619         ;;
8620       *)
8621         STRIP_STATIC_LIB=:
8622         STRIP_SHARED_LIB=:
8623         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8624 $as_echo "no" >&6; }
8625         ;;
8626     esac
8627   fi
8628
8629
8630
8631 if test -n "$ac_tool_prefix"; then
8632   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8633 set dummy ${ac_tool_prefix}ar; ac_word=$2
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8635 $as_echo_n "checking for $ac_word... " >&6; }
8636 if ${ac_cv_prog_AR+:} false; then :
8637   $as_echo_n "(cached) " >&6
8638 else
8639   if test -n "$AR"; then
8640   ac_cv_prog_AR="$AR" # Let the user override the test.
8641 else
8642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8643 for as_dir in $PATH
8644 do
8645   IFS=$as_save_IFS
8646   test -z "$as_dir" && as_dir=.
8647     for ac_exec_ext in '' $ac_executable_extensions; do
8648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8649     ac_cv_prog_AR="${ac_tool_prefix}ar"
8650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8651     break 2
8652   fi
8653 done
8654   done
8655 IFS=$as_save_IFS
8656
8657 fi
8658 fi
8659 AR=$ac_cv_prog_AR
8660 if test -n "$AR"; then
8661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8662 $as_echo "$AR" >&6; }
8663 else
8664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8665 $as_echo "no" >&6; }
8666 fi
8667
8668
8669 fi
8670 if test -z "$ac_cv_prog_AR"; then
8671   ac_ct_AR=$AR
8672   # Extract the first word of "ar", so it can be a program name with args.
8673 set dummy ar; ac_word=$2
8674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8675 $as_echo_n "checking for $ac_word... " >&6; }
8676 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8677   $as_echo_n "(cached) " >&6
8678 else
8679   if test -n "$ac_ct_AR"; then
8680   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8681 else
8682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8683 for as_dir in $PATH
8684 do
8685   IFS=$as_save_IFS
8686   test -z "$as_dir" && as_dir=.
8687     for ac_exec_ext in '' $ac_executable_extensions; do
8688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8689     ac_cv_prog_ac_ct_AR="ar"
8690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8691     break 2
8692   fi
8693 done
8694   done
8695 IFS=$as_save_IFS
8696
8697 fi
8698 fi
8699 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8700 if test -n "$ac_ct_AR"; then
8701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8702 $as_echo "$ac_ct_AR" >&6; }
8703 else
8704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8705 $as_echo "no" >&6; }
8706 fi
8707
8708   if test "x$ac_ct_AR" = x; then
8709     AR="ar"
8710   else
8711     case $cross_compiling:$ac_tool_warned in
8712 yes:)
8713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8714 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8715 ac_tool_warned=yes ;;
8716 esac
8717     AR=$ac_ct_AR
8718   fi
8719 else
8720   AR="$ac_cv_prog_AR"
8721 fi
8722
8723 if test "$PORTNAME" = "win32"; then
8724   if test -n "$ac_tool_prefix"; then
8725   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8726 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8728 $as_echo_n "checking for $ac_word... " >&6; }
8729 if ${ac_cv_prog_DLLTOOL+:} false; then :
8730   $as_echo_n "(cached) " >&6
8731 else
8732   if test -n "$DLLTOOL"; then
8733   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8734 else
8735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8736 for as_dir in $PATH
8737 do
8738   IFS=$as_save_IFS
8739   test -z "$as_dir" && as_dir=.
8740     for ac_exec_ext in '' $ac_executable_extensions; do
8741   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8742     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8743     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8744     break 2
8745   fi
8746 done
8747   done
8748 IFS=$as_save_IFS
8749
8750 fi
8751 fi
8752 DLLTOOL=$ac_cv_prog_DLLTOOL
8753 if test -n "$DLLTOOL"; then
8754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8755 $as_echo "$DLLTOOL" >&6; }
8756 else
8757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8758 $as_echo "no" >&6; }
8759 fi
8760
8761
8762 fi
8763 if test -z "$ac_cv_prog_DLLTOOL"; then
8764   ac_ct_DLLTOOL=$DLLTOOL
8765   # Extract the first word of "dlltool", so it can be a program name with args.
8766 set dummy dlltool; ac_word=$2
8767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8768 $as_echo_n "checking for $ac_word... " >&6; }
8769 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8770   $as_echo_n "(cached) " >&6
8771 else
8772   if test -n "$ac_ct_DLLTOOL"; then
8773   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8774 else
8775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8776 for as_dir in $PATH
8777 do
8778   IFS=$as_save_IFS
8779   test -z "$as_dir" && as_dir=.
8780     for ac_exec_ext in '' $ac_executable_extensions; do
8781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8782     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8784     break 2
8785   fi
8786 done
8787   done
8788 IFS=$as_save_IFS
8789
8790 fi
8791 fi
8792 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8793 if test -n "$ac_ct_DLLTOOL"; then
8794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8795 $as_echo "$ac_ct_DLLTOOL" >&6; }
8796 else
8797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8798 $as_echo "no" >&6; }
8799 fi
8800
8801   if test "x$ac_ct_DLLTOOL" = x; then
8802     DLLTOOL="dlltool"
8803   else
8804     case $cross_compiling:$ac_tool_warned in
8805 yes:)
8806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8807 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8808 ac_tool_warned=yes ;;
8809 esac
8810     DLLTOOL=$ac_ct_DLLTOOL
8811   fi
8812 else
8813   DLLTOOL="$ac_cv_prog_DLLTOOL"
8814 fi
8815
8816   if test -n "$ac_tool_prefix"; then
8817   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8818 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8820 $as_echo_n "checking for $ac_word... " >&6; }
8821 if ${ac_cv_prog_DLLWRAP+:} false; then :
8822   $as_echo_n "(cached) " >&6
8823 else
8824   if test -n "$DLLWRAP"; then
8825   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8826 else
8827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8828 for as_dir in $PATH
8829 do
8830   IFS=$as_save_IFS
8831   test -z "$as_dir" && as_dir=.
8832     for ac_exec_ext in '' $ac_executable_extensions; do
8833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8834     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8836     break 2
8837   fi
8838 done
8839   done
8840 IFS=$as_save_IFS
8841
8842 fi
8843 fi
8844 DLLWRAP=$ac_cv_prog_DLLWRAP
8845 if test -n "$DLLWRAP"; then
8846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
8847 $as_echo "$DLLWRAP" >&6; }
8848 else
8849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8850 $as_echo "no" >&6; }
8851 fi
8852
8853
8854 fi
8855 if test -z "$ac_cv_prog_DLLWRAP"; then
8856   ac_ct_DLLWRAP=$DLLWRAP
8857   # Extract the first word of "dllwrap", so it can be a program name with args.
8858 set dummy dllwrap; ac_word=$2
8859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8860 $as_echo_n "checking for $ac_word... " >&6; }
8861 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
8862   $as_echo_n "(cached) " >&6
8863 else
8864   if test -n "$ac_ct_DLLWRAP"; then
8865   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
8866 else
8867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8868 for as_dir in $PATH
8869 do
8870   IFS=$as_save_IFS
8871   test -z "$as_dir" && as_dir=.
8872     for ac_exec_ext in '' $ac_executable_extensions; do
8873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8874     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
8875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8876     break 2
8877   fi
8878 done
8879   done
8880 IFS=$as_save_IFS
8881
8882 fi
8883 fi
8884 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
8885 if test -n "$ac_ct_DLLWRAP"; then
8886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
8887 $as_echo "$ac_ct_DLLWRAP" >&6; }
8888 else
8889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8890 $as_echo "no" >&6; }
8891 fi
8892
8893   if test "x$ac_ct_DLLWRAP" = x; then
8894     DLLWRAP="dllwrap"
8895   else
8896     case $cross_compiling:$ac_tool_warned in
8897 yes:)
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8899 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8900 ac_tool_warned=yes ;;
8901 esac
8902     DLLWRAP=$ac_ct_DLLWRAP
8903   fi
8904 else
8905   DLLWRAP="$ac_cv_prog_DLLWRAP"
8906 fi
8907
8908   if test -n "$ac_tool_prefix"; then
8909   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8910 set dummy ${ac_tool_prefix}windres; ac_word=$2
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8912 $as_echo_n "checking for $ac_word... " >&6; }
8913 if ${ac_cv_prog_WINDRES+:} false; then :
8914   $as_echo_n "(cached) " >&6
8915 else
8916   if test -n "$WINDRES"; then
8917   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8918 else
8919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8920 for as_dir in $PATH
8921 do
8922   IFS=$as_save_IFS
8923   test -z "$as_dir" && as_dir=.
8924     for ac_exec_ext in '' $ac_executable_extensions; do
8925   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8926     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8928     break 2
8929   fi
8930 done
8931   done
8932 IFS=$as_save_IFS
8933
8934 fi
8935 fi
8936 WINDRES=$ac_cv_prog_WINDRES
8937 if test -n "$WINDRES"; then
8938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8939 $as_echo "$WINDRES" >&6; }
8940 else
8941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8942 $as_echo "no" >&6; }
8943 fi
8944
8945
8946 fi
8947 if test -z "$ac_cv_prog_WINDRES"; then
8948   ac_ct_WINDRES=$WINDRES
8949   # Extract the first word of "windres", so it can be a program name with args.
8950 set dummy windres; ac_word=$2
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8952 $as_echo_n "checking for $ac_word... " >&6; }
8953 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
8954   $as_echo_n "(cached) " >&6
8955 else
8956   if test -n "$ac_ct_WINDRES"; then
8957   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8958 else
8959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8960 for as_dir in $PATH
8961 do
8962   IFS=$as_save_IFS
8963   test -z "$as_dir" && as_dir=.
8964     for ac_exec_ext in '' $ac_executable_extensions; do
8965   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8966     ac_cv_prog_ac_ct_WINDRES="windres"
8967     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8968     break 2
8969   fi
8970 done
8971   done
8972 IFS=$as_save_IFS
8973
8974 fi
8975 fi
8976 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8977 if test -n "$ac_ct_WINDRES"; then
8978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8979 $as_echo "$ac_ct_WINDRES" >&6; }
8980 else
8981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8982 $as_echo "no" >&6; }
8983 fi
8984
8985   if test "x$ac_ct_WINDRES" = x; then
8986     WINDRES="windres"
8987   else
8988     case $cross_compiling:$ac_tool_warned in
8989 yes:)
8990 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8991 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8992 ac_tool_warned=yes ;;
8993 esac
8994     WINDRES=$ac_ct_WINDRES
8995   fi
8996 else
8997   WINDRES="$ac_cv_prog_WINDRES"
8998 fi
8999
9000 fi
9001
9002 # Find a good install program.  We prefer a C program (faster),
9003 # so one script is as good as another.  But avoid the broken or
9004 # incompatible versions:
9005 # SysV /etc/install, /usr/sbin/install
9006 # SunOS /usr/etc/install
9007 # IRIX /sbin/install
9008 # AIX /bin/install
9009 # AmigaOS /C/install, which installs bootblocks on floppy discs
9010 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9011 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9012 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9013 # OS/2's system install, which has a completely different semantic
9014 # ./install, which can be erroneously created by make from ./install.sh.
9015 # Reject install programs that cannot install multiple files.
9016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9017 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9018 if test -z "$INSTALL"; then
9019 if ${ac_cv_path_install+:} false; then :
9020   $as_echo_n "(cached) " >&6
9021 else
9022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9023 for as_dir in $PATH
9024 do
9025   IFS=$as_save_IFS
9026   test -z "$as_dir" && as_dir=.
9027     # Account for people who put trailing slashes in PATH elements.
9028 case $as_dir/ in #((
9029   ./ | .// | /[cC]/* | \
9030   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9031   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9032   /usr/ucb/* ) ;;
9033   *)
9034     # OSF1 and SCO ODT 3.0 have their own names for install.
9035     # Don't use installbsd from OSF since it installs stuff as root
9036     # by default.
9037     for ac_prog in ginstall scoinst install; do
9038       for ac_exec_ext in '' $ac_executable_extensions; do
9039         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9040           if test $ac_prog = install &&
9041             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9042             # AIX install.  It has an incompatible calling convention.
9043             :
9044           elif test $ac_prog = install &&
9045             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9046             # program-specific install script used by HP pwplus--don't use.
9047             :
9048           else
9049             rm -rf conftest.one conftest.two conftest.dir
9050             echo one > conftest.one
9051             echo two > conftest.two
9052             mkdir conftest.dir
9053             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9054               test -s conftest.one && test -s conftest.two &&
9055               test -s conftest.dir/conftest.one &&
9056               test -s conftest.dir/conftest.two
9057             then
9058               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9059               break 3
9060             fi
9061           fi
9062         fi
9063       done
9064     done
9065     ;;
9066 esac
9067
9068   done
9069 IFS=$as_save_IFS
9070
9071 rm -rf conftest.one conftest.two conftest.dir
9072
9073 fi
9074   if test "${ac_cv_path_install+set}" = set; then
9075     INSTALL=$ac_cv_path_install
9076   else
9077     # As a last resort, use the slow shell script.  Don't cache a
9078     # value for INSTALL within a source directory, because that will
9079     # break other packages using the cache if that directory is
9080     # removed, or if the value is a relative name.
9081     INSTALL=$ac_install_sh
9082   fi
9083 fi
9084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9085 $as_echo "$INSTALL" >&6; }
9086
9087 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9088 # It thinks the first close brace ends the variable substitution.
9089 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9090
9091 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9092
9093 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9094
9095 # When Autoconf chooses install-sh as install program it tries to generate
9096 # a relative path to it in each makefile where it substitutes it. This clashes
9097 # with our Makefile.global concept. This workaround helps.
9098 case $INSTALL in
9099   *install-sh*) install_bin='';;
9100   *) install_bin=$INSTALL;;
9101 esac
9102
9103
9104 if test -z "$TAR"; then
9105   for ac_prog in tar
9106 do
9107   # Extract the first word of "$ac_prog", so it can be a program name with args.
9108 set dummy $ac_prog; ac_word=$2
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9110 $as_echo_n "checking for $ac_word... " >&6; }
9111 if ${ac_cv_path_TAR+:} false; then :
9112   $as_echo_n "(cached) " >&6
9113 else
9114   case $TAR in
9115   [\\/]* | ?:[\\/]*)
9116   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9117   ;;
9118   *)
9119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9120 for as_dir in $PATH
9121 do
9122   IFS=$as_save_IFS
9123   test -z "$as_dir" && as_dir=.
9124     for ac_exec_ext in '' $ac_executable_extensions; do
9125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9126     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9128     break 2
9129   fi
9130 done
9131   done
9132 IFS=$as_save_IFS
9133
9134   ;;
9135 esac
9136 fi
9137 TAR=$ac_cv_path_TAR
9138 if test -n "$TAR"; then
9139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9140 $as_echo "$TAR" >&6; }
9141 else
9142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9143 $as_echo "no" >&6; }
9144 fi
9145
9146
9147   test -n "$TAR" && break
9148 done
9149
9150 else
9151   # Report the value of TAR in configure's output in all cases.
9152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9153 $as_echo_n "checking for TAR... " >&6; }
9154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9155 $as_echo "$TAR" >&6; }
9156 fi
9157
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9159 $as_echo_n "checking whether ln -s works... " >&6; }
9160 LN_S=$as_ln_s
9161 if test "$LN_S" = "ln -s"; then
9162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9163 $as_echo "yes" >&6; }
9164 else
9165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9166 $as_echo "no, using $LN_S" >&6; }
9167 fi
9168
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9170 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9171 if test -z "$MKDIR_P"; then
9172   if ${ac_cv_path_mkdir+:} false; then :
9173   $as_echo_n "(cached) " >&6
9174 else
9175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9176 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9177 do
9178   IFS=$as_save_IFS
9179   test -z "$as_dir" && as_dir=.
9180     for ac_prog in mkdir gmkdir; do
9181          for ac_exec_ext in '' $ac_executable_extensions; do
9182            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9183            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9184              'mkdir (GNU coreutils) '* | \
9185              'mkdir (coreutils) '* | \
9186              'mkdir (fileutils) '4.1*)
9187                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9188                break 3;;
9189            esac
9190          done
9191        done
9192   done
9193 IFS=$as_save_IFS
9194
9195 fi
9196
9197   test -d ./--version && rmdir ./--version
9198   if test "${ac_cv_path_mkdir+set}" = set; then
9199     MKDIR_P="$ac_cv_path_mkdir -p"
9200   else
9201     # As a last resort, use the slow shell script.  Don't cache a
9202     # value for MKDIR_P within a source directory, because that will
9203     # break other packages using the cache if that directory is
9204     # removed, or if the value is a relative name.
9205     MKDIR_P="$ac_install_sh -d"
9206   fi
9207 fi
9208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9209 $as_echo "$MKDIR_P" >&6; }
9210
9211 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9212 # a relative path to it in each makefile where it substitutes it. This clashes
9213 # with our Makefile.global concept. This workaround helps.
9214 case $MKDIR_P in
9215   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9216 esac
9217
9218 if test -z "$BISON"; then
9219   for ac_prog in bison
9220 do
9221   # Extract the first word of "$ac_prog", so it can be a program name with args.
9222 set dummy $ac_prog; ac_word=$2
9223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9224 $as_echo_n "checking for $ac_word... " >&6; }
9225 if ${ac_cv_path_BISON+:} false; then :
9226   $as_echo_n "(cached) " >&6
9227 else
9228   case $BISON in
9229   [\\/]* | ?:[\\/]*)
9230   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9231   ;;
9232   *)
9233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9234 for as_dir in $PATH
9235 do
9236   IFS=$as_save_IFS
9237   test -z "$as_dir" && as_dir=.
9238     for ac_exec_ext in '' $ac_executable_extensions; do
9239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9240     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9242     break 2
9243   fi
9244 done
9245   done
9246 IFS=$as_save_IFS
9247
9248   ;;
9249 esac
9250 fi
9251 BISON=$ac_cv_path_BISON
9252 if test -n "$BISON"; then
9253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9254 $as_echo "$BISON" >&6; }
9255 else
9256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9257 $as_echo "no" >&6; }
9258 fi
9259
9260
9261   test -n "$BISON" && break
9262 done
9263
9264 else
9265   # Report the value of BISON in configure's output in all cases.
9266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9267 $as_echo_n "checking for BISON... " >&6; }
9268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9269 $as_echo "$BISON" >&6; }
9270 fi
9271
9272
9273 if test "$BISON"; then
9274   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9275   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9276 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9277   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9278   then
9279     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9280 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9281 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9282 $as_echo "$as_me: WARNING:
9283 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9284 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9285     BISON=""
9286   fi
9287   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9288   # of the now preferred %name-prefix "base_yy", but the latter
9289   # doesn't work with Bison 2.3 or less.  So for now we silence the
9290   # deprecation warnings.
9291   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9292   then
9293     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9294   fi
9295 fi
9296
9297 if test -z "$BISON"; then
9298   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9299 *** Without Bison you will not be able to build PostgreSQL from Git nor
9300 *** change any of the parser definition files.  You can obtain Bison from
9301 *** a GNU mirror site.  (If you are using the official distribution of
9302 *** PostgreSQL then you do not need to worry about this, because the Bison
9303 *** output is pre-generated.)" >&5
9304 $as_echo "$as_me: WARNING:
9305 *** Without Bison you will not be able to build PostgreSQL from Git nor
9306 *** change any of the parser definition files.  You can obtain Bison from
9307 *** a GNU mirror site.  (If you are using the official distribution of
9308 *** PostgreSQL then you do not need to worry about this, because the Bison
9309 *** output is pre-generated.)" >&2;}
9310 fi
9311
9312
9313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9314 $as_echo_n "checking for flex... " >&6; }
9315 if ${pgac_cv_path_flex+:} false; then :
9316   $as_echo_n "(cached) " >&6
9317 else
9318   # Let the user override the test
9319 if test -n "$FLEX"; then
9320   pgac_cv_path_flex=$FLEX
9321 else
9322   pgac_save_IFS=$IFS
9323   IFS=$PATH_SEPARATOR
9324   for pgac_dir in $PATH; do
9325     IFS=$pgac_save_IFS
9326     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9327       pgac_dir=`pwd`
9328     fi
9329     for pgac_prog in flex lex; do
9330       pgac_candidate="$pgac_dir/$pgac_prog"
9331       if test -f "$pgac_candidate" \
9332         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9333       then
9334         echo '%%'  > conftest.l
9335         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9336           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9337           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;}'
9338           then
9339             pgac_cv_path_flex=$pgac_candidate
9340             break 2
9341           else
9342             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9343 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9344 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9345 $as_echo "$as_me: WARNING:
9346 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9347 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9348           fi
9349         fi
9350       fi
9351     done
9352   done
9353   rm -f conftest.l lex.yy.c
9354   : ${pgac_cv_path_flex=no}
9355 fi
9356
9357 fi
9358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9359 $as_echo "$pgac_cv_path_flex" >&6; }
9360 if test x"$pgac_cv_path_flex" = x"no"; then
9361   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9362 *** Without Flex you will not be able to build PostgreSQL from Git nor
9363 *** change any of the scanner definition files.  You can obtain Flex from
9364 *** a GNU mirror site.  (If you are using the official distribution of
9365 *** PostgreSQL then you do not need to worry about this because the Flex
9366 *** output is pre-generated.)" >&5
9367 $as_echo "$as_me: WARNING:
9368 *** Without Flex you will not be able to build PostgreSQL from Git nor
9369 *** change any of the scanner definition files.  You can obtain Flex from
9370 *** a GNU mirror site.  (If you are using the official distribution of
9371 *** PostgreSQL then you do not need to worry about this because the Flex
9372 *** output is pre-generated.)" >&2;}
9373
9374   FLEX=
9375 else
9376   FLEX=$pgac_cv_path_flex
9377   pgac_flex_version=`$FLEX --version 2>/dev/null`
9378   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9379 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9380 fi
9381
9382
9383
9384
9385
9386 if test -z "$PERL"; then
9387   for ac_prog in perl
9388 do
9389   # Extract the first word of "$ac_prog", so it can be a program name with args.
9390 set dummy $ac_prog; ac_word=$2
9391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9392 $as_echo_n "checking for $ac_word... " >&6; }
9393 if ${ac_cv_path_PERL+:} false; then :
9394   $as_echo_n "(cached) " >&6
9395 else
9396   case $PERL in
9397   [\\/]* | ?:[\\/]*)
9398   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9399   ;;
9400   *)
9401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9402 for as_dir in $PATH
9403 do
9404   IFS=$as_save_IFS
9405   test -z "$as_dir" && as_dir=.
9406     for ac_exec_ext in '' $ac_executable_extensions; do
9407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9408     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9410     break 2
9411   fi
9412 done
9413   done
9414 IFS=$as_save_IFS
9415
9416   ;;
9417 esac
9418 fi
9419 PERL=$ac_cv_path_PERL
9420 if test -n "$PERL"; then
9421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9422 $as_echo "$PERL" >&6; }
9423 else
9424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425 $as_echo "no" >&6; }
9426 fi
9427
9428
9429   test -n "$PERL" && break
9430 done
9431
9432 else
9433   # Report the value of PERL in configure's output in all cases.
9434   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9435 $as_echo_n "checking for PERL... " >&6; }
9436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9437 $as_echo "$PERL" >&6; }
9438 fi
9439
9440
9441 if test "$PERL"; then
9442   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'`
9443   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9444 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9445   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9446     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9447   then
9448     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9449 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9450 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9451 $as_echo "$as_me: WARNING:
9452 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9453 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9454     PERL=""
9455   fi
9456 fi
9457
9458 if test -z "$PERL"; then
9459   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9460 *** Without Perl you will not be able to build PostgreSQL from Git.
9461 *** You can obtain Perl from any CPAN mirror site.
9462 *** (If you are using the official distribution of PostgreSQL then you do not
9463 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9464 $as_echo "$as_me: WARNING:
9465 *** Without Perl you will not be able to build PostgreSQL from Git.
9466 *** You can obtain Perl from any CPAN mirror site.
9467 *** (If you are using the official distribution of PostgreSQL then you do not
9468 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9469 fi
9470
9471 if test "$with_perl" = yes; then
9472   if test -z "$PERL"; then
9473     as_fn_error $? "Perl not found" "$LINENO" 5
9474   fi
9475
9476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9477 $as_echo_n "checking for Perl archlibexp... " >&6; }
9478 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9479 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9481 $as_echo "$perl_archlibexp" >&6; }
9482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9483 $as_echo_n "checking for Perl privlibexp... " >&6; }
9484 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9485 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9487 $as_echo "$perl_privlibexp" >&6; }
9488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9489 $as_echo_n "checking for Perl useshrplib... " >&6; }
9490 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9491 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9493 $as_echo "$perl_useshrplib" >&6; }
9494   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9495     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9496 You might have to rebuild your Perl installation.  Refer to the
9497 documentation for details.  Use --without-perl to disable building
9498 PL/Perl." "$LINENO" 5
9499   fi
9500   # On most platforms, archlibexp is also where the Perl include files live ...
9501   perl_includespec="-I$perl_archlibexp/CORE"
9502   # ... but on newer macOS versions, we must use -iwithsysroot to look
9503   # under $PG_SYSROOT
9504   if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9505     if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9506       perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9507     fi
9508   fi
9509
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9511 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9512 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9514 $as_echo "$perl_ccflags" >&6; }
9515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9516 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9517 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9519 $as_echo "$perl_embed_ccflags" >&6; }
9520
9521
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9523 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9524 if test "$PORTNAME" = "win32" ; then
9525         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9526         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9527                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9528         else
9529                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9530                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9531                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9532                 fi
9533         fi
9534 else
9535         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9536         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9537         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9538 fi
9539 if test -z "$perl_embed_ldflags" ; then
9540         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541 $as_echo "no" >&6; }
9542         as_fn_error $? "could not determine flags for linking embedded Perl.
9543 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9544 installed." "$LINENO" 5
9545 else
9546         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9547 $as_echo "$perl_embed_ldflags" >&6; }
9548 fi
9549
9550 fi
9551
9552 if test "$with_python" = yes; then
9553   if test -z "$PYTHON"; then
9554   for ac_prog in python python3 python2
9555 do
9556   # Extract the first word of "$ac_prog", so it can be a program name with args.
9557 set dummy $ac_prog; ac_word=$2
9558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9559 $as_echo_n "checking for $ac_word... " >&6; }
9560 if ${ac_cv_path_PYTHON+:} false; then :
9561   $as_echo_n "(cached) " >&6
9562 else
9563   case $PYTHON in
9564   [\\/]* | ?:[\\/]*)
9565   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9566   ;;
9567   *)
9568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9569 for as_dir in $PATH
9570 do
9571   IFS=$as_save_IFS
9572   test -z "$as_dir" && as_dir=.
9573     for ac_exec_ext in '' $ac_executable_extensions; do
9574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9575     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9577     break 2
9578   fi
9579 done
9580   done
9581 IFS=$as_save_IFS
9582
9583   ;;
9584 esac
9585 fi
9586 PYTHON=$ac_cv_path_PYTHON
9587 if test -n "$PYTHON"; then
9588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9589 $as_echo "$PYTHON" >&6; }
9590 else
9591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9592 $as_echo "no" >&6; }
9593 fi
9594
9595
9596   test -n "$PYTHON" && break
9597 done
9598
9599 else
9600   # Report the value of PYTHON in configure's output in all cases.
9601   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9602 $as_echo_n "checking for PYTHON... " >&6; }
9603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9604 $as_echo "$PYTHON" >&6; }
9605 fi
9606
9607 if test x"$PYTHON" = x""; then
9608   as_fn_error $? "Python not found" "$LINENO" 5
9609 fi
9610
9611
9612 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9613 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9614 $as_echo "$as_me: using python $python_fullversion" >&6;}
9615 # python_fullversion is typically n.n.n plus some trailing junk
9616 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9617 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9618 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9619 # Reject unsupported Python versions as soon as practical.
9620 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9621   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9622 fi
9623
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9625 $as_echo_n "checking for Python distutils module... " >&6; }
9626 if "${PYTHON}" -c 'import distutils' 2>&5
9627 then
9628     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9629 $as_echo "yes" >&6; }
9630 else
9631     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9632 $as_echo "no" >&6; }
9633     as_fn_error $? "distutils module not found" "$LINENO" 5
9634 fi
9635
9636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9637 $as_echo_n "checking Python configuration directory... " >&6; }
9638 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9640 $as_echo "$python_configdir" >&6; }
9641
9642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9643 $as_echo_n "checking Python include directories... " >&6; }
9644 python_includespec=`${PYTHON} -c "
9645 import distutils.sysconfig
9646 a = '-I' + distutils.sysconfig.get_python_inc(False)
9647 b = '-I' + distutils.sysconfig.get_python_inc(True)
9648 if a == b:
9649     print(a)
9650 else:
9651     print(a + ' ' + b)"`
9652 if test "$PORTNAME" = win32 ; then
9653     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9654 fi
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9656 $as_echo "$python_includespec" >&6; }
9657
9658
9659
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9661 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9662
9663 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9664 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9665
9666 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9667 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9668 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9669 then
9670         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9671         found_shlib=1
9672 else
9673         # Otherwise, guess the base name of the shlib.
9674         # LDVERSION was added in Python 3.2, before that use VERSION,
9675         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9676         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9677         if test x"${python_ldversion}" != x""; then
9678                 ldlibrary="python${python_ldversion}"
9679         else
9680                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9681                 if test x"${python_version_var}" != x""; then
9682                         ldlibrary="python${python_version_var}"
9683                 else
9684                         ldlibrary="python${python_version}"
9685                 fi
9686         fi
9687         # Search for a likely-looking file.
9688         found_shlib=0
9689         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9690         do
9691                 # We don't know the platform DLSUFFIX here, so check 'em all.
9692                 for e in .so .dll .dylib .sl; do
9693                         if test -e "$d/lib${ldlibrary}$e"; then
9694                                 python_libdir="$d"
9695                                 found_shlib=1
9696                                 break 2
9697                         fi
9698                 done
9699         done
9700         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9701         # (".so.n.n") as well. However, check this only after failing to find
9702         # ".so" anywhere, because yet other platforms (Debian) put the .so
9703         # symlink in a different directory from the underlying versioned shlib.
9704         if test "$found_shlib" != 1; then
9705                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9706                 do
9707                         for f in "$d/lib${ldlibrary}.so."* ; do
9708                                 if test -e "$f"; then
9709                                         python_libdir="$d"
9710                                         found_shlib=1
9711                                         break 2
9712                                 fi
9713                         done
9714                 done
9715         fi
9716         # As usual, Windows has its own ideas.  Possible default library
9717         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9718         # and the "lib" prefix might not be there.
9719         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9720                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9721                 do
9722                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9723                                 if test -e "$f"; then
9724                                         python_libdir="$d"
9725                                         found_shlib=1
9726                                         break 2
9727                                 fi
9728                         done
9729                 done
9730         fi
9731 fi
9732 if test "$found_shlib" != 1; then
9733         as_fn_error $? "could not find shared library for Python
9734 You might have to rebuild your Python installation.  Refer to the
9735 documentation for details.  Use --without-python to disable building
9736 PL/Python." "$LINENO" 5
9737 fi
9738 python_libspec="-L${python_libdir} -l${ldlibrary}"
9739
9740 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9741
9742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9743 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9744
9745
9746
9747 fi
9748
9749 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9750   if test -z "$ZIC"; then
9751   for ac_prog in zic
9752 do
9753   # Extract the first word of "$ac_prog", so it can be a program name with args.
9754 set dummy $ac_prog; ac_word=$2
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9756 $as_echo_n "checking for $ac_word... " >&6; }
9757 if ${ac_cv_path_ZIC+:} false; then :
9758   $as_echo_n "(cached) " >&6
9759 else
9760   case $ZIC in
9761   [\\/]* | ?:[\\/]*)
9762   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9763   ;;
9764   *)
9765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9766 for as_dir in $PATH
9767 do
9768   IFS=$as_save_IFS
9769   test -z "$as_dir" && as_dir=.
9770     for ac_exec_ext in '' $ac_executable_extensions; do
9771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9772     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9774     break 2
9775   fi
9776 done
9777   done
9778 IFS=$as_save_IFS
9779
9780   ;;
9781 esac
9782 fi
9783 ZIC=$ac_cv_path_ZIC
9784 if test -n "$ZIC"; then
9785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9786 $as_echo "$ZIC" >&6; }
9787 else
9788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789 $as_echo "no" >&6; }
9790 fi
9791
9792
9793   test -n "$ZIC" && break
9794 done
9795
9796 else
9797   # Report the value of ZIC in configure's output in all cases.
9798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9799 $as_echo_n "checking for ZIC... " >&6; }
9800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9801 $as_echo "$ZIC" >&6; }
9802 fi
9803
9804   if test -z "$ZIC"; then
9805     as_fn_error $? "
9806 When cross-compiling, either use the option --with-system-tzdata to use
9807 existing time-zone data, or set the environment variable ZIC to a zic
9808 program to use during the build." "$LINENO" 5
9809   fi
9810 fi
9811
9812 #
9813 # Pthreads
9814 #
9815 # For each platform, we need to know about any special compile and link
9816 # libraries, and whether the normal C function names are thread-safe.
9817 # See the comment at the top of src/port/thread.c for more information.
9818 # WIN32 doesn't need the pthread tests;  it always uses threads
9819 #
9820 # These tests are run before the library-tests, because linking with the
9821 # other libraries can pull in the pthread functions as a side-effect.  We
9822 # want to use the -pthread or similar flags directly, and not rely on
9823 # the side-effects of linking with some other library.
9824
9825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
9826 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
9827 if ${ac_cv_path_SED+:} false; then :
9828   $as_echo_n "(cached) " >&6
9829 else
9830             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
9831      for ac_i in 1 2 3 4 5 6 7; do
9832        ac_script="$ac_script$as_nl$ac_script"
9833      done
9834      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
9835      { ac_script=; unset ac_script;}
9836      if test -z "$SED"; then
9837   ac_path_SED_found=false
9838   # Loop through the user's path and test for each of PROGNAME-LIST
9839   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9840 for as_dir in $PATH
9841 do
9842   IFS=$as_save_IFS
9843   test -z "$as_dir" && as_dir=.
9844     for ac_prog in sed gsed; do
9845     for ac_exec_ext in '' $ac_executable_extensions; do
9846       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
9847       as_fn_executable_p "$ac_path_SED" || continue
9848 # Check for GNU ac_path_SED and select it if it is found.
9849   # Check for GNU $ac_path_SED
9850 case `"$ac_path_SED" --version 2>&1` in
9851 *GNU*)
9852   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
9853 *)
9854   ac_count=0
9855   $as_echo_n 0123456789 >"conftest.in"
9856   while :
9857   do
9858     cat "conftest.in" "conftest.in" >"conftest.tmp"
9859     mv "conftest.tmp" "conftest.in"
9860     cp "conftest.in" "conftest.nl"
9861     $as_echo '' >> "conftest.nl"
9862     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
9863     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
9864     as_fn_arith $ac_count + 1 && ac_count=$as_val
9865     if test $ac_count -gt ${ac_path_SED_max-0}; then
9866       # Best one so far, save it but keep looking for a better one
9867       ac_cv_path_SED="$ac_path_SED"
9868       ac_path_SED_max=$ac_count
9869     fi
9870     # 10*(2^10) chars as input seems more than enough
9871     test $ac_count -gt 10 && break
9872   done
9873   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
9874 esac
9875
9876       $ac_path_SED_found && break 3
9877     done
9878   done
9879   done
9880 IFS=$as_save_IFS
9881   if test -z "$ac_cv_path_SED"; then
9882     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
9883   fi
9884 else
9885   ac_cv_path_SED=$SED
9886 fi
9887
9888 fi
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
9890 $as_echo "$ac_cv_path_SED" >&6; }
9891  SED="$ac_cv_path_SED"
9892   rm -f conftest.sed
9893
9894
9895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
9896 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
9897 if ${ac_cv_path_GREP+:} false; then :
9898   $as_echo_n "(cached) " >&6
9899 else
9900   if test -z "$GREP"; then
9901   ac_path_GREP_found=false
9902   # Loop through the user's path and test for each of PROGNAME-LIST
9903   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9904 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
9905 do
9906   IFS=$as_save_IFS
9907   test -z "$as_dir" && as_dir=.
9908     for ac_prog in grep ggrep; do
9909     for ac_exec_ext in '' $ac_executable_extensions; do
9910       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
9911       as_fn_executable_p "$ac_path_GREP" || continue
9912 # Check for GNU ac_path_GREP and select it if it is found.
9913   # Check for GNU $ac_path_GREP
9914 case `"$ac_path_GREP" --version 2>&1` in
9915 *GNU*)
9916   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
9917 *)
9918   ac_count=0
9919   $as_echo_n 0123456789 >"conftest.in"
9920   while :
9921   do
9922     cat "conftest.in" "conftest.in" >"conftest.tmp"
9923     mv "conftest.tmp" "conftest.in"
9924     cp "conftest.in" "conftest.nl"
9925     $as_echo 'GREP' >> "conftest.nl"
9926     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
9927     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
9928     as_fn_arith $ac_count + 1 && ac_count=$as_val
9929     if test $ac_count -gt ${ac_path_GREP_max-0}; then
9930       # Best one so far, save it but keep looking for a better one
9931       ac_cv_path_GREP="$ac_path_GREP"
9932       ac_path_GREP_max=$ac_count
9933     fi
9934     # 10*(2^10) chars as input seems more than enough
9935     test $ac_count -gt 10 && break
9936   done
9937   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
9938 esac
9939
9940       $ac_path_GREP_found && break 3
9941     done
9942   done
9943   done
9944 IFS=$as_save_IFS
9945   if test -z "$ac_cv_path_GREP"; then
9946     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
9947   fi
9948 else
9949   ac_cv_path_GREP=$GREP
9950 fi
9951
9952 fi
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
9954 $as_echo "$ac_cv_path_GREP" >&6; }
9955  GREP="$ac_cv_path_GREP"
9956
9957
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
9959 $as_echo_n "checking for egrep... " >&6; }
9960 if ${ac_cv_path_EGREP+:} false; then :
9961   $as_echo_n "(cached) " >&6
9962 else
9963   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
9964    then ac_cv_path_EGREP="$GREP -E"
9965    else
9966      if test -z "$EGREP"; then
9967   ac_path_EGREP_found=false
9968   # Loop through the user's path and test for each of PROGNAME-LIST
9969   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9970 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
9971 do
9972   IFS=$as_save_IFS
9973   test -z "$as_dir" && as_dir=.
9974     for ac_prog in egrep; do
9975     for ac_exec_ext in '' $ac_executable_extensions; do
9976       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
9977       as_fn_executable_p "$ac_path_EGREP" || continue
9978 # Check for GNU ac_path_EGREP and select it if it is found.
9979   # Check for GNU $ac_path_EGREP
9980 case `"$ac_path_EGREP" --version 2>&1` in
9981 *GNU*)
9982   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
9983 *)
9984   ac_count=0
9985   $as_echo_n 0123456789 >"conftest.in"
9986   while :
9987   do
9988     cat "conftest.in" "conftest.in" >"conftest.tmp"
9989     mv "conftest.tmp" "conftest.in"
9990     cp "conftest.in" "conftest.nl"
9991     $as_echo 'EGREP' >> "conftest.nl"
9992     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
9993     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
9994     as_fn_arith $ac_count + 1 && ac_count=$as_val
9995     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
9996       # Best one so far, save it but keep looking for a better one
9997       ac_cv_path_EGREP="$ac_path_EGREP"
9998       ac_path_EGREP_max=$ac_count
9999     fi
10000     # 10*(2^10) chars as input seems more than enough
10001     test $ac_count -gt 10 && break
10002   done
10003   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10004 esac
10005
10006       $ac_path_EGREP_found && break 3
10007     done
10008   done
10009   done
10010 IFS=$as_save_IFS
10011   if test -z "$ac_cv_path_EGREP"; then
10012     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10013   fi
10014 else
10015   ac_cv_path_EGREP=$EGREP
10016 fi
10017
10018    fi
10019 fi
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10021 $as_echo "$ac_cv_path_EGREP" >&6; }
10022  EGREP="$ac_cv_path_EGREP"
10023
10024
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10026 $as_echo_n "checking for ANSI C header files... " >&6; }
10027 if ${ac_cv_header_stdc+:} false; then :
10028   $as_echo_n "(cached) " >&6
10029 else
10030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10031 /* end confdefs.h.  */
10032 #include <stdlib.h>
10033 #include <stdarg.h>
10034 #include <string.h>
10035 #include <float.h>
10036
10037 int
10038 main ()
10039 {
10040
10041   ;
10042   return 0;
10043 }
10044 _ACEOF
10045 if ac_fn_c_try_compile "$LINENO"; then :
10046   ac_cv_header_stdc=yes
10047 else
10048   ac_cv_header_stdc=no
10049 fi
10050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10051
10052 if test $ac_cv_header_stdc = yes; then
10053   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10055 /* end confdefs.h.  */
10056 #include <string.h>
10057
10058 _ACEOF
10059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10060   $EGREP "memchr" >/dev/null 2>&1; then :
10061
10062 else
10063   ac_cv_header_stdc=no
10064 fi
10065 rm -f conftest*
10066
10067 fi
10068
10069 if test $ac_cv_header_stdc = yes; then
10070   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10072 /* end confdefs.h.  */
10073 #include <stdlib.h>
10074
10075 _ACEOF
10076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10077   $EGREP "free" >/dev/null 2>&1; then :
10078
10079 else
10080   ac_cv_header_stdc=no
10081 fi
10082 rm -f conftest*
10083
10084 fi
10085
10086 if test $ac_cv_header_stdc = yes; then
10087   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10088   if test "$cross_compiling" = yes; then :
10089   :
10090 else
10091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10092 /* end confdefs.h.  */
10093 #include <ctype.h>
10094 #include <stdlib.h>
10095 #if ((' ' & 0x0FF) == 0x020)
10096 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10097 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10098 #else
10099 # define ISLOWER(c) \
10100                    (('a' <= (c) && (c) <= 'i') \
10101                      || ('j' <= (c) && (c) <= 'r') \
10102                      || ('s' <= (c) && (c) <= 'z'))
10103 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10104 #endif
10105
10106 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10107 int
10108 main ()
10109 {
10110   int i;
10111   for (i = 0; i < 256; i++)
10112     if (XOR (islower (i), ISLOWER (i))
10113         || toupper (i) != TOUPPER (i))
10114       return 2;
10115   return 0;
10116 }
10117 _ACEOF
10118 if ac_fn_c_try_run "$LINENO"; then :
10119
10120 else
10121   ac_cv_header_stdc=no
10122 fi
10123 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10124   conftest.$ac_objext conftest.beam conftest.$ac_ext
10125 fi
10126
10127 fi
10128 fi
10129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10130 $as_echo "$ac_cv_header_stdc" >&6; }
10131 if test $ac_cv_header_stdc = yes; then
10132
10133 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10134
10135 fi
10136
10137 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10138 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10139                   inttypes.h stdint.h unistd.h
10140 do :
10141   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10142 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10143 "
10144 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10145   cat >>confdefs.h <<_ACEOF
10146 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10147 _ACEOF
10148
10149 fi
10150
10151 done
10152
10153
10154 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10155    # then
10156
10157
10158
10159
10160 ac_ext=c
10161 ac_cpp='$CPP $CPPFLAGS'
10162 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10163 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10164 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10165
10166 ax_pthread_ok=no
10167
10168 # We used to check for pthread.h first, but this fails if pthread.h
10169 # requires special compiler flags (e.g. on Tru64 or Sequent).
10170 # It gets checked for in the link test anyway.
10171
10172 # First of all, check if the user has set any of the PTHREAD_LIBS,
10173 # etcetera environment variables, and if threads linking works using
10174 # them:
10175 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10176         ax_pthread_save_CC="$CC"
10177         ax_pthread_save_CFLAGS="$CFLAGS"
10178         ax_pthread_save_LIBS="$LIBS"
10179         if test "x$PTHREAD_CC" != "x"; then :
10180   CC="$PTHREAD_CC"
10181 fi
10182         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10183         LIBS="$PTHREAD_LIBS $LIBS"
10184         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10185 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10186         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10187 /* end confdefs.h.  */
10188
10189 /* Override any GCC internal prototype to avoid an error.
10190    Use char because int might match the return type of a GCC
10191    builtin and then its argument prototype would still apply.  */
10192 #ifdef __cplusplus
10193 extern "C"
10194 #endif
10195 char pthread_join ();
10196 int
10197 main ()
10198 {
10199 return pthread_join ();
10200   ;
10201   return 0;
10202 }
10203 _ACEOF
10204 if ac_fn_c_try_link "$LINENO"; then :
10205   ax_pthread_ok=yes
10206 fi
10207 rm -f core conftest.err conftest.$ac_objext \
10208     conftest$ac_exeext conftest.$ac_ext
10209         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10210 $as_echo "$ax_pthread_ok" >&6; }
10211         if test "x$ax_pthread_ok" = "xno"; then
10212                 PTHREAD_LIBS=""
10213                 PTHREAD_CFLAGS=""
10214         fi
10215         CC="$ax_pthread_save_CC"
10216         CFLAGS="$ax_pthread_save_CFLAGS"
10217         LIBS="$ax_pthread_save_LIBS"
10218 fi
10219
10220 # We must check for the threads library under a number of different
10221 # names; the ordering is very important because some systems
10222 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10223 # libraries is broken (non-POSIX).
10224
10225 # Create a list of thread flags to try.  Items starting with a "-" are
10226 # C compiler flags, and other items are library names, except for "none"
10227 # which indicates that we try without any flags at all, and "pthread-config"
10228 # which is a program returning the flags for the Pth emulation library.
10229
10230 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10231
10232 # The ordering *is* (sometimes) important.  Some notes on the
10233 # individual items follow:
10234
10235 # pthreads: AIX (must check this before -lpthread)
10236 # none: in case threads are in libc; should be tried before -Kthread and
10237 #       other compiler flags to prevent continual compiler warnings
10238 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10239 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10240 #           (Note: HP C rejects this with "bad form for `-t' option")
10241 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10242 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10243 #      doesn't hurt to check since this sometimes defines pthreads and
10244 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10245 #      is present but should not be used directly; and before -mthreads,
10246 #      because the compiler interprets this as "-mt" + "-hreads")
10247 # -mthreads: Mingw32/gcc, Lynx/gcc
10248 # pthread: Linux, etcetera
10249 # --thread-safe: KAI C++
10250 # pthread-config: use pthread-config program (for GNU Pth library)
10251
10252 case $host_os in
10253
10254         freebsd*)
10255
10256         # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10257         # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10258
10259         ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10260         ;;
10261
10262         hpux*)
10263
10264         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10265         # multi-threading and also sets -lpthread."
10266
10267         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10268         ;;
10269
10270         openedition*)
10271
10272         # IBM z/OS requires a feature-test macro to be defined in order to
10273         # enable POSIX threads at all, so give the user a hint if this is
10274         # not set. (We don't define these ourselves, as they can affect
10275         # other portions of the system API in unpredictable ways.)
10276
10277         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10278 /* end confdefs.h.  */
10279
10280 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10281              AX_PTHREAD_ZOS_MISSING
10282 #            endif
10283
10284 _ACEOF
10285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10286   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10287   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10288 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10289 fi
10290 rm -f conftest*
10291
10292         ;;
10293
10294         solaris*)
10295
10296         # On Solaris (at least, for some versions), libc contains stubbed
10297         # (non-functional) versions of the pthreads routines, so link-based
10298         # tests will erroneously succeed. (N.B.: The stubs are missing
10299         # pthread_cleanup_push, or rather a function called by this macro,
10300         # so we could check for that, but who knows whether they'll stub
10301         # that too in a future libc.)  So we'll check first for the
10302         # standard Solaris way of linking pthreads (-mt -lpthread).
10303
10304         ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10305         ;;
10306 esac
10307
10308 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10309
10310 if test "x$GCC" = "xyes"; then :
10311   ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10312 fi
10313
10314 # The presence of a feature test macro requesting re-entrant function
10315 # definitions is, on some systems, a strong hint that pthreads support is
10316 # correctly enabled
10317
10318 case $host_os in
10319         darwin* | hpux* | linux* | osf* | solaris*)
10320         ax_pthread_check_macro="_REENTRANT"
10321         ;;
10322
10323         aix*)
10324         ax_pthread_check_macro="_THREAD_SAFE"
10325         ;;
10326
10327         *)
10328         ax_pthread_check_macro="--"
10329         ;;
10330 esac
10331 if test "x$ax_pthread_check_macro" = "x--"; then :
10332   ax_pthread_check_cond=0
10333 else
10334   ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10335 fi
10336
10337 # Are we compiling with Clang?
10338
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10340 $as_echo_n "checking whether $CC is Clang... " >&6; }
10341 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10342   $as_echo_n "(cached) " >&6
10343 else
10344   ax_cv_PTHREAD_CLANG=no
10345      # Note that Autoconf sets GCC=yes for Clang as well as GCC
10346      if test "x$GCC" = "xyes"; then
10347         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10348 /* end confdefs.h.  */
10349 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10350 #            if defined(__clang__) && defined(__llvm__)
10351              AX_PTHREAD_CC_IS_CLANG
10352 #            endif
10353
10354 _ACEOF
10355 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10356   $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10357   ax_cv_PTHREAD_CLANG=yes
10358 fi
10359 rm -f conftest*
10360
10361      fi
10362
10363 fi
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10365 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10366 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10367
10368 ax_pthread_clang_warning=no
10369
10370 # Clang needs special handling, because older versions handle the -pthread
10371 # option in a rather... idiosyncratic way
10372
10373 if test "x$ax_pthread_clang" = "xyes"; then
10374
10375         # Clang takes -pthread; it has never supported any other flag
10376
10377         # (Note 1: This will need to be revisited if a system that Clang
10378         # supports has POSIX threads in a separate library.  This tends not
10379         # to be the way of modern systems, but it's conceivable.)
10380
10381         # (Note 2: On some systems, notably Darwin, -pthread is not needed
10382         # to get POSIX threads support; the API is always present and
10383         # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
10384         # -pthread does define _REENTRANT, and while the Darwin headers
10385         # ignore this macro, third-party headers might not.)
10386
10387         PTHREAD_CFLAGS="-pthread"
10388         PTHREAD_LIBS=
10389
10390         ax_pthread_ok=yes
10391
10392         # However, older versions of Clang make a point of warning the user
10393         # that, in an invocation where only linking and no compilation is
10394         # taking place, the -pthread option has no effect ("argument unused
10395         # during compilation").  They expect -pthread to be passed in only
10396         # when source code is being compiled.
10397         #
10398         # Problem is, this is at odds with the way Automake and most other
10399         # C build frameworks function, which is that the same flags used in
10400         # compilation (CFLAGS) are also used in linking.  Many systems
10401         # supported by AX_PTHREAD require exactly this for POSIX threads
10402         # support, and in fact it is often not straightforward to specify a
10403         # flag that is used only in the compilation phase and not in
10404         # linking.  Such a scenario is extremely rare in practice.
10405         #
10406         # Even though use of the -pthread flag in linking would only print
10407         # a warning, this can be a nuisance for well-run software projects
10408         # that build with -Werror.  So if the active version of Clang has
10409         # this misfeature, we search for an option to squash it.
10410
10411         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10412 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10413 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10414   $as_echo_n "(cached) " >&6
10415 else
10416   ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10417              # Create an alternate version of $ac_link that compiles and
10418              # links in two steps (.c -> .o, .o -> exe) instead of one
10419              # (.c -> exe), because the warning occurs only in the second
10420              # step
10421              ax_pthread_save_ac_link="$ac_link"
10422              ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10423              ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10424              ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10425              ax_pthread_save_CFLAGS="$CFLAGS"
10426              for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10427                 if test "x$ax_pthread_try" = "xunknown"; then :
10428   break
10429 fi
10430                 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10431                 ac_link="$ax_pthread_save_ac_link"
10432                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10433 /* end confdefs.h.  */
10434 int main(void){return 0;}
10435 _ACEOF
10436 if ac_fn_c_try_link "$LINENO"; then :
10437   ac_link="$ax_pthread_2step_ac_link"
10438                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10439 /* end confdefs.h.  */
10440 int main(void){return 0;}
10441 _ACEOF
10442 if ac_fn_c_try_link "$LINENO"; then :
10443   break
10444 fi
10445 rm -f core conftest.err conftest.$ac_objext \
10446     conftest$ac_exeext conftest.$ac_ext
10447
10448 fi
10449 rm -f core conftest.err conftest.$ac_objext \
10450     conftest$ac_exeext conftest.$ac_ext
10451              done
10452              ac_link="$ax_pthread_save_ac_link"
10453              CFLAGS="$ax_pthread_save_CFLAGS"
10454              if test "x$ax_pthread_try" = "x"; then :
10455   ax_pthread_try=no
10456 fi
10457              ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10458
10459 fi
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10461 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10462
10463         case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10464                 no | unknown) ;;
10465                 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10466         esac
10467
10468 fi # $ax_pthread_clang = yes
10469
10470 if test "x$ax_pthread_ok" = "xno"; then
10471 for ax_pthread_try_flag in $ax_pthread_flags; do
10472
10473         case $ax_pthread_try_flag in
10474                 none)
10475                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10476 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10477                 ;;
10478
10479                 -mt,pthread)
10480                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10481 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10482                 PTHREAD_CFLAGS="-mt"
10483                 PTHREAD_LIBS="-lpthread"
10484                 ;;
10485
10486                 -*)
10487                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10488 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10489                 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10490                 ;;
10491
10492                 pthread-config)
10493                 # Extract the first word of "pthread-config", so it can be a program name with args.
10494 set dummy pthread-config; ac_word=$2
10495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10496 $as_echo_n "checking for $ac_word... " >&6; }
10497 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10498   $as_echo_n "(cached) " >&6
10499 else
10500   if test -n "$ax_pthread_config"; then
10501   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10502 else
10503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10504 for as_dir in $PATH
10505 do
10506   IFS=$as_save_IFS
10507   test -z "$as_dir" && as_dir=.
10508     for ac_exec_ext in '' $ac_executable_extensions; do
10509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10510     ac_cv_prog_ax_pthread_config="yes"
10511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10512     break 2
10513   fi
10514 done
10515   done
10516 IFS=$as_save_IFS
10517
10518   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10519 fi
10520 fi
10521 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10522 if test -n "$ax_pthread_config"; then
10523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10524 $as_echo "$ax_pthread_config" >&6; }
10525 else
10526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10527 $as_echo "no" >&6; }
10528 fi
10529
10530
10531                 if test "x$ax_pthread_config" = "xno"; then :
10532   continue
10533 fi
10534                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10535                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10536                 ;;
10537
10538                 *)
10539                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10540 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10541                 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10542                 ;;
10543         esac
10544
10545         ax_pthread_save_CFLAGS="$CFLAGS"
10546         ax_pthread_save_LIBS="$LIBS"
10547         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10548         LIBS="$PTHREAD_LIBS $LIBS"
10549
10550         # Check for various functions.  We must include pthread.h,
10551         # since some functions may be macros.  (On the Sequent, we
10552         # need a special flag -Kthread to make this header compile.)
10553         # We check for pthread_join because it is in -lpthread on IRIX
10554         # while pthread_create is in libc.  We check for pthread_attr_init
10555         # due to DEC craziness with -lpthreads.  We check for
10556         # pthread_cleanup_push because it is one of the few pthread
10557         # functions on Solaris that doesn't have a non-functional libc stub.
10558         # We try pthread_create on general principles.
10559
10560         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10561 /* end confdefs.h.  */
10562 #include <pthread.h>
10563 #                       if $ax_pthread_check_cond
10564 #                        error "$ax_pthread_check_macro must be defined"
10565 #                       endif
10566                         static void routine(void *a) { a = 0; }
10567                         static void *start_routine(void *a) { return a; }
10568 int
10569 main ()
10570 {
10571 pthread_t th; pthread_attr_t attr;
10572                         pthread_create(&th, 0, start_routine, 0);
10573                         pthread_join(th, 0);
10574                         pthread_attr_init(&attr);
10575                         pthread_cleanup_push(routine, 0);
10576                         pthread_cleanup_pop(0) /* ; */
10577   ;
10578   return 0;
10579 }
10580 _ACEOF
10581 if ac_fn_c_try_link "$LINENO"; then :
10582   ax_pthread_ok=yes
10583 fi
10584 rm -f core conftest.err conftest.$ac_objext \
10585     conftest$ac_exeext conftest.$ac_ext
10586
10587         CFLAGS="$ax_pthread_save_CFLAGS"
10588         LIBS="$ax_pthread_save_LIBS"
10589
10590         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10591 $as_echo "$ax_pthread_ok" >&6; }
10592         if test "x$ax_pthread_ok" = "xyes"; then :
10593   break
10594 fi
10595
10596         PTHREAD_LIBS=""
10597         PTHREAD_CFLAGS=""
10598 done
10599 fi
10600
10601 # Various other checks:
10602 if test "x$ax_pthread_ok" = "xyes"; then
10603         ax_pthread_save_CFLAGS="$CFLAGS"
10604         ax_pthread_save_LIBS="$LIBS"
10605         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10606         LIBS="$PTHREAD_LIBS $LIBS"
10607
10608         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10609         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10610 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10611 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10612   $as_echo_n "(cached) " >&6
10613 else
10614   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10615              for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10616                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10617 /* end confdefs.h.  */
10618 #include <pthread.h>
10619 int
10620 main ()
10621 {
10622 int attr = $ax_pthread_attr; return attr /* ; */
10623   ;
10624   return 0;
10625 }
10626 _ACEOF
10627 if ac_fn_c_try_link "$LINENO"; then :
10628   ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10629 fi
10630 rm -f core conftest.err conftest.$ac_objext \
10631     conftest$ac_exeext conftest.$ac_ext
10632              done
10633
10634 fi
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10636 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10637         if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10638                test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10639                test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
10640
10641 cat >>confdefs.h <<_ACEOF
10642 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10643 _ACEOF
10644
10645                ax_pthread_joinable_attr_defined=yes
10646
10647 fi
10648
10649         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10650 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
10651 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10652   $as_echo_n "(cached) " >&6
10653 else
10654   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10655              case $host_os in
10656              solaris*)
10657              ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10658              ;;
10659              esac
10660
10661 fi
10662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10663 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10664         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10665                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10666   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10667                ax_pthread_special_flags_added=yes
10668 fi
10669
10670         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10671 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10672 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10673   $as_echo_n "(cached) " >&6
10674 else
10675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10676 /* end confdefs.h.  */
10677 #include <pthread.h>
10678 int
10679 main ()
10680 {
10681 int i = PTHREAD_PRIO_INHERIT;
10682   ;
10683   return 0;
10684 }
10685 _ACEOF
10686 if ac_fn_c_try_link "$LINENO"; then :
10687   ax_cv_PTHREAD_PRIO_INHERIT=yes
10688 else
10689   ax_cv_PTHREAD_PRIO_INHERIT=no
10690 fi
10691 rm -f core conftest.err conftest.$ac_objext \
10692     conftest$ac_exeext conftest.$ac_ext
10693
10694 fi
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10696 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10697         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10698                test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
10699
10700 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10701
10702                ax_pthread_prio_inherit_defined=yes
10703
10704 fi
10705
10706         CFLAGS="$ax_pthread_save_CFLAGS"
10707         LIBS="$ax_pthread_save_LIBS"
10708
10709         # More AIX lossage: compile with *_r variant
10710         if test "x$GCC" != "xyes"; then
10711             case $host_os in
10712                 aix*)
10713                 case "x/$CC" in #(
10714   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10715     #handle absolute path differently from PATH based program lookup
10716                      case "x$CC" in #(
10717   x/*) :
10718     if as_fn_executable_p ${CC}_r; then :
10719   PTHREAD_CC="${CC}_r"
10720 fi ;; #(
10721   *) :
10722     for ac_prog in ${CC}_r
10723 do
10724   # Extract the first word of "$ac_prog", so it can be a program name with args.
10725 set dummy $ac_prog; ac_word=$2
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10727 $as_echo_n "checking for $ac_word... " >&6; }
10728 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10729   $as_echo_n "(cached) " >&6
10730 else
10731   if test -n "$PTHREAD_CC"; then
10732   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10733 else
10734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10735 for as_dir in $PATH
10736 do
10737   IFS=$as_save_IFS
10738   test -z "$as_dir" && as_dir=.
10739     for ac_exec_ext in '' $ac_executable_extensions; do
10740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10741     ac_cv_prog_PTHREAD_CC="$ac_prog"
10742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10743     break 2
10744   fi
10745 done
10746   done
10747 IFS=$as_save_IFS
10748
10749 fi
10750 fi
10751 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10752 if test -n "$PTHREAD_CC"; then
10753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10754 $as_echo "$PTHREAD_CC" >&6; }
10755 else
10756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757 $as_echo "no" >&6; }
10758 fi
10759
10760
10761   test -n "$PTHREAD_CC" && break
10762 done
10763 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10764  ;;
10765 esac ;; #(
10766   *) :
10767      ;;
10768 esac
10769                 ;;
10770             esac
10771         fi
10772 fi
10773
10774 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10775
10776
10777
10778
10779
10780 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10781 if test "x$ax_pthread_ok" = "xyes"; then
10782
10783 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10784
10785         :
10786 else
10787         ax_pthread_ok=no
10788
10789 fi
10790 ac_ext=c
10791 ac_cpp='$CPP $CPPFLAGS'
10792 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10793 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10794 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10795
10796         # set thread flags
10797
10798 # Some platforms use these, so just define them.  They can't hurt if they
10799 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10800 # enables 5-arg getpwuid_r, among other things.
10801 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10802
10803 # Check for *_r functions
10804 _CFLAGS="$CFLAGS"
10805 _LIBS="$LIBS"
10806 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10807 LIBS="$LIBS $PTHREAD_LIBS"
10808
10809 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10810 if test "x$ac_cv_header_pthread_h" = xyes; then :
10811
10812 else
10813   as_fn_error $? "
10814 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10815 fi
10816
10817
10818
10819 for ac_func in strerror_r getpwuid_r gethostbyname_r
10820 do :
10821   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10822 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10823 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10824   cat >>confdefs.h <<_ACEOF
10825 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10826 _ACEOF
10827
10828 fi
10829 done
10830
10831
10832 # Do test here with the proper thread flags
10833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10834 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10835 if ${pgac_cv_func_strerror_r_int+:} false; then :
10836   $as_echo_n "(cached) " >&6
10837 else
10838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10839 /* end confdefs.h.  */
10840 #include <string.h>
10841 int
10842 main ()
10843 {
10844 char buf[100];
10845   switch (strerror_r(1, buf, sizeof(buf)))
10846   { case 0: break; default: break; }
10847
10848   ;
10849   return 0;
10850 }
10851 _ACEOF
10852 if ac_fn_c_try_compile "$LINENO"; then :
10853   pgac_cv_func_strerror_r_int=yes
10854 else
10855   pgac_cv_func_strerror_r_int=no
10856 fi
10857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10858 fi
10859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10860 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10861 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10862
10863 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10864
10865 fi
10866
10867
10868 CFLAGS="$_CFLAGS"
10869 LIBS="$_LIBS"
10870
10871
10872 else
10873    # else
10874 # do not use values from template file
10875 PTHREAD_CFLAGS=
10876 PTHREAD_LIBS=
10877
10878 fi # fi
10879
10880
10881
10882
10883
10884 ##
10885 ## Libraries
10886 ##
10887 ## Most libraries are included only if they demonstrably provide a function
10888 ## we need, but libm is an exception: always include it, because there are
10889 ## too many compilers that play cute optimization games that will break
10890 ## probes for standard functions such as pow().
10891 ##
10892
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10894 $as_echo_n "checking for main in -lm... " >&6; }
10895 if ${ac_cv_lib_m_main+:} false; then :
10896   $as_echo_n "(cached) " >&6
10897 else
10898   ac_check_lib_save_LIBS=$LIBS
10899 LIBS="-lm  $LIBS"
10900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10901 /* end confdefs.h.  */
10902
10903
10904 int
10905 main ()
10906 {
10907 return main ();
10908   ;
10909   return 0;
10910 }
10911 _ACEOF
10912 if ac_fn_c_try_link "$LINENO"; then :
10913   ac_cv_lib_m_main=yes
10914 else
10915   ac_cv_lib_m_main=no
10916 fi
10917 rm -f core conftest.err conftest.$ac_objext \
10918     conftest$ac_exeext conftest.$ac_ext
10919 LIBS=$ac_check_lib_save_LIBS
10920 fi
10921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10922 $as_echo "$ac_cv_lib_m_main" >&6; }
10923 if test "x$ac_cv_lib_m_main" = xyes; then :
10924   cat >>confdefs.h <<_ACEOF
10925 #define HAVE_LIBM 1
10926 _ACEOF
10927
10928   LIBS="-lm $LIBS"
10929
10930 fi
10931
10932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10933 $as_echo_n "checking for library containing setproctitle... " >&6; }
10934 if ${ac_cv_search_setproctitle+:} false; then :
10935   $as_echo_n "(cached) " >&6
10936 else
10937   ac_func_search_save_LIBS=$LIBS
10938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10939 /* end confdefs.h.  */
10940
10941 /* Override any GCC internal prototype to avoid an error.
10942    Use char because int might match the return type of a GCC
10943    builtin and then its argument prototype would still apply.  */
10944 #ifdef __cplusplus
10945 extern "C"
10946 #endif
10947 char setproctitle ();
10948 int
10949 main ()
10950 {
10951 return setproctitle ();
10952   ;
10953   return 0;
10954 }
10955 _ACEOF
10956 for ac_lib in '' util; do
10957   if test -z "$ac_lib"; then
10958     ac_res="none required"
10959   else
10960     ac_res=-l$ac_lib
10961     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10962   fi
10963   if ac_fn_c_try_link "$LINENO"; then :
10964   ac_cv_search_setproctitle=$ac_res
10965 fi
10966 rm -f core conftest.err conftest.$ac_objext \
10967     conftest$ac_exeext
10968   if ${ac_cv_search_setproctitle+:} false; then :
10969   break
10970 fi
10971 done
10972 if ${ac_cv_search_setproctitle+:} false; then :
10973
10974 else
10975   ac_cv_search_setproctitle=no
10976 fi
10977 rm conftest.$ac_ext
10978 LIBS=$ac_func_search_save_LIBS
10979 fi
10980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10981 $as_echo "$ac_cv_search_setproctitle" >&6; }
10982 ac_res=$ac_cv_search_setproctitle
10983 if test "$ac_res" != no; then :
10984   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10985
10986 fi
10987
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10989 $as_echo_n "checking for library containing dlopen... " >&6; }
10990 if ${ac_cv_search_dlopen+:} false; then :
10991   $as_echo_n "(cached) " >&6
10992 else
10993   ac_func_search_save_LIBS=$LIBS
10994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10995 /* end confdefs.h.  */
10996
10997 /* Override any GCC internal prototype to avoid an error.
10998    Use char because int might match the return type of a GCC
10999    builtin and then its argument prototype would still apply.  */
11000 #ifdef __cplusplus
11001 extern "C"
11002 #endif
11003 char dlopen ();
11004 int
11005 main ()
11006 {
11007 return dlopen ();
11008   ;
11009   return 0;
11010 }
11011 _ACEOF
11012 for ac_lib in '' dl; do
11013   if test -z "$ac_lib"; then
11014     ac_res="none required"
11015   else
11016     ac_res=-l$ac_lib
11017     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11018   fi
11019   if ac_fn_c_try_link "$LINENO"; then :
11020   ac_cv_search_dlopen=$ac_res
11021 fi
11022 rm -f core conftest.err conftest.$ac_objext \
11023     conftest$ac_exeext
11024   if ${ac_cv_search_dlopen+:} false; then :
11025   break
11026 fi
11027 done
11028 if ${ac_cv_search_dlopen+:} false; then :
11029
11030 else
11031   ac_cv_search_dlopen=no
11032 fi
11033 rm conftest.$ac_ext
11034 LIBS=$ac_func_search_save_LIBS
11035 fi
11036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11037 $as_echo "$ac_cv_search_dlopen" >&6; }
11038 ac_res=$ac_cv_search_dlopen
11039 if test "$ac_res" != no; then :
11040   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11041
11042 fi
11043
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11045 $as_echo_n "checking for library containing socket... " >&6; }
11046 if ${ac_cv_search_socket+:} false; then :
11047   $as_echo_n "(cached) " >&6
11048 else
11049   ac_func_search_save_LIBS=$LIBS
11050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11051 /* end confdefs.h.  */
11052
11053 /* Override any GCC internal prototype to avoid an error.
11054    Use char because int might match the return type of a GCC
11055    builtin and then its argument prototype would still apply.  */
11056 #ifdef __cplusplus
11057 extern "C"
11058 #endif
11059 char socket ();
11060 int
11061 main ()
11062 {
11063 return socket ();
11064   ;
11065   return 0;
11066 }
11067 _ACEOF
11068 for ac_lib in '' socket ws2_32; do
11069   if test -z "$ac_lib"; then
11070     ac_res="none required"
11071   else
11072     ac_res=-l$ac_lib
11073     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11074   fi
11075   if ac_fn_c_try_link "$LINENO"; then :
11076   ac_cv_search_socket=$ac_res
11077 fi
11078 rm -f core conftest.err conftest.$ac_objext \
11079     conftest$ac_exeext
11080   if ${ac_cv_search_socket+:} false; then :
11081   break
11082 fi
11083 done
11084 if ${ac_cv_search_socket+:} false; then :
11085
11086 else
11087   ac_cv_search_socket=no
11088 fi
11089 rm conftest.$ac_ext
11090 LIBS=$ac_func_search_save_LIBS
11091 fi
11092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11093 $as_echo "$ac_cv_search_socket" >&6; }
11094 ac_res=$ac_cv_search_socket
11095 if test "$ac_res" != no; then :
11096   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11097
11098 fi
11099
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11101 $as_echo_n "checking for library containing shl_load... " >&6; }
11102 if ${ac_cv_search_shl_load+:} false; then :
11103   $as_echo_n "(cached) " >&6
11104 else
11105   ac_func_search_save_LIBS=$LIBS
11106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11107 /* end confdefs.h.  */
11108
11109 /* Override any GCC internal prototype to avoid an error.
11110    Use char because int might match the return type of a GCC
11111    builtin and then its argument prototype would still apply.  */
11112 #ifdef __cplusplus
11113 extern "C"
11114 #endif
11115 char shl_load ();
11116 int
11117 main ()
11118 {
11119 return shl_load ();
11120   ;
11121   return 0;
11122 }
11123 _ACEOF
11124 for ac_lib in '' dld; do
11125   if test -z "$ac_lib"; then
11126     ac_res="none required"
11127   else
11128     ac_res=-l$ac_lib
11129     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11130   fi
11131   if ac_fn_c_try_link "$LINENO"; then :
11132   ac_cv_search_shl_load=$ac_res
11133 fi
11134 rm -f core conftest.err conftest.$ac_objext \
11135     conftest$ac_exeext
11136   if ${ac_cv_search_shl_load+:} false; then :
11137   break
11138 fi
11139 done
11140 if ${ac_cv_search_shl_load+:} false; then :
11141
11142 else
11143   ac_cv_search_shl_load=no
11144 fi
11145 rm conftest.$ac_ext
11146 LIBS=$ac_func_search_save_LIBS
11147 fi
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11149 $as_echo "$ac_cv_search_shl_load" >&6; }
11150 ac_res=$ac_cv_search_shl_load
11151 if test "$ac_res" != no; then :
11152   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11153
11154 fi
11155
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11157 $as_echo_n "checking for library containing getopt_long... " >&6; }
11158 if ${ac_cv_search_getopt_long+:} false; then :
11159   $as_echo_n "(cached) " >&6
11160 else
11161   ac_func_search_save_LIBS=$LIBS
11162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11163 /* end confdefs.h.  */
11164
11165 /* Override any GCC internal prototype to avoid an error.
11166    Use char because int might match the return type of a GCC
11167    builtin and then its argument prototype would still apply.  */
11168 #ifdef __cplusplus
11169 extern "C"
11170 #endif
11171 char getopt_long ();
11172 int
11173 main ()
11174 {
11175 return getopt_long ();
11176   ;
11177   return 0;
11178 }
11179 _ACEOF
11180 for ac_lib in '' getopt gnugetopt; do
11181   if test -z "$ac_lib"; then
11182     ac_res="none required"
11183   else
11184     ac_res=-l$ac_lib
11185     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11186   fi
11187   if ac_fn_c_try_link "$LINENO"; then :
11188   ac_cv_search_getopt_long=$ac_res
11189 fi
11190 rm -f core conftest.err conftest.$ac_objext \
11191     conftest$ac_exeext
11192   if ${ac_cv_search_getopt_long+:} false; then :
11193   break
11194 fi
11195 done
11196 if ${ac_cv_search_getopt_long+:} false; then :
11197
11198 else
11199   ac_cv_search_getopt_long=no
11200 fi
11201 rm conftest.$ac_ext
11202 LIBS=$ac_func_search_save_LIBS
11203 fi
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11205 $as_echo "$ac_cv_search_getopt_long" >&6; }
11206 ac_res=$ac_cv_search_getopt_long
11207 if test "$ac_res" != no; then :
11208   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11209
11210 fi
11211
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11213 $as_echo_n "checking for library containing shm_open... " >&6; }
11214 if ${ac_cv_search_shm_open+:} false; then :
11215   $as_echo_n "(cached) " >&6
11216 else
11217   ac_func_search_save_LIBS=$LIBS
11218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11219 /* end confdefs.h.  */
11220
11221 /* Override any GCC internal prototype to avoid an error.
11222    Use char because int might match the return type of a GCC
11223    builtin and then its argument prototype would still apply.  */
11224 #ifdef __cplusplus
11225 extern "C"
11226 #endif
11227 char shm_open ();
11228 int
11229 main ()
11230 {
11231 return shm_open ();
11232   ;
11233   return 0;
11234 }
11235 _ACEOF
11236 for ac_lib in '' rt; do
11237   if test -z "$ac_lib"; then
11238     ac_res="none required"
11239   else
11240     ac_res=-l$ac_lib
11241     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11242   fi
11243   if ac_fn_c_try_link "$LINENO"; then :
11244   ac_cv_search_shm_open=$ac_res
11245 fi
11246 rm -f core conftest.err conftest.$ac_objext \
11247     conftest$ac_exeext
11248   if ${ac_cv_search_shm_open+:} false; then :
11249   break
11250 fi
11251 done
11252 if ${ac_cv_search_shm_open+:} false; then :
11253
11254 else
11255   ac_cv_search_shm_open=no
11256 fi
11257 rm conftest.$ac_ext
11258 LIBS=$ac_func_search_save_LIBS
11259 fi
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11261 $as_echo "$ac_cv_search_shm_open" >&6; }
11262 ac_res=$ac_cv_search_shm_open
11263 if test "$ac_res" != no; then :
11264   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11265
11266 fi
11267
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11269 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11270 if ${ac_cv_search_shm_unlink+:} false; then :
11271   $as_echo_n "(cached) " >&6
11272 else
11273   ac_func_search_save_LIBS=$LIBS
11274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11275 /* end confdefs.h.  */
11276
11277 /* Override any GCC internal prototype to avoid an error.
11278    Use char because int might match the return type of a GCC
11279    builtin and then its argument prototype would still apply.  */
11280 #ifdef __cplusplus
11281 extern "C"
11282 #endif
11283 char shm_unlink ();
11284 int
11285 main ()
11286 {
11287 return shm_unlink ();
11288   ;
11289   return 0;
11290 }
11291 _ACEOF
11292 for ac_lib in '' rt; do
11293   if test -z "$ac_lib"; then
11294     ac_res="none required"
11295   else
11296     ac_res=-l$ac_lib
11297     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11298   fi
11299   if ac_fn_c_try_link "$LINENO"; then :
11300   ac_cv_search_shm_unlink=$ac_res
11301 fi
11302 rm -f core conftest.err conftest.$ac_objext \
11303     conftest$ac_exeext
11304   if ${ac_cv_search_shm_unlink+:} false; then :
11305   break
11306 fi
11307 done
11308 if ${ac_cv_search_shm_unlink+:} false; then :
11309
11310 else
11311   ac_cv_search_shm_unlink=no
11312 fi
11313 rm conftest.$ac_ext
11314 LIBS=$ac_func_search_save_LIBS
11315 fi
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11317 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11318 ac_res=$ac_cv_search_shm_unlink
11319 if test "$ac_res" != no; then :
11320   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11321
11322 fi
11323
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11325 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11326 if ${ac_cv_search_clock_gettime+:} false; then :
11327   $as_echo_n "(cached) " >&6
11328 else
11329   ac_func_search_save_LIBS=$LIBS
11330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11331 /* end confdefs.h.  */
11332
11333 /* Override any GCC internal prototype to avoid an error.
11334    Use char because int might match the return type of a GCC
11335    builtin and then its argument prototype would still apply.  */
11336 #ifdef __cplusplus
11337 extern "C"
11338 #endif
11339 char clock_gettime ();
11340 int
11341 main ()
11342 {
11343 return clock_gettime ();
11344   ;
11345   return 0;
11346 }
11347 _ACEOF
11348 for ac_lib in '' rt posix4; do
11349   if test -z "$ac_lib"; then
11350     ac_res="none required"
11351   else
11352     ac_res=-l$ac_lib
11353     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11354   fi
11355   if ac_fn_c_try_link "$LINENO"; then :
11356   ac_cv_search_clock_gettime=$ac_res
11357 fi
11358 rm -f core conftest.err conftest.$ac_objext \
11359     conftest$ac_exeext
11360   if ${ac_cv_search_clock_gettime+:} false; then :
11361   break
11362 fi
11363 done
11364 if ${ac_cv_search_clock_gettime+:} false; then :
11365
11366 else
11367   ac_cv_search_clock_gettime=no
11368 fi
11369 rm conftest.$ac_ext
11370 LIBS=$ac_func_search_save_LIBS
11371 fi
11372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11373 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11374 ac_res=$ac_cv_search_clock_gettime
11375 if test "$ac_res" != no; then :
11376   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11377
11378 fi
11379
11380 # Solaris:
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11382 $as_echo_n "checking for library containing fdatasync... " >&6; }
11383 if ${ac_cv_search_fdatasync+:} false; then :
11384   $as_echo_n "(cached) " >&6
11385 else
11386   ac_func_search_save_LIBS=$LIBS
11387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11388 /* end confdefs.h.  */
11389
11390 /* Override any GCC internal prototype to avoid an error.
11391    Use char because int might match the return type of a GCC
11392    builtin and then its argument prototype would still apply.  */
11393 #ifdef __cplusplus
11394 extern "C"
11395 #endif
11396 char fdatasync ();
11397 int
11398 main ()
11399 {
11400 return fdatasync ();
11401   ;
11402   return 0;
11403 }
11404 _ACEOF
11405 for ac_lib in '' rt posix4; do
11406   if test -z "$ac_lib"; then
11407     ac_res="none required"
11408   else
11409     ac_res=-l$ac_lib
11410     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11411   fi
11412   if ac_fn_c_try_link "$LINENO"; then :
11413   ac_cv_search_fdatasync=$ac_res
11414 fi
11415 rm -f core conftest.err conftest.$ac_objext \
11416     conftest$ac_exeext
11417   if ${ac_cv_search_fdatasync+:} false; then :
11418   break
11419 fi
11420 done
11421 if ${ac_cv_search_fdatasync+:} false; then :
11422
11423 else
11424   ac_cv_search_fdatasync=no
11425 fi
11426 rm conftest.$ac_ext
11427 LIBS=$ac_func_search_save_LIBS
11428 fi
11429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11430 $as_echo "$ac_cv_search_fdatasync" >&6; }
11431 ac_res=$ac_cv_search_fdatasync
11432 if test "$ac_res" != no; then :
11433   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11434
11435 fi
11436
11437 # Required for thread_test.c on Solaris
11438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11439 $as_echo_n "checking for library containing sched_yield... " >&6; }
11440 if ${ac_cv_search_sched_yield+:} false; then :
11441   $as_echo_n "(cached) " >&6
11442 else
11443   ac_func_search_save_LIBS=$LIBS
11444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11445 /* end confdefs.h.  */
11446
11447 /* Override any GCC internal prototype to avoid an error.
11448    Use char because int might match the return type of a GCC
11449    builtin and then its argument prototype would still apply.  */
11450 #ifdef __cplusplus
11451 extern "C"
11452 #endif
11453 char sched_yield ();
11454 int
11455 main ()
11456 {
11457 return sched_yield ();
11458   ;
11459   return 0;
11460 }
11461 _ACEOF
11462 for ac_lib in '' rt; do
11463   if test -z "$ac_lib"; then
11464     ac_res="none required"
11465   else
11466     ac_res=-l$ac_lib
11467     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11468   fi
11469   if ac_fn_c_try_link "$LINENO"; then :
11470   ac_cv_search_sched_yield=$ac_res
11471 fi
11472 rm -f core conftest.err conftest.$ac_objext \
11473     conftest$ac_exeext
11474   if ${ac_cv_search_sched_yield+:} false; then :
11475   break
11476 fi
11477 done
11478 if ${ac_cv_search_sched_yield+:} false; then :
11479
11480 else
11481   ac_cv_search_sched_yield=no
11482 fi
11483 rm conftest.$ac_ext
11484 LIBS=$ac_func_search_save_LIBS
11485 fi
11486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11487 $as_echo "$ac_cv_search_sched_yield" >&6; }
11488 ac_res=$ac_cv_search_sched_yield
11489 if test "$ac_res" != no; then :
11490   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11491
11492 fi
11493
11494 # Required for thread_test.c on Solaris 2.5:
11495 # Other ports use it too (HP-UX) so test unconditionally
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11497 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11498 if ${ac_cv_search_gethostbyname_r+:} false; then :
11499   $as_echo_n "(cached) " >&6
11500 else
11501   ac_func_search_save_LIBS=$LIBS
11502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11503 /* end confdefs.h.  */
11504
11505 /* Override any GCC internal prototype to avoid an error.
11506    Use char because int might match the return type of a GCC
11507    builtin and then its argument prototype would still apply.  */
11508 #ifdef __cplusplus
11509 extern "C"
11510 #endif
11511 char gethostbyname_r ();
11512 int
11513 main ()
11514 {
11515 return gethostbyname_r ();
11516   ;
11517   return 0;
11518 }
11519 _ACEOF
11520 for ac_lib in '' nsl; do
11521   if test -z "$ac_lib"; then
11522     ac_res="none required"
11523   else
11524     ac_res=-l$ac_lib
11525     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11526   fi
11527   if ac_fn_c_try_link "$LINENO"; then :
11528   ac_cv_search_gethostbyname_r=$ac_res
11529 fi
11530 rm -f core conftest.err conftest.$ac_objext \
11531     conftest$ac_exeext
11532   if ${ac_cv_search_gethostbyname_r+:} false; then :
11533   break
11534 fi
11535 done
11536 if ${ac_cv_search_gethostbyname_r+:} false; then :
11537
11538 else
11539   ac_cv_search_gethostbyname_r=no
11540 fi
11541 rm conftest.$ac_ext
11542 LIBS=$ac_func_search_save_LIBS
11543 fi
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11545 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11546 ac_res=$ac_cv_search_gethostbyname_r
11547 if test "$ac_res" != no; then :
11548   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11549
11550 fi
11551
11552 # Cygwin:
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11554 $as_echo_n "checking for library containing shmget... " >&6; }
11555 if ${ac_cv_search_shmget+:} false; then :
11556   $as_echo_n "(cached) " >&6
11557 else
11558   ac_func_search_save_LIBS=$LIBS
11559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11560 /* end confdefs.h.  */
11561
11562 /* Override any GCC internal prototype to avoid an error.
11563    Use char because int might match the return type of a GCC
11564    builtin and then its argument prototype would still apply.  */
11565 #ifdef __cplusplus
11566 extern "C"
11567 #endif
11568 char shmget ();
11569 int
11570 main ()
11571 {
11572 return shmget ();
11573   ;
11574   return 0;
11575 }
11576 _ACEOF
11577 for ac_lib in '' cygipc; do
11578   if test -z "$ac_lib"; then
11579     ac_res="none required"
11580   else
11581     ac_res=-l$ac_lib
11582     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11583   fi
11584   if ac_fn_c_try_link "$LINENO"; then :
11585   ac_cv_search_shmget=$ac_res
11586 fi
11587 rm -f core conftest.err conftest.$ac_objext \
11588     conftest$ac_exeext
11589   if ${ac_cv_search_shmget+:} false; then :
11590   break
11591 fi
11592 done
11593 if ${ac_cv_search_shmget+:} false; then :
11594
11595 else
11596   ac_cv_search_shmget=no
11597 fi
11598 rm conftest.$ac_ext
11599 LIBS=$ac_func_search_save_LIBS
11600 fi
11601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11602 $as_echo "$ac_cv_search_shmget" >&6; }
11603 ac_res=$ac_cv_search_shmget
11604 if test "$ac_res" != no; then :
11605   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11606
11607 fi
11608
11609
11610 if test "$with_readline" = yes; then
11611
11612
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11614 $as_echo_n "checking for library containing readline... " >&6; }
11615 if ${pgac_cv_check_readline+:} false; then :
11616   $as_echo_n "(cached) " >&6
11617 else
11618   pgac_cv_check_readline=no
11619 pgac_save_LIBS=$LIBS
11620 if test x"$with_libedit_preferred" != x"yes"
11621 then    READLINE_ORDER="-lreadline -ledit"
11622 else    READLINE_ORDER="-ledit -lreadline"
11623 fi
11624 for pgac_rllib in $READLINE_ORDER ; do
11625   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11626     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11627     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11628 /* end confdefs.h.  */
11629
11630 /* Override any GCC internal prototype to avoid an error.
11631    Use char because int might match the return type of a GCC
11632    builtin and then its argument prototype would still apply.  */
11633 #ifdef __cplusplus
11634 extern "C"
11635 #endif
11636 char readline ();
11637 int
11638 main ()
11639 {
11640 return readline ();
11641   ;
11642   return 0;
11643 }
11644 _ACEOF
11645 if ac_fn_c_try_link "$LINENO"; then :
11646
11647       # Older NetBSD and OpenBSD have a broken linker that does not
11648       # recognize dependent libraries; assume curses is needed if we didn't
11649       # find any dependency.
11650       case $host_os in
11651         netbsd* | openbsd*)
11652           if test x"$pgac_lib" = x"" ; then
11653             pgac_lib=" -lcurses"
11654           fi ;;
11655       esac
11656
11657       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11658       break
11659
11660 fi
11661 rm -f core conftest.err conftest.$ac_objext \
11662     conftest$ac_exeext conftest.$ac_ext
11663   done
11664   if test "$pgac_cv_check_readline" != no ; then
11665     break
11666   fi
11667 done
11668 LIBS=$pgac_save_LIBS
11669
11670 fi
11671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11672 $as_echo "$pgac_cv_check_readline" >&6; }
11673 if test "$pgac_cv_check_readline" != no ; then
11674   LIBS="$pgac_cv_check_readline $LIBS"
11675
11676 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11677
11678 fi
11679
11680
11681   if test x"$pgac_cv_check_readline" = x"no"; then
11682     as_fn_error $? "readline library not found
11683 If you have readline already installed, see config.log for details on the
11684 failure.  It is possible the compiler isn't looking in the proper directory.
11685 Use --without-readline to disable readline support." "$LINENO" 5
11686   fi
11687 fi
11688
11689 if test "$with_zlib" = yes; then
11690   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11691 $as_echo_n "checking for inflate in -lz... " >&6; }
11692 if ${ac_cv_lib_z_inflate+:} false; then :
11693   $as_echo_n "(cached) " >&6
11694 else
11695   ac_check_lib_save_LIBS=$LIBS
11696 LIBS="-lz  $LIBS"
11697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11698 /* end confdefs.h.  */
11699
11700 /* Override any GCC internal prototype to avoid an error.
11701    Use char because int might match the return type of a GCC
11702    builtin and then its argument prototype would still apply.  */
11703 #ifdef __cplusplus
11704 extern "C"
11705 #endif
11706 char inflate ();
11707 int
11708 main ()
11709 {
11710 return inflate ();
11711   ;
11712   return 0;
11713 }
11714 _ACEOF
11715 if ac_fn_c_try_link "$LINENO"; then :
11716   ac_cv_lib_z_inflate=yes
11717 else
11718   ac_cv_lib_z_inflate=no
11719 fi
11720 rm -f core conftest.err conftest.$ac_objext \
11721     conftest$ac_exeext conftest.$ac_ext
11722 LIBS=$ac_check_lib_save_LIBS
11723 fi
11724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11725 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11726 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11727   cat >>confdefs.h <<_ACEOF
11728 #define HAVE_LIBZ 1
11729 _ACEOF
11730
11731   LIBS="-lz $LIBS"
11732
11733 else
11734   as_fn_error $? "zlib library not found
11735 If you have zlib already installed, see config.log for details on the
11736 failure.  It is possible the compiler isn't looking in the proper directory.
11737 Use --without-zlib to disable zlib support." "$LINENO" 5
11738 fi
11739
11740 fi
11741
11742 if test "$enable_spinlocks" = yes; then
11743
11744 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11745
11746 else
11747   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11748 *** Not using spinlocks will cause poor performance." >&5
11749 $as_echo "$as_me: WARNING:
11750 *** Not using spinlocks will cause poor performance." >&2;}
11751 fi
11752
11753 if test "$enable_atomics" = yes; then
11754
11755 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11756
11757 else
11758   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11759 *** Not using atomic operations will cause poor performance." >&5
11760 $as_echo "$as_me: WARNING:
11761 *** Not using atomic operations will cause poor performance." >&2;}
11762 fi
11763
11764 if test "$with_gssapi" = yes ; then
11765   if test "$PORTNAME" != "win32"; then
11766     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11767 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11768 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11769   $as_echo_n "(cached) " >&6
11770 else
11771   ac_func_search_save_LIBS=$LIBS
11772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11773 /* end confdefs.h.  */
11774
11775 /* Override any GCC internal prototype to avoid an error.
11776    Use char because int might match the return type of a GCC
11777    builtin and then its argument prototype would still apply.  */
11778 #ifdef __cplusplus
11779 extern "C"
11780 #endif
11781 char gss_init_sec_context ();
11782 int
11783 main ()
11784 {
11785 return gss_init_sec_context ();
11786   ;
11787   return 0;
11788 }
11789 _ACEOF
11790 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11791   if test -z "$ac_lib"; then
11792     ac_res="none required"
11793   else
11794     ac_res=-l$ac_lib
11795     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11796   fi
11797   if ac_fn_c_try_link "$LINENO"; then :
11798   ac_cv_search_gss_init_sec_context=$ac_res
11799 fi
11800 rm -f core conftest.err conftest.$ac_objext \
11801     conftest$ac_exeext
11802   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11803   break
11804 fi
11805 done
11806 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11807
11808 else
11809   ac_cv_search_gss_init_sec_context=no
11810 fi
11811 rm conftest.$ac_ext
11812 LIBS=$ac_func_search_save_LIBS
11813 fi
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11815 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11816 ac_res=$ac_cv_search_gss_init_sec_context
11817 if test "$ac_res" != no; then :
11818   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11819
11820 else
11821   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11822 fi
11823
11824   else
11825     LIBS="$LIBS -lgssapi32"
11826   fi
11827 fi
11828
11829 if test "$with_openssl" = yes ; then
11830     if test "$PORTNAME" != "win32"; then
11831      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11832 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11833 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11834   $as_echo_n "(cached) " >&6
11835 else
11836   ac_check_lib_save_LIBS=$LIBS
11837 LIBS="-lcrypto  $LIBS"
11838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11839 /* end confdefs.h.  */
11840
11841 /* Override any GCC internal prototype to avoid an error.
11842    Use char because int might match the return type of a GCC
11843    builtin and then its argument prototype would still apply.  */
11844 #ifdef __cplusplus
11845 extern "C"
11846 #endif
11847 char CRYPTO_new_ex_data ();
11848 int
11849 main ()
11850 {
11851 return CRYPTO_new_ex_data ();
11852   ;
11853   return 0;
11854 }
11855 _ACEOF
11856 if ac_fn_c_try_link "$LINENO"; then :
11857   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11858 else
11859   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11860 fi
11861 rm -f core conftest.err conftest.$ac_objext \
11862     conftest$ac_exeext conftest.$ac_ext
11863 LIBS=$ac_check_lib_save_LIBS
11864 fi
11865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11866 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11867 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11868   cat >>confdefs.h <<_ACEOF
11869 #define HAVE_LIBCRYPTO 1
11870 _ACEOF
11871
11872   LIBS="-lcrypto $LIBS"
11873
11874 else
11875   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11876 fi
11877
11878      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11879 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11880 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11881   $as_echo_n "(cached) " >&6
11882 else
11883   ac_check_lib_save_LIBS=$LIBS
11884 LIBS="-lssl  $LIBS"
11885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11886 /* end confdefs.h.  */
11887
11888 /* Override any GCC internal prototype to avoid an error.
11889    Use char because int might match the return type of a GCC
11890    builtin and then its argument prototype would still apply.  */
11891 #ifdef __cplusplus
11892 extern "C"
11893 #endif
11894 char SSL_new ();
11895 int
11896 main ()
11897 {
11898 return SSL_new ();
11899   ;
11900   return 0;
11901 }
11902 _ACEOF
11903 if ac_fn_c_try_link "$LINENO"; then :
11904   ac_cv_lib_ssl_SSL_new=yes
11905 else
11906   ac_cv_lib_ssl_SSL_new=no
11907 fi
11908 rm -f core conftest.err conftest.$ac_objext \
11909     conftest$ac_exeext conftest.$ac_ext
11910 LIBS=$ac_check_lib_save_LIBS
11911 fi
11912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11913 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11914 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11915   cat >>confdefs.h <<_ACEOF
11916 #define HAVE_LIBSSL 1
11917 _ACEOF
11918
11919   LIBS="-lssl $LIBS"
11920
11921 else
11922   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11923 fi
11924
11925   else
11926      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11927 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11928 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11929   $as_echo_n "(cached) " >&6
11930 else
11931   ac_func_search_save_LIBS=$LIBS
11932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11933 /* end confdefs.h.  */
11934
11935 /* Override any GCC internal prototype to avoid an error.
11936    Use char because int might match the return type of a GCC
11937    builtin and then its argument prototype would still apply.  */
11938 #ifdef __cplusplus
11939 extern "C"
11940 #endif
11941 char CRYPTO_new_ex_data ();
11942 int
11943 main ()
11944 {
11945 return CRYPTO_new_ex_data ();
11946   ;
11947   return 0;
11948 }
11949 _ACEOF
11950 for ac_lib in '' eay32 crypto; do
11951   if test -z "$ac_lib"; then
11952     ac_res="none required"
11953   else
11954     ac_res=-l$ac_lib
11955     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11956   fi
11957   if ac_fn_c_try_link "$LINENO"; then :
11958   ac_cv_search_CRYPTO_new_ex_data=$ac_res
11959 fi
11960 rm -f core conftest.err conftest.$ac_objext \
11961     conftest$ac_exeext
11962   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11963   break
11964 fi
11965 done
11966 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11967
11968 else
11969   ac_cv_search_CRYPTO_new_ex_data=no
11970 fi
11971 rm conftest.$ac_ext
11972 LIBS=$ac_func_search_save_LIBS
11973 fi
11974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
11975 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
11976 ac_res=$ac_cv_search_CRYPTO_new_ex_data
11977 if test "$ac_res" != no; then :
11978   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11979
11980 else
11981   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
11982 fi
11983
11984      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
11985 $as_echo_n "checking for library containing SSL_new... " >&6; }
11986 if ${ac_cv_search_SSL_new+:} false; then :
11987   $as_echo_n "(cached) " >&6
11988 else
11989   ac_func_search_save_LIBS=$LIBS
11990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11991 /* end confdefs.h.  */
11992
11993 /* Override any GCC internal prototype to avoid an error.
11994    Use char because int might match the return type of a GCC
11995    builtin and then its argument prototype would still apply.  */
11996 #ifdef __cplusplus
11997 extern "C"
11998 #endif
11999 char SSL_new ();
12000 int
12001 main ()
12002 {
12003 return SSL_new ();
12004   ;
12005   return 0;
12006 }
12007 _ACEOF
12008 for ac_lib in '' ssleay32 ssl; do
12009   if test -z "$ac_lib"; then
12010     ac_res="none required"
12011   else
12012     ac_res=-l$ac_lib
12013     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12014   fi
12015   if ac_fn_c_try_link "$LINENO"; then :
12016   ac_cv_search_SSL_new=$ac_res
12017 fi
12018 rm -f core conftest.err conftest.$ac_objext \
12019     conftest$ac_exeext
12020   if ${ac_cv_search_SSL_new+:} false; then :
12021   break
12022 fi
12023 done
12024 if ${ac_cv_search_SSL_new+:} false; then :
12025
12026 else
12027   ac_cv_search_SSL_new=no
12028 fi
12029 rm conftest.$ac_ext
12030 LIBS=$ac_func_search_save_LIBS
12031 fi
12032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12033 $as_echo "$ac_cv_search_SSL_new" >&6; }
12034 ac_res=$ac_cv_search_SSL_new
12035 if test "$ac_res" != no; then :
12036   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12037
12038 else
12039   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12040 fi
12041
12042   fi
12043   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12044 do :
12045   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12046 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12047 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12048   cat >>confdefs.h <<_ACEOF
12049 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12050 _ACEOF
12051
12052 fi
12053 done
12054
12055   # Functions introduced in OpenSSL 1.1.0. We used to check for
12056   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12057   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12058   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12059   # functions.
12060   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data
12061 do :
12062   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12063 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12064 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12065   cat >>confdefs.h <<_ACEOF
12066 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12067 _ACEOF
12068
12069 fi
12070 done
12071
12072   # OpenSSL versions before 1.1.0 required setting callback functions, for
12073   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12074   # function was removed.
12075   for ac_func in CRYPTO_lock
12076 do :
12077   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12078 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12079   cat >>confdefs.h <<_ACEOF
12080 #define HAVE_CRYPTO_LOCK 1
12081 _ACEOF
12082
12083 fi
12084 done
12085
12086 fi
12087
12088 if test "$with_pam" = yes ; then
12089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12090 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12091 if ${ac_cv_lib_pam_pam_start+:} false; then :
12092   $as_echo_n "(cached) " >&6
12093 else
12094   ac_check_lib_save_LIBS=$LIBS
12095 LIBS="-lpam  $LIBS"
12096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12097 /* end confdefs.h.  */
12098
12099 /* Override any GCC internal prototype to avoid an error.
12100    Use char because int might match the return type of a GCC
12101    builtin and then its argument prototype would still apply.  */
12102 #ifdef __cplusplus
12103 extern "C"
12104 #endif
12105 char pam_start ();
12106 int
12107 main ()
12108 {
12109 return pam_start ();
12110   ;
12111   return 0;
12112 }
12113 _ACEOF
12114 if ac_fn_c_try_link "$LINENO"; then :
12115   ac_cv_lib_pam_pam_start=yes
12116 else
12117   ac_cv_lib_pam_pam_start=no
12118 fi
12119 rm -f core conftest.err conftest.$ac_objext \
12120     conftest$ac_exeext conftest.$ac_ext
12121 LIBS=$ac_check_lib_save_LIBS
12122 fi
12123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12124 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12125 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12126   cat >>confdefs.h <<_ACEOF
12127 #define HAVE_LIBPAM 1
12128 _ACEOF
12129
12130   LIBS="-lpam $LIBS"
12131
12132 else
12133   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12134 fi
12135
12136 fi
12137
12138 if test "$with_libxml" = yes ; then
12139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12140 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12141 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12142   $as_echo_n "(cached) " >&6
12143 else
12144   ac_check_lib_save_LIBS=$LIBS
12145 LIBS="-lxml2  $LIBS"
12146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12147 /* end confdefs.h.  */
12148
12149 /* Override any GCC internal prototype to avoid an error.
12150    Use char because int might match the return type of a GCC
12151    builtin and then its argument prototype would still apply.  */
12152 #ifdef __cplusplus
12153 extern "C"
12154 #endif
12155 char xmlSaveToBuffer ();
12156 int
12157 main ()
12158 {
12159 return xmlSaveToBuffer ();
12160   ;
12161   return 0;
12162 }
12163 _ACEOF
12164 if ac_fn_c_try_link "$LINENO"; then :
12165   ac_cv_lib_xml2_xmlSaveToBuffer=yes
12166 else
12167   ac_cv_lib_xml2_xmlSaveToBuffer=no
12168 fi
12169 rm -f core conftest.err conftest.$ac_objext \
12170     conftest$ac_exeext conftest.$ac_ext
12171 LIBS=$ac_check_lib_save_LIBS
12172 fi
12173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12174 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12175 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12176   cat >>confdefs.h <<_ACEOF
12177 #define HAVE_LIBXML2 1
12178 _ACEOF
12179
12180   LIBS="-lxml2 $LIBS"
12181
12182 else
12183   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12184 fi
12185
12186 fi
12187
12188 if test "$with_libxslt" = yes ; then
12189   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12190 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12191 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12192   $as_echo_n "(cached) " >&6
12193 else
12194   ac_check_lib_save_LIBS=$LIBS
12195 LIBS="-lxslt  $LIBS"
12196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12197 /* end confdefs.h.  */
12198
12199 /* Override any GCC internal prototype to avoid an error.
12200    Use char because int might match the return type of a GCC
12201    builtin and then its argument prototype would still apply.  */
12202 #ifdef __cplusplus
12203 extern "C"
12204 #endif
12205 char xsltCleanupGlobals ();
12206 int
12207 main ()
12208 {
12209 return xsltCleanupGlobals ();
12210   ;
12211   return 0;
12212 }
12213 _ACEOF
12214 if ac_fn_c_try_link "$LINENO"; then :
12215   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12216 else
12217   ac_cv_lib_xslt_xsltCleanupGlobals=no
12218 fi
12219 rm -f core conftest.err conftest.$ac_objext \
12220     conftest$ac_exeext conftest.$ac_ext
12221 LIBS=$ac_check_lib_save_LIBS
12222 fi
12223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12224 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12225 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12226   cat >>confdefs.h <<_ACEOF
12227 #define HAVE_LIBXSLT 1
12228 _ACEOF
12229
12230   LIBS="-lxslt $LIBS"
12231
12232 else
12233   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12234 fi
12235
12236 fi
12237
12238 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12239 if test "$with_ldap" = yes ; then
12240   _LIBS="$LIBS"
12241   if test "$PORTNAME" != "win32"; then
12242     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12243 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12244 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12245   $as_echo_n "(cached) " >&6
12246 else
12247   ac_check_lib_save_LIBS=$LIBS
12248 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12250 /* end confdefs.h.  */
12251
12252 /* Override any GCC internal prototype to avoid an error.
12253    Use char because int might match the return type of a GCC
12254    builtin and then its argument prototype would still apply.  */
12255 #ifdef __cplusplus
12256 extern "C"
12257 #endif
12258 char ldap_bind ();
12259 int
12260 main ()
12261 {
12262 return ldap_bind ();
12263   ;
12264   return 0;
12265 }
12266 _ACEOF
12267 if ac_fn_c_try_link "$LINENO"; then :
12268   ac_cv_lib_ldap_ldap_bind=yes
12269 else
12270   ac_cv_lib_ldap_ldap_bind=no
12271 fi
12272 rm -f core conftest.err conftest.$ac_objext \
12273     conftest$ac_exeext conftest.$ac_ext
12274 LIBS=$ac_check_lib_save_LIBS
12275 fi
12276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12277 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12278 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12279   cat >>confdefs.h <<_ACEOF
12280 #define HAVE_LIBLDAP 1
12281 _ACEOF
12282
12283   LIBS="-lldap $LIBS"
12284
12285 else
12286   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12287 fi
12288
12289     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12290     if test "$enable_thread_safety" = yes; then
12291       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12292       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12293 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12294 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12295   $as_echo_n "(cached) " >&6
12296 else
12297   ac_check_lib_save_LIBS=$LIBS
12298 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12300 /* end confdefs.h.  */
12301
12302 /* Override any GCC internal prototype to avoid an error.
12303    Use char because int might match the return type of a GCC
12304    builtin and then its argument prototype would still apply.  */
12305 #ifdef __cplusplus
12306 extern "C"
12307 #endif
12308 char ldap_simple_bind ();
12309 int
12310 main ()
12311 {
12312 return ldap_simple_bind ();
12313   ;
12314   return 0;
12315 }
12316 _ACEOF
12317 if ac_fn_c_try_link "$LINENO"; then :
12318   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12319 else
12320   ac_cv_lib_ldap_r_ldap_simple_bind=no
12321 fi
12322 rm -f core conftest.err conftest.$ac_objext \
12323     conftest$ac_exeext conftest.$ac_ext
12324 LIBS=$ac_check_lib_save_LIBS
12325 fi
12326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12327 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12328 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12329   cat >>confdefs.h <<_ACEOF
12330 #define HAVE_LIBLDAP_R 1
12331 _ACEOF
12332
12333   LIBS="-lldap_r $LIBS"
12334
12335 else
12336   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12337 fi
12338
12339       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12340     else
12341       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12342     fi
12343     for ac_func in ldap_initialize
12344 do :
12345   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12346 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12347   cat >>confdefs.h <<_ACEOF
12348 #define HAVE_LDAP_INITIALIZE 1
12349 _ACEOF
12350
12351 fi
12352 done
12353
12354   else
12355     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12356 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12357 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12358   $as_echo_n "(cached) " >&6
12359 else
12360   ac_check_lib_save_LIBS=$LIBS
12361 LIBS="-lwldap32  $LIBS"
12362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12363 /* end confdefs.h.  */
12364
12365 /* Override any GCC internal prototype to avoid an error.
12366    Use char because int might match the return type of a GCC
12367    builtin and then its argument prototype would still apply.  */
12368 #ifdef __cplusplus
12369 extern "C"
12370 #endif
12371 char ldap_bind ();
12372 int
12373 main ()
12374 {
12375 return ldap_bind ();
12376   ;
12377   return 0;
12378 }
12379 _ACEOF
12380 if ac_fn_c_try_link "$LINENO"; then :
12381   ac_cv_lib_wldap32_ldap_bind=yes
12382 else
12383   ac_cv_lib_wldap32_ldap_bind=no
12384 fi
12385 rm -f core conftest.err conftest.$ac_objext \
12386     conftest$ac_exeext conftest.$ac_ext
12387 LIBS=$ac_check_lib_save_LIBS
12388 fi
12389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12390 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12391 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12392   cat >>confdefs.h <<_ACEOF
12393 #define HAVE_LIBWLDAP32 1
12394 _ACEOF
12395
12396   LIBS="-lwldap32 $LIBS"
12397
12398 else
12399   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12400 fi
12401
12402     LDAP_LIBS_FE="-lwldap32"
12403     LDAP_LIBS_BE="-lwldap32"
12404   fi
12405   LIBS="$_LIBS"
12406 fi
12407
12408
12409
12410 # for contrib/sepgsql
12411 if test "$with_selinux" = yes; then
12412   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12413 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12414 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12415   $as_echo_n "(cached) " >&6
12416 else
12417   ac_check_lib_save_LIBS=$LIBS
12418 LIBS="-lselinux  $LIBS"
12419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12420 /* end confdefs.h.  */
12421
12422 /* Override any GCC internal prototype to avoid an error.
12423    Use char because int might match the return type of a GCC
12424    builtin and then its argument prototype would still apply.  */
12425 #ifdef __cplusplus
12426 extern "C"
12427 #endif
12428 char security_compute_create_name ();
12429 int
12430 main ()
12431 {
12432 return security_compute_create_name ();
12433   ;
12434   return 0;
12435 }
12436 _ACEOF
12437 if ac_fn_c_try_link "$LINENO"; then :
12438   ac_cv_lib_selinux_security_compute_create_name=yes
12439 else
12440   ac_cv_lib_selinux_security_compute_create_name=no
12441 fi
12442 rm -f core conftest.err conftest.$ac_objext \
12443     conftest$ac_exeext conftest.$ac_ext
12444 LIBS=$ac_check_lib_save_LIBS
12445 fi
12446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12447 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12448 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12449   cat >>confdefs.h <<_ACEOF
12450 #define HAVE_LIBSELINUX 1
12451 _ACEOF
12452
12453   LIBS="-lselinux $LIBS"
12454
12455 else
12456   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12457 fi
12458
12459 fi
12460
12461 # for contrib/uuid-ossp
12462 if test "$with_uuid" = bsd ; then
12463   # On BSD, the UUID functions are in libc
12464   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12465 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12466   UUID_LIBS=""
12467 else
12468   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12469 fi
12470
12471 elif test "$with_uuid" = e2fs ; then
12472   # On macOS, the UUID functions are in libc
12473   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12474 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12475   UUID_LIBS=""
12476 else
12477   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12478 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12479 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12480   $as_echo_n "(cached) " >&6
12481 else
12482   ac_check_lib_save_LIBS=$LIBS
12483 LIBS="-luuid  $LIBS"
12484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12485 /* end confdefs.h.  */
12486
12487 /* Override any GCC internal prototype to avoid an error.
12488    Use char because int might match the return type of a GCC
12489    builtin and then its argument prototype would still apply.  */
12490 #ifdef __cplusplus
12491 extern "C"
12492 #endif
12493 char uuid_generate ();
12494 int
12495 main ()
12496 {
12497 return uuid_generate ();
12498   ;
12499   return 0;
12500 }
12501 _ACEOF
12502 if ac_fn_c_try_link "$LINENO"; then :
12503   ac_cv_lib_uuid_uuid_generate=yes
12504 else
12505   ac_cv_lib_uuid_uuid_generate=no
12506 fi
12507 rm -f core conftest.err conftest.$ac_objext \
12508     conftest$ac_exeext conftest.$ac_ext
12509 LIBS=$ac_check_lib_save_LIBS
12510 fi
12511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12512 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12513 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12514   UUID_LIBS="-luuid"
12515 else
12516   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12517 fi
12518
12519 fi
12520
12521 elif test "$with_uuid" = ossp ; then
12522   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12523 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12524 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12525   $as_echo_n "(cached) " >&6
12526 else
12527   ac_check_lib_save_LIBS=$LIBS
12528 LIBS="-lossp-uuid  $LIBS"
12529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12530 /* end confdefs.h.  */
12531
12532 /* Override any GCC internal prototype to avoid an error.
12533    Use char because int might match the return type of a GCC
12534    builtin and then its argument prototype would still apply.  */
12535 #ifdef __cplusplus
12536 extern "C"
12537 #endif
12538 char uuid_export ();
12539 int
12540 main ()
12541 {
12542 return uuid_export ();
12543   ;
12544   return 0;
12545 }
12546 _ACEOF
12547 if ac_fn_c_try_link "$LINENO"; then :
12548   ac_cv_lib_ossp_uuid_uuid_export=yes
12549 else
12550   ac_cv_lib_ossp_uuid_uuid_export=no
12551 fi
12552 rm -f core conftest.err conftest.$ac_objext \
12553     conftest$ac_exeext conftest.$ac_ext
12554 LIBS=$ac_check_lib_save_LIBS
12555 fi
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12557 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12558 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12559   UUID_LIBS="-lossp-uuid"
12560 else
12561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12562 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12563 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12564   $as_echo_n "(cached) " >&6
12565 else
12566   ac_check_lib_save_LIBS=$LIBS
12567 LIBS="-luuid  $LIBS"
12568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12569 /* end confdefs.h.  */
12570
12571 /* Override any GCC internal prototype to avoid an error.
12572    Use char because int might match the return type of a GCC
12573    builtin and then its argument prototype would still apply.  */
12574 #ifdef __cplusplus
12575 extern "C"
12576 #endif
12577 char uuid_export ();
12578 int
12579 main ()
12580 {
12581 return uuid_export ();
12582   ;
12583   return 0;
12584 }
12585 _ACEOF
12586 if ac_fn_c_try_link "$LINENO"; then :
12587   ac_cv_lib_uuid_uuid_export=yes
12588 else
12589   ac_cv_lib_uuid_uuid_export=no
12590 fi
12591 rm -f core conftest.err conftest.$ac_objext \
12592     conftest$ac_exeext conftest.$ac_ext
12593 LIBS=$ac_check_lib_save_LIBS
12594 fi
12595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12596 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12597 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12598   UUID_LIBS="-luuid"
12599 else
12600   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12601 fi
12602
12603 fi
12604
12605 fi
12606
12607
12608
12609 ##
12610 ## Header files
12611 ##
12612
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12614 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12615 if ${ac_cv_header_stdbool_h+:} false; then :
12616   $as_echo_n "(cached) " >&6
12617 else
12618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12619 /* end confdefs.h.  */
12620
12621              #include <stdbool.h>
12622              #ifndef bool
12623               "error: bool is not defined"
12624              #endif
12625              #ifndef false
12626               "error: false is not defined"
12627              #endif
12628              #if false
12629               "error: false is not 0"
12630              #endif
12631              #ifndef true
12632               "error: true is not defined"
12633              #endif
12634              #if true != 1
12635               "error: true is not 1"
12636              #endif
12637              #ifndef __bool_true_false_are_defined
12638               "error: __bool_true_false_are_defined is not defined"
12639              #endif
12640
12641              struct s { _Bool s: 1; _Bool t; } s;
12642
12643              char a[true == 1 ? 1 : -1];
12644              char b[false == 0 ? 1 : -1];
12645              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12646              char d[(bool) 0.5 == true ? 1 : -1];
12647              /* See body of main program for 'e'.  */
12648              char f[(_Bool) 0.0 == false ? 1 : -1];
12649              char g[true];
12650              char h[sizeof (_Bool)];
12651              char i[sizeof s.t];
12652              enum { j = false, k = true, l = false * true, m = true * 256 };
12653              /* The following fails for
12654                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12655              _Bool n[m];
12656              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12657              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12658              /* Catch a bug in an HP-UX C compiler.  See
12659                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12660                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12661               */
12662              _Bool q = true;
12663              _Bool *pq = &q;
12664
12665 int
12666 main ()
12667 {
12668
12669              bool e = &s;
12670              *pq |= q;
12671              *pq |= ! q;
12672              /* Refer to every declared value, to avoid compiler optimizations.  */
12673              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12674                      + !m + !n + !o + !p + !q + !pq);
12675
12676   ;
12677   return 0;
12678 }
12679 _ACEOF
12680 if ac_fn_c_try_compile "$LINENO"; then :
12681   ac_cv_header_stdbool_h=yes
12682 else
12683   ac_cv_header_stdbool_h=no
12684 fi
12685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12686 fi
12687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12688 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12689    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12690 if test "x$ac_cv_type__Bool" = xyes; then :
12691
12692 cat >>confdefs.h <<_ACEOF
12693 #define HAVE__BOOL 1
12694 _ACEOF
12695
12696
12697 fi
12698
12699
12700 if test $ac_cv_header_stdbool_h = yes; then
12701
12702 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12703
12704 fi
12705
12706
12707 for ac_header in atomic.h copyfile.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.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/un.h termios.h ucred.h utime.h wchar.h wctype.h
12708 do :
12709   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12710 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12711 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12712   cat >>confdefs.h <<_ACEOF
12713 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12714 _ACEOF
12715
12716 fi
12717
12718 done
12719
12720
12721 # On BSD, test for net/if.h will fail unless sys/socket.h
12722 # is included first.
12723 for ac_header in net/if.h
12724 do :
12725   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12726 #include <sys/socket.h>
12727
12728 "
12729 if test "x$ac_cv_header_net_if_h" = xyes; then :
12730   cat >>confdefs.h <<_ACEOF
12731 #define HAVE_NET_IF_H 1
12732 _ACEOF
12733
12734 fi
12735
12736 done
12737
12738
12739 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12740 # is included first.
12741 for ac_header in sys/ucred.h
12742 do :
12743   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12744 #include <sys/param.h>
12745
12746 "
12747 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12748   cat >>confdefs.h <<_ACEOF
12749 #define HAVE_SYS_UCRED_H 1
12750 _ACEOF
12751
12752 fi
12753
12754 done
12755
12756
12757 # At least on IRIX, test for netinet/tcp.h will fail unless
12758 # netinet/in.h is included first.
12759 for ac_header in netinet/tcp.h
12760 do :
12761   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12762 #include <netinet/in.h>
12763
12764 "
12765 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12766   cat >>confdefs.h <<_ACEOF
12767 #define HAVE_NETINET_TCP_H 1
12768 _ACEOF
12769
12770 fi
12771
12772 done
12773
12774
12775 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12776   for ac_header in readline/readline.h
12777 do :
12778   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12779 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12780   cat >>confdefs.h <<_ACEOF
12781 #define HAVE_READLINE_READLINE_H 1
12782 _ACEOF
12783
12784 else
12785   for ac_header in readline.h
12786 do :
12787   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12788 if test "x$ac_cv_header_readline_h" = xyes; then :
12789   cat >>confdefs.h <<_ACEOF
12790 #define HAVE_READLINE_H 1
12791 _ACEOF
12792
12793 else
12794   as_fn_error $? "readline header not found
12795 If you have readline already installed, see config.log for details on the
12796 failure.  It is possible the compiler isn't looking in the proper directory.
12797 Use --without-readline to disable readline support." "$LINENO" 5
12798 fi
12799
12800 done
12801
12802 fi
12803
12804 done
12805
12806   for ac_header in readline/history.h
12807 do :
12808   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12809 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12810   cat >>confdefs.h <<_ACEOF
12811 #define HAVE_READLINE_HISTORY_H 1
12812 _ACEOF
12813
12814 else
12815   for ac_header in history.h
12816 do :
12817   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12818 if test "x$ac_cv_header_history_h" = xyes; then :
12819   cat >>confdefs.h <<_ACEOF
12820 #define HAVE_HISTORY_H 1
12821 _ACEOF
12822
12823 else
12824   as_fn_error $? "history header not found
12825 If you have readline already installed, see config.log for details on the
12826 failure.  It is possible the compiler isn't looking in the proper directory.
12827 Use --without-readline to disable readline support." "$LINENO" 5
12828 fi
12829
12830 done
12831
12832 fi
12833
12834 done
12835
12836 fi
12837
12838 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12839 # Some installations of libedit usurp /usr/include/readline/, which seems
12840 # bad practice, since in combined installations readline will have its headers
12841 # there.  We might have to resort to AC_EGREP checks to make sure we found
12842 # the proper header...
12843   for ac_header in editline/readline.h
12844 do :
12845   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12846 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12847   cat >>confdefs.h <<_ACEOF
12848 #define HAVE_EDITLINE_READLINE_H 1
12849 _ACEOF
12850
12851 else
12852   for ac_header in readline.h
12853 do :
12854   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12855 if test "x$ac_cv_header_readline_h" = xyes; then :
12856   cat >>confdefs.h <<_ACEOF
12857 #define HAVE_READLINE_H 1
12858 _ACEOF
12859
12860 else
12861   for ac_header in readline/readline.h
12862 do :
12863   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12864 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12865   cat >>confdefs.h <<_ACEOF
12866 #define HAVE_READLINE_READLINE_H 1
12867 _ACEOF
12868
12869 else
12870   as_fn_error $? "readline header not found
12871 If you have libedit already installed, see config.log for details on the
12872 failure.  It is possible the compiler isn't looking in the proper directory.
12873 Use --without-readline to disable libedit support." "$LINENO" 5
12874 fi
12875
12876 done
12877
12878 fi
12879
12880 done
12881
12882 fi
12883
12884 done
12885
12886 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12887 # not be there at all.  Hence, don't complain if not found.  We must check
12888 # though, since in yet other versions it is an independent header.
12889   for ac_header in editline/history.h
12890 do :
12891   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12892 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12893   cat >>confdefs.h <<_ACEOF
12894 #define HAVE_EDITLINE_HISTORY_H 1
12895 _ACEOF
12896
12897 else
12898   for ac_header in history.h
12899 do :
12900   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12901 if test "x$ac_cv_header_history_h" = xyes; then :
12902   cat >>confdefs.h <<_ACEOF
12903 #define HAVE_HISTORY_H 1
12904 _ACEOF
12905
12906 else
12907   for ac_header in readline/history.h
12908 do :
12909   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12910 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12911   cat >>confdefs.h <<_ACEOF
12912 #define HAVE_READLINE_HISTORY_H 1
12913 _ACEOF
12914
12915 fi
12916
12917 done
12918
12919 fi
12920
12921 done
12922
12923 fi
12924
12925 done
12926
12927 fi
12928
12929 if test "$with_zlib" = yes; then
12930   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12931 if test "x$ac_cv_header_zlib_h" = xyes; then :
12932
12933 else
12934   as_fn_error $? "zlib header not found
12935 If you have zlib already installed, see config.log for details on the
12936 failure.  It is possible the compiler isn't looking in the proper directory.
12937 Use --without-zlib to disable zlib support." "$LINENO" 5
12938 fi
12939
12940
12941 fi
12942
12943 if test "$with_gssapi" = yes ; then
12944   for ac_header in gssapi/gssapi.h
12945 do :
12946   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
12947 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
12948   cat >>confdefs.h <<_ACEOF
12949 #define HAVE_GSSAPI_GSSAPI_H 1
12950 _ACEOF
12951
12952 else
12953   for ac_header in gssapi.h
12954 do :
12955   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
12956 if test "x$ac_cv_header_gssapi_h" = xyes; then :
12957   cat >>confdefs.h <<_ACEOF
12958 #define HAVE_GSSAPI_H 1
12959 _ACEOF
12960
12961 else
12962   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
12963 fi
12964
12965 done
12966
12967 fi
12968
12969 done
12970
12971 fi
12972
12973 if test "$with_openssl" = yes ; then
12974   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
12975 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
12976
12977 else
12978   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
12979 fi
12980
12981
12982   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
12983 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
12984
12985 else
12986   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
12987 fi
12988
12989
12990 fi
12991
12992 if test "$with_pam" = yes ; then
12993   for ac_header in security/pam_appl.h
12994 do :
12995   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
12996 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
12997   cat >>confdefs.h <<_ACEOF
12998 #define HAVE_SECURITY_PAM_APPL_H 1
12999 _ACEOF
13000
13001 else
13002   for ac_header in pam/pam_appl.h
13003 do :
13004   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13005 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13006   cat >>confdefs.h <<_ACEOF
13007 #define HAVE_PAM_PAM_APPL_H 1
13008 _ACEOF
13009
13010 else
13011   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13012 fi
13013
13014 done
13015
13016 fi
13017
13018 done
13019
13020 fi
13021
13022 if test "$with_bsd_auth" = yes ; then
13023   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13024 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13025
13026 else
13027   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13028 fi
13029
13030
13031 fi
13032
13033 if test "$with_systemd" = yes ; then
13034   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13035 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13036
13037 else
13038   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13039 fi
13040
13041
13042 fi
13043
13044 if test "$with_libxml" = yes ; then
13045   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13046 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13047
13048 else
13049   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13050 fi
13051
13052
13053 fi
13054
13055 if test "$with_libxslt" = yes ; then
13056   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13057 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13058
13059 else
13060   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13061 fi
13062
13063
13064 fi
13065
13066 if test "$with_ldap" = yes ; then
13067   if test "$PORTNAME" != "win32"; then
13068      for ac_header in ldap.h
13069 do :
13070   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13071 if test "x$ac_cv_header_ldap_h" = xyes; then :
13072   cat >>confdefs.h <<_ACEOF
13073 #define HAVE_LDAP_H 1
13074 _ACEOF
13075
13076 else
13077   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13078 fi
13079
13080 done
13081
13082      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13083 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13084 if ${pgac_cv_ldap_safe+:} false; then :
13085   $as_echo_n "(cached) " >&6
13086 else
13087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13088 /* end confdefs.h.  */
13089 #include <ldap.h>
13090 #if !defined(LDAP_VENDOR_VERSION) || \
13091      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13092       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13093 choke me
13094 #endif
13095 int
13096 main ()
13097 {
13098
13099   ;
13100   return 0;
13101 }
13102 _ACEOF
13103 if ac_fn_c_try_compile "$LINENO"; then :
13104   pgac_cv_ldap_safe=yes
13105 else
13106   pgac_cv_ldap_safe=no
13107 fi
13108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13109 fi
13110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13111 $as_echo "$pgac_cv_ldap_safe" >&6; }
13112
13113 if test "$pgac_cv_ldap_safe" != yes; then
13114   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13115 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13116 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13117 *** also uses LDAP will crash on exit." >&5
13118 $as_echo "$as_me: WARNING:
13119 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13120 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13121 *** also uses LDAP will crash on exit." >&2;}
13122 fi
13123   else
13124      for ac_header in winldap.h
13125 do :
13126   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13127 #include <windows.h>
13128
13129 "
13130 if test "x$ac_cv_header_winldap_h" = xyes; then :
13131   cat >>confdefs.h <<_ACEOF
13132 #define HAVE_WINLDAP_H 1
13133 _ACEOF
13134
13135 else
13136   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13137 fi
13138
13139 done
13140
13141   fi
13142 fi
13143
13144 if test "$with_bonjour" = yes ; then
13145   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13146 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13147
13148 else
13149   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13150 fi
13151
13152
13153 fi
13154
13155 # for contrib/uuid-ossp
13156 if test "$with_uuid" = bsd ; then
13157   for ac_header in uuid.h
13158 do :
13159   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13160 if test "x$ac_cv_header_uuid_h" = xyes; then :
13161   cat >>confdefs.h <<_ACEOF
13162 #define HAVE_UUID_H 1
13163 _ACEOF
13164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13165 /* end confdefs.h.  */
13166 #include <uuid.h>
13167
13168 _ACEOF
13169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13170   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13171
13172 else
13173   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13174 fi
13175 rm -f conftest*
13176
13177 else
13178   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13179 fi
13180
13181 done
13182
13183 elif test "$with_uuid" = e2fs ; then
13184   for ac_header in uuid/uuid.h
13185 do :
13186   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13187 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13188   cat >>confdefs.h <<_ACEOF
13189 #define HAVE_UUID_UUID_H 1
13190 _ACEOF
13191  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13192 /* end confdefs.h.  */
13193 #include <uuid/uuid.h>
13194
13195 _ACEOF
13196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13197   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13198
13199 else
13200   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13201 fi
13202 rm -f conftest*
13203
13204 else
13205   for ac_header in uuid.h
13206 do :
13207   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13208 if test "x$ac_cv_header_uuid_h" = xyes; then :
13209   cat >>confdefs.h <<_ACEOF
13210 #define HAVE_UUID_H 1
13211 _ACEOF
13212  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13213 /* end confdefs.h.  */
13214 #include <uuid.h>
13215
13216 _ACEOF
13217 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13218   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13219
13220 else
13221   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13222 fi
13223 rm -f conftest*
13224
13225 else
13226   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13227 fi
13228
13229 done
13230
13231 fi
13232
13233 done
13234
13235 elif test "$with_uuid" = ossp ; then
13236   for ac_header in ossp/uuid.h
13237 do :
13238   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13239 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13240   cat >>confdefs.h <<_ACEOF
13241 #define HAVE_OSSP_UUID_H 1
13242 _ACEOF
13243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13244 /* end confdefs.h.  */
13245 #include <ossp/uuid.h>
13246
13247 _ACEOF
13248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13249   $EGREP "uuid_export" >/dev/null 2>&1; then :
13250
13251 else
13252   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13253 fi
13254 rm -f conftest*
13255
13256 else
13257   for ac_header in uuid.h
13258 do :
13259   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13260 if test "x$ac_cv_header_uuid_h" = xyes; then :
13261   cat >>confdefs.h <<_ACEOF
13262 #define HAVE_UUID_H 1
13263 _ACEOF
13264  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13265 /* end confdefs.h.  */
13266 #include <uuid.h>
13267
13268 _ACEOF
13269 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13270   $EGREP "uuid_export" >/dev/null 2>&1; then :
13271
13272 else
13273   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13274 fi
13275 rm -f conftest*
13276
13277 else
13278   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13279 fi
13280
13281 done
13282
13283 fi
13284
13285 done
13286
13287 fi
13288
13289 if test "$PORTNAME" = "win32" ; then
13290    for ac_header in crtdefs.h
13291 do :
13292   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13293 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13294   cat >>confdefs.h <<_ACEOF
13295 #define HAVE_CRTDEFS_H 1
13296 _ACEOF
13297
13298 fi
13299
13300 done
13301
13302 fi
13303
13304 ##
13305 ## Types, structures, compiler characteristics
13306 ##
13307
13308   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13309 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13310 if ${ac_cv_c_bigendian+:} false; then :
13311   $as_echo_n "(cached) " >&6
13312 else
13313   ac_cv_c_bigendian=unknown
13314     # See if we're dealing with a universal compiler.
13315     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13316 /* end confdefs.h.  */
13317 #ifndef __APPLE_CC__
13318                not a universal capable compiler
13319              #endif
13320              typedef int dummy;
13321
13322 _ACEOF
13323 if ac_fn_c_try_compile "$LINENO"; then :
13324
13325         # Check for potential -arch flags.  It is not universal unless
13326         # there are at least two -arch flags with different values.
13327         ac_arch=
13328         ac_prev=
13329         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13330          if test -n "$ac_prev"; then
13331            case $ac_word in
13332              i?86 | x86_64 | ppc | ppc64)
13333                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13334                  ac_arch=$ac_word
13335                else
13336                  ac_cv_c_bigendian=universal
13337                  break
13338                fi
13339                ;;
13340            esac
13341            ac_prev=
13342          elif test "x$ac_word" = "x-arch"; then
13343            ac_prev=arch
13344          fi
13345        done
13346 fi
13347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13348     if test $ac_cv_c_bigendian = unknown; then
13349       # See if sys/param.h defines the BYTE_ORDER macro.
13350       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13351 /* end confdefs.h.  */
13352 #include <sys/types.h>
13353              #include <sys/param.h>
13354
13355 int
13356 main ()
13357 {
13358 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13359                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13360                      && LITTLE_ENDIAN)
13361               bogus endian macros
13362              #endif
13363
13364   ;
13365   return 0;
13366 }
13367 _ACEOF
13368 if ac_fn_c_try_compile "$LINENO"; then :
13369   # It does; now see whether it defined to BIG_ENDIAN or not.
13370          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13371 /* end confdefs.h.  */
13372 #include <sys/types.h>
13373                 #include <sys/param.h>
13374
13375 int
13376 main ()
13377 {
13378 #if BYTE_ORDER != BIG_ENDIAN
13379                  not big endian
13380                 #endif
13381
13382   ;
13383   return 0;
13384 }
13385 _ACEOF
13386 if ac_fn_c_try_compile "$LINENO"; then :
13387   ac_cv_c_bigendian=yes
13388 else
13389   ac_cv_c_bigendian=no
13390 fi
13391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13392 fi
13393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13394     fi
13395     if test $ac_cv_c_bigendian = unknown; then
13396       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13397       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13398 /* end confdefs.h.  */
13399 #include <limits.h>
13400
13401 int
13402 main ()
13403 {
13404 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13405               bogus endian macros
13406              #endif
13407
13408   ;
13409   return 0;
13410 }
13411 _ACEOF
13412 if ac_fn_c_try_compile "$LINENO"; then :
13413   # It does; now see whether it defined to _BIG_ENDIAN or not.
13414          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13415 /* end confdefs.h.  */
13416 #include <limits.h>
13417
13418 int
13419 main ()
13420 {
13421 #ifndef _BIG_ENDIAN
13422                  not big endian
13423                 #endif
13424
13425   ;
13426   return 0;
13427 }
13428 _ACEOF
13429 if ac_fn_c_try_compile "$LINENO"; then :
13430   ac_cv_c_bigendian=yes
13431 else
13432   ac_cv_c_bigendian=no
13433 fi
13434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13435 fi
13436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13437     fi
13438     if test $ac_cv_c_bigendian = unknown; then
13439       # Compile a test program.
13440       if test "$cross_compiling" = yes; then :
13441   # Try to guess by grepping values from an object file.
13442          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13443 /* end confdefs.h.  */
13444 short int ascii_mm[] =
13445                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13446                 short int ascii_ii[] =
13447                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13448                 int use_ascii (int i) {
13449                   return ascii_mm[i] + ascii_ii[i];
13450                 }
13451                 short int ebcdic_ii[] =
13452                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13453                 short int ebcdic_mm[] =
13454                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13455                 int use_ebcdic (int i) {
13456                   return ebcdic_mm[i] + ebcdic_ii[i];
13457                 }
13458                 extern int foo;
13459
13460 int
13461 main ()
13462 {
13463 return use_ascii (foo) == use_ebcdic (foo);
13464   ;
13465   return 0;
13466 }
13467 _ACEOF
13468 if ac_fn_c_try_compile "$LINENO"; then :
13469   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13470               ac_cv_c_bigendian=yes
13471             fi
13472             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13473               if test "$ac_cv_c_bigendian" = unknown; then
13474                 ac_cv_c_bigendian=no
13475               else
13476                 # finding both strings is unlikely to happen, but who knows?
13477                 ac_cv_c_bigendian=unknown
13478               fi
13479             fi
13480 fi
13481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13482 else
13483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13484 /* end confdefs.h.  */
13485 $ac_includes_default
13486 int
13487 main ()
13488 {
13489
13490              /* Are we little or big endian?  From Harbison&Steele.  */
13491              union
13492              {
13493                long int l;
13494                char c[sizeof (long int)];
13495              } u;
13496              u.l = 1;
13497              return u.c[sizeof (long int) - 1] == 1;
13498
13499   ;
13500   return 0;
13501 }
13502 _ACEOF
13503 if ac_fn_c_try_run "$LINENO"; then :
13504   ac_cv_c_bigendian=no
13505 else
13506   ac_cv_c_bigendian=yes
13507 fi
13508 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13509   conftest.$ac_objext conftest.beam conftest.$ac_ext
13510 fi
13511
13512     fi
13513 fi
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13515 $as_echo "$ac_cv_c_bigendian" >&6; }
13516  case $ac_cv_c_bigendian in #(
13517    yes)
13518      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13519 ;; #(
13520    no)
13521       ;; #(
13522    universal)
13523
13524 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13525
13526      ;; #(
13527    *)
13528      as_fn_error $? "unknown endianness
13529  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13530  esac
13531
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13533 $as_echo_n "checking for inline... " >&6; }
13534 if ${ac_cv_c_inline+:} false; then :
13535   $as_echo_n "(cached) " >&6
13536 else
13537   ac_cv_c_inline=no
13538 for ac_kw in inline __inline__ __inline; do
13539   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13540 /* end confdefs.h.  */
13541 #ifndef __cplusplus
13542 typedef int foo_t;
13543 static $ac_kw foo_t static_foo () {return 0; }
13544 $ac_kw foo_t foo () {return 0; }
13545 #endif
13546
13547 _ACEOF
13548 if ac_fn_c_try_compile "$LINENO"; then :
13549   ac_cv_c_inline=$ac_kw
13550 fi
13551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13552   test "$ac_cv_c_inline" != no && break
13553 done
13554
13555 fi
13556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13557 $as_echo "$ac_cv_c_inline" >&6; }
13558
13559 case $ac_cv_c_inline in
13560   inline | yes) ;;
13561   *)
13562     case $ac_cv_c_inline in
13563       no) ac_val=;;
13564       *) ac_val=$ac_cv_c_inline;;
13565     esac
13566     cat >>confdefs.h <<_ACEOF
13567 #ifndef __cplusplus
13568 #define inline $ac_val
13569 #endif
13570 _ACEOF
13571     ;;
13572 esac
13573
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13575 $as_echo_n "checking for printf format archetype... " >&6; }
13576 if ${pgac_cv_printf_archetype+:} false; then :
13577   $as_echo_n "(cached) " >&6
13578 else
13579   pgac_cv_printf_archetype=gnu_printf
13580 ac_save_c_werror_flag=$ac_c_werror_flag
13581 ac_c_werror_flag=yes
13582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13583 /* end confdefs.h.  */
13584 extern void pgac_write(int ignore, const char *fmt,...)
13585 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13586 int
13587 main ()
13588 {
13589 pgac_write(0, "error %s: %m", "foo");
13590   ;
13591   return 0;
13592 }
13593 _ACEOF
13594 if ac_fn_c_try_compile "$LINENO"; then :
13595   ac_archetype_ok=yes
13596 else
13597   ac_archetype_ok=no
13598 fi
13599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13600 ac_c_werror_flag=$ac_save_c_werror_flag
13601
13602 if [ "$ac_archetype_ok" = no ]; then
13603   pgac_cv_printf_archetype=__syslog__
13604   ac_save_c_werror_flag=$ac_c_werror_flag
13605 ac_c_werror_flag=yes
13606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13607 /* end confdefs.h.  */
13608 extern void pgac_write(int ignore, const char *fmt,...)
13609 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13610 int
13611 main ()
13612 {
13613 pgac_write(0, "error %s: %m", "foo");
13614   ;
13615   return 0;
13616 }
13617 _ACEOF
13618 if ac_fn_c_try_compile "$LINENO"; then :
13619   ac_archetype_ok=yes
13620 else
13621   ac_archetype_ok=no
13622 fi
13623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13624 ac_c_werror_flag=$ac_save_c_werror_flag
13625
13626   if [ "$ac_archetype_ok" = no ]; then
13627     pgac_cv_printf_archetype=printf
13628   fi
13629 fi
13630 fi
13631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13632 $as_echo "$pgac_cv_printf_archetype" >&6; }
13633
13634 cat >>confdefs.h <<_ACEOF
13635 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13636 _ACEOF
13637
13638
13639
13640   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13641 $as_echo_n "checking for flexible array members... " >&6; }
13642 if ${ac_cv_c_flexmember+:} false; then :
13643   $as_echo_n "(cached) " >&6
13644 else
13645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13646 /* end confdefs.h.  */
13647 #include <stdlib.h>
13648             #include <stdio.h>
13649             #include <stddef.h>
13650             struct s { int n; double d[]; };
13651 int
13652 main ()
13653 {
13654 int m = getchar ();
13655             struct s *p = malloc (offsetof (struct s, d)
13656                                   + m * sizeof (double));
13657             p->d[0] = 0.0;
13658             return p->d != (double *) NULL;
13659   ;
13660   return 0;
13661 }
13662 _ACEOF
13663 if ac_fn_c_try_compile "$LINENO"; then :
13664   ac_cv_c_flexmember=yes
13665 else
13666   ac_cv_c_flexmember=no
13667 fi
13668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13669 fi
13670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13671 $as_echo "$ac_cv_c_flexmember" >&6; }
13672   if test $ac_cv_c_flexmember = yes; then
13673
13674 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13675
13676   else
13677     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13678
13679   fi
13680
13681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13682 $as_echo_n "checking for signed types... " >&6; }
13683 if ${pgac_cv_c_signed+:} false; then :
13684   $as_echo_n "(cached) " >&6
13685 else
13686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687 /* end confdefs.h.  */
13688
13689 int
13690 main ()
13691 {
13692 signed char c; signed short s; signed int i;
13693   ;
13694   return 0;
13695 }
13696 _ACEOF
13697 if ac_fn_c_try_compile "$LINENO"; then :
13698   pgac_cv_c_signed=yes
13699 else
13700   pgac_cv_c_signed=no
13701 fi
13702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13703 fi
13704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13705 $as_echo "$pgac_cv_c_signed" >&6; }
13706 if test x"$pgac_cv_c_signed" = xno ; then
13707
13708 $as_echo "#define signed /**/" >>confdefs.h
13709
13710 fi
13711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13712 $as_echo_n "checking for __func__... " >&6; }
13713 if ${pgac_cv_funcname_func_support+:} false; then :
13714   $as_echo_n "(cached) " >&6
13715 else
13716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13717 /* end confdefs.h.  */
13718 #include <stdio.h>
13719 int
13720 main ()
13721 {
13722 printf("%s\n", __func__);
13723   ;
13724   return 0;
13725 }
13726 _ACEOF
13727 if ac_fn_c_try_compile "$LINENO"; then :
13728   pgac_cv_funcname_func_support=yes
13729 else
13730   pgac_cv_funcname_func_support=no
13731 fi
13732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13733 fi
13734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13735 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13736 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13737
13738 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13739
13740 else
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13742 $as_echo_n "checking for __FUNCTION__... " >&6; }
13743 if ${pgac_cv_funcname_function_support+:} false; then :
13744   $as_echo_n "(cached) " >&6
13745 else
13746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13747 /* end confdefs.h.  */
13748 #include <stdio.h>
13749 int
13750 main ()
13751 {
13752 printf("%s\n", __FUNCTION__);
13753   ;
13754   return 0;
13755 }
13756 _ACEOF
13757 if ac_fn_c_try_compile "$LINENO"; then :
13758   pgac_cv_funcname_function_support=yes
13759 else
13760   pgac_cv_funcname_function_support=no
13761 fi
13762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13763 fi
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13765 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13766 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13767
13768 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13769
13770 fi
13771 fi
13772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13773 $as_echo_n "checking for _Static_assert... " >&6; }
13774 if ${pgac_cv__static_assert+:} false; then :
13775   $as_echo_n "(cached) " >&6
13776 else
13777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13778 /* end confdefs.h.  */
13779
13780 int
13781 main ()
13782 {
13783 ({ _Static_assert(1, "foo"); })
13784   ;
13785   return 0;
13786 }
13787 _ACEOF
13788 if ac_fn_c_try_link "$LINENO"; then :
13789   pgac_cv__static_assert=yes
13790 else
13791   pgac_cv__static_assert=no
13792 fi
13793 rm -f core conftest.err conftest.$ac_objext \
13794     conftest$ac_exeext conftest.$ac_ext
13795 fi
13796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13797 $as_echo "$pgac_cv__static_assert" >&6; }
13798 if test x"$pgac_cv__static_assert" = xyes ; then
13799
13800 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13801
13802 fi
13803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13804 $as_echo_n "checking for typeof... " >&6; }
13805 if ${pgac_cv_c_typeof+:} false; then :
13806   $as_echo_n "(cached) " >&6
13807 else
13808   pgac_cv_c_typeof=no
13809 for pgac_kw in typeof __typeof__ decltype; do
13810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13811 /* end confdefs.h.  */
13812
13813 int
13814 main ()
13815 {
13816 int x = 0;
13817 $pgac_kw(x) y;
13818 y = x;
13819 return y;
13820   ;
13821   return 0;
13822 }
13823 _ACEOF
13824 if ac_fn_c_try_compile "$LINENO"; then :
13825   pgac_cv_c_typeof=$pgac_kw
13826 fi
13827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13828   test "$pgac_cv_c_typeof" != no && break
13829 done
13830 fi
13831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13832 $as_echo "$pgac_cv_c_typeof" >&6; }
13833 if test "$pgac_cv_c_typeof" != no; then
13834
13835 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13836
13837   if test "$pgac_cv_c_typeof" != typeof; then
13838
13839 cat >>confdefs.h <<_ACEOF
13840 #define typeof $pgac_cv_c_typeof
13841 _ACEOF
13842
13843   fi
13844 fi
13845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13846 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13847 if ${pgac_cv__types_compatible+:} false; then :
13848   $as_echo_n "(cached) " >&6
13849 else
13850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13851 /* end confdefs.h.  */
13852
13853 int
13854 main ()
13855 {
13856  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13857   ;
13858   return 0;
13859 }
13860 _ACEOF
13861 if ac_fn_c_try_compile "$LINENO"; then :
13862   pgac_cv__types_compatible=yes
13863 else
13864   pgac_cv__types_compatible=no
13865 fi
13866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13867 fi
13868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13869 $as_echo "$pgac_cv__types_compatible" >&6; }
13870 if test x"$pgac_cv__types_compatible" = xyes ; then
13871
13872 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13873
13874 fi
13875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13876 $as_echo_n "checking for __builtin_constant_p... " >&6; }
13877 if ${pgac_cv__builtin_constant_p+:} false; then :
13878   $as_echo_n "(cached) " >&6
13879 else
13880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13881 /* end confdefs.h.  */
13882 static int x;
13883   static int y[__builtin_constant_p(x) ? x : 1];
13884   static int z[__builtin_constant_p("string literal") ? 1 : x];
13885
13886
13887 _ACEOF
13888 if ac_fn_c_try_compile "$LINENO"; then :
13889   pgac_cv__builtin_constant_p=yes
13890 else
13891   pgac_cv__builtin_constant_p=no
13892 fi
13893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13894 fi
13895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13896 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
13897 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13898
13899 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13900
13901 fi
13902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13903 $as_echo_n "checking for __builtin_unreachable... " >&6; }
13904 if ${pgac_cv__builtin_unreachable+:} false; then :
13905   $as_echo_n "(cached) " >&6
13906 else
13907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13908 /* end confdefs.h.  */
13909
13910 int
13911 main ()
13912 {
13913 __builtin_unreachable();
13914   ;
13915   return 0;
13916 }
13917 _ACEOF
13918 if ac_fn_c_try_link "$LINENO"; then :
13919   pgac_cv__builtin_unreachable=yes
13920 else
13921   pgac_cv__builtin_unreachable=no
13922 fi
13923 rm -f core conftest.err conftest.$ac_objext \
13924     conftest$ac_exeext conftest.$ac_ext
13925 fi
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
13927 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
13928 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
13929
13930 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
13931
13932 fi
13933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
13934 $as_echo_n "checking for computed goto support... " >&6; }
13935 if ${pgac_cv_computed_goto+:} false; then :
13936   $as_echo_n "(cached) " >&6
13937 else
13938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13939 /* end confdefs.h.  */
13940
13941 int
13942 main ()
13943 {
13944 void *labeladdrs[] = {&&my_label};
13945   goto *labeladdrs[0];
13946   my_label:
13947   return 1;
13948
13949   ;
13950   return 0;
13951 }
13952 _ACEOF
13953 if ac_fn_c_try_compile "$LINENO"; then :
13954   pgac_cv_computed_goto=yes
13955 else
13956   pgac_cv_computed_goto=no
13957 fi
13958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13959 fi
13960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
13961 $as_echo "$pgac_cv_computed_goto" >&6; }
13962 if test x"$pgac_cv_computed_goto" = xyes ; then
13963
13964 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
13965
13966 fi
13967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13968 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13969 if ${ac_cv_struct_tm+:} false; then :
13970   $as_echo_n "(cached) " >&6
13971 else
13972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13973 /* end confdefs.h.  */
13974 #include <sys/types.h>
13975 #include <time.h>
13976
13977 int
13978 main ()
13979 {
13980 struct tm tm;
13981                                      int *p = &tm.tm_sec;
13982                                      return !p;
13983   ;
13984   return 0;
13985 }
13986 _ACEOF
13987 if ac_fn_c_try_compile "$LINENO"; then :
13988   ac_cv_struct_tm=time.h
13989 else
13990   ac_cv_struct_tm=sys/time.h
13991 fi
13992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13993 fi
13994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13995 $as_echo "$ac_cv_struct_tm" >&6; }
13996 if test $ac_cv_struct_tm = sys/time.h; then
13997
13998 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
13999
14000 fi
14001
14002 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14003 #include <$ac_cv_struct_tm>
14004
14005 "
14006 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14007
14008 cat >>confdefs.h <<_ACEOF
14009 #define HAVE_STRUCT_TM_TM_ZONE 1
14010 _ACEOF
14011
14012
14013 fi
14014
14015 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14016
14017 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14018
14019 fi
14020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14021 $as_echo_n "checking for tzname... " >&6; }
14022 if ${ac_cv_var_tzname+:} false; then :
14023   $as_echo_n "(cached) " >&6
14024 else
14025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14026 /* end confdefs.h.  */
14027 #include <stdlib.h>
14028 #include <time.h>
14029 #ifndef tzname /* For SGI.  */
14030 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14031 #endif
14032
14033 int
14034 main ()
14035 {
14036 atoi(*tzname);
14037   ;
14038   return 0;
14039 }
14040 _ACEOF
14041 if ac_fn_c_try_link "$LINENO"; then :
14042   ac_cv_var_tzname=yes
14043 else
14044   ac_cv_var_tzname=no
14045 fi
14046 rm -f core conftest.err conftest.$ac_objext \
14047     conftest$ac_exeext conftest.$ac_ext
14048 fi
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14050 $as_echo "$ac_cv_var_tzname" >&6; }
14051 if test $ac_cv_var_tzname = yes; then
14052
14053 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14054
14055 fi
14056
14057 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14058 #ifdef HAVE_SYS_IPC_H
14059 #include <sys/ipc.h>
14060 #endif
14061 #ifdef HAVE_SYS_SEM_H
14062 #include <sys/sem.h>
14063 #endif
14064 "
14065 if test "x$ac_cv_type_union_semun" = xyes; then :
14066
14067 cat >>confdefs.h <<_ACEOF
14068 #define HAVE_UNION_SEMUN 1
14069 _ACEOF
14070
14071
14072 fi
14073
14074 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14075 #ifdef HAVE_SYS_UN_H
14076 #include <sys/un.h>
14077 #endif
14078
14079 "
14080 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14081
14082 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14083
14084 fi
14085
14086 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14087 #include <sys/socket.h>
14088
14089 "
14090 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14091
14092 cat >>confdefs.h <<_ACEOF
14093 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14094 _ACEOF
14095
14096
14097 fi
14098
14099 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14100 #include <sys/socket.h>
14101
14102 "
14103 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14104
14105 cat >>confdefs.h <<_ACEOF
14106 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14107 _ACEOF
14108
14109
14110 fi
14111 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14112 #include <sys/socket.h>
14113
14114 "
14115 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14116
14117 cat >>confdefs.h <<_ACEOF
14118 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14119 _ACEOF
14120
14121
14122 fi
14123 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14124 #include <sys/socket.h>
14125
14126 "
14127 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14128
14129 cat >>confdefs.h <<_ACEOF
14130 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14131 _ACEOF
14132
14133
14134 fi
14135 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14136 #include <sys/socket.h>
14137
14138 "
14139 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14140
14141 cat >>confdefs.h <<_ACEOF
14142 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14143 _ACEOF
14144
14145
14146 fi
14147 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14148 #include <sys/socket.h>
14149
14150 "
14151 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14152
14153 cat >>confdefs.h <<_ACEOF
14154 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14155 _ACEOF
14156
14157
14158 fi
14159
14160 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14161 #include <sys/socket.h>
14162 #include <netdb.h>
14163
14164 "
14165 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14166
14167 cat >>confdefs.h <<_ACEOF
14168 #define HAVE_STRUCT_ADDRINFO 1
14169 _ACEOF
14170
14171
14172 fi
14173
14174
14175   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14176 if test "x$ac_cv_type_intptr_t" = xyes; then :
14177
14178 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14179
14180 else
14181   for ac_type in 'int' 'long int' 'long long int'; do
14182        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14183 /* end confdefs.h.  */
14184 $ac_includes_default
14185 int
14186 main ()
14187 {
14188 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14189 test_array [0] = 0;
14190 return test_array [0];
14191
14192   ;
14193   return 0;
14194 }
14195 _ACEOF
14196 if ac_fn_c_try_compile "$LINENO"; then :
14197
14198 cat >>confdefs.h <<_ACEOF
14199 #define intptr_t $ac_type
14200 _ACEOF
14201
14202           ac_type=
14203 fi
14204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205        test -z "$ac_type" && break
14206      done
14207 fi
14208
14209
14210
14211   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14212 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14213
14214 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14215
14216 else
14217   for ac_type in 'unsigned int' 'unsigned long int' \
14218         'unsigned long long int'; do
14219        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14220 /* end confdefs.h.  */
14221 $ac_includes_default
14222 int
14223 main ()
14224 {
14225 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14226 test_array [0] = 0;
14227 return test_array [0];
14228
14229   ;
14230   return 0;
14231 }
14232 _ACEOF
14233 if ac_fn_c_try_compile "$LINENO"; then :
14234
14235 cat >>confdefs.h <<_ACEOF
14236 #define uintptr_t $ac_type
14237 _ACEOF
14238
14239           ac_type=
14240 fi
14241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14242        test -z "$ac_type" && break
14243      done
14244 fi
14245
14246
14247
14248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14249 $as_echo_n "checking for unsigned long long int... " >&6; }
14250 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14251   $as_echo_n "(cached) " >&6
14252 else
14253   ac_cv_type_unsigned_long_long_int=yes
14254      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14255        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14256 /* end confdefs.h.  */
14257
14258   /* For now, do not test the preprocessor; as of 2007 there are too many
14259          implementations with broken preprocessors.  Perhaps this can
14260          be revisited in 2012.  In the meantime, code should not expect
14261          #if to work with literals wider than 32 bits.  */
14262       /* Test literals.  */
14263       long long int ll = 9223372036854775807ll;
14264       long long int nll = -9223372036854775807LL;
14265       unsigned long long int ull = 18446744073709551615ULL;
14266       /* Test constant expressions.   */
14267       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14268                      ? 1 : -1)];
14269       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14270                      ? 1 : -1)];
14271       int i = 63;
14272 int
14273 main ()
14274 {
14275 /* Test availability of runtime routines for shift and division.  */
14276       long long int llmax = 9223372036854775807ll;
14277       unsigned long long int ullmax = 18446744073709551615ull;
14278       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14279               | (llmax / ll) | (llmax % ll)
14280               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14281               | (ullmax / ull) | (ullmax % ull));
14282   ;
14283   return 0;
14284 }
14285
14286 _ACEOF
14287 if ac_fn_c_try_link "$LINENO"; then :
14288
14289 else
14290   ac_cv_type_unsigned_long_long_int=no
14291 fi
14292 rm -f core conftest.err conftest.$ac_objext \
14293     conftest$ac_exeext conftest.$ac_ext
14294      fi
14295 fi
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14297 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14298   if test $ac_cv_type_unsigned_long_long_int = yes; then
14299
14300 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14301
14302   fi
14303
14304
14305
14306   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14307 $as_echo_n "checking for long long int... " >&6; }
14308 if ${ac_cv_type_long_long_int+:} false; then :
14309   $as_echo_n "(cached) " >&6
14310 else
14311   ac_cv_type_long_long_int=yes
14312       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14313         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14314         if test $ac_cv_type_long_long_int = yes; then
14315                                   if test "$cross_compiling" = yes; then :
14316   :
14317 else
14318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14319 /* end confdefs.h.  */
14320 #include <limits.h>
14321                  #ifndef LLONG_MAX
14322                  # define HALF \
14323                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14324                  # define LLONG_MAX (HALF - 1 + HALF)
14325                  #endif
14326 int
14327 main ()
14328 {
14329 long long int n = 1;
14330                  int i;
14331                  for (i = 0; ; i++)
14332                    {
14333                      long long int m = n << i;
14334                      if (m >> i != n)
14335                        return 1;
14336                      if (LLONG_MAX / 2 < m)
14337                        break;
14338                    }
14339                  return 0;
14340   ;
14341   return 0;
14342 }
14343 _ACEOF
14344 if ac_fn_c_try_run "$LINENO"; then :
14345
14346 else
14347   ac_cv_type_long_long_int=no
14348 fi
14349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14350   conftest.$ac_objext conftest.beam conftest.$ac_ext
14351 fi
14352
14353         fi
14354       fi
14355 fi
14356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14357 $as_echo "$ac_cv_type_long_long_int" >&6; }
14358   if test $ac_cv_type_long_long_int = yes; then
14359
14360 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14361
14362   fi
14363
14364
14365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14366 $as_echo_n "checking for locale_t... " >&6; }
14367 if ${pgac_cv_type_locale_t+:} false; then :
14368   $as_echo_n "(cached) " >&6
14369 else
14370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14371 /* end confdefs.h.  */
14372 #include <locale.h>
14373 locale_t x;
14374 int
14375 main ()
14376 {
14377
14378   ;
14379   return 0;
14380 }
14381 _ACEOF
14382 if ac_fn_c_try_compile "$LINENO"; then :
14383   pgac_cv_type_locale_t=yes
14384 else
14385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14386 /* end confdefs.h.  */
14387 #include <xlocale.h>
14388 locale_t x;
14389 int
14390 main ()
14391 {
14392
14393   ;
14394   return 0;
14395 }
14396 _ACEOF
14397 if ac_fn_c_try_compile "$LINENO"; then :
14398   pgac_cv_type_locale_t='yes (in xlocale.h)'
14399 else
14400   pgac_cv_type_locale_t=no
14401 fi
14402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14403 fi
14404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14405 fi
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14407 $as_echo "$pgac_cv_type_locale_t" >&6; }
14408 if test "$pgac_cv_type_locale_t" != no; then
14409
14410 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14411
14412 fi
14413 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14414
14415 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14416
14417 fi
14418
14419 # MSVC doesn't cope well with defining restrict to __restrict, the
14420 # spelling it understands, because it conflicts with
14421 # __declspec(restrict). Therefore we define pg_restrict to the
14422 # appropriate definition, which presumably won't conflict.
14423 #
14424 # Allow platforms with buggy compilers to force restrict to not be
14425 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14426 # template.
14427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14428 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14429 if ${ac_cv_c_restrict+:} false; then :
14430   $as_echo_n "(cached) " >&6
14431 else
14432   ac_cv_c_restrict=no
14433    # The order here caters to the fact that C++ does not require restrict.
14434    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14435      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14436 /* end confdefs.h.  */
14437 typedef int * int_ptr;
14438         int foo (int_ptr $ac_kw ip) {
14439         return ip[0];
14440        }
14441 int
14442 main ()
14443 {
14444 int s[1];
14445         int * $ac_kw t = s;
14446         t[0] = 0;
14447         return foo(t)
14448   ;
14449   return 0;
14450 }
14451 _ACEOF
14452 if ac_fn_c_try_compile "$LINENO"; then :
14453   ac_cv_c_restrict=$ac_kw
14454 fi
14455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14456      test "$ac_cv_c_restrict" != no && break
14457    done
14458
14459 fi
14460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14461 $as_echo "$ac_cv_c_restrict" >&6; }
14462
14463  case $ac_cv_c_restrict in
14464    restrict) ;;
14465    no) $as_echo "#define restrict /**/" >>confdefs.h
14466  ;;
14467    *)  cat >>confdefs.h <<_ACEOF
14468 #define restrict $ac_cv_c_restrict
14469 _ACEOF
14470  ;;
14471  esac
14472
14473 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14474   pg_restrict=""
14475 else
14476   pg_restrict="$ac_cv_c_restrict"
14477 fi
14478
14479 cat >>confdefs.h <<_ACEOF
14480 #define pg_restrict $pg_restrict
14481 _ACEOF
14482
14483
14484 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14485 #include <sys/param.h>
14486 #ifdef HAVE_SYS_UCRED_H
14487 #include <sys/ucred.h>
14488 #endif
14489 "
14490 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14491
14492 cat >>confdefs.h <<_ACEOF
14493 #define HAVE_STRUCT_CMSGCRED 1
14494 _ACEOF
14495
14496
14497 fi
14498
14499
14500 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14501 #include <getopt.h>
14502 #endif
14503 "
14504 if test "x$ac_cv_type_struct_option" = xyes; then :
14505
14506 cat >>confdefs.h <<_ACEOF
14507 #define HAVE_STRUCT_OPTION 1
14508 _ACEOF
14509
14510
14511 fi
14512
14513
14514 if test "$with_zlib" = yes; then
14515   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14516   # did not).  While we could work around the lack of z_streamp, it
14517   # seems unwise to encourage people to use such old zlib versions...
14518   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14519 "
14520 if test "x$ac_cv_type_z_streamp" = xyes; then :
14521
14522 else
14523   as_fn_error $? "zlib version is too old
14524 Use --without-zlib to disable zlib support." "$LINENO" 5
14525 fi
14526
14527 fi
14528
14529 case $host_cpu in
14530   x86_64)
14531     # On x86_64, check if we can compile a popcntq instruction
14532     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14533 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14534 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14535   $as_echo_n "(cached) " >&6
14536 else
14537   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14538 /* end confdefs.h.  */
14539
14540 int
14541 main ()
14542 {
14543 long long x = 1; long long r;
14544          __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14545   ;
14546   return 0;
14547 }
14548 _ACEOF
14549 if ac_fn_c_try_compile "$LINENO"; then :
14550   pgac_cv_have_x86_64_popcntq=yes
14551 else
14552   pgac_cv_have_x86_64_popcntq=no
14553 fi
14554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14555 fi
14556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14557 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14558     if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14559
14560 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14561
14562     fi
14563   ;;
14564   ppc*|powerpc*)
14565     # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14566     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14567 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14568 if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
14569   $as_echo_n "(cached) " >&6
14570 else
14571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14572 /* end confdefs.h.  */
14573
14574 int
14575 main ()
14576 {
14577 int a = 0; int *p = &a; int r;
14578          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14579   ;
14580   return 0;
14581 }
14582 _ACEOF
14583 if ac_fn_c_try_compile "$LINENO"; then :
14584   pgac_cv_have_ppc_mutex_hint=yes
14585 else
14586   pgac_cv_have_ppc_mutex_hint=no
14587 fi
14588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14589 fi
14590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14591 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14592     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14593
14594 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14595
14596     fi
14597   ;;
14598 esac
14599
14600 # Check largefile support.  You might think this is a system service not a
14601 # compiler characteristic, but you'd be wrong.  We must check this before
14602 # probing existence of related functions such as fseeko, since the largefile
14603 # defines can affect what is generated for that.
14604 if test "$PORTNAME" != "win32"; then
14605    # Check whether --enable-largefile was given.
14606 if test "${enable_largefile+set}" = set; then :
14607   enableval=$enable_largefile;
14608 fi
14609
14610 if test "$enable_largefile" != no; then
14611
14612   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14613 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14614 if ${ac_cv_sys_largefile_CC+:} false; then :
14615   $as_echo_n "(cached) " >&6
14616 else
14617   ac_cv_sys_largefile_CC=no
14618      if test "$GCC" != yes; then
14619        ac_save_CC=$CC
14620        while :; do
14621          # IRIX 6.2 and later do not support large files by default,
14622          # so use the C compiler's -n32 option if that helps.
14623          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14624 /* end confdefs.h.  */
14625 #include <sys/types.h>
14626  /* Check that off_t can represent 2**63 - 1 correctly.
14627     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14628     since some C++ compilers masquerading as C compilers
14629     incorrectly reject 9223372036854775807.  */
14630 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14631   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14632                        && LARGE_OFF_T % 2147483647 == 1)
14633                       ? 1 : -1];
14634 int
14635 main ()
14636 {
14637
14638   ;
14639   return 0;
14640 }
14641 _ACEOF
14642          if ac_fn_c_try_compile "$LINENO"; then :
14643   break
14644 fi
14645 rm -f core conftest.err conftest.$ac_objext
14646          CC="$CC -n32"
14647          if ac_fn_c_try_compile "$LINENO"; then :
14648   ac_cv_sys_largefile_CC=' -n32'; break
14649 fi
14650 rm -f core conftest.err conftest.$ac_objext
14651          break
14652        done
14653        CC=$ac_save_CC
14654        rm -f conftest.$ac_ext
14655     fi
14656 fi
14657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14658 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14659   if test "$ac_cv_sys_largefile_CC" != no; then
14660     CC=$CC$ac_cv_sys_largefile_CC
14661   fi
14662
14663   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14664 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14665 if ${ac_cv_sys_file_offset_bits+:} false; then :
14666   $as_echo_n "(cached) " >&6
14667 else
14668   while :; do
14669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14670 /* end confdefs.h.  */
14671 #include <sys/types.h>
14672  /* Check that off_t can represent 2**63 - 1 correctly.
14673     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14674     since some C++ compilers masquerading as C compilers
14675     incorrectly reject 9223372036854775807.  */
14676 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14677   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14678                        && LARGE_OFF_T % 2147483647 == 1)
14679                       ? 1 : -1];
14680 int
14681 main ()
14682 {
14683
14684   ;
14685   return 0;
14686 }
14687 _ACEOF
14688 if ac_fn_c_try_compile "$LINENO"; then :
14689   ac_cv_sys_file_offset_bits=no; break
14690 fi
14691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14692   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14693 /* end confdefs.h.  */
14694 #define _FILE_OFFSET_BITS 64
14695 #include <sys/types.h>
14696  /* Check that off_t can represent 2**63 - 1 correctly.
14697     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14698     since some C++ compilers masquerading as C compilers
14699     incorrectly reject 9223372036854775807.  */
14700 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14701   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14702                        && LARGE_OFF_T % 2147483647 == 1)
14703                       ? 1 : -1];
14704 int
14705 main ()
14706 {
14707
14708   ;
14709   return 0;
14710 }
14711 _ACEOF
14712 if ac_fn_c_try_compile "$LINENO"; then :
14713   ac_cv_sys_file_offset_bits=64; break
14714 fi
14715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14716   ac_cv_sys_file_offset_bits=unknown
14717   break
14718 done
14719 fi
14720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14721 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14722 case $ac_cv_sys_file_offset_bits in #(
14723   no | unknown) ;;
14724   *)
14725 cat >>confdefs.h <<_ACEOF
14726 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14727 _ACEOF
14728 ;;
14729 esac
14730 rm -rf conftest*
14731   if test $ac_cv_sys_file_offset_bits = unknown; then
14732     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14733 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14734 if ${ac_cv_sys_large_files+:} false; then :
14735   $as_echo_n "(cached) " >&6
14736 else
14737   while :; do
14738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14739 /* end confdefs.h.  */
14740 #include <sys/types.h>
14741  /* Check that off_t can represent 2**63 - 1 correctly.
14742     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14743     since some C++ compilers masquerading as C compilers
14744     incorrectly reject 9223372036854775807.  */
14745 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14746   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14747                        && LARGE_OFF_T % 2147483647 == 1)
14748                       ? 1 : -1];
14749 int
14750 main ()
14751 {
14752
14753   ;
14754   return 0;
14755 }
14756 _ACEOF
14757 if ac_fn_c_try_compile "$LINENO"; then :
14758   ac_cv_sys_large_files=no; break
14759 fi
14760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14762 /* end confdefs.h.  */
14763 #define _LARGE_FILES 1
14764 #include <sys/types.h>
14765  /* Check that off_t can represent 2**63 - 1 correctly.
14766     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14767     since some C++ compilers masquerading as C compilers
14768     incorrectly reject 9223372036854775807.  */
14769 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14770   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14771                        && LARGE_OFF_T % 2147483647 == 1)
14772                       ? 1 : -1];
14773 int
14774 main ()
14775 {
14776
14777   ;
14778   return 0;
14779 }
14780 _ACEOF
14781 if ac_fn_c_try_compile "$LINENO"; then :
14782   ac_cv_sys_large_files=1; break
14783 fi
14784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14785   ac_cv_sys_large_files=unknown
14786   break
14787 done
14788 fi
14789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14790 $as_echo "$ac_cv_sys_large_files" >&6; }
14791 case $ac_cv_sys_large_files in #(
14792   no | unknown) ;;
14793   *)
14794 cat >>confdefs.h <<_ACEOF
14795 #define _LARGE_FILES $ac_cv_sys_large_files
14796 _ACEOF
14797 ;;
14798 esac
14799 rm -rf conftest*
14800   fi
14801
14802
14803 fi
14804
14805
14806 fi
14807
14808 # The cast to long int works around a bug in the HP C Compiler
14809 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14810 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14811 # This bug is HP SR number 8606223364.
14812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14813 $as_echo_n "checking size of off_t... " >&6; }
14814 if ${ac_cv_sizeof_off_t+:} false; then :
14815   $as_echo_n "(cached) " >&6
14816 else
14817   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14818
14819 else
14820   if test "$ac_cv_type_off_t" = yes; then
14821      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14822 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14823 as_fn_error 77 "cannot compute sizeof (off_t)
14824 See \`config.log' for more details" "$LINENO" 5; }
14825    else
14826      ac_cv_sizeof_off_t=0
14827    fi
14828 fi
14829
14830 fi
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14832 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14833
14834
14835
14836 cat >>confdefs.h <<_ACEOF
14837 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14838 _ACEOF
14839
14840
14841
14842 # If we don't have largefile support, can't handle segsize >= 2GB.
14843 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14844    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14845 fi
14846
14847 # The cast to long int works around a bug in the HP C Compiler
14848 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14849 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14850 # This bug is HP SR number 8606223364.
14851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14852 $as_echo_n "checking size of bool... " >&6; }
14853 if ${ac_cv_sizeof_bool+:} false; then :
14854   $as_echo_n "(cached) " >&6
14855 else
14856   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14857 #include <stdbool.h>
14858 #endif
14859 "; then :
14860
14861 else
14862   if test "$ac_cv_type_bool" = yes; then
14863      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14864 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14865 as_fn_error 77 "cannot compute sizeof (bool)
14866 See \`config.log' for more details" "$LINENO" 5; }
14867    else
14868      ac_cv_sizeof_bool=0
14869    fi
14870 fi
14871
14872 fi
14873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14874 $as_echo "$ac_cv_sizeof_bool" >&6; }
14875
14876
14877
14878 cat >>confdefs.h <<_ACEOF
14879 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14880 _ACEOF
14881
14882
14883
14884
14885 ##
14886 ## Functions, global variables
14887 ##
14888
14889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14890 $as_echo_n "checking for int timezone... " >&6; }
14891 if ${pgac_cv_var_int_timezone+:} false; then :
14892   $as_echo_n "(cached) " >&6
14893 else
14894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h.  */
14896 #include <time.h>
14897 int res;
14898 int
14899 main ()
14900 {
14901 #ifndef __CYGWIN__
14902 res = timezone / 60;
14903 #else
14904 res = _timezone / 60;
14905 #endif
14906   ;
14907   return 0;
14908 }
14909 _ACEOF
14910 if ac_fn_c_try_link "$LINENO"; then :
14911   pgac_cv_var_int_timezone=yes
14912 else
14913   pgac_cv_var_int_timezone=no
14914 fi
14915 rm -f core conftest.err conftest.$ac_objext \
14916     conftest$ac_exeext conftest.$ac_ext
14917 fi
14918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
14919 $as_echo "$pgac_cv_var_int_timezone" >&6; }
14920 if test x"$pgac_cv_var_int_timezone" = xyes ; then
14921
14922 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
14923
14924 fi
14925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
14926 $as_echo_n "checking types of arguments for accept()... " >&6; }
14927  if ${ac_cv_func_accept_return+:} false; then :
14928   $as_echo_n "(cached) " >&6
14929 else
14930    if ${ac_cv_func_accept_arg1+:} false; then :
14931   $as_echo_n "(cached) " >&6
14932 else
14933     if ${ac_cv_func_accept_arg2+:} false; then :
14934   $as_echo_n "(cached) " >&6
14935 else
14936      if ${ac_cv_func_accept_arg3+:} false; then :
14937   $as_echo_n "(cached) " >&6
14938 else
14939       for ac_cv_func_accept_return in 'int' 'SOCKET WSAAPI' 'unsigned int PASCAL'; do
14940       for ac_cv_func_accept_arg1 in 'int' 'SOCKET' 'unsigned int'; do
14941        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
14942         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
14943          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14944 /* end confdefs.h.  */
14945 #include <sys/types.h>
14946 #include <sys/socket.h>
14947 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
14948 _ACEOF
14949 if ac_fn_c_try_compile "$LINENO"; then :
14950   ac_not_found=no; break 4
14951 else
14952   ac_not_found=yes
14953 fi
14954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14955        done
14956       done
14957      done
14958     done
14959     if test "$ac_not_found" = yes; then
14960       as_fn_error $? "could not determine argument types" "$LINENO" 5
14961     fi
14962     if test "$ac_cv_func_accept_arg3" = "void"; then
14963       ac_cv_func_accept_arg3=int
14964     fi
14965
14966 fi
14967
14968 fi
14969
14970 fi
14971
14972 fi
14973  { $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
14974 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
14975
14976 cat >>confdefs.h <<_ACEOF
14977 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
14978 _ACEOF
14979
14980
14981 cat >>confdefs.h <<_ACEOF
14982 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
14983 _ACEOF
14984
14985
14986 cat >>confdefs.h <<_ACEOF
14987 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
14988 _ACEOF
14989
14990
14991 cat >>confdefs.h <<_ACEOF
14992 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
14993 _ACEOF
14994
14995
14996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
14997 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
14998 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
14999   $as_echo_n "(cached) " >&6
15000 else
15001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15002 /* end confdefs.h.  */
15003 #include <sys/time.h>
15004 int
15005 main ()
15006 {
15007 struct timeval *tp;
15008 struct timezone *tzp;
15009 gettimeofday(tp,tzp);
15010   ;
15011   return 0;
15012 }
15013 _ACEOF
15014 if ac_fn_c_try_compile "$LINENO"; then :
15015   pgac_cv_func_gettimeofday_1arg=no
15016 else
15017   pgac_cv_func_gettimeofday_1arg=yes
15018 fi
15019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15020 fi
15021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15022 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15023 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15024
15025 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15026
15027 fi
15028
15029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15030 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15031 if ${pgac_cv_func_wcstombs_l+:} false; then :
15032   $as_echo_n "(cached) " >&6
15033 else
15034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15035 /* end confdefs.h.  */
15036 #include <stdlib.h>
15037 #include <locale.h>
15038 int
15039 main ()
15040 {
15041 #ifndef wcstombs_l
15042 (void) wcstombs_l;
15043 #endif
15044   ;
15045   return 0;
15046 }
15047 _ACEOF
15048 if ac_fn_c_try_compile "$LINENO"; then :
15049   pgac_cv_func_wcstombs_l='yes'
15050 else
15051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15052 /* end confdefs.h.  */
15053 #include <stdlib.h>
15054 #include <locale.h>
15055 #include <xlocale.h>
15056 int
15057 main ()
15058 {
15059 #ifndef wcstombs_l
15060 (void) wcstombs_l;
15061 #endif
15062   ;
15063   return 0;
15064 }
15065 _ACEOF
15066 if ac_fn_c_try_compile "$LINENO"; then :
15067   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15068 else
15069   pgac_cv_func_wcstombs_l='no'
15070 fi
15071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15072 fi
15073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15074 fi
15075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15076 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15077 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15078
15079 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15080
15081 fi
15082
15083 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15084 # symbols that that library has no business exposing to the world.  Pending
15085 # acquisition of a clue by those developers, ignore libedit (including its
15086 # possible alias of libreadline) while checking for everything else.
15087 LIBS_including_readline="$LIBS"
15088 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15089
15090 for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memset_s memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale utime utimes wcstombs_l
15091 do :
15092   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15093 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15094 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15095   cat >>confdefs.h <<_ACEOF
15096 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15097 _ACEOF
15098
15099 fi
15100 done
15101
15102
15103 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15105 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15106 if ${pgac_cv__builtin_bswap16+:} false; then :
15107   $as_echo_n "(cached) " >&6
15108 else
15109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15110 /* end confdefs.h.  */
15111
15112 int
15113 call__builtin_bswap16(int x)
15114 {
15115     return __builtin_bswap16(x);
15116 }
15117 int
15118 main ()
15119 {
15120
15121   ;
15122   return 0;
15123 }
15124 _ACEOF
15125 if ac_fn_c_try_link "$LINENO"; then :
15126   pgac_cv__builtin_bswap16=yes
15127 else
15128   pgac_cv__builtin_bswap16=no
15129 fi
15130 rm -f core conftest.err conftest.$ac_objext \
15131     conftest$ac_exeext conftest.$ac_ext
15132 fi
15133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15134 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15135 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15136
15137 cat >>confdefs.h <<_ACEOF
15138 #define HAVE__BUILTIN_BSWAP16 1
15139 _ACEOF
15140
15141 fi
15142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15143 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15144 if ${pgac_cv__builtin_bswap32+:} false; then :
15145   $as_echo_n "(cached) " >&6
15146 else
15147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15148 /* end confdefs.h.  */
15149
15150 int
15151 call__builtin_bswap32(int x)
15152 {
15153     return __builtin_bswap32(x);
15154 }
15155 int
15156 main ()
15157 {
15158
15159   ;
15160   return 0;
15161 }
15162 _ACEOF
15163 if ac_fn_c_try_link "$LINENO"; then :
15164   pgac_cv__builtin_bswap32=yes
15165 else
15166   pgac_cv__builtin_bswap32=no
15167 fi
15168 rm -f core conftest.err conftest.$ac_objext \
15169     conftest$ac_exeext conftest.$ac_ext
15170 fi
15171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15172 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15173 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15174
15175 cat >>confdefs.h <<_ACEOF
15176 #define HAVE__BUILTIN_BSWAP32 1
15177 _ACEOF
15178
15179 fi
15180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15181 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15182 if ${pgac_cv__builtin_bswap64+:} false; then :
15183   $as_echo_n "(cached) " >&6
15184 else
15185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15186 /* end confdefs.h.  */
15187
15188 int
15189 call__builtin_bswap64(long int x)
15190 {
15191     return __builtin_bswap64(x);
15192 }
15193 int
15194 main ()
15195 {
15196
15197   ;
15198   return 0;
15199 }
15200 _ACEOF
15201 if ac_fn_c_try_link "$LINENO"; then :
15202   pgac_cv__builtin_bswap64=yes
15203 else
15204   pgac_cv__builtin_bswap64=no
15205 fi
15206 rm -f core conftest.err conftest.$ac_objext \
15207     conftest$ac_exeext conftest.$ac_ext
15208 fi
15209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15210 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15211 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15212
15213 cat >>confdefs.h <<_ACEOF
15214 #define HAVE__BUILTIN_BSWAP64 1
15215 _ACEOF
15216
15217 fi
15218 # We assume that we needn't test all widths of these explicitly:
15219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15220 $as_echo_n "checking for __builtin_clz... " >&6; }
15221 if ${pgac_cv__builtin_clz+:} false; then :
15222   $as_echo_n "(cached) " >&6
15223 else
15224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15225 /* end confdefs.h.  */
15226
15227 int
15228 call__builtin_clz(unsigned int x)
15229 {
15230     return __builtin_clz(x);
15231 }
15232 int
15233 main ()
15234 {
15235
15236   ;
15237   return 0;
15238 }
15239 _ACEOF
15240 if ac_fn_c_try_link "$LINENO"; then :
15241   pgac_cv__builtin_clz=yes
15242 else
15243   pgac_cv__builtin_clz=no
15244 fi
15245 rm -f core conftest.err conftest.$ac_objext \
15246     conftest$ac_exeext conftest.$ac_ext
15247 fi
15248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15249 $as_echo "$pgac_cv__builtin_clz" >&6; }
15250 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15251
15252 cat >>confdefs.h <<_ACEOF
15253 #define HAVE__BUILTIN_CLZ 1
15254 _ACEOF
15255
15256 fi
15257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15258 $as_echo_n "checking for __builtin_ctz... " >&6; }
15259 if ${pgac_cv__builtin_ctz+:} false; then :
15260   $as_echo_n "(cached) " >&6
15261 else
15262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15263 /* end confdefs.h.  */
15264
15265 int
15266 call__builtin_ctz(unsigned int x)
15267 {
15268     return __builtin_ctz(x);
15269 }
15270 int
15271 main ()
15272 {
15273
15274   ;
15275   return 0;
15276 }
15277 _ACEOF
15278 if ac_fn_c_try_link "$LINENO"; then :
15279   pgac_cv__builtin_ctz=yes
15280 else
15281   pgac_cv__builtin_ctz=no
15282 fi
15283 rm -f core conftest.err conftest.$ac_objext \
15284     conftest$ac_exeext conftest.$ac_ext
15285 fi
15286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15287 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15288 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15289
15290 cat >>confdefs.h <<_ACEOF
15291 #define HAVE__BUILTIN_CTZ 1
15292 _ACEOF
15293
15294 fi
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15296 $as_echo_n "checking for __builtin_popcount... " >&6; }
15297 if ${pgac_cv__builtin_popcount+:} false; then :
15298   $as_echo_n "(cached) " >&6
15299 else
15300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15301 /* end confdefs.h.  */
15302
15303 int
15304 call__builtin_popcount(unsigned int x)
15305 {
15306     return __builtin_popcount(x);
15307 }
15308 int
15309 main ()
15310 {
15311
15312   ;
15313   return 0;
15314 }
15315 _ACEOF
15316 if ac_fn_c_try_link "$LINENO"; then :
15317   pgac_cv__builtin_popcount=yes
15318 else
15319   pgac_cv__builtin_popcount=no
15320 fi
15321 rm -f core conftest.err conftest.$ac_objext \
15322     conftest$ac_exeext conftest.$ac_ext
15323 fi
15324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15325 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15326 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15327
15328 cat >>confdefs.h <<_ACEOF
15329 #define HAVE__BUILTIN_POPCOUNT 1
15330 _ACEOF
15331
15332 fi
15333
15334 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15335 if test "x$ac_cv_func_fseeko" = xyes; then :
15336   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15337
15338 else
15339   case " $LIBOBJS " in
15340   *" fseeko.$ac_objext "* ) ;;
15341   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15342  ;;
15343 esac
15344
15345 fi
15346
15347
15348 case $host_os in
15349         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15350         # Mingw uses macros to access Win32 API calls
15351         netbsd*|mingw*)
15352
15353 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15354
15355                 ac_cv_func_fseeko=yes;;
15356         *)
15357                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15358 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15359 if ${ac_cv_sys_largefile_source+:} false; then :
15360   $as_echo_n "(cached) " >&6
15361 else
15362   while :; do
15363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15364 /* end confdefs.h.  */
15365 #include <sys/types.h> /* for off_t */
15366      #include <stdio.h>
15367 int
15368 main ()
15369 {
15370 int (*fp) (FILE *, off_t, int) = fseeko;
15371      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15372   ;
15373   return 0;
15374 }
15375 _ACEOF
15376 if ac_fn_c_try_link "$LINENO"; then :
15377   ac_cv_sys_largefile_source=no; break
15378 fi
15379 rm -f core conftest.err conftest.$ac_objext \
15380     conftest$ac_exeext conftest.$ac_ext
15381   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15382 /* end confdefs.h.  */
15383 #define _LARGEFILE_SOURCE 1
15384 #include <sys/types.h> /* for off_t */
15385      #include <stdio.h>
15386 int
15387 main ()
15388 {
15389 int (*fp) (FILE *, off_t, int) = fseeko;
15390      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15391   ;
15392   return 0;
15393 }
15394 _ACEOF
15395 if ac_fn_c_try_link "$LINENO"; then :
15396   ac_cv_sys_largefile_source=1; break
15397 fi
15398 rm -f core conftest.err conftest.$ac_objext \
15399     conftest$ac_exeext conftest.$ac_ext
15400   ac_cv_sys_largefile_source=unknown
15401   break
15402 done
15403 fi
15404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15405 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15406 case $ac_cv_sys_largefile_source in #(
15407   no | unknown) ;;
15408   *)
15409 cat >>confdefs.h <<_ACEOF
15410 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15411 _ACEOF
15412 ;;
15413 esac
15414 rm -rf conftest*
15415
15416 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15417 # in glibc 2.1.3, but that breaks too many other things.
15418 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15419 if test $ac_cv_sys_largefile_source != unknown; then
15420
15421 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15422
15423 fi
15424 ;;
15425 esac
15426
15427 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15428 # by calling it, 2009-04-02
15429 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15430 # The Clang compiler raises a warning for an undeclared identifier that matches
15431 # a compiler builtin function.  All extant Clang versions are affected, as of
15432 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
15433 # C and Objective C languages, but Clang does report an error under C++ and
15434 # Objective C++.
15435 #
15436 # Passing -fno-builtin to the compiler would suppress this problem.  That
15437 # strategy would have the advantage of being insensitive to stray warnings, but
15438 # it would make tests less realistic.
15439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15440 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15441 if ${ac_cv_c_decl_report+:} false; then :
15442   $as_echo_n "(cached) " >&6
15443 else
15444   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15445 /* end confdefs.h.  */
15446
15447 int
15448 main ()
15449 {
15450 (void) strchr;
15451   ;
15452   return 0;
15453 }
15454 _ACEOF
15455 if ac_fn_c_try_compile "$LINENO"; then :
15456   if test -s conftest.err; then :
15457       # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15458     # valid AC_CHECK_DECL input.  No library function is consistently available
15459     # on freestanding implementations, so test against a dummy declaration.
15460     # Include always-available headers on the off chance that they somehow
15461     # elicit warnings.
15462     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15463 /* end confdefs.h.  */
15464 #include <float.h>
15465 #include <limits.h>
15466 #include <stdarg.h>
15467 #include <stddef.h>
15468 extern void ac_decl (int, char *);
15469 int
15470 main ()
15471 {
15472 #ifdef __cplusplus
15473   (void) ac_decl ((int) 0, (char *) 0);
15474   (void) ac_decl;
15475 #else
15476   (void) ac_decl;
15477 #endif
15478
15479   ;
15480   return 0;
15481 }
15482 _ACEOF
15483 if ac_fn_c_try_compile "$LINENO"; then :
15484   if test -s conftest.err; then :
15485   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15486 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15487 as_fn_error $? "cannot detect from compiler exit status or warnings
15488 See \`config.log' for more details" "$LINENO" 5; }
15489 else
15490   ac_cv_c_decl_report=warning
15491 fi
15492 else
15493   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15494 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15495 as_fn_error $? "cannot compile a simple declaration test
15496 See \`config.log' for more details" "$LINENO" 5; }
15497 fi
15498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15499 else
15500   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15501 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15502 as_fn_error $? "compiler does not report undeclared identifiers
15503 See \`config.log' for more details" "$LINENO" 5; }
15504 fi
15505 else
15506   ac_cv_c_decl_report=error
15507 fi
15508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15509 fi
15510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15511 $as_echo "$ac_cv_c_decl_report" >&6; }
15512
15513 case $ac_cv_c_decl_report in
15514   warning) ac_c_decl_warn_flag=yes ;;
15515   *) ac_c_decl_warn_flag= ;;
15516 esac
15517
15518 if test "$PORTNAME" != "solaris"; then :
15519
15520 for ac_func in posix_fadvise
15521 do :
15522   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15523 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15524   cat >>confdefs.h <<_ACEOF
15525 #define HAVE_POSIX_FADVISE 1
15526 _ACEOF
15527
15528 fi
15529 done
15530
15531 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15532 "
15533 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15534   ac_have_decl=1
15535 else
15536   ac_have_decl=0
15537 fi
15538
15539 cat >>confdefs.h <<_ACEOF
15540 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15541 _ACEOF
15542
15543
15544 fi # fi
15545
15546 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15547 "
15548 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15549   ac_have_decl=1
15550 else
15551   ac_have_decl=0
15552 fi
15553
15554 cat >>confdefs.h <<_ACEOF
15555 #define HAVE_DECL_FDATASYNC $ac_have_decl
15556 _ACEOF
15557
15558 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15559 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15560   ac_have_decl=1
15561 else
15562   ac_have_decl=0
15563 fi
15564
15565 cat >>confdefs.h <<_ACEOF
15566 #define HAVE_DECL_STRLCAT $ac_have_decl
15567 _ACEOF
15568 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15569 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15570   ac_have_decl=1
15571 else
15572   ac_have_decl=0
15573 fi
15574
15575 cat >>confdefs.h <<_ACEOF
15576 #define HAVE_DECL_STRLCPY $ac_have_decl
15577 _ACEOF
15578 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15579 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15580   ac_have_decl=1
15581 else
15582   ac_have_decl=0
15583 fi
15584
15585 cat >>confdefs.h <<_ACEOF
15586 #define HAVE_DECL_STRNLEN $ac_have_decl
15587 _ACEOF
15588
15589 # This is probably only present on macOS, but may as well check always
15590 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15591 "
15592 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15593   ac_have_decl=1
15594 else
15595   ac_have_decl=0
15596 fi
15597
15598 cat >>confdefs.h <<_ACEOF
15599 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15600 _ACEOF
15601
15602
15603 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15604 "
15605 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15606   ac_have_decl=1
15607 else
15608   ac_have_decl=0
15609 fi
15610
15611 cat >>confdefs.h <<_ACEOF
15612 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15613 _ACEOF
15614 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15615 "
15616 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15617   ac_have_decl=1
15618 else
15619   ac_have_decl=0
15620 fi
15621
15622 cat >>confdefs.h <<_ACEOF
15623 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15624 _ACEOF
15625
15626
15627 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15628 #include <netinet/in.h>
15629 "
15630 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15631
15632 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15633
15634 fi
15635
15636
15637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15638 $as_echo_n "checking for PS_STRINGS... " >&6; }
15639 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15640   $as_echo_n "(cached) " >&6
15641 else
15642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15643 /* end confdefs.h.  */
15644 #include <machine/vmparam.h>
15645 #include <sys/exec.h>
15646
15647 int
15648 main ()
15649 {
15650 PS_STRINGS->ps_nargvstr = 1;
15651 PS_STRINGS->ps_argvstr = "foo";
15652   ;
15653   return 0;
15654 }
15655 _ACEOF
15656 if ac_fn_c_try_link "$LINENO"; then :
15657   pgac_cv_var_PS_STRINGS=yes
15658 else
15659   pgac_cv_var_PS_STRINGS=no
15660 fi
15661 rm -f core conftest.err conftest.$ac_objext \
15662     conftest$ac_exeext conftest.$ac_ext
15663 fi
15664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15665 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15666 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15667
15668 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15669
15670 fi
15671
15672
15673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15674 $as_echo_n "checking for isinf... " >&6; }
15675 if ${ac_cv_func_isinf+:} false; then :
15676   $as_echo_n "(cached) " >&6
15677 else
15678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15679 /* end confdefs.h.  */
15680
15681 #include <math.h>
15682 double glob_double;
15683
15684 int
15685 main ()
15686 {
15687 return isinf(glob_double) ? 0 : 1;
15688   ;
15689   return 0;
15690 }
15691 _ACEOF
15692 if ac_fn_c_try_link "$LINENO"; then :
15693   ac_cv_func_isinf=yes
15694 else
15695   ac_cv_func_isinf=no
15696 fi
15697 rm -f core conftest.err conftest.$ac_objext \
15698     conftest$ac_exeext conftest.$ac_ext
15699 fi
15700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15701 $as_echo "$ac_cv_func_isinf" >&6; }
15702
15703 if test $ac_cv_func_isinf = yes ; then
15704
15705 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15706
15707 else
15708   case " $LIBOBJS " in
15709   *" isinf.$ac_objext "* ) ;;
15710   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15711  ;;
15712 esac
15713
15714   # Look for a way to implement a substitute for isinf()
15715   for ac_func in fpclass fp_class fp_class_d class
15716 do :
15717   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15718 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15719 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15720   cat >>confdefs.h <<_ACEOF
15721 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15722 _ACEOF
15723  break
15724 fi
15725 done
15726
15727 fi
15728
15729 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15730 if test "x$ac_cv_func_dlopen" = xyes; then :
15731   $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15732
15733 else
15734   case " $LIBOBJS " in
15735   *" dlopen.$ac_objext "* ) ;;
15736   *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15737  ;;
15738 esac
15739
15740 fi
15741
15742 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
15743 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
15744   $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
15745
15746 else
15747   case " $LIBOBJS " in
15748   *" explicit_bzero.$ac_objext "* ) ;;
15749   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
15750  ;;
15751 esac
15752
15753 fi
15754
15755 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15756 if test "x$ac_cv_func_fls" = xyes; then :
15757   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15758
15759 else
15760   case " $LIBOBJS " in
15761   *" fls.$ac_objext "* ) ;;
15762   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15763  ;;
15764 esac
15765
15766 fi
15767
15768 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15769 if test "x$ac_cv_func_getopt" = xyes; then :
15770   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15771
15772 else
15773   case " $LIBOBJS " in
15774   *" getopt.$ac_objext "* ) ;;
15775   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15776  ;;
15777 esac
15778
15779 fi
15780
15781 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15782 if test "x$ac_cv_func_getrusage" = xyes; then :
15783   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15784
15785 else
15786   case " $LIBOBJS " in
15787   *" getrusage.$ac_objext "* ) ;;
15788   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15789  ;;
15790 esac
15791
15792 fi
15793
15794 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15795 if test "x$ac_cv_func_inet_aton" = xyes; then :
15796   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15797
15798 else
15799   case " $LIBOBJS " in
15800   *" inet_aton.$ac_objext "* ) ;;
15801   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15802  ;;
15803 esac
15804
15805 fi
15806
15807 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15808 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15809   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15810
15811 else
15812   case " $LIBOBJS " in
15813   *" mkdtemp.$ac_objext "* ) ;;
15814   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15815  ;;
15816 esac
15817
15818 fi
15819
15820 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15821 if test "x$ac_cv_func_pread" = xyes; then :
15822   $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15823
15824 else
15825   case " $LIBOBJS " in
15826   *" pread.$ac_objext "* ) ;;
15827   *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15828  ;;
15829 esac
15830
15831 fi
15832
15833 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15834 if test "x$ac_cv_func_pwrite" = xyes; then :
15835   $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15836
15837 else
15838   case " $LIBOBJS " in
15839   *" pwrite.$ac_objext "* ) ;;
15840   *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15841  ;;
15842 esac
15843
15844 fi
15845
15846 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15847 if test "x$ac_cv_func_random" = xyes; then :
15848   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15849
15850 else
15851   case " $LIBOBJS " in
15852   *" random.$ac_objext "* ) ;;
15853   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15854  ;;
15855 esac
15856
15857 fi
15858
15859 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15860 if test "x$ac_cv_func_rint" = xyes; then :
15861   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15862
15863 else
15864   case " $LIBOBJS " in
15865   *" rint.$ac_objext "* ) ;;
15866   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15867  ;;
15868 esac
15869
15870 fi
15871
15872 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15873 if test "x$ac_cv_func_srandom" = xyes; then :
15874   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15875
15876 else
15877   case " $LIBOBJS " in
15878   *" srandom.$ac_objext "* ) ;;
15879   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15880  ;;
15881 esac
15882
15883 fi
15884
15885 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15886 if test "x$ac_cv_func_strlcat" = xyes; then :
15887   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15888
15889 else
15890   case " $LIBOBJS " in
15891   *" strlcat.$ac_objext "* ) ;;
15892   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15893  ;;
15894 esac
15895
15896 fi
15897
15898 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15899 if test "x$ac_cv_func_strlcpy" = xyes; then :
15900   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15901
15902 else
15903   case " $LIBOBJS " in
15904   *" strlcpy.$ac_objext "* ) ;;
15905   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15906  ;;
15907 esac
15908
15909 fi
15910
15911 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15912 if test "x$ac_cv_func_strnlen" = xyes; then :
15913   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15914
15915 else
15916   case " $LIBOBJS " in
15917   *" strnlen.$ac_objext "* ) ;;
15918   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15919  ;;
15920 esac
15921
15922 fi
15923
15924 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
15925 if test "x$ac_cv_func_strtof" = xyes; then :
15926   $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
15927
15928 else
15929   case " $LIBOBJS " in
15930   *" strtof.$ac_objext "* ) ;;
15931   *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15932  ;;
15933 esac
15934
15935 fi
15936
15937
15938
15939 case $host_os in
15940         # Cygwin and (apparently, based on test results) Mingw both
15941         # have a broken strtof(), so substitute the same replacement
15942         # code we use with VS2013. That's not a perfect fix, since
15943         # (unlike with VS2013) it doesn't avoid double-rounding, but
15944         # we have no better options. To get that, though, we have to
15945         # force the file to be compiled despite HAVE_STRTOF.
15946         mingw*|cygwin*)
15947                 case " $LIBOBJS " in
15948   *" strtof.$ac_objext "* ) ;;
15949   *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15950  ;;
15951 esac
15952
15953                 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
15954 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
15955         ;;
15956 esac
15957
15958 case $host_os in
15959
15960         # Windows uses a specialised env handler
15961         # and doesn't need a replacement getpeereid because it doesn't use
15962         # Unix sockets.
15963         mingw*)
15964
15965 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15966
15967
15968 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15969
15970                 ac_cv_func_unsetenv=yes
15971                 ac_cv_func_getpeereid=yes;;
15972         *)
15973                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15974 if test "x$ac_cv_func_unsetenv" = xyes; then :
15975   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15976
15977 else
15978   case " $LIBOBJS " in
15979   *" unsetenv.$ac_objext "* ) ;;
15980   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15981  ;;
15982 esac
15983
15984 fi
15985
15986 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15987 if test "x$ac_cv_func_getpeereid" = xyes; then :
15988   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15989
15990 else
15991   case " $LIBOBJS " in
15992   *" getpeereid.$ac_objext "* ) ;;
15993   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15994  ;;
15995 esac
15996
15997 fi
15998
15999
16000                 ;;
16001 esac
16002
16003 # System's version of getaddrinfo(), if any, may be used only if we found
16004 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16005 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16006 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16007    test "$PORTNAME" != "win32"; then
16008   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16009 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16010   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16011
16012 else
16013   case " $LIBOBJS " in
16014   *" getaddrinfo.$ac_objext "* ) ;;
16015   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16016  ;;
16017 esac
16018
16019 fi
16020
16021
16022 else
16023   case " $LIBOBJS " in
16024   *" getaddrinfo.$ac_objext "* ) ;;
16025   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16026  ;;
16027 esac
16028
16029 fi
16030
16031 # Similarly, use system's getopt_long() only if system provides struct option.
16032 if test x"$ac_cv_type_struct_option" = xyes ; then
16033   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16034 if test "x$ac_cv_func_getopt_long" = xyes; then :
16035   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16036
16037 else
16038   case " $LIBOBJS " in
16039   *" getopt_long.$ac_objext "* ) ;;
16040   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16041  ;;
16042 esac
16043
16044 fi
16045
16046
16047 else
16048   case " $LIBOBJS " in
16049   *" getopt_long.$ac_objext "* ) ;;
16050   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16051  ;;
16052 esac
16053
16054 fi
16055
16056 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16057 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16058 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16059   case " $LIBOBJS " in
16060   *" getopt.$ac_objext "* ) ;;
16061   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16062  ;;
16063 esac
16064
16065 fi
16066
16067 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16068 # so always use our version on Windows.
16069 if test "$PORTNAME" = "win32"; then
16070   case " $LIBOBJS " in
16071   *" getopt.$ac_objext "* ) ;;
16072   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16073  ;;
16074 esac
16075
16076   case " $LIBOBJS " in
16077   *" getopt_long.$ac_objext "* ) ;;
16078   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16079  ;;
16080 esac
16081
16082 fi
16083
16084 # Win32 (really MinGW) support
16085 if test "$PORTNAME" = "win32"; then
16086   for ac_func in _configthreadlocale
16087 do :
16088   ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16089 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16090   cat >>confdefs.h <<_ACEOF
16091 #define HAVE__CONFIGTHREADLOCALE 1
16092 _ACEOF
16093
16094 fi
16095 done
16096
16097   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16098 if test "x$ac_cv_func_gettimeofday" = xyes; then :
16099   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16100
16101 else
16102   case " $LIBOBJS " in
16103   *" gettimeofday.$ac_objext "* ) ;;
16104   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16105  ;;
16106 esac
16107
16108 fi
16109
16110
16111   case " $LIBOBJS " in
16112   *" dirmod.$ac_objext "* ) ;;
16113   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16114  ;;
16115 esac
16116
16117   case " $LIBOBJS " in
16118   *" kill.$ac_objext "* ) ;;
16119   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16120  ;;
16121 esac
16122
16123   case " $LIBOBJS " in
16124   *" open.$ac_objext "* ) ;;
16125   *) LIBOBJS="$LIBOBJS open.$ac_objext"
16126  ;;
16127 esac
16128
16129   case " $LIBOBJS " in
16130   *" system.$ac_objext "* ) ;;
16131   *) LIBOBJS="$LIBOBJS system.$ac_objext"
16132  ;;
16133 esac
16134
16135   case " $LIBOBJS " in
16136   *" win32env.$ac_objext "* ) ;;
16137   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16138  ;;
16139 esac
16140
16141   case " $LIBOBJS " in
16142   *" win32error.$ac_objext "* ) ;;
16143   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16144  ;;
16145 esac
16146
16147   case " $LIBOBJS " in
16148   *" win32security.$ac_objext "* ) ;;
16149   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16150  ;;
16151 esac
16152
16153   case " $LIBOBJS " in
16154   *" win32setlocale.$ac_objext "* ) ;;
16155   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16156  ;;
16157 esac
16158
16159
16160 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16161
16162   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16163 #define WIN32_LEAN_AND_MEAN
16164 #include <windows.h>
16165 #include <string.h>
16166 #include <dbghelp.h>
16167 "
16168 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16169
16170 cat >>confdefs.h <<_ACEOF
16171 #define HAVE_MINIDUMP_TYPE 1
16172 _ACEOF
16173
16174 pgac_minidump_type=yes
16175 else
16176   pgac_minidump_type=no
16177 fi
16178
16179 fi
16180 if test x"$pgac_minidump_type" = x"yes" ; then
16181   have_win32_dbghelp=yes
16182
16183 else
16184   have_win32_dbghelp=no
16185
16186 fi
16187
16188 # Cygwin needs only a bit of that
16189 if test "$PORTNAME" = "cygwin"; then
16190   case " $LIBOBJS " in
16191   *" dirmod.$ac_objext "* ) ;;
16192   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16193  ;;
16194 esac
16195
16196 fi
16197
16198 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16199 if test "x$ac_cv_func_syslog" = xyes; then :
16200   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16201 if test "x$ac_cv_header_syslog_h" = xyes; then :
16202
16203 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16204
16205 fi
16206
16207
16208 fi
16209
16210
16211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16212 $as_echo_n "checking for opterr... " >&6; }
16213 if ${pgac_cv_var_int_opterr+:} false; then :
16214   $as_echo_n "(cached) " >&6
16215 else
16216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16217 /* end confdefs.h.  */
16218 #include <unistd.h>
16219 int
16220 main ()
16221 {
16222 extern int opterr; opterr = 1;
16223   ;
16224   return 0;
16225 }
16226 _ACEOF
16227 if ac_fn_c_try_link "$LINENO"; then :
16228   pgac_cv_var_int_opterr=yes
16229 else
16230   pgac_cv_var_int_opterr=no
16231 fi
16232 rm -f core conftest.err conftest.$ac_objext \
16233     conftest$ac_exeext conftest.$ac_ext
16234 fi
16235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16236 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16237 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16238
16239 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16240
16241 fi
16242
16243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16244 $as_echo_n "checking for optreset... " >&6; }
16245 if ${pgac_cv_var_int_optreset+:} false; then :
16246   $as_echo_n "(cached) " >&6
16247 else
16248   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16249 /* end confdefs.h.  */
16250 #include <unistd.h>
16251 int
16252 main ()
16253 {
16254 extern int optreset; optreset = 1;
16255   ;
16256   return 0;
16257 }
16258 _ACEOF
16259 if ac_fn_c_try_link "$LINENO"; then :
16260   pgac_cv_var_int_optreset=yes
16261 else
16262   pgac_cv_var_int_optreset=no
16263 fi
16264 rm -f core conftest.err conftest.$ac_objext \
16265     conftest$ac_exeext conftest.$ac_ext
16266 fi
16267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16268 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16269 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16270
16271 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16272
16273 fi
16274
16275 for ac_func in strtoll __strtoll strtoq
16276 do :
16277   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16278 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16279 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16280   cat >>confdefs.h <<_ACEOF
16281 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16282 _ACEOF
16283  break
16284 fi
16285 done
16286
16287 for ac_func in strtoull __strtoull strtouq
16288 do :
16289   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16290 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16291 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16292   cat >>confdefs.h <<_ACEOF
16293 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16294 _ACEOF
16295  break
16296 fi
16297 done
16298
16299 # strto[u]ll may exist but not be declared
16300 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16301 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16302   ac_have_decl=1
16303 else
16304   ac_have_decl=0
16305 fi
16306
16307 cat >>confdefs.h <<_ACEOF
16308 #define HAVE_DECL_STRTOLL $ac_have_decl
16309 _ACEOF
16310 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16311 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16312   ac_have_decl=1
16313 else
16314   ac_have_decl=0
16315 fi
16316
16317 cat >>confdefs.h <<_ACEOF
16318 #define HAVE_DECL_STRTOULL $ac_have_decl
16319 _ACEOF
16320
16321
16322 if test "$with_icu" = yes; then
16323   ac_save_CPPFLAGS=$CPPFLAGS
16324   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16325
16326   # Verify we have ICU's header files
16327   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16328 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16329
16330 else
16331   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16332 fi
16333
16334
16335
16336   CPPFLAGS=$ac_save_CPPFLAGS
16337 fi
16338
16339 if test "$with_llvm" = yes; then
16340
16341   # Check which functionality is present
16342   SAVE_CPPFLAGS="$CPPFLAGS"
16343   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16344   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16345 "
16346 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16347   ac_have_decl=1
16348 else
16349   ac_have_decl=0
16350 fi
16351
16352 cat >>confdefs.h <<_ACEOF
16353 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16354 _ACEOF
16355
16356   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16357 "
16358 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16359   ac_have_decl=1
16360 else
16361   ac_have_decl=0
16362 fi
16363
16364 cat >>confdefs.h <<_ACEOF
16365 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16366 _ACEOF
16367 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16368 "
16369 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16370   ac_have_decl=1
16371 else
16372   ac_have_decl=0
16373 fi
16374
16375 cat >>confdefs.h <<_ACEOF
16376 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16377 _ACEOF
16378
16379   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16380 "
16381 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16382   ac_have_decl=1
16383 else
16384   ac_have_decl=0
16385 fi
16386
16387 cat >>confdefs.h <<_ACEOF
16388 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16389 _ACEOF
16390 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16391 "
16392 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16393   ac_have_decl=1
16394 else
16395   ac_have_decl=0
16396 fi
16397
16398 cat >>confdefs.h <<_ACEOF
16399 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16400 _ACEOF
16401
16402   CPPFLAGS="$SAVE_CPPFLAGS"
16403
16404 fi
16405
16406 # Lastly, restore full LIBS list and check for readline/libedit symbols
16407 LIBS="$LIBS_including_readline"
16408
16409 if test "$with_readline" = yes; then
16410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16411 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16412 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16413   $as_echo_n "(cached) " >&6
16414 else
16415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16416 /* end confdefs.h.  */
16417 #include <stdio.h>
16418 #ifdef HAVE_READLINE_READLINE_H
16419 # include <readline/readline.h>
16420 #elif defined(HAVE_READLINE_H)
16421 # include <readline.h>
16422 #endif
16423
16424 int
16425 main ()
16426 {
16427 rl_completion_append_character = 'x';
16428   ;
16429   return 0;
16430 }
16431 _ACEOF
16432 if ac_fn_c_try_link "$LINENO"; then :
16433   pgac_cv_var_rl_completion_append_character=yes
16434 else
16435   pgac_cv_var_rl_completion_append_character=no
16436 fi
16437 rm -f core conftest.err conftest.$ac_objext \
16438     conftest$ac_exeext conftest.$ac_ext
16439 fi
16440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16441 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16442 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16443
16444 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16445
16446 fi
16447   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16448 do :
16449   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16450 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16451 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16452   cat >>confdefs.h <<_ACEOF
16453 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16454 _ACEOF
16455
16456 fi
16457 done
16458
16459   for ac_func in append_history history_truncate_file
16460 do :
16461   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16462 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16463 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16464   cat >>confdefs.h <<_ACEOF
16465 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16466 _ACEOF
16467
16468 fi
16469 done
16470
16471 fi
16472
16473
16474 # This test makes sure that run tests work at all.  Sometimes a shared
16475 # library is found by the linker, but the runtime linker can't find it.
16476 # This check should come after all modifications of compiler or linker
16477 # variables, and before any other run tests.
16478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16479 $as_echo_n "checking test program... " >&6; }
16480 if test "$cross_compiling" = yes; then :
16481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16482 $as_echo "cross-compiling" >&6; }
16483 else
16484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16485 /* end confdefs.h.  */
16486 int main() { return 0; }
16487 _ACEOF
16488 if ac_fn_c_try_run "$LINENO"; then :
16489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16490 $as_echo "ok" >&6; }
16491 else
16492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16493 $as_echo "failed" >&6; }
16494 as_fn_error $? "
16495 Could not execute a simple test program.  This may be a problem
16496 related to locating shared libraries.  Check the file 'config.log'
16497 for the exact reason." "$LINENO" 5
16498 fi
16499 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16500   conftest.$ac_objext conftest.beam conftest.$ac_ext
16501 fi
16502
16503
16504 # --------------------
16505 # Run tests below here
16506 # --------------------
16507
16508
16509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16510 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16511 if ${pgac_cv_type_long_int_64+:} false; then :
16512   $as_echo_n "(cached) " >&6
16513 else
16514   if test "$cross_compiling" = yes; then :
16515   # If cross-compiling, check the size reported by the compiler and
16516 # trust that the arithmetic works.
16517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16518 /* end confdefs.h.  */
16519
16520 int
16521 main ()
16522 {
16523 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16524 test_array [0] = 0;
16525 return test_array [0];
16526
16527   ;
16528   return 0;
16529 }
16530 _ACEOF
16531 if ac_fn_c_try_compile "$LINENO"; then :
16532   pgac_cv_type_long_int_64=yes
16533 else
16534   pgac_cv_type_long_int_64=no
16535 fi
16536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16537 else
16538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16539 /* end confdefs.h.  */
16540 typedef long int ac_int64;
16541
16542 /*
16543  * These are globals to discourage the compiler from folding all the
16544  * arithmetic tests down to compile-time constants.
16545  */
16546 ac_int64 a = 20000001;
16547 ac_int64 b = 40000005;
16548
16549 int does_int64_work()
16550 {
16551   ac_int64 c,d;
16552
16553   if (sizeof(ac_int64) != 8)
16554     return 0;                   /* definitely not the right size */
16555
16556   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16557   c = a * b;
16558   d = (c + b) / b;
16559   if (d != a+1)
16560     return 0;
16561   return 1;
16562 }
16563
16564 int
16565 main() {
16566   return (! does_int64_work());
16567 }
16568 _ACEOF
16569 if ac_fn_c_try_run "$LINENO"; then :
16570   pgac_cv_type_long_int_64=yes
16571 else
16572   pgac_cv_type_long_int_64=no
16573 fi
16574 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16575   conftest.$ac_objext conftest.beam conftest.$ac_ext
16576 fi
16577
16578 fi
16579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16580 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16581
16582 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16583 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16584
16585 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16586
16587 fi
16588
16589
16590 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16591   pg_int64_type="long int"
16592 else
16593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16594 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16595 if ${pgac_cv_type_long_long_int_64+:} false; then :
16596   $as_echo_n "(cached) " >&6
16597 else
16598   if test "$cross_compiling" = yes; then :
16599   # If cross-compiling, check the size reported by the compiler and
16600 # trust that the arithmetic works.
16601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16602 /* end confdefs.h.  */
16603
16604 int
16605 main ()
16606 {
16607 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16608 test_array [0] = 0;
16609 return test_array [0];
16610
16611   ;
16612   return 0;
16613 }
16614 _ACEOF
16615 if ac_fn_c_try_compile "$LINENO"; then :
16616   pgac_cv_type_long_long_int_64=yes
16617 else
16618   pgac_cv_type_long_long_int_64=no
16619 fi
16620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16621 else
16622   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16623 /* end confdefs.h.  */
16624 typedef long long int ac_int64;
16625
16626 /*
16627  * These are globals to discourage the compiler from folding all the
16628  * arithmetic tests down to compile-time constants.
16629  */
16630 ac_int64 a = 20000001;
16631 ac_int64 b = 40000005;
16632
16633 int does_int64_work()
16634 {
16635   ac_int64 c,d;
16636
16637   if (sizeof(ac_int64) != 8)
16638     return 0;                   /* definitely not the right size */
16639
16640   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16641   c = a * b;
16642   d = (c + b) / b;
16643   if (d != a+1)
16644     return 0;
16645   return 1;
16646 }
16647
16648 int
16649 main() {
16650   return (! does_int64_work());
16651 }
16652 _ACEOF
16653 if ac_fn_c_try_run "$LINENO"; then :
16654   pgac_cv_type_long_long_int_64=yes
16655 else
16656   pgac_cv_type_long_long_int_64=no
16657 fi
16658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16659   conftest.$ac_objext conftest.beam conftest.$ac_ext
16660 fi
16661
16662 fi
16663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16664 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16665
16666 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16667 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16668
16669 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16670
16671 fi
16672
16673   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16674     pg_int64_type="long long int"
16675   else
16676     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16677   fi
16678 fi
16679
16680
16681 cat >>confdefs.h <<_ACEOF
16682 #define PG_INT64_TYPE $pg_int64_type
16683 _ACEOF
16684
16685
16686 # Select the printf length modifier that goes with that, too.
16687 if test x"$pg_int64_type" = x"long long int" ; then
16688   INT64_MODIFIER='"ll"'
16689 else
16690   INT64_MODIFIER='"l"'
16691 fi
16692
16693
16694 cat >>confdefs.h <<_ACEOF
16695 #define INT64_MODIFIER $INT64_MODIFIER
16696 _ACEOF
16697
16698
16699 # has to be down here, rather than with the other builtins, because
16700 # the test uses PG_INT64_TYPE.
16701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16702 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16703 if ${pgac_cv__builtin_op_overflow+:} false; then :
16704   $as_echo_n "(cached) " >&6
16705 else
16706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16707 /* end confdefs.h.  */
16708
16709 PG_INT64_TYPE a = 1;
16710 PG_INT64_TYPE b = 1;
16711 PG_INT64_TYPE result;
16712 int oflo;
16713
16714 int
16715 main ()
16716 {
16717 oflo = __builtin_mul_overflow(a, b, &result);
16718   ;
16719   return 0;
16720 }
16721 _ACEOF
16722 if ac_fn_c_try_link "$LINENO"; then :
16723   pgac_cv__builtin_op_overflow=yes
16724 else
16725   pgac_cv__builtin_op_overflow=no
16726 fi
16727 rm -f core conftest.err conftest.$ac_objext \
16728     conftest$ac_exeext conftest.$ac_ext
16729 fi
16730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16731 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16732 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16733
16734 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16735
16736 fi
16737
16738 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16739 # The cast to long int works around a bug in the HP C Compiler
16740 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16741 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16742 # This bug is HP SR number 8606223364.
16743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16744 $as_echo_n "checking size of void *... " >&6; }
16745 if ${ac_cv_sizeof_void_p+:} false; then :
16746   $as_echo_n "(cached) " >&6
16747 else
16748   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16749
16750 else
16751   if test "$ac_cv_type_void_p" = yes; then
16752      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16753 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16754 as_fn_error 77 "cannot compute sizeof (void *)
16755 See \`config.log' for more details" "$LINENO" 5; }
16756    else
16757      ac_cv_sizeof_void_p=0
16758    fi
16759 fi
16760
16761 fi
16762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16763 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16764
16765
16766
16767 cat >>confdefs.h <<_ACEOF
16768 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16769 _ACEOF
16770
16771
16772 # The cast to long int works around a bug in the HP C Compiler
16773 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16774 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16775 # This bug is HP SR number 8606223364.
16776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16777 $as_echo_n "checking size of size_t... " >&6; }
16778 if ${ac_cv_sizeof_size_t+:} false; then :
16779   $as_echo_n "(cached) " >&6
16780 else
16781   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16782
16783 else
16784   if test "$ac_cv_type_size_t" = yes; then
16785      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16786 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16787 as_fn_error 77 "cannot compute sizeof (size_t)
16788 See \`config.log' for more details" "$LINENO" 5; }
16789    else
16790      ac_cv_sizeof_size_t=0
16791    fi
16792 fi
16793
16794 fi
16795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16796 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16797
16798
16799
16800 cat >>confdefs.h <<_ACEOF
16801 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16802 _ACEOF
16803
16804
16805 # The cast to long int works around a bug in the HP C Compiler
16806 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16807 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16808 # This bug is HP SR number 8606223364.
16809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16810 $as_echo_n "checking size of long... " >&6; }
16811 if ${ac_cv_sizeof_long+:} false; then :
16812   $as_echo_n "(cached) " >&6
16813 else
16814   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16815
16816 else
16817   if test "$ac_cv_type_long" = yes; then
16818      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16819 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16820 as_fn_error 77 "cannot compute sizeof (long)
16821 See \`config.log' for more details" "$LINENO" 5; }
16822    else
16823      ac_cv_sizeof_long=0
16824    fi
16825 fi
16826
16827 fi
16828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16829 $as_echo "$ac_cv_sizeof_long" >&6; }
16830
16831
16832
16833 cat >>confdefs.h <<_ACEOF
16834 #define SIZEOF_LONG $ac_cv_sizeof_long
16835 _ACEOF
16836
16837
16838
16839 # Decide whether float4 is passed by value: user-selectable, enabled by default
16840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16841 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16842
16843
16844 # Check whether --enable-float4-byval was given.
16845 if test "${enable_float4_byval+set}" = set; then :
16846   enableval=$enable_float4_byval;
16847   case $enableval in
16848     yes)
16849
16850 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16851
16852                float4passbyval=true
16853       ;;
16854     no)
16855       float4passbyval=false
16856       ;;
16857     *)
16858       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16859       ;;
16860   esac
16861
16862 else
16863   enable_float4_byval=yes
16864
16865 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16866
16867                float4passbyval=true
16868 fi
16869
16870
16871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16872 $as_echo "$enable_float4_byval" >&6; }
16873
16874 cat >>confdefs.h <<_ACEOF
16875 #define FLOAT4PASSBYVAL $float4passbyval
16876 _ACEOF
16877
16878
16879 # Decide whether float8 is passed by value.
16880 # Note: this setting also controls int8 and related types such as timestamp.
16881 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16882 # If not, trying to select it is an error.
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16884 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16885 if test $ac_cv_sizeof_void_p -ge 8 ; then
16886
16887
16888 # Check whether --enable-float8-byval was given.
16889 if test "${enable_float8_byval+set}" = set; then :
16890   enableval=$enable_float8_byval;
16891   case $enableval in
16892     yes)
16893       :
16894       ;;
16895     no)
16896       :
16897       ;;
16898     *)
16899       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16900       ;;
16901   esac
16902
16903 else
16904   enable_float8_byval=yes
16905
16906 fi
16907
16908
16909 else
16910
16911
16912 # Check whether --enable-float8-byval was given.
16913 if test "${enable_float8_byval+set}" = set; then :
16914   enableval=$enable_float8_byval;
16915   case $enableval in
16916     yes)
16917       :
16918       ;;
16919     no)
16920       :
16921       ;;
16922     *)
16923       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16924       ;;
16925   esac
16926
16927 else
16928   enable_float8_byval=no
16929
16930 fi
16931
16932
16933   if test "$enable_float8_byval" = yes ; then
16934     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16935   fi
16936 fi
16937 if test "$enable_float8_byval" = yes ; then
16938
16939 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16940
16941   float8passbyval=true
16942 else
16943   float8passbyval=false
16944 fi
16945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16946 $as_echo "$enable_float8_byval" >&6; }
16947
16948 cat >>confdefs.h <<_ACEOF
16949 #define FLOAT8PASSBYVAL $float8passbyval
16950 _ACEOF
16951
16952
16953 # Determine memory alignment requirements for the basic C data types.
16954
16955 # The cast to long int works around a bug in the HP C Compiler,
16956 # see AC_CHECK_SIZEOF for more information.
16957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16958 $as_echo_n "checking alignment of short... " >&6; }
16959 if ${ac_cv_alignof_short+:} false; then :
16960   $as_echo_n "(cached) " >&6
16961 else
16962   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16963 #ifndef offsetof
16964 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16965 #endif
16966 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16967
16968 else
16969   if test "$ac_cv_type_short" = yes; then
16970      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16971 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16972 as_fn_error 77 "cannot compute alignment of short
16973 See \`config.log' for more details" "$LINENO" 5; }
16974    else
16975      ac_cv_alignof_short=0
16976    fi
16977 fi
16978
16979 fi
16980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16981 $as_echo "$ac_cv_alignof_short" >&6; }
16982
16983
16984
16985 cat >>confdefs.h <<_ACEOF
16986 #define ALIGNOF_SHORT $ac_cv_alignof_short
16987 _ACEOF
16988
16989
16990 # The cast to long int works around a bug in the HP C Compiler,
16991 # see AC_CHECK_SIZEOF for more information.
16992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16993 $as_echo_n "checking alignment of int... " >&6; }
16994 if ${ac_cv_alignof_int+:} false; then :
16995   $as_echo_n "(cached) " >&6
16996 else
16997   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16998 #ifndef offsetof
16999 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17000 #endif
17001 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17002
17003 else
17004   if test "$ac_cv_type_int" = yes; then
17005      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17006 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17007 as_fn_error 77 "cannot compute alignment of int
17008 See \`config.log' for more details" "$LINENO" 5; }
17009    else
17010      ac_cv_alignof_int=0
17011    fi
17012 fi
17013
17014 fi
17015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17016 $as_echo "$ac_cv_alignof_int" >&6; }
17017
17018
17019
17020 cat >>confdefs.h <<_ACEOF
17021 #define ALIGNOF_INT $ac_cv_alignof_int
17022 _ACEOF
17023
17024
17025 # The cast to long int works around a bug in the HP C Compiler,
17026 # see AC_CHECK_SIZEOF for more information.
17027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17028 $as_echo_n "checking alignment of long... " >&6; }
17029 if ${ac_cv_alignof_long+:} false; then :
17030   $as_echo_n "(cached) " >&6
17031 else
17032   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
17033 #ifndef offsetof
17034 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17035 #endif
17036 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17037
17038 else
17039   if test "$ac_cv_type_long" = yes; then
17040      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17041 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17042 as_fn_error 77 "cannot compute alignment of long
17043 See \`config.log' for more details" "$LINENO" 5; }
17044    else
17045      ac_cv_alignof_long=0
17046    fi
17047 fi
17048
17049 fi
17050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17051 $as_echo "$ac_cv_alignof_long" >&6; }
17052
17053
17054
17055 cat >>confdefs.h <<_ACEOF
17056 #define ALIGNOF_LONG $ac_cv_alignof_long
17057 _ACEOF
17058
17059
17060 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17061   # The cast to long int works around a bug in the HP C Compiler,
17062 # see AC_CHECK_SIZEOF for more information.
17063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17064 $as_echo_n "checking alignment of long long int... " >&6; }
17065 if ${ac_cv_alignof_long_long_int+:} false; then :
17066   $as_echo_n "(cached) " >&6
17067 else
17068   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
17069 #ifndef offsetof
17070 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17071 #endif
17072 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17073
17074 else
17075   if test "$ac_cv_type_long_long_int" = yes; then
17076      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17077 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17078 as_fn_error 77 "cannot compute alignment of long long int
17079 See \`config.log' for more details" "$LINENO" 5; }
17080    else
17081      ac_cv_alignof_long_long_int=0
17082    fi
17083 fi
17084
17085 fi
17086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17087 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17088
17089
17090
17091 cat >>confdefs.h <<_ACEOF
17092 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17093 _ACEOF
17094
17095
17096 fi
17097 # The cast to long int works around a bug in the HP C Compiler,
17098 # see AC_CHECK_SIZEOF for more information.
17099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17100 $as_echo_n "checking alignment of double... " >&6; }
17101 if ${ac_cv_alignof_double+:} false; then :
17102   $as_echo_n "(cached) " >&6
17103 else
17104   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
17105 #ifndef offsetof
17106 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17107 #endif
17108 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17109
17110 else
17111   if test "$ac_cv_type_double" = yes; then
17112      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17113 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17114 as_fn_error 77 "cannot compute alignment of double
17115 See \`config.log' for more details" "$LINENO" 5; }
17116    else
17117      ac_cv_alignof_double=0
17118    fi
17119 fi
17120
17121 fi
17122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17123 $as_echo "$ac_cv_alignof_double" >&6; }
17124
17125
17126
17127 cat >>confdefs.h <<_ACEOF
17128 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17129 _ACEOF
17130
17131
17132
17133 # Compute maximum alignment of any basic type.
17134 # We assume long's alignment is at least as strong as char, short, or int;
17135 # but we must check long long (if it is being used for int64) and double.
17136 # Note that we intentionally do not consider any types wider than 64 bits,
17137 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17138 # for disk and memory space.
17139
17140 MAX_ALIGNOF=$ac_cv_alignof_long
17141 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17142   MAX_ALIGNOF=$ac_cv_alignof_double
17143 fi
17144 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17145   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17146 fi
17147
17148 cat >>confdefs.h <<_ACEOF
17149 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17150 _ACEOF
17151
17152
17153
17154 # Some platforms predefine the types int8, int16, etc.  Only check
17155 # a (hopefully) representative subset.
17156 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17157 "
17158 if test "x$ac_cv_type_int8" = xyes; then :
17159
17160 cat >>confdefs.h <<_ACEOF
17161 #define HAVE_INT8 1
17162 _ACEOF
17163
17164
17165 fi
17166 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17167 "
17168 if test "x$ac_cv_type_uint8" = xyes; then :
17169
17170 cat >>confdefs.h <<_ACEOF
17171 #define HAVE_UINT8 1
17172 _ACEOF
17173
17174
17175 fi
17176 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17177 "
17178 if test "x$ac_cv_type_int64" = xyes; then :
17179
17180 cat >>confdefs.h <<_ACEOF
17181 #define HAVE_INT64 1
17182 _ACEOF
17183
17184
17185 fi
17186 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17187 "
17188 if test "x$ac_cv_type_uint64" = xyes; then :
17189
17190 cat >>confdefs.h <<_ACEOF
17191 #define HAVE_UINT64 1
17192 _ACEOF
17193
17194
17195 fi
17196
17197
17198 # Some compilers offer a 128-bit integer scalar type.
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17200 $as_echo_n "checking for __int128... " >&6; }
17201 if ${pgac_cv__128bit_int+:} false; then :
17202   $as_echo_n "(cached) " >&6
17203 else
17204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17205 /* end confdefs.h.  */
17206
17207 /*
17208  * We don't actually run this test, just link it to verify that any support
17209  * functions needed for __int128 are present.
17210  *
17211  * These are globals to discourage the compiler from folding all the
17212  * arithmetic tests down to compile-time constants.  We do not have
17213  * convenient support for 128bit literals at this point...
17214  */
17215 __int128 a = 48828125;
17216 __int128 b = 97656250;
17217
17218 int
17219 main ()
17220 {
17221
17222 __int128 c,d;
17223 a = (a << 12) + 1; /* 200000000001 */
17224 b = (b << 12) + 5; /* 400000000005 */
17225 /* try the most relevant arithmetic ops */
17226 c = a * b;
17227 d = (c + b) / b;
17228 /* must use the results, else compiler may optimize arithmetic away */
17229 if (d != a+1)
17230   return 1;
17231
17232   ;
17233   return 0;
17234 }
17235 _ACEOF
17236 if ac_fn_c_try_link "$LINENO"; then :
17237   pgac_cv__128bit_int=yes
17238 else
17239   pgac_cv__128bit_int=no
17240 fi
17241 rm -f core conftest.err conftest.$ac_objext \
17242     conftest$ac_exeext conftest.$ac_ext
17243 fi
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17245 $as_echo "$pgac_cv__128bit_int" >&6; }
17246 if test x"$pgac_cv__128bit_int" = xyes ; then
17247   # Use of non-default alignment with __int128 tickles bugs in some compilers.
17248   # If not cross-compiling, we can test for bugs and disable use of __int128
17249   # with buggy compilers.  If cross-compiling, hope for the best.
17250   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17251   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17252 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17253 if ${pgac_cv__128bit_int_bug+:} false; then :
17254   $as_echo_n "(cached) " >&6
17255 else
17256   if test "$cross_compiling" = yes; then :
17257   pgac_cv__128bit_int_bug="assuming ok"
17258 else
17259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17260 /* end confdefs.h.  */
17261
17262 /* This must match the corresponding code in c.h: */
17263 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17264 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17265 #endif
17266 typedef __int128 int128a
17267 #if defined(pg_attribute_aligned)
17268 pg_attribute_aligned(8)
17269 #endif
17270 ;
17271 int128a holder;
17272 void pass_by_val(void *buffer, int128a par) { holder = par; }
17273
17274 int
17275 main ()
17276 {
17277
17278 long int i64 = 97656225L << 12;
17279 int128a q;
17280 pass_by_val(main, (int128a) i64);
17281 q = (int128a) i64;
17282 if (q != holder)
17283   return 1;
17284
17285   ;
17286   return 0;
17287 }
17288 _ACEOF
17289 if ac_fn_c_try_run "$LINENO"; then :
17290   pgac_cv__128bit_int_bug=ok
17291 else
17292   pgac_cv__128bit_int_bug=broken
17293 fi
17294 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17295   conftest.$ac_objext conftest.beam conftest.$ac_ext
17296 fi
17297
17298 fi
17299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17300 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17301   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17302
17303 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17304
17305     # The cast to long int works around a bug in the HP C Compiler,
17306 # see AC_CHECK_SIZEOF for more information.
17307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17308 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17309 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17310   $as_echo_n "(cached) " >&6
17311 else
17312   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17313 #ifndef offsetof
17314 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17315 #endif
17316 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17317
17318 else
17319   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17320      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17321 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17322 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17323 See \`config.log' for more details" "$LINENO" 5; }
17324    else
17325      ac_cv_alignof_PG_INT128_TYPE=0
17326    fi
17327 fi
17328
17329 fi
17330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17331 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17332
17333
17334
17335 cat >>confdefs.h <<_ACEOF
17336 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17337 _ACEOF
17338
17339
17340   fi
17341 fi
17342
17343 # Check for various atomic operations now that we have checked how to declare
17344 # 64bit integers.
17345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17346 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17347 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17348   $as_echo_n "(cached) " >&6
17349 else
17350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17351 /* end confdefs.h.  */
17352
17353 int
17354 main ()
17355 {
17356 char lock = 0;
17357    __sync_lock_test_and_set(&lock, 1);
17358    __sync_lock_release(&lock);
17359   ;
17360   return 0;
17361 }
17362 _ACEOF
17363 if ac_fn_c_try_link "$LINENO"; then :
17364   pgac_cv_gcc_sync_char_tas="yes"
17365 else
17366   pgac_cv_gcc_sync_char_tas="no"
17367 fi
17368 rm -f core conftest.err conftest.$ac_objext \
17369     conftest$ac_exeext conftest.$ac_ext
17370 fi
17371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17372 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17373 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17374
17375 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17376
17377 fi
17378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17379 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17380 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17381   $as_echo_n "(cached) " >&6
17382 else
17383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17384 /* end confdefs.h.  */
17385
17386 int
17387 main ()
17388 {
17389 int lock = 0;
17390    __sync_lock_test_and_set(&lock, 1);
17391    __sync_lock_release(&lock);
17392   ;
17393   return 0;
17394 }
17395 _ACEOF
17396 if ac_fn_c_try_link "$LINENO"; then :
17397   pgac_cv_gcc_sync_int32_tas="yes"
17398 else
17399   pgac_cv_gcc_sync_int32_tas="no"
17400 fi
17401 rm -f core conftest.err conftest.$ac_objext \
17402     conftest$ac_exeext conftest.$ac_ext
17403 fi
17404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17405 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17406 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17407
17408 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17409
17410 fi
17411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17412 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17413 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17414   $as_echo_n "(cached) " >&6
17415 else
17416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17417 /* end confdefs.h.  */
17418
17419 int
17420 main ()
17421 {
17422 int val = 0;
17423    __sync_val_compare_and_swap(&val, 0, 37);
17424   ;
17425   return 0;
17426 }
17427 _ACEOF
17428 if ac_fn_c_try_link "$LINENO"; then :
17429   pgac_cv_gcc_sync_int32_cas="yes"
17430 else
17431   pgac_cv_gcc_sync_int32_cas="no"
17432 fi
17433 rm -f core conftest.err conftest.$ac_objext \
17434     conftest$ac_exeext conftest.$ac_ext
17435 fi
17436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17437 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17438 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17439
17440 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17441
17442 fi
17443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17444 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17445 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17446   $as_echo_n "(cached) " >&6
17447 else
17448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17449 /* end confdefs.h.  */
17450
17451 int
17452 main ()
17453 {
17454 PG_INT64_TYPE lock = 0;
17455    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17456   ;
17457   return 0;
17458 }
17459 _ACEOF
17460 if ac_fn_c_try_link "$LINENO"; then :
17461   pgac_cv_gcc_sync_int64_cas="yes"
17462 else
17463   pgac_cv_gcc_sync_int64_cas="no"
17464 fi
17465 rm -f core conftest.err conftest.$ac_objext \
17466     conftest$ac_exeext conftest.$ac_ext
17467 fi
17468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17469 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17470 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17471
17472 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17473
17474 fi
17475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17476 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17477 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17478   $as_echo_n "(cached) " >&6
17479 else
17480   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17481 /* end confdefs.h.  */
17482
17483 int
17484 main ()
17485 {
17486 int val = 0;
17487    int expect = 0;
17488    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17489   ;
17490   return 0;
17491 }
17492 _ACEOF
17493 if ac_fn_c_try_link "$LINENO"; then :
17494   pgac_cv_gcc_atomic_int32_cas="yes"
17495 else
17496   pgac_cv_gcc_atomic_int32_cas="no"
17497 fi
17498 rm -f core conftest.err conftest.$ac_objext \
17499     conftest$ac_exeext conftest.$ac_ext
17500 fi
17501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17502 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17503 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17504
17505 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17506
17507 fi
17508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17509 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17510 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17511   $as_echo_n "(cached) " >&6
17512 else
17513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17514 /* end confdefs.h.  */
17515
17516 int
17517 main ()
17518 {
17519 PG_INT64_TYPE val = 0;
17520    PG_INT64_TYPE expect = 0;
17521    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17522   ;
17523   return 0;
17524 }
17525 _ACEOF
17526 if ac_fn_c_try_link "$LINENO"; then :
17527   pgac_cv_gcc_atomic_int64_cas="yes"
17528 else
17529   pgac_cv_gcc_atomic_int64_cas="no"
17530 fi
17531 rm -f core conftest.err conftest.$ac_objext \
17532     conftest$ac_exeext conftest.$ac_ext
17533 fi
17534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17535 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17536 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17537
17538 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17539
17540 fi
17541
17542
17543 # Check for x86 cpuid instruction
17544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17545 $as_echo_n "checking for __get_cpuid... " >&6; }
17546 if ${pgac_cv__get_cpuid+:} false; then :
17547   $as_echo_n "(cached) " >&6
17548 else
17549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17550 /* end confdefs.h.  */
17551 #include <cpuid.h>
17552 int
17553 main ()
17554 {
17555 unsigned int exx[4] = {0, 0, 0, 0};
17556   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17557
17558   ;
17559   return 0;
17560 }
17561 _ACEOF
17562 if ac_fn_c_try_link "$LINENO"; then :
17563   pgac_cv__get_cpuid="yes"
17564 else
17565   pgac_cv__get_cpuid="no"
17566 fi
17567 rm -f core conftest.err conftest.$ac_objext \
17568     conftest$ac_exeext conftest.$ac_ext
17569 fi
17570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17571 $as_echo "$pgac_cv__get_cpuid" >&6; }
17572 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17573
17574 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17575
17576 fi
17577
17578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17579 $as_echo_n "checking for __cpuid... " >&6; }
17580 if ${pgac_cv__cpuid+:} false; then :
17581   $as_echo_n "(cached) " >&6
17582 else
17583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17584 /* end confdefs.h.  */
17585 #include <intrin.h>
17586 int
17587 main ()
17588 {
17589 unsigned int exx[4] = {0, 0, 0, 0};
17590   __get_cpuid(exx[0], 1);
17591
17592   ;
17593   return 0;
17594 }
17595 _ACEOF
17596 if ac_fn_c_try_link "$LINENO"; then :
17597   pgac_cv__cpuid="yes"
17598 else
17599   pgac_cv__cpuid="no"
17600 fi
17601 rm -f core conftest.err conftest.$ac_objext \
17602     conftest$ac_exeext conftest.$ac_ext
17603 fi
17604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17605 $as_echo "$pgac_cv__cpuid" >&6; }
17606 if test x"$pgac_cv__cpuid" = x"yes"; then
17607
17608 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17609
17610 fi
17611
17612 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17613 #
17614 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17615 # with the default compiler flags. If not, check if adding the -msse4.2
17616 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17618 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17619 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17620   $as_echo_n "(cached) " >&6
17621 else
17622   pgac_save_CFLAGS=$CFLAGS
17623 CFLAGS="$pgac_save_CFLAGS "
17624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17625 /* end confdefs.h.  */
17626 #include <nmmintrin.h>
17627 int
17628 main ()
17629 {
17630 unsigned int crc = 0;
17631    crc = _mm_crc32_u8(crc, 0);
17632    crc = _mm_crc32_u32(crc, 0);
17633    /* return computed value, to prevent the above being optimized away */
17634    return crc == 0;
17635   ;
17636   return 0;
17637 }
17638 _ACEOF
17639 if ac_fn_c_try_link "$LINENO"; then :
17640   pgac_cv_sse42_crc32_intrinsics_=yes
17641 else
17642   pgac_cv_sse42_crc32_intrinsics_=no
17643 fi
17644 rm -f core conftest.err conftest.$ac_objext \
17645     conftest$ac_exeext conftest.$ac_ext
17646 CFLAGS="$pgac_save_CFLAGS"
17647 fi
17648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17649 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17650 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17651   CFLAGS_SSE42=""
17652   pgac_sse42_crc32_intrinsics=yes
17653 fi
17654
17655 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17656   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17657 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17658 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17659   $as_echo_n "(cached) " >&6
17660 else
17661   pgac_save_CFLAGS=$CFLAGS
17662 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17664 /* end confdefs.h.  */
17665 #include <nmmintrin.h>
17666 int
17667 main ()
17668 {
17669 unsigned int crc = 0;
17670    crc = _mm_crc32_u8(crc, 0);
17671    crc = _mm_crc32_u32(crc, 0);
17672    /* return computed value, to prevent the above being optimized away */
17673    return crc == 0;
17674   ;
17675   return 0;
17676 }
17677 _ACEOF
17678 if ac_fn_c_try_link "$LINENO"; then :
17679   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17680 else
17681   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17682 fi
17683 rm -f core conftest.err conftest.$ac_objext \
17684     conftest$ac_exeext conftest.$ac_ext
17685 CFLAGS="$pgac_save_CFLAGS"
17686 fi
17687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17688 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17689 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17690   CFLAGS_SSE42="-msse4.2"
17691   pgac_sse42_crc32_intrinsics=yes
17692 fi
17693
17694 fi
17695
17696
17697 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17698 # define __SSE4_2__ in that case.
17699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17700 /* end confdefs.h.  */
17701
17702 int
17703 main ()
17704 {
17705
17706 #ifndef __SSE4_2__
17707 #error __SSE4_2__ not defined
17708 #endif
17709
17710   ;
17711   return 0;
17712 }
17713 _ACEOF
17714 if ac_fn_c_try_compile "$LINENO"; then :
17715   SSE4_2_TARGETED=1
17716 fi
17717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17718
17719 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17720 #
17721 # First check if __crc32c* intrinsics can be used with the default compiler
17722 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17723 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17725 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17726 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17727   $as_echo_n "(cached) " >&6
17728 else
17729   pgac_save_CFLAGS=$CFLAGS
17730 CFLAGS="$pgac_save_CFLAGS "
17731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17732 /* end confdefs.h.  */
17733 #include <arm_acle.h>
17734 int
17735 main ()
17736 {
17737 unsigned int crc = 0;
17738    crc = __crc32cb(crc, 0);
17739    crc = __crc32ch(crc, 0);
17740    crc = __crc32cw(crc, 0);
17741    crc = __crc32cd(crc, 0);
17742    /* return computed value, to prevent the above being optimized away */
17743    return crc == 0;
17744   ;
17745   return 0;
17746 }
17747 _ACEOF
17748 if ac_fn_c_try_link "$LINENO"; then :
17749   pgac_cv_armv8_crc32c_intrinsics_=yes
17750 else
17751   pgac_cv_armv8_crc32c_intrinsics_=no
17752 fi
17753 rm -f core conftest.err conftest.$ac_objext \
17754     conftest$ac_exeext conftest.$ac_ext
17755 CFLAGS="$pgac_save_CFLAGS"
17756 fi
17757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17758 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17759 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17760   CFLAGS_ARMV8_CRC32C=""
17761   pgac_armv8_crc32c_intrinsics=yes
17762 fi
17763
17764 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17766 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17767 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17768   $as_echo_n "(cached) " >&6
17769 else
17770   pgac_save_CFLAGS=$CFLAGS
17771 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17773 /* end confdefs.h.  */
17774 #include <arm_acle.h>
17775 int
17776 main ()
17777 {
17778 unsigned int crc = 0;
17779    crc = __crc32cb(crc, 0);
17780    crc = __crc32ch(crc, 0);
17781    crc = __crc32cw(crc, 0);
17782    crc = __crc32cd(crc, 0);
17783    /* return computed value, to prevent the above being optimized away */
17784    return crc == 0;
17785   ;
17786   return 0;
17787 }
17788 _ACEOF
17789 if ac_fn_c_try_link "$LINENO"; then :
17790   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17791 else
17792   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17793 fi
17794 rm -f core conftest.err conftest.$ac_objext \
17795     conftest$ac_exeext conftest.$ac_ext
17796 CFLAGS="$pgac_save_CFLAGS"
17797 fi
17798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17799 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17800 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17801   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17802   pgac_armv8_crc32c_intrinsics=yes
17803 fi
17804
17805 fi
17806
17807
17808 # Select CRC-32C implementation.
17809 #
17810 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17811 # use the special CRC instructions for calculating CRC-32C. If we're not
17812 # targeting such a processor, but we can nevertheless produce code that uses
17813 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17814 # implementations and select which one to use at runtime, depending on whether
17815 # SSE 4.2 is supported by the processor we're running on.
17816 #
17817 # Similarly, if we are targeting an ARM processor that has the CRC
17818 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17819 # we're not targeting such a processor, but can nevertheless produce code that
17820 # uses the CRC instructions, compile both, and select at runtime.
17821 #
17822 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17823 # in the template or configure command line.
17824 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
17825   # Use Intel SSE 4.2 if available.
17826   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17827     USE_SSE42_CRC32C=1
17828   else
17829     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17830     # the runtime check.
17831     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
17832       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17833     else
17834       # Use ARM CRC Extension if available.
17835       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17836         USE_ARMV8_CRC32C=1
17837       else
17838         # ARM CRC Extension, with runtime check?
17839         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17840           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17841         else
17842           # fall back to slicing-by-8 algorithm, which doesn't require any
17843           # special CPU support.
17844           USE_SLICING_BY_8_CRC32C=1
17845         fi
17846       fi
17847     fi
17848   fi
17849 fi
17850
17851 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17853 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17854 if test x"$USE_SSE42_CRC32C" = x"1"; then
17855
17856 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17857
17858   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17860 $as_echo "SSE 4.2" >&6; }
17861 else
17862   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17863
17864 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17865
17866     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17867     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17868 $as_echo "SSE 4.2 with runtime check" >&6; }
17869   else
17870     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17871
17872 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17873
17874       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17875       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17876 $as_echo "ARMv8 CRC instructions" >&6; }
17877     else
17878       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17879
17880 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17881
17882         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17883         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17884 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17885       else
17886
17887 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17888
17889         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17890         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17891 $as_echo "slicing-by-8" >&6; }
17892       fi
17893     fi
17894   fi
17895 fi
17896
17897
17898
17899 # Select semaphore implementation type.
17900 if test "$PORTNAME" != "win32"; then
17901   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17902     # Need sem_open for this
17903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17904 $as_echo_n "checking for library containing sem_open... " >&6; }
17905 if ${ac_cv_search_sem_open+:} false; then :
17906   $as_echo_n "(cached) " >&6
17907 else
17908   ac_func_search_save_LIBS=$LIBS
17909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17910 /* end confdefs.h.  */
17911
17912 /* Override any GCC internal prototype to avoid an error.
17913    Use char because int might match the return type of a GCC
17914    builtin and then its argument prototype would still apply.  */
17915 #ifdef __cplusplus
17916 extern "C"
17917 #endif
17918 char sem_open ();
17919 int
17920 main ()
17921 {
17922 return sem_open ();
17923   ;
17924   return 0;
17925 }
17926 _ACEOF
17927 for ac_lib in '' rt pthread; do
17928   if test -z "$ac_lib"; then
17929     ac_res="none required"
17930   else
17931     ac_res=-l$ac_lib
17932     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17933   fi
17934   if ac_fn_c_try_link "$LINENO"; then :
17935   ac_cv_search_sem_open=$ac_res
17936 fi
17937 rm -f core conftest.err conftest.$ac_objext \
17938     conftest$ac_exeext
17939   if ${ac_cv_search_sem_open+:} false; then :
17940   break
17941 fi
17942 done
17943 if ${ac_cv_search_sem_open+:} false; then :
17944
17945 else
17946   ac_cv_search_sem_open=no
17947 fi
17948 rm conftest.$ac_ext
17949 LIBS=$ac_func_search_save_LIBS
17950 fi
17951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17952 $as_echo "$ac_cv_search_sem_open" >&6; }
17953 ac_res=$ac_cv_search_sem_open
17954 if test "$ac_res" != no; then :
17955   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17956   USE_NAMED_POSIX_SEMAPHORES=1
17957 fi
17958
17959   fi
17960   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17961     # Need sem_init for this
17962     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17963 $as_echo_n "checking for library containing sem_init... " >&6; }
17964 if ${ac_cv_search_sem_init+:} false; then :
17965   $as_echo_n "(cached) " >&6
17966 else
17967   ac_func_search_save_LIBS=$LIBS
17968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17969 /* end confdefs.h.  */
17970
17971 /* Override any GCC internal prototype to avoid an error.
17972    Use char because int might match the return type of a GCC
17973    builtin and then its argument prototype would still apply.  */
17974 #ifdef __cplusplus
17975 extern "C"
17976 #endif
17977 char sem_init ();
17978 int
17979 main ()
17980 {
17981 return sem_init ();
17982   ;
17983   return 0;
17984 }
17985 _ACEOF
17986 for ac_lib in '' rt pthread; do
17987   if test -z "$ac_lib"; then
17988     ac_res="none required"
17989   else
17990     ac_res=-l$ac_lib
17991     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17992   fi
17993   if ac_fn_c_try_link "$LINENO"; then :
17994   ac_cv_search_sem_init=$ac_res
17995 fi
17996 rm -f core conftest.err conftest.$ac_objext \
17997     conftest$ac_exeext
17998   if ${ac_cv_search_sem_init+:} false; then :
17999   break
18000 fi
18001 done
18002 if ${ac_cv_search_sem_init+:} false; then :
18003
18004 else
18005   ac_cv_search_sem_init=no
18006 fi
18007 rm conftest.$ac_ext
18008 LIBS=$ac_func_search_save_LIBS
18009 fi
18010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18011 $as_echo "$ac_cv_search_sem_init" >&6; }
18012 ac_res=$ac_cv_search_sem_init
18013 if test "$ac_res" != no; then :
18014   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18015   USE_UNNAMED_POSIX_SEMAPHORES=1
18016 fi
18017
18018   fi
18019   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18020 $as_echo_n "checking which semaphore API to use... " >&6; }
18021   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18022
18023 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18024
18025     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18026     sematype="named POSIX"
18027   else
18028     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18029
18030 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18031
18032       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18033       sematype="unnamed POSIX"
18034     else
18035
18036 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18037
18038       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18039       sematype="System V"
18040     fi
18041   fi
18042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18043 $as_echo "$sematype" >&6; }
18044 else
18045
18046 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18047
18048   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18049 fi
18050
18051
18052 # Select shared-memory implementation type.
18053 if test "$PORTNAME" != "win32"; then
18054
18055 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18056
18057   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18058 else
18059
18060 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18061
18062   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18063 fi
18064
18065 # Select random number source
18066 #
18067 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
18068 # in the template or configure command line.
18069
18070 # If not selected manually, try to select a source automatically.
18071 if test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
18072   if test x"$with_openssl" = x"yes" ; then
18073     USE_OPENSSL_RANDOM=1
18074   elif test "$PORTNAME" = "win32" ; then
18075     USE_WIN32_RANDOM=1
18076   else
18077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18078 $as_echo_n "checking for /dev/urandom... " >&6; }
18079 if ${ac_cv_file__dev_urandom+:} false; then :
18080   $as_echo_n "(cached) " >&6
18081 else
18082   test "$cross_compiling" = yes &&
18083   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18084 if test -r "/dev/urandom"; then
18085   ac_cv_file__dev_urandom=yes
18086 else
18087   ac_cv_file__dev_urandom=no
18088 fi
18089 fi
18090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18091 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18092 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18093
18094 fi
18095
18096
18097     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
18098       USE_DEV_URANDOM=1
18099     fi
18100   fi
18101 fi
18102
18103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18104 $as_echo_n "checking which random number source to use... " >&6; }
18105 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
18106
18107 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
18108
18109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18110 $as_echo "OpenSSL" >&6; }
18111 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
18112
18113 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
18114
18115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18116 $as_echo "Windows native" >&6; }
18117 elif test x"$USE_DEV_URANDOM" = x"1" ; then
18118
18119 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
18120
18121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18122 $as_echo "/dev/urandom" >&6; }
18123 else
18124   as_fn_error $? "
18125 no source of strong random numbers was found
18126 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers." "$LINENO" 5
18127 fi
18128
18129 # If not set in template file, set bytes to use libc memset()
18130 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18131   MEMSET_LOOP_LIMIT=1024
18132 fi
18133
18134 cat >>confdefs.h <<_ACEOF
18135 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18136 _ACEOF
18137
18138
18139
18140 if test "$enable_nls" = yes ; then
18141
18142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18143 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18144 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18145   $as_echo_n "(cached) " >&6
18146 else
18147   ac_func_search_save_LIBS=$LIBS
18148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18149 /* end confdefs.h.  */
18150
18151 /* Override any GCC internal prototype to avoid an error.
18152    Use char because int might match the return type of a GCC
18153    builtin and then its argument prototype would still apply.  */
18154 #ifdef __cplusplus
18155 extern "C"
18156 #endif
18157 char bind_textdomain_codeset ();
18158 int
18159 main ()
18160 {
18161 return bind_textdomain_codeset ();
18162   ;
18163   return 0;
18164 }
18165 _ACEOF
18166 for ac_lib in '' intl; do
18167   if test -z "$ac_lib"; then
18168     ac_res="none required"
18169   else
18170     ac_res=-l$ac_lib
18171     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18172   fi
18173   if ac_fn_c_try_link "$LINENO"; then :
18174   ac_cv_search_bind_textdomain_codeset=$ac_res
18175 fi
18176 rm -f core conftest.err conftest.$ac_objext \
18177     conftest$ac_exeext
18178   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18179   break
18180 fi
18181 done
18182 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18183
18184 else
18185   ac_cv_search_bind_textdomain_codeset=no
18186 fi
18187 rm conftest.$ac_ext
18188 LIBS=$ac_func_search_save_LIBS
18189 fi
18190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18191 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18192 ac_res=$ac_cv_search_bind_textdomain_codeset
18193 if test "$ac_res" != no; then :
18194   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18195
18196 else
18197   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18198 fi
18199
18200   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18201 if test "x$ac_cv_header_libintl_h" = xyes; then :
18202
18203 else
18204   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18205 fi
18206
18207
18208   if test -z "$MSGFMT"; then
18209   for ac_prog in msgfmt
18210 do
18211   # Extract the first word of "$ac_prog", so it can be a program name with args.
18212 set dummy $ac_prog; ac_word=$2
18213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18214 $as_echo_n "checking for $ac_word... " >&6; }
18215 if ${ac_cv_path_MSGFMT+:} false; then :
18216   $as_echo_n "(cached) " >&6
18217 else
18218   case $MSGFMT in
18219   [\\/]* | ?:[\\/]*)
18220   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18221   ;;
18222   *)
18223   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18224 for as_dir in $PATH
18225 do
18226   IFS=$as_save_IFS
18227   test -z "$as_dir" && as_dir=.
18228     for ac_exec_ext in '' $ac_executable_extensions; do
18229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18230     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18232     break 2
18233   fi
18234 done
18235   done
18236 IFS=$as_save_IFS
18237
18238   ;;
18239 esac
18240 fi
18241 MSGFMT=$ac_cv_path_MSGFMT
18242 if test -n "$MSGFMT"; then
18243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18244 $as_echo "$MSGFMT" >&6; }
18245 else
18246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18247 $as_echo "no" >&6; }
18248 fi
18249
18250
18251   test -n "$MSGFMT" && break
18252 done
18253
18254 else
18255   # Report the value of MSGFMT in configure's output in all cases.
18256   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18257 $as_echo_n "checking for MSGFMT... " >&6; }
18258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18259 $as_echo "$MSGFMT" >&6; }
18260 fi
18261
18262     if test -z "$MSGFMT"; then
18263     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18264   fi
18265   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18266 $as_echo_n "checking for msgfmt flags... " >&6; }
18267 if ${pgac_cv_msgfmt_flags+:} false; then :
18268   $as_echo_n "(cached) " >&6
18269 else
18270   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18271     pgac_cv_msgfmt_flags=-c
18272 fi
18273 fi
18274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18275 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18276   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18277
18278   if test -z "$MSGMERGE"; then
18279   for ac_prog in msgmerge
18280 do
18281   # Extract the first word of "$ac_prog", so it can be a program name with args.
18282 set dummy $ac_prog; ac_word=$2
18283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18284 $as_echo_n "checking for $ac_word... " >&6; }
18285 if ${ac_cv_path_MSGMERGE+:} false; then :
18286   $as_echo_n "(cached) " >&6
18287 else
18288   case $MSGMERGE in
18289   [\\/]* | ?:[\\/]*)
18290   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18291   ;;
18292   *)
18293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18294 for as_dir in $PATH
18295 do
18296   IFS=$as_save_IFS
18297   test -z "$as_dir" && as_dir=.
18298     for ac_exec_ext in '' $ac_executable_extensions; do
18299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18300     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18302     break 2
18303   fi
18304 done
18305   done
18306 IFS=$as_save_IFS
18307
18308   ;;
18309 esac
18310 fi
18311 MSGMERGE=$ac_cv_path_MSGMERGE
18312 if test -n "$MSGMERGE"; then
18313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18314 $as_echo "$MSGMERGE" >&6; }
18315 else
18316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18317 $as_echo "no" >&6; }
18318 fi
18319
18320
18321   test -n "$MSGMERGE" && break
18322 done
18323
18324 else
18325   # Report the value of MSGMERGE in configure's output in all cases.
18326   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18327 $as_echo_n "checking for MSGMERGE... " >&6; }
18328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18329 $as_echo "$MSGMERGE" >&6; }
18330 fi
18331
18332   if test -z "$XGETTEXT"; then
18333   for ac_prog in xgettext
18334 do
18335   # Extract the first word of "$ac_prog", so it can be a program name with args.
18336 set dummy $ac_prog; ac_word=$2
18337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18338 $as_echo_n "checking for $ac_word... " >&6; }
18339 if ${ac_cv_path_XGETTEXT+:} false; then :
18340   $as_echo_n "(cached) " >&6
18341 else
18342   case $XGETTEXT in
18343   [\\/]* | ?:[\\/]*)
18344   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18345   ;;
18346   *)
18347   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18348 for as_dir in $PATH
18349 do
18350   IFS=$as_save_IFS
18351   test -z "$as_dir" && as_dir=.
18352     for ac_exec_ext in '' $ac_executable_extensions; do
18353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18354     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18356     break 2
18357   fi
18358 done
18359   done
18360 IFS=$as_save_IFS
18361
18362   ;;
18363 esac
18364 fi
18365 XGETTEXT=$ac_cv_path_XGETTEXT
18366 if test -n "$XGETTEXT"; then
18367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18368 $as_echo "$XGETTEXT" >&6; }
18369 else
18370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18371 $as_echo "no" >&6; }
18372 fi
18373
18374
18375   test -n "$XGETTEXT" && break
18376 done
18377
18378 else
18379   # Report the value of XGETTEXT in configure's output in all cases.
18380   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18381 $as_echo_n "checking for XGETTEXT... " >&6; }
18382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18383 $as_echo "$XGETTEXT" >&6; }
18384 fi
18385
18386
18387 fi
18388
18389 # Check for Tcl configuration script tclConfig.sh
18390 if test "$with_tcl" = yes; then
18391     if test -z "$TCLSH"; then
18392   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18393 do
18394   # Extract the first word of "$ac_prog", so it can be a program name with args.
18395 set dummy $ac_prog; ac_word=$2
18396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18397 $as_echo_n "checking for $ac_word... " >&6; }
18398 if ${ac_cv_path_TCLSH+:} false; then :
18399   $as_echo_n "(cached) " >&6
18400 else
18401   case $TCLSH in
18402   [\\/]* | ?:[\\/]*)
18403   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18404   ;;
18405   *)
18406   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18407 for as_dir in $PATH
18408 do
18409   IFS=$as_save_IFS
18410   test -z "$as_dir" && as_dir=.
18411     for ac_exec_ext in '' $ac_executable_extensions; do
18412   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18413     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18415     break 2
18416   fi
18417 done
18418   done
18419 IFS=$as_save_IFS
18420
18421   ;;
18422 esac
18423 fi
18424 TCLSH=$ac_cv_path_TCLSH
18425 if test -n "$TCLSH"; then
18426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18427 $as_echo "$TCLSH" >&6; }
18428 else
18429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18430 $as_echo "no" >&6; }
18431 fi
18432
18433
18434   test -n "$TCLSH" && break
18435 done
18436
18437 else
18438   # Report the value of TCLSH in configure's output in all cases.
18439   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18440 $as_echo_n "checking for TCLSH... " >&6; }
18441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18442 $as_echo "$TCLSH" >&6; }
18443 fi
18444
18445 if test x"$TCLSH" = x""; then
18446   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18447 fi
18448
18449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18450 $as_echo_n "checking for tclConfig.sh... " >&6; }
18451 # Let user override test
18452 if test -z "$TCL_CONFIG_SH"; then
18453     pgac_test_dirs="$with_tclconfig"
18454
18455     set X $pgac_test_dirs; shift
18456     if test $# -eq 0; then
18457         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18458         pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18459         # On newer macOS, $auto_path frequently doesn't include the place
18460         # where tclConfig.sh actually lives.  Append that to the end, so as not
18461         # to break cases where a non-default Tcl installation is being used.
18462         if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18463             pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18464         fi
18465         set X $pgac_test_dirs; shift
18466     fi
18467
18468     for pgac_dir do
18469         if test -r "$pgac_dir/tclConfig.sh"; then
18470             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18471             break
18472         fi
18473     done
18474 fi
18475
18476 if test -z "$TCL_CONFIG_SH"; then
18477     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18478 $as_echo "no" >&6; }
18479     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18480 else
18481     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18482 $as_echo "$TCL_CONFIG_SH" >&6; }
18483 fi
18484
18485
18486
18487     . "$TCL_CONFIG_SH"
18488 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18489 eval TCL_LIBS=\"$TCL_LIBS\"
18490 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18491 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18492
18493         if test "$TCL_SHARED_BUILD" != 1; then
18494       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18495 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18496     fi
18497     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18498     ac_save_CPPFLAGS=$CPPFLAGS
18499     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18500     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18501 if test "x$ac_cv_header_tcl_h" = xyes; then :
18502
18503 else
18504   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18505 fi
18506
18507
18508     CPPFLAGS=$ac_save_CPPFLAGS
18509 fi
18510
18511 # check for <perl.h>
18512 if test "$with_perl" = yes; then
18513   ac_save_CPPFLAGS=$CPPFLAGS
18514   CPPFLAGS="$CPPFLAGS $perl_includespec"
18515   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18516 "
18517 if test "x$ac_cv_header_perl_h" = xyes; then :
18518
18519 else
18520   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18521 fi
18522
18523
18524   # While we're at it, check that we can link to libperl.
18525   # On most platforms, if perl.h is there then libperl.so will be too, but at
18526   # this writing Debian packages them separately.  There is no known reason to
18527   # waste cycles on separate probes for the Tcl or Python libraries, though.
18528   pgac_save_LIBS=$LIBS
18529   LIBS="$perl_embed_ldflags"
18530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18531 $as_echo_n "checking for libperl... " >&6; }
18532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18533 /* end confdefs.h.  */
18534
18535 #include <EXTERN.h>
18536 #include <perl.h>
18537
18538 int
18539 main ()
18540 {
18541 perl_alloc();
18542   ;
18543   return 0;
18544 }
18545 _ACEOF
18546 if ac_fn_c_try_link "$LINENO"; then :
18547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18548 $as_echo "yes" >&6; }
18549 else
18550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18551 $as_echo "no" >&6; }
18552      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18553 fi
18554 rm -f core conftest.err conftest.$ac_objext \
18555     conftest$ac_exeext conftest.$ac_ext
18556   LIBS=$pgac_save_LIBS
18557   CPPFLAGS=$ac_save_CPPFLAGS
18558 fi
18559
18560 # check for <Python.h>
18561 if test "$with_python" = yes; then
18562   ac_save_CPPFLAGS=$CPPFLAGS
18563   CPPFLAGS="$python_includespec $CPPFLAGS"
18564   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18565 if test "x$ac_cv_header_Python_h" = xyes; then :
18566
18567 else
18568   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18569 fi
18570
18571
18572   CPPFLAGS=$ac_save_CPPFLAGS
18573 fi
18574
18575 #
18576 # Check for DocBook and tools
18577 #
18578 if test -z "$XMLLINT"; then
18579   for ac_prog in xmllint
18580 do
18581   # Extract the first word of "$ac_prog", so it can be a program name with args.
18582 set dummy $ac_prog; ac_word=$2
18583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18584 $as_echo_n "checking for $ac_word... " >&6; }
18585 if ${ac_cv_path_XMLLINT+:} false; then :
18586   $as_echo_n "(cached) " >&6
18587 else
18588   case $XMLLINT in
18589   [\\/]* | ?:[\\/]*)
18590   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18591   ;;
18592   *)
18593   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18594 for as_dir in $PATH
18595 do
18596   IFS=$as_save_IFS
18597   test -z "$as_dir" && as_dir=.
18598     for ac_exec_ext in '' $ac_executable_extensions; do
18599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18600     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18602     break 2
18603   fi
18604 done
18605   done
18606 IFS=$as_save_IFS
18607
18608   ;;
18609 esac
18610 fi
18611 XMLLINT=$ac_cv_path_XMLLINT
18612 if test -n "$XMLLINT"; then
18613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18614 $as_echo "$XMLLINT" >&6; }
18615 else
18616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18617 $as_echo "no" >&6; }
18618 fi
18619
18620
18621   test -n "$XMLLINT" && break
18622 done
18623
18624 else
18625   # Report the value of XMLLINT in configure's output in all cases.
18626   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18627 $as_echo_n "checking for XMLLINT... " >&6; }
18628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18629 $as_echo "$XMLLINT" >&6; }
18630 fi
18631
18632
18633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.5" >&5
18634 $as_echo_n "checking for DocBook XML V4.5... " >&6; }
18635 if ${pgac_cv_check_docbook+:} false; then :
18636   $as_echo_n "(cached) " >&6
18637 else
18638   cat >conftest.xml <<EOF
18639 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
18640 <book>
18641  <title>test</title>
18642  <chapter>
18643   <title>random</title>
18644    <sect1>
18645     <title>testsect</title>
18646     <para>text</para>
18647   </sect1>
18648  </chapter>
18649 </book>
18650 EOF
18651
18652 pgac_cv_check_docbook=no
18653
18654 if test -n "$XMLLINT"; then
18655   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18656   if test $? -eq 0; then
18657     pgac_cv_check_docbook=yes
18658   fi
18659 fi
18660 rm -f conftest.xml
18661 fi
18662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18663 $as_echo "$pgac_cv_check_docbook" >&6; }
18664
18665 have_docbook=$pgac_cv_check_docbook
18666
18667
18668 if test -z "$DBTOEPUB"; then
18669   for ac_prog in dbtoepub
18670 do
18671   # Extract the first word of "$ac_prog", so it can be a program name with args.
18672 set dummy $ac_prog; ac_word=$2
18673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18674 $as_echo_n "checking for $ac_word... " >&6; }
18675 if ${ac_cv_path_DBTOEPUB+:} false; then :
18676   $as_echo_n "(cached) " >&6
18677 else
18678   case $DBTOEPUB in
18679   [\\/]* | ?:[\\/]*)
18680   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18681   ;;
18682   *)
18683   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18684 for as_dir in $PATH
18685 do
18686   IFS=$as_save_IFS
18687   test -z "$as_dir" && as_dir=.
18688     for ac_exec_ext in '' $ac_executable_extensions; do
18689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18690     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18692     break 2
18693   fi
18694 done
18695   done
18696 IFS=$as_save_IFS
18697
18698   ;;
18699 esac
18700 fi
18701 DBTOEPUB=$ac_cv_path_DBTOEPUB
18702 if test -n "$DBTOEPUB"; then
18703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18704 $as_echo "$DBTOEPUB" >&6; }
18705 else
18706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18707 $as_echo "no" >&6; }
18708 fi
18709
18710
18711   test -n "$DBTOEPUB" && break
18712 done
18713
18714 else
18715   # Report the value of DBTOEPUB in configure's output in all cases.
18716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18717 $as_echo_n "checking for DBTOEPUB... " >&6; }
18718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18719 $as_echo "$DBTOEPUB" >&6; }
18720 fi
18721
18722 if test -z "$XSLTPROC"; then
18723   for ac_prog in xsltproc
18724 do
18725   # Extract the first word of "$ac_prog", so it can be a program name with args.
18726 set dummy $ac_prog; ac_word=$2
18727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18728 $as_echo_n "checking for $ac_word... " >&6; }
18729 if ${ac_cv_path_XSLTPROC+:} false; then :
18730   $as_echo_n "(cached) " >&6
18731 else
18732   case $XSLTPROC in
18733   [\\/]* | ?:[\\/]*)
18734   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18735   ;;
18736   *)
18737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18738 for as_dir in $PATH
18739 do
18740   IFS=$as_save_IFS
18741   test -z "$as_dir" && as_dir=.
18742     for ac_exec_ext in '' $ac_executable_extensions; do
18743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18744     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18746     break 2
18747   fi
18748 done
18749   done
18750 IFS=$as_save_IFS
18751
18752   ;;
18753 esac
18754 fi
18755 XSLTPROC=$ac_cv_path_XSLTPROC
18756 if test -n "$XSLTPROC"; then
18757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18758 $as_echo "$XSLTPROC" >&6; }
18759 else
18760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18761 $as_echo "no" >&6; }
18762 fi
18763
18764
18765   test -n "$XSLTPROC" && break
18766 done
18767
18768 else
18769   # Report the value of XSLTPROC in configure's output in all cases.
18770   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18771 $as_echo_n "checking for XSLTPROC... " >&6; }
18772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18773 $as_echo "$XSLTPROC" >&6; }
18774 fi
18775
18776 if test -z "$FOP"; then
18777   for ac_prog in fop
18778 do
18779   # Extract the first word of "$ac_prog", so it can be a program name with args.
18780 set dummy $ac_prog; ac_word=$2
18781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18782 $as_echo_n "checking for $ac_word... " >&6; }
18783 if ${ac_cv_path_FOP+:} false; then :
18784   $as_echo_n "(cached) " >&6
18785 else
18786   case $FOP in
18787   [\\/]* | ?:[\\/]*)
18788   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18789   ;;
18790   *)
18791   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18792 for as_dir in $PATH
18793 do
18794   IFS=$as_save_IFS
18795   test -z "$as_dir" && as_dir=.
18796     for ac_exec_ext in '' $ac_executable_extensions; do
18797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18798     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18800     break 2
18801   fi
18802 done
18803   done
18804 IFS=$as_save_IFS
18805
18806   ;;
18807 esac
18808 fi
18809 FOP=$ac_cv_path_FOP
18810 if test -n "$FOP"; then
18811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18812 $as_echo "$FOP" >&6; }
18813 else
18814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18815 $as_echo "no" >&6; }
18816 fi
18817
18818
18819   test -n "$FOP" && break
18820 done
18821
18822 else
18823   # Report the value of FOP in configure's output in all cases.
18824   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18825 $as_echo_n "checking for FOP... " >&6; }
18826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18827 $as_echo "$FOP" >&6; }
18828 fi
18829
18830
18831 #
18832 # Check for test tools
18833 #
18834 if test "$enable_tap_tests" = yes; then
18835   # Check for necessary modules, unless user has specified the "prove" to use;
18836   # in that case it's her responsibility to have a working configuration.
18837   # (prove might be part of a different Perl installation than perl, eg on
18838   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18839   if test -z "$PROVE"; then
18840     # Test::More and Time::HiRes are supposed to be part of core Perl,
18841     # but some distros omit them in a minimal installation.
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852 # Make sure we have perl
18853 if test -z "$PERL"; then
18854 # Extract the first word of "perl", so it can be a program name with args.
18855 set dummy perl; ac_word=$2
18856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18857 $as_echo_n "checking for $ac_word... " >&6; }
18858 if ${ac_cv_prog_PERL+:} false; then :
18859   $as_echo_n "(cached) " >&6
18860 else
18861   if test -n "$PERL"; then
18862   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18863 else
18864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18865 for as_dir in $PATH
18866 do
18867   IFS=$as_save_IFS
18868   test -z "$as_dir" && as_dir=.
18869     for ac_exec_ext in '' $ac_executable_extensions; do
18870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18871     ac_cv_prog_PERL="perl"
18872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18873     break 2
18874   fi
18875 done
18876   done
18877 IFS=$as_save_IFS
18878
18879 fi
18880 fi
18881 PERL=$ac_cv_prog_PERL
18882 if test -n "$PERL"; then
18883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18884 $as_echo "$PERL" >&6; }
18885 else
18886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18887 $as_echo "no" >&6; }
18888 fi
18889
18890
18891 fi
18892
18893 if test "x$PERL" != x; then
18894   ax_perl_modules_failed=0
18895   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18896     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18897 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18898
18899     # Would be nice to log result here, but can't rely on autoconf internals
18900     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18901     if test $? -ne 0; then
18902       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18903 $as_echo "no" >&6; };
18904       ax_perl_modules_failed=1
18905    else
18906       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18907 $as_echo "ok" >&6; };
18908     fi
18909   done
18910
18911   # Run optional shell commands
18912   if test "$ax_perl_modules_failed" = 0; then
18913     :
18914
18915   else
18916     :
18917     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18918   fi
18919 else
18920   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18921 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18922 fi
18923   fi
18924   # Now make sure we know where prove is
18925   if test -z "$PROVE"; then
18926   for ac_prog in prove
18927 do
18928   # Extract the first word of "$ac_prog", so it can be a program name with args.
18929 set dummy $ac_prog; ac_word=$2
18930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18931 $as_echo_n "checking for $ac_word... " >&6; }
18932 if ${ac_cv_path_PROVE+:} false; then :
18933   $as_echo_n "(cached) " >&6
18934 else
18935   case $PROVE in
18936   [\\/]* | ?:[\\/]*)
18937   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18938   ;;
18939   *)
18940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18941 for as_dir in $PATH
18942 do
18943   IFS=$as_save_IFS
18944   test -z "$as_dir" && as_dir=.
18945     for ac_exec_ext in '' $ac_executable_extensions; do
18946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18947     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18949     break 2
18950   fi
18951 done
18952   done
18953 IFS=$as_save_IFS
18954
18955   ;;
18956 esac
18957 fi
18958 PROVE=$ac_cv_path_PROVE
18959 if test -n "$PROVE"; then
18960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18961 $as_echo "$PROVE" >&6; }
18962 else
18963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18964 $as_echo "no" >&6; }
18965 fi
18966
18967
18968   test -n "$PROVE" && break
18969 done
18970
18971 else
18972   # Report the value of PROVE in configure's output in all cases.
18973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18974 $as_echo_n "checking for PROVE... " >&6; }
18975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18976 $as_echo "$PROVE" >&6; }
18977 fi
18978
18979   if test -z "$PROVE"; then
18980     as_fn_error $? "prove not found" "$LINENO" 5
18981   fi
18982 fi
18983
18984 # Thread testing
18985
18986 # We have to run the thread test near the end so we have all our symbols
18987 # defined.  Cross compiling throws a warning.
18988 #
18989 if test "$enable_thread_safety" = yes; then
18990 if test "$PORTNAME" != "win32"
18991 then
18992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18993 $as_echo_n "checking thread safety of required library functions... " >&6; }
18994
18995 _CFLAGS="$CFLAGS"
18996 _LIBS="$LIBS"
18997 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18998 LIBS="$LIBS $PTHREAD_LIBS"
18999 if test "$cross_compiling" = yes; then :
19000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
19001 $as_echo "maybe" >&6; }
19002   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19003 *** Skipping thread test program because of cross-compile build.
19004 *** Run the program in src/test/thread on the target machine.
19005 " >&5
19006 $as_echo "$as_me: WARNING:
19007 *** Skipping thread test program because of cross-compile build.
19008 *** Run the program in src/test/thread on the target machine.
19009 " >&2;}
19010 else
19011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19012 /* end confdefs.h.  */
19013 #include "$srcdir/src/test/thread/thread_test.c"
19014 _ACEOF
19015 if ac_fn_c_try_run "$LINENO"; then :
19016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19017 $as_echo "yes" >&6; }
19018 else
19019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19020 $as_echo "no" >&6; }
19021   as_fn_error $? "thread test program failed
19022 This platform is not thread-safe.  Check the file 'config.log' or compile
19023 and run src/test/thread/thread_test for the exact reason.
19024 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
19025 fi
19026 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19027   conftest.$ac_objext conftest.beam conftest.$ac_ext
19028 fi
19029
19030 CFLAGS="$_CFLAGS"
19031 LIBS="$_LIBS"
19032 else
19033 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
19034 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
19035 fi
19036 fi
19037
19038 # If compiler will take -Wl,--as-needed (or various platform-specific
19039 # spellings thereof) then add that to LDFLAGS.  This is much easier than
19040 # trying to filter LIBS to the minimum for each executable.
19041 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19042 # libreadline; therefore we postpone testing it until we know what library
19043 # dependencies readline has.  The test code will try to link with $LIBS.
19044 if test "$with_readline" = yes; then
19045   link_test_func=readline
19046 else
19047   link_test_func=exit
19048 fi
19049
19050 if test "$PORTNAME" = "darwin"; then
19051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19052 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19053 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19054   $as_echo_n "(cached) " >&6
19055 else
19056   pgac_save_LDFLAGS=$LDFLAGS
19057 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19058 if test "$cross_compiling" = yes; then :
19059   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19060 else
19061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19062 /* end confdefs.h.  */
19063 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19064 int
19065 main ()
19066 {
19067
19068   ;
19069   return 0;
19070 }
19071 _ACEOF
19072 if ac_fn_c_try_run "$LINENO"; then :
19073   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19074 else
19075   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19076 fi
19077 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19078   conftest.$ac_objext conftest.beam conftest.$ac_ext
19079 fi
19080
19081 LDFLAGS="$pgac_save_LDFLAGS"
19082 fi
19083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19084 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19085 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19086   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19087 fi
19088
19089 elif test "$PORTNAME" = "openbsd"; then
19090   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19091 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19092 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19093   $as_echo_n "(cached) " >&6
19094 else
19095   pgac_save_LDFLAGS=$LDFLAGS
19096 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19097 if test "$cross_compiling" = yes; then :
19098   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19099 else
19100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19101 /* end confdefs.h.  */
19102 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19103 int
19104 main ()
19105 {
19106
19107   ;
19108   return 0;
19109 }
19110 _ACEOF
19111 if ac_fn_c_try_run "$LINENO"; then :
19112   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19113 else
19114   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19115 fi
19116 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19117   conftest.$ac_objext conftest.beam conftest.$ac_ext
19118 fi
19119
19120 LDFLAGS="$pgac_save_LDFLAGS"
19121 fi
19122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19123 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19124 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19125   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19126 fi
19127
19128 else
19129   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19130 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19131 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19132   $as_echo_n "(cached) " >&6
19133 else
19134   pgac_save_LDFLAGS=$LDFLAGS
19135 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19136 if test "$cross_compiling" = yes; then :
19137   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19138 else
19139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19140 /* end confdefs.h.  */
19141 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19142 int
19143 main ()
19144 {
19145
19146   ;
19147   return 0;
19148 }
19149 _ACEOF
19150 if ac_fn_c_try_run "$LINENO"; then :
19151   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19152 else
19153   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19154 fi
19155 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19156   conftest.$ac_objext conftest.beam conftest.$ac_ext
19157 fi
19158
19159 LDFLAGS="$pgac_save_LDFLAGS"
19160 fi
19161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19162 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19163 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19164   LDFLAGS="$LDFLAGS -Wl,--as-needed"
19165 fi
19166
19167 fi
19168
19169 # Create compiler version string
19170 if test x"$GCC" = x"yes" ; then
19171   cc_string=`${CC} --version | sed q`
19172   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19173 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19174   cc_string=`${CC} -V 2>&1 | sed q`
19175 else
19176   cc_string=$CC
19177 fi
19178
19179
19180 cat >>confdefs.h <<_ACEOF
19181 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19182 _ACEOF
19183
19184
19185 # Supply a numeric version string for use by 3rd party add-ons
19186 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19187 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
19188 tr '.' '        ' |
19189 $AWK '{printf "%d%04d", $1, $2}'`"
19190
19191 cat >>confdefs.h <<_ACEOF
19192 #define PG_VERSION_NUM $PG_VERSION_NUM
19193 _ACEOF
19194
19195
19196
19197 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19198 # literally, so that it's possible to override it at build time using
19199 # a command like "make ... PG_SYSROOT=path".  This has to be done after
19200 # we've finished all configure checks that depend on CPPFLAGS.
19201 if test x"$PG_SYSROOT" != x; then
19202   CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19203 fi
19204
19205
19206
19207 # Begin output steps
19208
19209 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19210 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19211 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19212 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19213 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19214 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19215 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19216 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19217 # Currently only used when LLVM is used
19218 if test "$with_llvm" = yes ; then
19219    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19220 $as_echo "$as_me: using CXX=$CXX" >&6;}
19221    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19222 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19223    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19224 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19225    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19226 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19227    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19228 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19229 fi
19230
19231 # prepare build tree if outside source tree
19232 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19233 # Note 2: /bin/pwd might be better than shell's built-in at getting
19234 #         a symlink-free name.
19235 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19236   vpath_build=no
19237 else
19238   vpath_build=yes
19239   if test "$no_create" != yes; then
19240     $as_echo_n "preparing build tree... " >&6
19241     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19242     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19243       || as_fn_error $? "failed" "$LINENO" 5
19244     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19245 $as_echo "done" >&6; }
19246   fi
19247 fi
19248
19249
19250
19251 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19252
19253
19254 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}"
19255
19256
19257 if test "$PORTNAME" = "win32"; then
19258 ac_config_commands="$ac_config_commands check_win32_symlinks"
19259
19260 fi
19261
19262 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19263
19264
19265 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19266
19267
19268 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19269
19270
19271 cat >confcache <<\_ACEOF
19272 # This file is a shell script that caches the results of configure
19273 # tests run on this system so they can be shared between configure
19274 # scripts and configure runs, see configure's option --config-cache.
19275 # It is not useful on other systems.  If it contains results you don't
19276 # want to keep, you may remove or edit it.
19277 #
19278 # config.status only pays attention to the cache file if you give it
19279 # the --recheck option to rerun configure.
19280 #
19281 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19282 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19283 # following values.
19284
19285 _ACEOF
19286
19287 # The following way of writing the cache mishandles newlines in values,
19288 # but we know of no workaround that is simple, portable, and efficient.
19289 # So, we kill variables containing newlines.
19290 # Ultrix sh set writes to stderr and can't be redirected directly,
19291 # and sets the high bit in the cache file unless we assign to the vars.
19292 (
19293   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19294     eval ac_val=\$$ac_var
19295     case $ac_val in #(
19296     *${as_nl}*)
19297       case $ac_var in #(
19298       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19299 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19300       esac
19301       case $ac_var in #(
19302       _ | IFS | as_nl) ;; #(
19303       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19304       *) { eval $ac_var=; unset $ac_var;} ;;
19305       esac ;;
19306     esac
19307   done
19308
19309   (set) 2>&1 |
19310     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19311     *${as_nl}ac_space=\ *)
19312       # `set' does not quote correctly, so add quotes: double-quote
19313       # substitution turns \\\\ into \\, and sed turns \\ into \.
19314       sed -n \
19315         "s/'/'\\\\''/g;
19316           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19317       ;; #(
19318     *)
19319       # `set' quotes correctly as required by POSIX, so do not add quotes.
19320       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19321       ;;
19322     esac |
19323     sort
19324 ) |
19325   sed '
19326      /^ac_cv_env_/b end
19327      t clear
19328      :clear
19329      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19330      t end
19331      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19332      :end' >>confcache
19333 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19334   if test -w "$cache_file"; then
19335     if test "x$cache_file" != "x/dev/null"; then
19336       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19337 $as_echo "$as_me: updating cache $cache_file" >&6;}
19338       if test ! -f "$cache_file" || test -h "$cache_file"; then
19339         cat confcache >"$cache_file"
19340       else
19341         case $cache_file in #(
19342         */* | ?:*)
19343           mv -f confcache "$cache_file"$$ &&
19344           mv -f "$cache_file"$$ "$cache_file" ;; #(
19345         *)
19346           mv -f confcache "$cache_file" ;;
19347         esac
19348       fi
19349     fi
19350   else
19351     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19352 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19353   fi
19354 fi
19355 rm -f confcache
19356
19357 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19358 # Let make expand exec_prefix.
19359 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19360
19361 DEFS=-DHAVE_CONFIG_H
19362
19363 ac_libobjs=
19364 ac_ltlibobjs=
19365 U=
19366 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19367   # 1. Remove the extension, and $U if already installed.
19368   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19369   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19370   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19371   #    will be set to the directory where LIBOBJS objects are built.
19372   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19373   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19374 done
19375 LIBOBJS=$ac_libobjs
19376
19377 LTLIBOBJS=$ac_ltlibobjs
19378
19379
19380
19381
19382 : "${CONFIG_STATUS=./config.status}"
19383 ac_write_fail=0
19384 ac_clean_files_save=$ac_clean_files
19385 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19386 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19387 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19388 as_write_fail=0
19389 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19390 #! $SHELL
19391 # Generated by $as_me.
19392 # Run this file to recreate the current configuration.
19393 # Compiler output produced by configure, useful for debugging
19394 # configure, is in config.log if it exists.
19395
19396 debug=false
19397 ac_cs_recheck=false
19398 ac_cs_silent=false
19399
19400 SHELL=\${CONFIG_SHELL-$SHELL}
19401 export SHELL
19402 _ASEOF
19403 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19404 ## -------------------- ##
19405 ## M4sh Initialization. ##
19406 ## -------------------- ##
19407
19408 # Be more Bourne compatible
19409 DUALCASE=1; export DUALCASE # for MKS sh
19410 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19411   emulate sh
19412   NULLCMD=:
19413   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19414   # is contrary to our usage.  Disable this feature.
19415   alias -g '${1+"$@"}'='"$@"'
19416   setopt NO_GLOB_SUBST
19417 else
19418   case `(set -o) 2>/dev/null` in #(
19419   *posix*) :
19420     set -o posix ;; #(
19421   *) :
19422      ;;
19423 esac
19424 fi
19425
19426
19427 as_nl='
19428 '
19429 export as_nl
19430 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19431 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19432 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19433 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19434 # Prefer a ksh shell builtin over an external printf program on Solaris,
19435 # but without wasting forks for bash or zsh.
19436 if test -z "$BASH_VERSION$ZSH_VERSION" \
19437     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19438   as_echo='print -r --'
19439   as_echo_n='print -rn --'
19440 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19441   as_echo='printf %s\n'
19442   as_echo_n='printf %s'
19443 else
19444   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19445     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19446     as_echo_n='/usr/ucb/echo -n'
19447   else
19448     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19449     as_echo_n_body='eval
19450       arg=$1;
19451       case $arg in #(
19452       *"$as_nl"*)
19453         expr "X$arg" : "X\\(.*\\)$as_nl";
19454         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19455       esac;
19456       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19457     '
19458     export as_echo_n_body
19459     as_echo_n='sh -c $as_echo_n_body as_echo'
19460   fi
19461   export as_echo_body
19462   as_echo='sh -c $as_echo_body as_echo'
19463 fi
19464
19465 # The user is always right.
19466 if test "${PATH_SEPARATOR+set}" != set; then
19467   PATH_SEPARATOR=:
19468   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19469     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19470       PATH_SEPARATOR=';'
19471   }
19472 fi
19473
19474
19475 # IFS
19476 # We need space, tab and new line, in precisely that order.  Quoting is
19477 # there to prevent editors from complaining about space-tab.
19478 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19479 # splitting by setting IFS to empty value.)
19480 IFS=" ""        $as_nl"
19481
19482 # Find who we are.  Look in the path if we contain no directory separator.
19483 as_myself=
19484 case $0 in #((
19485   *[\\/]* ) as_myself=$0 ;;
19486   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19487 for as_dir in $PATH
19488 do
19489   IFS=$as_save_IFS
19490   test -z "$as_dir" && as_dir=.
19491     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19492   done
19493 IFS=$as_save_IFS
19494
19495      ;;
19496 esac
19497 # We did not find ourselves, most probably we were run as `sh COMMAND'
19498 # in which case we are not to be found in the path.
19499 if test "x$as_myself" = x; then
19500   as_myself=$0
19501 fi
19502 if test ! -f "$as_myself"; then
19503   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19504   exit 1
19505 fi
19506
19507 # Unset variables that we do not need and which cause bugs (e.g. in
19508 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19509 # suppresses any "Segmentation fault" message there.  '((' could
19510 # trigger a bug in pdksh 5.2.14.
19511 for as_var in BASH_ENV ENV MAIL MAILPATH
19512 do eval test x\${$as_var+set} = xset \
19513   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19514 done
19515 PS1='$ '
19516 PS2='> '
19517 PS4='+ '
19518
19519 # NLS nuisances.
19520 LC_ALL=C
19521 export LC_ALL
19522 LANGUAGE=C
19523 export LANGUAGE
19524
19525 # CDPATH.
19526 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19527
19528
19529 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19530 # ----------------------------------------
19531 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19532 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19533 # script with STATUS, using 1 if that was 0.
19534 as_fn_error ()
19535 {
19536   as_status=$1; test $as_status -eq 0 && as_status=1
19537   if test "$4"; then
19538     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19539     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19540   fi
19541   $as_echo "$as_me: error: $2" >&2
19542   as_fn_exit $as_status
19543 } # as_fn_error
19544
19545
19546 # as_fn_set_status STATUS
19547 # -----------------------
19548 # Set $? to STATUS, without forking.
19549 as_fn_set_status ()
19550 {
19551   return $1
19552 } # as_fn_set_status
19553
19554 # as_fn_exit STATUS
19555 # -----------------
19556 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19557 as_fn_exit ()
19558 {
19559   set +e
19560   as_fn_set_status $1
19561   exit $1
19562 } # as_fn_exit
19563
19564 # as_fn_unset VAR
19565 # ---------------
19566 # Portably unset VAR.
19567 as_fn_unset ()
19568 {
19569   { eval $1=; unset $1;}
19570 }
19571 as_unset=as_fn_unset
19572 # as_fn_append VAR VALUE
19573 # ----------------------
19574 # Append the text in VALUE to the end of the definition contained in VAR. Take
19575 # advantage of any shell optimizations that allow amortized linear growth over
19576 # repeated appends, instead of the typical quadratic growth present in naive
19577 # implementations.
19578 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19579   eval 'as_fn_append ()
19580   {
19581     eval $1+=\$2
19582   }'
19583 else
19584   as_fn_append ()
19585   {
19586     eval $1=\$$1\$2
19587   }
19588 fi # as_fn_append
19589
19590 # as_fn_arith ARG...
19591 # ------------------
19592 # Perform arithmetic evaluation on the ARGs, and store the result in the
19593 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19594 # must be portable across $(()) and expr.
19595 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19596   eval 'as_fn_arith ()
19597   {
19598     as_val=$(( $* ))
19599   }'
19600 else
19601   as_fn_arith ()
19602   {
19603     as_val=`expr "$@" || test $? -eq 1`
19604   }
19605 fi # as_fn_arith
19606
19607
19608 if expr a : '\(a\)' >/dev/null 2>&1 &&
19609    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19610   as_expr=expr
19611 else
19612   as_expr=false
19613 fi
19614
19615 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19616   as_basename=basename
19617 else
19618   as_basename=false
19619 fi
19620
19621 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19622   as_dirname=dirname
19623 else
19624   as_dirname=false
19625 fi
19626
19627 as_me=`$as_basename -- "$0" ||
19628 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19629          X"$0" : 'X\(//\)$' \| \
19630          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19631 $as_echo X/"$0" |
19632     sed '/^.*\/\([^/][^/]*\)\/*$/{
19633             s//\1/
19634             q
19635           }
19636           /^X\/\(\/\/\)$/{
19637             s//\1/
19638             q
19639           }
19640           /^X\/\(\/\).*/{
19641             s//\1/
19642             q
19643           }
19644           s/.*/./; q'`
19645
19646 # Avoid depending upon Character Ranges.
19647 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19648 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19649 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19650 as_cr_digits='0123456789'
19651 as_cr_alnum=$as_cr_Letters$as_cr_digits
19652
19653 ECHO_C= ECHO_N= ECHO_T=
19654 case `echo -n x` in #(((((
19655 -n*)
19656   case `echo 'xy\c'` in
19657   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19658   xy)  ECHO_C='\c';;
19659   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19660        ECHO_T=' ';;
19661   esac;;
19662 *)
19663   ECHO_N='-n';;
19664 esac
19665
19666 rm -f conf$$ conf$$.exe conf$$.file
19667 if test -d conf$$.dir; then
19668   rm -f conf$$.dir/conf$$.file
19669 else
19670   rm -f conf$$.dir
19671   mkdir conf$$.dir 2>/dev/null
19672 fi
19673 if (echo >conf$$.file) 2>/dev/null; then
19674   if ln -s conf$$.file conf$$ 2>/dev/null; then
19675     as_ln_s='ln -s'
19676     # ... but there are two gotchas:
19677     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19678     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19679     # In both cases, we have to default to `cp -pR'.
19680     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19681       as_ln_s='cp -pR'
19682   elif ln conf$$.file conf$$ 2>/dev/null; then
19683     as_ln_s=ln
19684   else
19685     as_ln_s='cp -pR'
19686   fi
19687 else
19688   as_ln_s='cp -pR'
19689 fi
19690 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19691 rmdir conf$$.dir 2>/dev/null
19692
19693
19694 # as_fn_mkdir_p
19695 # -------------
19696 # Create "$as_dir" as a directory, including parents if necessary.
19697 as_fn_mkdir_p ()
19698 {
19699
19700   case $as_dir in #(
19701   -*) as_dir=./$as_dir;;
19702   esac
19703   test -d "$as_dir" || eval $as_mkdir_p || {
19704     as_dirs=
19705     while :; do
19706       case $as_dir in #(
19707       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19708       *) as_qdir=$as_dir;;
19709       esac
19710       as_dirs="'$as_qdir' $as_dirs"
19711       as_dir=`$as_dirname -- "$as_dir" ||
19712 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19713          X"$as_dir" : 'X\(//\)[^/]' \| \
19714          X"$as_dir" : 'X\(//\)$' \| \
19715          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19716 $as_echo X"$as_dir" |
19717     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19718             s//\1/
19719             q
19720           }
19721           /^X\(\/\/\)[^/].*/{
19722             s//\1/
19723             q
19724           }
19725           /^X\(\/\/\)$/{
19726             s//\1/
19727             q
19728           }
19729           /^X\(\/\).*/{
19730             s//\1/
19731             q
19732           }
19733           s/.*/./; q'`
19734       test -d "$as_dir" && break
19735     done
19736     test -z "$as_dirs" || eval "mkdir $as_dirs"
19737   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19738
19739
19740 } # as_fn_mkdir_p
19741 if mkdir -p . 2>/dev/null; then
19742   as_mkdir_p='mkdir -p "$as_dir"'
19743 else
19744   test -d ./-p && rmdir ./-p
19745   as_mkdir_p=false
19746 fi
19747
19748
19749 # as_fn_executable_p FILE
19750 # -----------------------
19751 # Test if FILE is an executable regular file.
19752 as_fn_executable_p ()
19753 {
19754   test -f "$1" && test -x "$1"
19755 } # as_fn_executable_p
19756 as_test_x='test -x'
19757 as_executable_p=as_fn_executable_p
19758
19759 # Sed expression to map a string onto a valid CPP name.
19760 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19761
19762 # Sed expression to map a string onto a valid variable name.
19763 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19764
19765
19766 exec 6>&1
19767 ## ----------------------------------- ##
19768 ## Main body of $CONFIG_STATUS script. ##
19769 ## ----------------------------------- ##
19770 _ASEOF
19771 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19772
19773 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19774 # Save the log message, to keep $0 and so on meaningful, and to
19775 # report actual input values of CONFIG_FILES etc. instead of their
19776 # values after options handling.
19777 ac_log="
19778 This file was extended by PostgreSQL $as_me 13devel, which was
19779 generated by GNU Autoconf 2.69.  Invocation command line was
19780
19781   CONFIG_FILES    = $CONFIG_FILES
19782   CONFIG_HEADERS  = $CONFIG_HEADERS
19783   CONFIG_LINKS    = $CONFIG_LINKS
19784   CONFIG_COMMANDS = $CONFIG_COMMANDS
19785   $ $0 $@
19786
19787 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19788 "
19789
19790 _ACEOF
19791
19792 case $ac_config_files in *"
19793 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19794 esac
19795
19796 case $ac_config_headers in *"
19797 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19798 esac
19799
19800
19801 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19802 # Files that config.status was made for.
19803 config_files="$ac_config_files"
19804 config_headers="$ac_config_headers"
19805 config_links="$ac_config_links"
19806 config_commands="$ac_config_commands"
19807
19808 _ACEOF
19809
19810 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19811 ac_cs_usage="\
19812 \`$as_me' instantiates files and other configuration actions
19813 from templates according to the current configuration.  Unless the files
19814 and actions are specified as TAGs, all are instantiated by default.
19815
19816 Usage: $0 [OPTION]... [TAG]...
19817
19818   -h, --help       print this help, then exit
19819   -V, --version    print version number and configuration settings, then exit
19820       --config     print configuration, then exit
19821   -q, --quiet, --silent
19822                    do not print progress messages
19823   -d, --debug      don't remove temporary files
19824       --recheck    update $as_me by reconfiguring in the same conditions
19825       --file=FILE[:TEMPLATE]
19826                    instantiate the configuration file FILE
19827       --header=FILE[:TEMPLATE]
19828                    instantiate the configuration header FILE
19829
19830 Configuration files:
19831 $config_files
19832
19833 Configuration headers:
19834 $config_headers
19835
19836 Configuration links:
19837 $config_links
19838
19839 Configuration commands:
19840 $config_commands
19841
19842 Report bugs to <pgsql-bugs@lists.postgresql.org>."
19843
19844 _ACEOF
19845 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19846 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19847 ac_cs_version="\\
19848 PostgreSQL config.status 13devel
19849 configured by $0, generated by GNU Autoconf 2.69,
19850   with options \\"\$ac_cs_config\\"
19851
19852 Copyright (C) 2012 Free Software Foundation, Inc.
19853 This config.status script is free software; the Free Software Foundation
19854 gives unlimited permission to copy, distribute and modify it."
19855
19856 ac_pwd='$ac_pwd'
19857 srcdir='$srcdir'
19858 INSTALL='$INSTALL'
19859 MKDIR_P='$MKDIR_P'
19860 AWK='$AWK'
19861 test -n "\$AWK" || AWK=awk
19862 _ACEOF
19863
19864 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19865 # The default lists apply if the user does not specify any file.
19866 ac_need_defaults=:
19867 while test $# != 0
19868 do
19869   case $1 in
19870   --*=?*)
19871     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19872     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19873     ac_shift=:
19874     ;;
19875   --*=)
19876     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19877     ac_optarg=
19878     ac_shift=:
19879     ;;
19880   *)
19881     ac_option=$1
19882     ac_optarg=$2
19883     ac_shift=shift
19884     ;;
19885   esac
19886
19887   case $ac_option in
19888   # Handling of the options.
19889   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19890     ac_cs_recheck=: ;;
19891   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19892     $as_echo "$ac_cs_version"; exit ;;
19893   --config | --confi | --conf | --con | --co | --c )
19894     $as_echo "$ac_cs_config"; exit ;;
19895   --debug | --debu | --deb | --de | --d | -d )
19896     debug=: ;;
19897   --file | --fil | --fi | --f )
19898     $ac_shift
19899     case $ac_optarg in
19900     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19901     '') as_fn_error $? "missing file argument" ;;
19902     esac
19903     as_fn_append CONFIG_FILES " '$ac_optarg'"
19904     ac_need_defaults=false;;
19905   --header | --heade | --head | --hea )
19906     $ac_shift
19907     case $ac_optarg in
19908     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19909     esac
19910     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19911     ac_need_defaults=false;;
19912   --he | --h)
19913     # Conflict between --help and --header
19914     as_fn_error $? "ambiguous option: \`$1'
19915 Try \`$0 --help' for more information.";;
19916   --help | --hel | -h )
19917     $as_echo "$ac_cs_usage"; exit ;;
19918   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19919   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19920     ac_cs_silent=: ;;
19921
19922   # This is an error.
19923   -*) as_fn_error $? "unrecognized option: \`$1'
19924 Try \`$0 --help' for more information." ;;
19925
19926   *) as_fn_append ac_config_targets " $1"
19927      ac_need_defaults=false ;;
19928
19929   esac
19930   shift
19931 done
19932
19933 ac_configure_extra_args=
19934
19935 if $ac_cs_silent; then
19936   exec 6>/dev/null
19937   ac_configure_extra_args="$ac_configure_extra_args --silent"
19938 fi
19939
19940 _ACEOF
19941 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19942 if \$ac_cs_recheck; then
19943   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19944   shift
19945   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19946   CONFIG_SHELL='$SHELL'
19947   export CONFIG_SHELL
19948   exec "\$@"
19949 fi
19950
19951 _ACEOF
19952 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19953 exec 5>>config.log
19954 {
19955   echo
19956   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19957 ## Running $as_me. ##
19958 _ASBOX
19959   $as_echo "$ac_log"
19960 } >&5
19961
19962 _ACEOF
19963 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19964 _ACEOF
19965
19966 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19967
19968 # Handling of arguments.
19969 for ac_config_target in $ac_config_targets
19970 do
19971   case $ac_config_target in
19972     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19973     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19974     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19975     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19976     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19977     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19978     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19979     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19980     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19981     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19982     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19983
19984   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19985   esac
19986 done
19987
19988
19989 # If the user did not use the arguments to specify the items to instantiate,
19990 # then the envvar interface is used.  Set only those that are not.
19991 # We use the long form for the default assignment because of an extremely
19992 # bizarre bug on SunOS 4.1.3.
19993 if $ac_need_defaults; then
19994   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19995   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19996   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19997   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19998 fi
19999
20000 # Have a temporary directory for convenience.  Make it in the build tree
20001 # simply because there is no reason against having it here, and in addition,
20002 # creating and moving files from /tmp can sometimes cause problems.
20003 # Hook for its removal unless debugging.
20004 # Note that there is a small window in which the directory will not be cleaned:
20005 # after its creation but before its name has been assigned to `$tmp'.
20006 $debug ||
20007 {
20008   tmp= ac_tmp=
20009   trap 'exit_status=$?
20010   : "${ac_tmp:=$tmp}"
20011   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20012 ' 0
20013   trap 'as_fn_exit 1' 1 2 13 15
20014 }
20015 # Create a (secure) tmp directory for tmp files.
20016
20017 {
20018   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20019   test -d "$tmp"
20020 }  ||
20021 {
20022   tmp=./conf$$-$RANDOM
20023   (umask 077 && mkdir "$tmp")
20024 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20025 ac_tmp=$tmp
20026
20027 # Set up the scripts for CONFIG_FILES section.
20028 # No need to generate them if there are no CONFIG_FILES.
20029 # This happens for instance with `./config.status config.h'.
20030 if test -n "$CONFIG_FILES"; then
20031
20032
20033 ac_cr=`echo X | tr X '\015'`
20034 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20035 # But we know of no other shell where ac_cr would be empty at this
20036 # point, so we can use a bashism as a fallback.
20037 if test "x$ac_cr" = x; then
20038   eval ac_cr=\$\'\\r\'
20039 fi
20040 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20041 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20042   ac_cs_awk_cr='\\r'
20043 else
20044   ac_cs_awk_cr=$ac_cr
20045 fi
20046
20047 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20048 _ACEOF
20049
20050
20051 {
20052   echo "cat >conf$$subs.awk <<_ACEOF" &&
20053   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20054   echo "_ACEOF"
20055 } >conf$$subs.sh ||
20056   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20057 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20058 ac_delim='%!_!# '
20059 for ac_last_try in false false false false false :; do
20060   . ./conf$$subs.sh ||
20061     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20062
20063   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20064   if test $ac_delim_n = $ac_delim_num; then
20065     break
20066   elif $ac_last_try; then
20067     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20068   else
20069     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20070   fi
20071 done
20072 rm -f conf$$subs.sh
20073
20074 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20075 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20076 _ACEOF
20077 sed -n '
20078 h
20079 s/^/S["/; s/!.*/"]=/
20080 p
20081 g
20082 s/^[^!]*!//
20083 :repl
20084 t repl
20085 s/'"$ac_delim"'$//
20086 t delim
20087 :nl
20088 h
20089 s/\(.\{148\}\)..*/\1/
20090 t more1
20091 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20092 p
20093 n
20094 b repl
20095 :more1
20096 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20097 p
20098 g
20099 s/.\{148\}//
20100 t nl
20101 :delim
20102 h
20103 s/\(.\{148\}\)..*/\1/
20104 t more2
20105 s/["\\]/\\&/g; s/^/"/; s/$/"/
20106 p
20107 b
20108 :more2
20109 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20110 p
20111 g
20112 s/.\{148\}//
20113 t delim
20114 ' <conf$$subs.awk | sed '
20115 /^[^""]/{
20116   N
20117   s/\n//
20118 }
20119 ' >>$CONFIG_STATUS || ac_write_fail=1
20120 rm -f conf$$subs.awk
20121 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20122 _ACAWK
20123 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20124   for (key in S) S_is_set[key] = 1
20125   FS = "\a"
20126
20127 }
20128 {
20129   line = $ 0
20130   nfields = split(line, field, "@")
20131   substed = 0
20132   len = length(field[1])
20133   for (i = 2; i < nfields; i++) {
20134     key = field[i]
20135     keylen = length(key)
20136     if (S_is_set[key]) {
20137       value = S[key]
20138       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20139       len += length(value) + length(field[++i])
20140       substed = 1
20141     } else
20142       len += 1 + keylen
20143   }
20144
20145   print line
20146 }
20147
20148 _ACAWK
20149 _ACEOF
20150 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20151 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20152   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20153 else
20154   cat
20155 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20156   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20157 _ACEOF
20158
20159 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20160 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20161 # trailing colons and then remove the whole line if VPATH becomes empty
20162 # (actually we leave an empty line to preserve line numbers).
20163 if test "x$srcdir" = x.; then
20164   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
20165 h
20166 s///
20167 s/^/:/
20168 s/[      ]*$/:/
20169 s/:\$(srcdir):/:/g
20170 s/:\${srcdir}:/:/g
20171 s/:@srcdir@:/:/g
20172 s/^:*//
20173 s/:*$//
20174 x
20175 s/\(=[   ]*\).*/\1/
20176 G
20177 s/\n//
20178 s/^[^=]*=[       ]*$//
20179 }'
20180 fi
20181
20182 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20183 fi # test -n "$CONFIG_FILES"
20184
20185 # Set up the scripts for CONFIG_HEADERS section.
20186 # No need to generate them if there are no CONFIG_HEADERS.
20187 # This happens for instance with `./config.status Makefile'.
20188 if test -n "$CONFIG_HEADERS"; then
20189 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20190 BEGIN {
20191 _ACEOF
20192
20193 # Transform confdefs.h into an awk script `defines.awk', embedded as
20194 # here-document in config.status, that substitutes the proper values into
20195 # config.h.in to produce config.h.
20196
20197 # Create a delimiter string that does not exist in confdefs.h, to ease
20198 # handling of long lines.
20199 ac_delim='%!_!# '
20200 for ac_last_try in false false :; do
20201   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20202   if test -z "$ac_tt"; then
20203     break
20204   elif $ac_last_try; then
20205     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20206   else
20207     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20208   fi
20209 done
20210
20211 # For the awk script, D is an array of macro values keyed by name,
20212 # likewise P contains macro parameters if any.  Preserve backslash
20213 # newline sequences.
20214
20215 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20216 sed -n '
20217 s/.\{148\}/&'"$ac_delim"'/g
20218 t rset
20219 :rset
20220 s/^[     ]*#[    ]*define[       ][      ]*/ /
20221 t def
20222 d
20223 :def
20224 s/\\$//
20225 t bsnl
20226 s/["\\]/\\&/g
20227 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20228 D["\1"]=" \3"/p
20229 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
20230 d
20231 :bsnl
20232 s/["\\]/\\&/g
20233 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20234 D["\1"]=" \3\\\\\\n"\\/p
20235 t cont
20236 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20237 t cont
20238 d
20239 :cont
20240 n
20241 s/.\{148\}/&'"$ac_delim"'/g
20242 t clear
20243 :clear
20244 s/\\$//
20245 t bsnlc
20246 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20247 d
20248 :bsnlc
20249 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20250 b cont
20251 ' <confdefs.h | sed '
20252 s/'"$ac_delim"'/"\\\
20253 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20254
20255 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20256   for (key in D) D_is_set[key] = 1
20257   FS = "\a"
20258 }
20259 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20260   line = \$ 0
20261   split(line, arg, " ")
20262   if (arg[1] == "#") {
20263     defundef = arg[2]
20264     mac1 = arg[3]
20265   } else {
20266     defundef = substr(arg[1], 2)
20267     mac1 = arg[2]
20268   }
20269   split(mac1, mac2, "(") #)
20270   macro = mac2[1]
20271   prefix = substr(line, 1, index(line, defundef) - 1)
20272   if (D_is_set[macro]) {
20273     # Preserve the white space surrounding the "#".
20274     print prefix "define", macro P[macro] D[macro]
20275     next
20276   } else {
20277     # Replace #undef with comments.  This is necessary, for example,
20278     # in the case of _POSIX_SOURCE, which is predefined and required
20279     # on some systems where configure will not decide to define it.
20280     if (defundef == "undef") {
20281       print "/*", prefix defundef, macro, "*/"
20282       next
20283     }
20284   }
20285 }
20286 { print }
20287 _ACAWK
20288 _ACEOF
20289 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20290   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20291 fi # test -n "$CONFIG_HEADERS"
20292
20293
20294 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20295 shift
20296 for ac_tag
20297 do
20298   case $ac_tag in
20299   :[FHLC]) ac_mode=$ac_tag; continue;;
20300   esac
20301   case $ac_mode$ac_tag in
20302   :[FHL]*:*);;
20303   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20304   :[FH]-) ac_tag=-:-;;
20305   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20306   esac
20307   ac_save_IFS=$IFS
20308   IFS=:
20309   set x $ac_tag
20310   IFS=$ac_save_IFS
20311   shift
20312   ac_file=$1
20313   shift
20314
20315   case $ac_mode in
20316   :L) ac_source=$1;;
20317   :[FH])
20318     ac_file_inputs=
20319     for ac_f
20320     do
20321       case $ac_f in
20322       -) ac_f="$ac_tmp/stdin";;
20323       *) # Look for the file first in the build tree, then in the source tree
20324          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20325          # because $ac_f cannot contain `:'.
20326          test -f "$ac_f" ||
20327            case $ac_f in
20328            [\\/$]*) false;;
20329            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20330            esac ||
20331            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20332       esac
20333       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20334       as_fn_append ac_file_inputs " '$ac_f'"
20335     done
20336
20337     # Let's still pretend it is `configure' which instantiates (i.e., don't
20338     # use $as_me), people would be surprised to read:
20339     #    /* config.h.  Generated by config.status.  */
20340     configure_input='Generated from '`
20341           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20342         `' by configure.'
20343     if test x"$ac_file" != x-; then
20344       configure_input="$ac_file.  $configure_input"
20345       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20346 $as_echo "$as_me: creating $ac_file" >&6;}
20347     fi
20348     # Neutralize special characters interpreted by sed in replacement strings.
20349     case $configure_input in #(
20350     *\&* | *\|* | *\\* )
20351        ac_sed_conf_input=`$as_echo "$configure_input" |
20352        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20353     *) ac_sed_conf_input=$configure_input;;
20354     esac
20355
20356     case $ac_tag in
20357     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20358       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20359     esac
20360     ;;
20361   esac
20362
20363   ac_dir=`$as_dirname -- "$ac_file" ||
20364 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20365          X"$ac_file" : 'X\(//\)[^/]' \| \
20366          X"$ac_file" : 'X\(//\)$' \| \
20367          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20368 $as_echo X"$ac_file" |
20369     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20370             s//\1/
20371             q
20372           }
20373           /^X\(\/\/\)[^/].*/{
20374             s//\1/
20375             q
20376           }
20377           /^X\(\/\/\)$/{
20378             s//\1/
20379             q
20380           }
20381           /^X\(\/\).*/{
20382             s//\1/
20383             q
20384           }
20385           s/.*/./; q'`
20386   as_dir="$ac_dir"; as_fn_mkdir_p
20387   ac_builddir=.
20388
20389 case "$ac_dir" in
20390 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20391 *)
20392   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20393   # A ".." for each directory in $ac_dir_suffix.
20394   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20395   case $ac_top_builddir_sub in
20396   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20397   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20398   esac ;;
20399 esac
20400 ac_abs_top_builddir=$ac_pwd
20401 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20402 # for backward compatibility:
20403 ac_top_builddir=$ac_top_build_prefix
20404
20405 case $srcdir in
20406   .)  # We are building in place.
20407     ac_srcdir=.
20408     ac_top_srcdir=$ac_top_builddir_sub
20409     ac_abs_top_srcdir=$ac_pwd ;;
20410   [\\/]* | ?:[\\/]* )  # Absolute name.
20411     ac_srcdir=$srcdir$ac_dir_suffix;
20412     ac_top_srcdir=$srcdir
20413     ac_abs_top_srcdir=$srcdir ;;
20414   *) # Relative name.
20415     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20416     ac_top_srcdir=$ac_top_build_prefix$srcdir
20417     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20418 esac
20419 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20420
20421
20422   case $ac_mode in
20423   :F)
20424   #
20425   # CONFIG_FILE
20426   #
20427
20428   case $INSTALL in
20429   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20430   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20431   esac
20432   ac_MKDIR_P=$MKDIR_P
20433   case $MKDIR_P in
20434   [\\/$]* | ?:[\\/]* ) ;;
20435   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20436   esac
20437 _ACEOF
20438
20439 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20440 # If the template does not know about datarootdir, expand it.
20441 # FIXME: This hack should be removed a few years after 2.60.
20442 ac_datarootdir_hack=; ac_datarootdir_seen=
20443 ac_sed_dataroot='
20444 /datarootdir/ {
20445   p
20446   q
20447 }
20448 /@datadir@/p
20449 /@docdir@/p
20450 /@infodir@/p
20451 /@localedir@/p
20452 /@mandir@/p'
20453 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20454 *datarootdir*) ac_datarootdir_seen=yes;;
20455 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20456   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20457 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20458 _ACEOF
20459 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20460   ac_datarootdir_hack='
20461   s&@datadir@&$datadir&g
20462   s&@docdir@&$docdir&g
20463   s&@infodir@&$infodir&g
20464   s&@localedir@&$localedir&g
20465   s&@mandir@&$mandir&g
20466   s&\\\${datarootdir}&$datarootdir&g' ;;
20467 esac
20468 _ACEOF
20469
20470 # Neutralize VPATH when `$srcdir' = `.'.
20471 # Shell code in configure.ac might set extrasub.
20472 # FIXME: do we really want to maintain this feature?
20473 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20474 ac_sed_extra="$ac_vpsub
20475 $extrasub
20476 _ACEOF
20477 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20478 :t
20479 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20480 s|@configure_input@|$ac_sed_conf_input|;t t
20481 s&@top_builddir@&$ac_top_builddir_sub&;t t
20482 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20483 s&@srcdir@&$ac_srcdir&;t t
20484 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20485 s&@top_srcdir@&$ac_top_srcdir&;t t
20486 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20487 s&@builddir@&$ac_builddir&;t t
20488 s&@abs_builddir@&$ac_abs_builddir&;t t
20489 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20490 s&@INSTALL@&$ac_INSTALL&;t t
20491 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20492 $ac_datarootdir_hack
20493 "
20494 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20495   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20496
20497 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20498   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20499   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20500       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20501   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20502 which seems to be undefined.  Please make sure it is defined" >&5
20503 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20504 which seems to be undefined.  Please make sure it is defined" >&2;}
20505
20506   rm -f "$ac_tmp/stdin"
20507   case $ac_file in
20508   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20509   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20510   esac \
20511   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20512  ;;
20513   :H)
20514   #
20515   # CONFIG_HEADER
20516   #
20517   if test x"$ac_file" != x-; then
20518     {
20519       $as_echo "/* $configure_input  */" \
20520       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20521     } >"$ac_tmp/config.h" \
20522       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20523     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20524       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20525 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20526     else
20527       rm -f "$ac_file"
20528       mv "$ac_tmp/config.h" "$ac_file" \
20529         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20530     fi
20531   else
20532     $as_echo "/* $configure_input  */" \
20533       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20534       || as_fn_error $? "could not create -" "$LINENO" 5
20535   fi
20536  ;;
20537   :L)
20538   #
20539   # CONFIG_LINK
20540   #
20541
20542   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20543     :
20544   else
20545     # Prefer the file from the source tree if names are identical.
20546     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20547       ac_source=$srcdir/$ac_source
20548     fi
20549
20550     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20551 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20552
20553     if test ! -r "$ac_source"; then
20554       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20555     fi
20556     rm -f "$ac_file"
20557
20558     # Try a relative symlink, then a hard link, then a copy.
20559     case $ac_source in
20560     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20561         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20562     esac
20563     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20564       ln "$ac_source" "$ac_file" 2>/dev/null ||
20565       cp -p "$ac_source" "$ac_file" ||
20566       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20567   fi
20568  ;;
20569   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20570 $as_echo "$as_me: executing $ac_file commands" >&6;}
20571  ;;
20572   esac
20573
20574
20575   case $ac_file$ac_mode in
20576     "check_win32_symlinks":C)
20577 # Links sometimes fail undetected on Mingw -
20578 # so here we detect it and warn the user
20579 for FILE in $CONFIG_LINKS
20580  do
20581         # test -e works for symlinks in the MinGW console
20582         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20583 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20584  done
20585  ;;
20586     "src/include/pg_config.h":H)
20587 # Update timestamp for pg_config.h (see Makefile.global)
20588 echo >src/include/stamp-h
20589  ;;
20590     "src/include/pg_config_ext.h":H)
20591 # Update timestamp for pg_config_ext.h (see Makefile.global)
20592 echo >src/include/stamp-ext-h
20593  ;;
20594     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20595
20596   esac
20597 done # for ac_tag
20598
20599
20600 as_fn_exit 0
20601 _ACEOF
20602 ac_clean_files=$ac_clean_files_save
20603
20604 test $ac_write_fail = 0 ||
20605   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20606
20607
20608 # configure is writing to config.log, and then calls config.status.
20609 # config.status does its own redirection, appending to config.log.
20610 # Unfortunately, on DOS this fails, as config.log is still kept open
20611 # by configure, so config.status won't be able to write to it; its
20612 # output is simply discarded.  So we exec the FD to /dev/null,
20613 # effectively closing config.log, so it can be properly (re)opened and
20614 # appended to by config.status.  When coming back to configure, we
20615 # need to make the FD available again.
20616 if test "$no_create" != yes; then
20617   ac_cs_success=:
20618   ac_config_status_args=
20619   test "$silent" = yes &&
20620     ac_config_status_args="$ac_config_status_args --quiet"
20621   exec 5>/dev/null
20622   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20623   exec 5>>config.log
20624   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20625   # would make configure fail if this is the last instruction.
20626   $ac_cs_success || as_fn_exit 1
20627 fi
20628 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20629   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20630 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20631 fi
20632